From patchwork Fri Sep 17 11:02:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 1529343 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=n2HsPekI; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9rf957Dkz9sW4 for ; Fri, 17 Sep 2021 21:03:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 599C0831EE; Fri, 17 Sep 2021 13:03:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.b="n2HsPekI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA05F83208; Fri, 17 Sep 2021 13:02:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7B7C5829FC for ; Fri, 17 Sep 2021 13:02:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=wqu@suse.com Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4201D222E9 for ; Fri, 17 Sep 2021 11:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631876574; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=AqJveOI1tEGnVKOh23v5pg7mnDDFv/MX6IHbVFok/Q0=; b=n2HsPekIi1YmP8XgJaTomuu8JJSrs6AcH8WOPM08maZ7uEIuzTXFIWG/JXjisZAdSnDBtn qWTMrKjVuv66S75U9KJVxZKqUgxywWEjFPqQkNYPKJL6ItQRG7ToGwNCD6Jz2hzL8HuCfO NbaU09ErX5dJgLSS+A4bEEIDZo35BLY= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7AE8814063 for ; Fri, 17 Sep 2021 11:02:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id z2tsD911RGEwFAAAMHmgww (envelope-from ) for ; Fri, 17 Sep 2021 11:02:53 +0000 From: Qu Wenruo To: u-boot@lists.denx.de Subject: [PATCH] distro_bootcmd: change the default dtb search path to include default kernel dtbs directory Date: Fri, 17 Sep 2021 19:02:35 +0800 Message-Id: <20210917110235.63885-1-wqu@suse.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean When booting using U-boot -> systemd-boot (EFI payload) -> kernel on RK3399, systemd-boot by some bug can't execute its "devicetree" key correctly to load its proper dtb from files. In that case, it will use fallback dtb from U-boot, which can be out-of-date, and on RK3399, even the latest U-boot contains out-of-date dtb which can cause problems like invalid opp tables. And for systemd-boot, it doesn't provide any board specific dtb, but completely relies on the EFI environment provided by U-boot, thus if we can't find a good dtb, the fallback one will be used anyway. So this patch will workaround the problem by appending common linux dtbs directory to the existing "efi_dtb_prefixes" so that for systemd-boot it can use the existing fdt and boot properly. Signed-off-by: Qu Wenruo --- include/config_distro_bootcmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 2627c2a6a541..4ec87483eb65 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -151,7 +151,7 @@ "load ${devtype} ${devnum}:${distro_bootpart} " \ "${fdt_addr_r} ${prefix}${efi_fdtfile}\0" \ \ - "efi_dtb_prefixes=/ /dtb/ /dtb/current/\0" \ + "efi_dtb_prefixes=/ /dtb/ /dtb/current/ /dtbs/ /dtbs/current/\0" \ "scan_dev_for_efi=" \ "setenv efi_fdtfile ${fdtfile}; " \ BOOTENV_EFI_SET_FDTFILE_FALLBACK \