2023.10, initial pass at DT detection fix

This commit is contained in:
Peter Robinson 2023-10-21 10:16:31 +01:00
parent 4798befe95
commit 6cd0d073d6
7 changed files with 772 additions and 914 deletions

View File

@ -3947,7 +3947,6 @@ Changes in v5:
Changes in v4:
- Add patch "video: Enable VIDEO_DAMAGE for drivers that need it"
arch/arm/mach-omap2/omap3/Kconfig | 1 +
arch/arm/mach-sunxi/Kconfig | 1 +
drivers/video/Kconfig | 8 ++++++++
drivers/video/exynos/Kconfig | 1 +
@ -3959,18 +3958,6 @@ Changes in v4:
drivers/video/tidss/Kconfig | 1 +
10 files changed, 17 insertions(+)
diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig
index 671e4791c67f..fd858f7b50f2 100644
--- a/arch/arm/mach-omap2/omap3/Kconfig
+++ b/arch/arm/mach-omap2/omap3/Kconfig
@@ -113,6 +113,7 @@ config TARGET_NOKIA_RX51
select CMDLINE_TAG
select INITRD_TAG
select REVISION_TAG
+ imply VIDEO_DAMAGE
config TARGET_TAO3530
bool "TAO3530"
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 9d5df2c10273..fb4478ea32e8 100644
--- a/arch/arm/mach-sunxi/Kconfig

View File

@ -76,8 +76,6 @@ rock-pi-n10-rk3399pro
rockpro64-rk3399
roc-pc-mezzanine-rk3399
roc-pc-rk3399
rpi_3
rpi_4
rpi_arm64
sopine_baseboard
starqltechn

View File

@ -0,0 +1,213 @@
From patchwork Sat Sep 23 20:50:15 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Patchwork-Submitter: Simon Glass <sjg@chromium.org>
X-Patchwork-Id: 1838641
X-Patchwork-Delegate: sjg@chromium.org
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (1024-bit key;
unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256
header.s=google header.b=KG3aXwv5;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=85.214.62.61; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de [85.214.62.61])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4RtLr82vCNz1ynH
for <incoming@patchwork.ozlabs.org>; Sun, 24 Sep 2023 06:50:30 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id C5750868D8;
Sat, 23 Sep 2023 22:50:24 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
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=chromium.org header.i=@chromium.org
header.b="KG3aXwv5";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id E66458698D; Sat, 23 Sep 2023 22:50:23 +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,DKIMWL_WL_HIGH,
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 mail-io1-xd35.google.com (mail-io1-xd35.google.com
[IPv6:2607:f8b0:4864:20::d35])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 739828684C
for <u-boot@lists.denx.de>; Sat, 23 Sep 2023 22:50:21 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sjg@chromium.org
Received: by mail-io1-xd35.google.com with SMTP id
ca18e2360f4ac-79fa4ff8220so82788439f.3
for <u-boot@lists.denx.de>; Sat, 23 Sep 2023 13:50:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1695502220; x=1696107020; darn=lists.denx.de;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=fcy5WkVBoc7uoRrzJTdjAvllGuUSUwfIiQ5P7MPqanU=;
b=KG3aXwv5HvtWYkt2G7n3DcwAsa2xdEa6uyrBRWhucS+3OUN5eZ79edhY+dVDuwuEAL
I/Ci/8cflRdX1s9cv7mPYw2tXHkWnudM3Jwyw+72113wGGZG+e1q9i0wvb+MmxxK4lDM
ApdxnzfJunDfWMC4zu0PhcdG39ZcuC82Ezgcc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1695502220; x=1696107020;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=fcy5WkVBoc7uoRrzJTdjAvllGuUSUwfIiQ5P7MPqanU=;
b=UNAm2llXUYdkTNewaIJpX2/kKkDsigJYBX1Ch147g7NChNygnu0Glr6Ya3Cw6WpHIG
OzXCeyakwC/pjiea0NTxHVU01HvJOlAiZwBZoQMMnavjUuSAdMqDCSLIndWzRhOARHfS
ksVozUDoXyyT/gV0XsaczFQgdgBImzMU7OR4NRnNalhSl2iZqYqt/TJ3Ftciv0KfxrcB
CrNKVLlJySDCY+svy4oHY0uID6SHsIAGjKBEAE1x9VhZ1jtpTJE4Zzrqa4nrrt+oEgus
A44BAwUrpks5SSMYfllyvb2A/OavxCiknMLIS7ENPr4izxS2EvAZcqH0KhFUUzD5aDXf
XmKg==
X-Gm-Message-State: AOJu0YwjY6Rk6HbA8DutFJQwzzA4q1TI/KwnuD1ZteWezSPjeMGyx26P
qvXFutS0QtYRlcVbGETlNS4BhMXg2YyAsItRSoI=
X-Google-Smtp-Source:
AGHT+IE/HwkByEI0cMcKWYghOMoUVXCzjV4a68DB17kNo1TCDUCCFa07idjIRi4hzVA51WQbE/JX/w==
X-Received: by 2002:a05:6e02:19cd:b0:34f:f5a4:3e68 with SMTP id
r13-20020a056e0219cd00b0034ff5a43e68mr4812478ill.30.1695502219881;
Sat, 23 Sep 2023 13:50:19 -0700 (PDT)
Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net.
[73.14.173.85]) by smtp.gmail.com with ESMTPSA id
i8-20020a056e020ec800b0034fda29890asm691408ilk.10.2023.09.23.13.50.19
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 23 Sep 2023 13:50:19 -0700 (PDT)
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Date Huang <tjjh89017@hotmail.com>, Tom Rini <trini@konsulko.com>,
=?utf-8?q?Vincent_Stehl=C3=A9?= <vincent.stehle@arm.com>,
Simon Glass <sjg@chromium.org>
Subject: [PATCH] bootstd: Scan all bootdevs in a boot_targets entry
Date: Sat, 23 Sep 2023 14:50:15 -0600
Message-ID: <20230923205017.1754340-1-sjg@chromium.org>
X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
When the boot_targets environment variable is used with the distro-boot
scripts, each device is included individually. For example, if there
are three mmc devices, then we will have something like:
boot_targets="mmc0 mmc1 mmc2"
In contrast, standard boot supports specifying just the uclass, i.e.:
boot_targets="mmc"
The intention is that this should scan all MMC devices, but in fact it
currently only scans the first.
Update the logic to handle this case, without required BOOTSTD_FULL to
be enabled.
I believe at least three people reported this, but I found two.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Date Huang <tjjh89017@hotmail.com>
Reported-by: Vincent Stehlé <vincent.stehle@arm.com>
---
boot/bootdev-uclass.c | 3 ++-
boot/bootflow.c | 21 +++++++++++++++++++--
test/boot/bootdev.c | 10 ++++++++++
3 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index fa52bc3a9c4e..5a60cf223c79 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -460,10 +460,11 @@ int bootdev_find_by_label(const char *label, struct udevice **devp,
* if no sequence number was provided, we must scan all
* bootdevs for this media uclass
*/
- if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && seq == -1)
+ if (seq == -1)
method_flags |= BOOTFLOW_METHF_SINGLE_UCLASS;
if (method_flagsp)
*method_flagsp = method_flags;
+ log_debug("method flags %x\n", method_flags);
return 0;
}
log_debug("- no device in %s\n", media->name);
diff --git a/boot/bootflow.c b/boot/bootflow.c
index 81b5829d5b37..74abf3e17d7e 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -260,8 +260,25 @@ static int iter_incr(struct bootflow_iter *iter)
} else {
log_debug("labels %p\n", iter->labels);
if (iter->labels) {
- ret = bootdev_next_label(iter, &dev,
- &method_flags);
+ /*
+ * when the label is "mmc" we want to scan all
+ * mmc bootdevs, not just the first. See
+ * bootdev_find_by_label() where this flag is
+ * set up
+ */
+ if (iter->method_flags & BOOTFLOW_METHF_SINGLE_UCLASS) {
+ uclass_next_device(&dev);
+ log_debug("looking for next device %s: %s\n",
+ iter->dev->name,
+ dev ? dev->name : "<none>");
+ } else {
+ dev = NULL;
+ }
+ if (!dev) {
+ log_debug("looking at next label\n");
+ ret = bootdev_next_label(iter, &dev,
+ &method_flags);
+ }
} else {
ret = bootdev_next_prio(iter, &dev);
method_flags = 0;
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c
index 6b29213416db..c5f14a7a1323 100644
--- a/test/boot/bootdev.c
+++ b/test/boot/bootdev.c
@@ -221,6 +221,16 @@ static int bootdev_test_order(struct unit_test_state *uts)
ut_asserteq_str("mmc2.bootdev", iter.dev_used[1]->name);
bootflow_iter_uninit(&iter);
+ /* Make sure it scans a bootdevs in each target */
+ ut_assertok(env_set("boot_targets", "mmc spi"));
+ ut_asserteq(0, bootflow_scan_first(NULL, NULL, &iter, 0, &bflow));
+ ut_asserteq(-ENODEV, bootflow_scan_next(&iter, &bflow));
+ ut_asserteq(3, iter.num_devs);
+ ut_asserteq_str("mmc2.bootdev", iter.dev_used[0]->name);
+ ut_asserteq_str("mmc1.bootdev", iter.dev_used[1]->name);
+ ut_asserteq_str("mmc0.bootdev", iter.dev_used[2]->name);
+ bootflow_iter_uninit(&iter);
+
return 0;
}
BOOTSTD_TEST(bootdev_test_order, UT_TESTF_DM | UT_TESTF_SCAN_FDT);

View File

@ -1,892 +0,0 @@
From patchwork Thu Jul 27 21:54:28 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Simon Glass <sjg@chromium.org>
X-Patchwork-Id: 1813968
X-Patchwork-Delegate: pbrobinson@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.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=<UNKNOWN>)
Authentication-Results: legolas.ozlabs.org;
dkim=pass (1024-bit key;
unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256
header.s=google header.b=N1JBl/Ip;
dkim-atps=neutral
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 ECDSA (P-384))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl1V3MSFz1yZb
for <incoming@patchwork.ozlabs.org>; Fri, 28 Jul 2023 07:55:10 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 29D6686883;
Thu, 27 Jul 2023 23:54:50 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
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=chromium.org header.i=@chromium.org
header.b="N1JBl/Ip";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id BFC74863EE; Thu, 27 Jul 2023 23:54:44 +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,DKIMWL_WL_HIGH,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,
SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no
version=3.4.2
Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com
[IPv6:2607:f8b0:4864:20::12d])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id A9CE3867A8
for <u-boot@lists.denx.de>; Thu, 27 Jul 2023 23:54:41 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sjg@chromium.org
Received: by mail-il1-x12d.google.com with SMTP id
e9e14a558f8ab-3466725f0beso6233385ab.1
for <u-boot@lists.denx.de>; Thu, 27 Jul 2023 14:54:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1690494880; x=1691099680;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=PfW4qtLSfZ+bnC9lQwrjMDVmboUSfVp8v4ohkW8rjNg=;
b=N1JBl/IpuUO0bR2jxCF4K6S6GW+xv1r7HlydRFhGC+Y0jR6zVXjPOQITlZBrwEARlk
THRvjpw5qRIedk0NNo/pQCKKQqruScbjKPYX1OBI4dK8j/HkC/GExnZkrzqJlvtCNqRi
vd32bzFnA0G7Sw/tWm/fMJuxGDvemFLzoLQgg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1690494880; x=1691099680;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=PfW4qtLSfZ+bnC9lQwrjMDVmboUSfVp8v4ohkW8rjNg=;
b=htLAMKMTT/T5aB5rrz1DwCj312u/yXPKNVhy1hUQl0xUxGmuV261y4snpFJIp92LWY
bPTp84aFfLtyyJhH6BRikYrtWYDX1XpPE35ADFLtlQMM5GIU9q0hkifkPd7abPqf9CjN
34tE1/jfbEQ9DVjGSSH+XObnLtGLjO2UX0/c9ws1veWcDD9e9lre0Tr0FdMyy+r4RdCC
V39BVGSWBW9Mr3+y6MVHLCblg21I+/bjRp2nviWmZbeJhx4cKepnzFGfm5KjWnIujj0D
Y86K9+ZBDN2NRnIyfK6oPrQqLMSObWKrzxurO93MsbUXmBc8FJqZwyN2XUixqo8t6Kso
pNvg==
X-Gm-Message-State: ABy/qLb0K45Zq6AUJT2FpWarTb3YBaFoeytG1lXRxYdhcArX6FKSUhG7
DkuKoL8etDw0hNEDFIyMz2KF4qEO37wmml3Qc3M=
X-Google-Smtp-Source:
APBJJlG54VUHOmyZVhkSmMpIiz5S/hblBzg2zwJFl+9fxJRZJWQN2zHspMrpRxc36G3YPyvYcXHJ4A==
X-Received: by 2002:a05:6e02:1ba5:b0:347:6f47:bb2 with SMTP id
n5-20020a056e021ba500b003476f470bb2mr889940ili.19.1690494880268;
Thu, 27 Jul 2023 14:54:40 -0700 (PDT)
Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85])
by smtp.gmail.com with ESMTPSA id
n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.39
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 27 Jul 2023 14:54:40 -0700 (PDT)
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Peter Robinson <pbrobinson@gmail.com>,
Simon Glass <sjg@chromium.org>, Albert Aribaud <albert.u.boot@aribaud.net>,
Matthias Brugger <mbrugger@suse.com>, Stephen Warren <swarren@nvidia.com>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: [RESEND PATCH v3 1/3] arm: rpi: Switch to standard boot
Date: Thu, 27 Jul 2023 15:54:28 -0600
Message-ID: <20230727215433.578830-2-sjg@chromium.org>
X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog
In-Reply-To: <20230727215433.578830-1-sjg@chromium.org>
References: <20230727215433.578830-1-sjg@chromium.org>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
Drop use of the distro scripts and use standard boot instead.
We don't need to specify the mmc devices individually, since they are
used in order from 0 to 2, and standard boot uses that order anyway.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v3:
- Rebase to -master
Changes in v2:
- Rebase to -next
configs/rpi_0_w_defconfig | 1 +
configs/rpi_2_defconfig | 1 +
configs/rpi_3_32b_defconfig | 1 +
configs/rpi_3_b_plus_defconfig | 1 +
configs/rpi_3_defconfig | 1 +
configs/rpi_4_32b_defconfig | 1 +
configs/rpi_4_defconfig | 1 +
configs/rpi_arm64_defconfig | 1 +
configs/rpi_defconfig | 1 +
include/configs/rpi.h | 38 ++--------------------------------
10 files changed, 11 insertions(+), 36 deletions(-)
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index 5da334a8bcf9..7554e671e2ca 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w"
CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index 990862160712..653f78bec1e8 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b"
CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index 80885aa9488d..305f1dacfd46 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
index 0acce8b883f8..f36f1258aa6d 100644
--- a/configs/rpi_3_b_plus_defconfig
+++ b/configs/rpi_3_b_plus_defconfig
@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b-plus"
CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index bb6fe128061b..a0d8be42537f 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
index f6213340971e..71f61c52e52d 100644
--- a/configs/rpi_4_32b_defconfig
+++ b/configs/rpi_4_32b_defconfig
@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_DM_RESET=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_PCI=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index bbc0fd6c649a..fa2c05da21e8 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_DM_RESET=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_PCI=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
index 5d9a273cb920..3e64573b70b1 100644
--- a/configs/rpi_arm64_defconfig
+++ b/configs/rpi_arm64_defconfig
@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_DM_RESET=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_PCI=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 550b8dcb9587..4b8e402c89d4 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b"
CONFIG_SYS_PROMPT="U-Boot> "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 4da982f73578..4160db2d8e14 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -122,47 +122,13 @@
"fdt_addr_r=0x02600000\0" \
"ramdisk_addr_r=0x02700000\0"
-#if IS_ENABLED(CONFIG_CMD_MMC)
- #define BOOT_TARGET_MMC(func) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 2)
-#else
- #define BOOT_TARGET_MMC(func)
-#endif
-
-#if IS_ENABLED(CONFIG_CMD_USB)
- #define BOOT_TARGET_USB(func) func(USB, usb, 0)
-#else
- #define BOOT_TARGET_USB(func)
-#endif
-
-#if CONFIG_IS_ENABLED(CMD_PXE)
- #define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
-#else
- #define BOOT_TARGET_PXE(func)
-#endif
-
-#if CONFIG_IS_ENABLED(CMD_DHCP)
- #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
-#else
- #define BOOT_TARGET_DHCP(func)
-#endif
-
-#define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_MMC(func) \
- BOOT_TARGET_USB(func) \
- BOOT_TARGET_PXE(func) \
- BOOT_TARGET_DHCP(func)
-
-#include <config_distro_bootcmd.h>
+#define BOOT_TARGETS "mmc usb pxe dhcp"
#define CFG_EXTRA_ENV_SETTINGS \
"dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \
ENV_DEVICE_SETTINGS \
ENV_DFU_SETTINGS \
ENV_MEM_LAYOUT_SETTINGS \
- BOOTENV
-
+ "boot_targets=" BOOT_TARGETS "\0"
#endif
From patchwork Thu Jul 27 21:54:29 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Simon Glass <sjg@chromium.org>
X-Patchwork-Id: 1813969
X-Patchwork-Delegate: pbrobinson@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=85.214.62.61; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)
Authentication-Results: legolas.ozlabs.org;
dkim=pass (1024-bit key;
unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256
header.s=google header.b=nzf25ZVl;
dkim-atps=neutral
Received: from phobos.denx.de (phobos.denx.de [85.214.62.61])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl1p1S1xz1yZb
for <incoming@patchwork.ozlabs.org>; Fri, 28 Jul 2023 07:55:26 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id CEB4186898;
Thu, 27 Jul 2023 23:55:12 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
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=chromium.org header.i=@chromium.org
header.b="nzf25ZVl";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id A550186437; Thu, 27 Jul 2023 23:54:46 +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,DKIMWL_WL_HIGH,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,
SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no
version=3.4.2
Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com
[IPv6:2607:f8b0:4864:20::d35])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 848728687F
for <u-boot@lists.denx.de>; Thu, 27 Jul 2023 23:54:42 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sjg@chromium.org
Received: by mail-io1-xd35.google.com with SMTP id
ca18e2360f4ac-7906614bc90so37744039f.3
for <u-boot@lists.denx.de>; Thu, 27 Jul 2023 14:54:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1690494881; x=1691099681;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=rvJFSxuX2uR5MvGPMP0r8JMhRHphT9SXIfCxnVxNK0U=;
b=nzf25ZVlr+TPb8i9KPe94q+xnslw0eiim8ufkD20J+REgYqV1+bfKhPYKo45AkO/Cs
4b6fZA33NLf5U7qgGo7v+urHNiAPER6YN1bXI9hJSNAEtM13z2v621IsEFffyVMcM85C
4AMfUiBclfET9Wn0oQnsQ5JK94HV4jlQugZzQ=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1690494881; x=1691099681;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=rvJFSxuX2uR5MvGPMP0r8JMhRHphT9SXIfCxnVxNK0U=;
b=SWZg15tnmLFbQbK+nDA8NsoxsfTOrSK/kUZE8JUBjXnb/EfYfPfZWjBXdTlOT0hTzs
Do1oyQ0GpF9az6Cx1cJaNL+6/ndCRmpmhbQqCvSRgBsAKnQp00cgnet2sm4yVWfiF5PX
2qaBEeb9gg636lDes6X4aWDvc+t+OzxAlyoh09leqtoNsYaZ9IaM0yoiS8fr0BiqJMrg
MSYnMIsBLMm+jhgQFf2e8ur5tdy7JpF2W9IWlzTu24aMYaDO7jzv2OPLE4yabyZoUIxZ
VGKiZBQssS0Xb/sjea7V65wIws1WhJUfrh088lrlqAdsj+ZlnkWnVhBhlZPR+tkRHWJZ
HcHw==
X-Gm-Message-State: ABy/qLaVdYCT7tOkUReGBSdg/9KznV2sYfo8iTdWbZcW3wegZxOZfpEX
rfBbszTe7MI5Zzj4HA69r3jTlgsxblkKBaKi4I0=
X-Google-Smtp-Source:
APBJJlGWO4DcArS83mKgiEVe92ZPEk/c3kJN6Gj7ZAwNVPMXoPhbtveScu/4+gTrfnrjCxTkZP9a3g==
X-Received: by 2002:a05:6602:682:b0:787:1d53:e6cc with SMTP id
dp2-20020a056602068200b007871d53e6ccmr874039iob.21.1690494881076;
Thu, 27 Jul 2023 14:54:41 -0700 (PDT)
Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85])
by smtp.gmail.com with ESMTPSA id
n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.40
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 27 Jul 2023 14:54:40 -0700 (PDT)
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Peter Robinson <pbrobinson@gmail.com>,
Simon Glass <sjg@chromium.org>, Matthias Brugger <mbrugger@suse.com>,
Stephen Warren <swarren@nvidia.com>, Stephen Warren <swarren@wwwdotorg.org>
Subject: [RESEND PATCH v3 2/3] rpi: Disable DISTRO_DEFAULTS
Date: Thu, 27 Jul 2023 15:54:29 -0600
Message-ID: <20230727215433.578830-3-sjg@chromium.org>
X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog
In-Reply-To: <20230727215433.578830-1-sjg@chromium.org>
References: <20230727215433.578830-1-sjg@chromium.org>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
Disable this option to reclaim some space, since bootstd requires less
functionality to operate (e.g. hush parser).
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v2)
Changes in v2:
- Add new patch to disable DISTRO_DEFAULTS
configs/rpi_0_w_defconfig | 1 -
configs/rpi_2_defconfig | 1 -
configs/rpi_3_32b_defconfig | 1 -
configs/rpi_3_b_plus_defconfig | 1 -
configs/rpi_3_defconfig | 1 -
configs/rpi_4_32b_defconfig | 1 -
configs/rpi_4_defconfig | 1 -
configs/rpi_arm64_defconfig | 1 -
configs/rpi_defconfig | 1 -
9 files changed, 9 deletions(-)
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index 7554e671e2ca..3167bfbe48f7 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index 653f78bec1e8..883dab161702 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -15,7 +15,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index 305f1dacfd46..5ff7d987a431 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
index f36f1258aa6d..31f2a6eb310c 100644
--- a/configs/rpi_3_b_plus_defconfig
+++ b/configs/rpi_3_b_plus_defconfig
@@ -13,7 +13,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index a0d8be42537f..fa6e1507d640 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -13,7 +13,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
index 71f61c52e52d..55bf6c0770f0 100644
--- a/configs/rpi_4_32b_defconfig
+++ b/configs/rpi_4_32b_defconfig
@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_PCI=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="pci enum; usb start;"
# CONFIG_DISPLAY_CPUINFO is not set
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index fa2c05da21e8..6679cce9a165 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_PCI=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="pci enum; usb start;"
# CONFIG_DISPLAY_CPUINFO is not set
diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
index 3e64573b70b1..26e29ffb5a1f 100644
--- a/configs/rpi_arm64_defconfig
+++ b/configs/rpi_arm64_defconfig
@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_PCI=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="pci enum; usb start;"
# CONFIG_DISPLAY_CPUINFO is not set
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 4b8e402c89d4..0ac5efec717b 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
-CONFIG_DISTRO_DEFAULTS=y
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
From patchwork Thu Jul 27 21:54:30 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Simon Glass <sjg@chromium.org>
X-Patchwork-Id: 1813970
X-Patchwork-Delegate: pbrobinson@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.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=<UNKNOWN>)
Authentication-Results: legolas.ozlabs.org;
dkim=pass (1024-bit key;
unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256
header.s=google header.b=mBws8fys;
dkim-atps=neutral
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 ECDSA (P-384))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl220N1zz1yZb
for <incoming@patchwork.ozlabs.org>; Fri, 28 Jul 2023 07:55:38 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 7E187868A9;
Thu, 27 Jul 2023 23:55:29 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
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=chromium.org header.i=@chromium.org
header.b="mBws8fys";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 7F3798687F; Thu, 27 Jul 2023 23:54:47 +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,DKIMWL_WL_HIGH,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,
SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no
version=3.4.2
Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com
[IPv6:2607:f8b0:4864:20::d31])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 6FD6A86883
for <u-boot@lists.denx.de>; Thu, 27 Jul 2023 23:54:43 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sjg@chromium.org
Received: by mail-io1-xd31.google.com with SMTP id
ca18e2360f4ac-7878e573827so57883239f.1
for <u-boot@lists.denx.de>; Thu, 27 Jul 2023 14:54:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1690494882; x=1691099682;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=YMeq2z0BceWJEeXZ+KPCl2/DO9snM/APf71IQJ8+EHM=;
b=mBws8fysMfDnws5xSckJmwYoFnbO4f08B6wlUEznhDpb/FVohJO+FmfQbnHUDUDsSy
Ee6d5JuG8wVUQSapqqsi2JXsNwfvnzsA0e7QaUoJptoauwkl1oKG+AZ91ThkEcjXdL6O
RK775AhnEeLE5jMuVBfe9uFq6Re05aeM+vdsU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1690494882; x=1691099682;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=YMeq2z0BceWJEeXZ+KPCl2/DO9snM/APf71IQJ8+EHM=;
b=JCEGP9SG2bCGvzpYyon4ZvzAorqfIf8zfk2pJUGBNzjUUgshrJ61sNPKq511ECI9Iq
4yxAoqYQDXgSv32IWK7fI0cGnv7QlyXjPSVE42G6W+gO2BZAnd0nUhwVSoV4Llz1vwx5
RVOUfXyUZVtm/98JYyMavbvbNvnFy2RmefMLDz3Q3ES8eb7l8KclgtnPTpvsNdO4pw4W
MVzDzaNyuZq1tfHjYJz1UTC7G5rfiqkgThZbvc0VAa3wEnxtT4xxFIfebHKkyqbLqQ/6
CfuFspsQDYnNZ4pVUaM9P6SWPzRKLIFCThE3AZDKEjW9hb9O1MOTzablkioHKNFipH2v
8aPw==
X-Gm-Message-State: ABy/qLbiMvFNCnHAWkxWhayqbqcbzPbE/txTwyh8SaP8/5b7BdEzsSap
DdDHhSzoDCe+X4IQmkeApNsbmjJmALrfhBJBa1E=
X-Google-Smtp-Source:
APBJJlE+7X+YHtsSdv0glv6+7e+JF2c+SP9bOM3kvNRjEtcpLydgTQTDsxizlaaU3s5ZzSPXDsW9LQ==
X-Received: by 2002:a6b:d902:0:b0:786:cd9b:1ccd with SMTP id
r2-20020a6bd902000000b00786cd9b1ccdmr812254ioc.0.1690494881976;
Thu, 27 Jul 2023 14:54:41 -0700 (PDT)
Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85])
by smtp.gmail.com with ESMTPSA id
n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.41
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 27 Jul 2023 14:54:41 -0700 (PDT)
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Peter Robinson <pbrobinson@gmail.com>,
Simon Glass <sjg@chromium.org>, Albert Aribaud <albert.u.boot@aribaud.net>,
Matthias Brugger <mbrugger@suse.com>, Stephen Warren <swarren@nvidia.com>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: [RESEND PATCH v3 3/3] arm: rpi: Switch to a text environment
Date: Thu, 27 Jul 2023 15:54:30 -0600
Message-ID: <20230727215433.578830-4-sjg@chromium.org>
X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog
In-Reply-To: <20230727215433.578830-1-sjg@chromium.org>
References: <20230727215433.578830-1-sjg@chromium.org>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
Use the new environment format so we can drop most of the config.h file.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
board/raspberrypi/rpi/rpi.env | 77 ++++++++++++++++++++++++++
include/configs/rpi.h | 100 ----------------------------------
2 files changed, 77 insertions(+), 100 deletions(-)
create mode 100644 board/raspberrypi/rpi/rpi.env
diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
new file mode 100644
index 000000000000..30228285edde
--- /dev/null
+++ b/board/raspberrypi/rpi/rpi.env
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+/* environment for Raspberry Pi boards */
+
+dhcpuboot=usb start; dhcp u-boot.uimg; bootm
+
+/* Environment */
+stdin=serial,usbkbd
+stdout=serial,vidconsole
+stderr=serial,vidconsole
+
+/* DFU over USB/UDC */
+#ifdef CONFIG_CMD_DFU
+dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1;
+ config.txt fat 0 1;
+#ifdef CONFIG_ARM64
+dfu_alt_info+=Image fat 0 1
+#else
+dfu_alt_info+=zImage fat 0 1
+#endif
+#endif /* CONFIG_CMD_DFU */
+
+/*
+ * Memory layout for where various images get loaded by boot scripts:
+ *
+ * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this.
+ *
+ * Older versions of the boot firmware place the firmware-loaded DTB at 0x100,
+ * newer versions place it in high memory. So prevent U-Boot from doing its own
+ * DTB + initrd relocation so that we won't accidentally relocate the initrd
+ * over the firmware-loaded DTB and generally try to lay out things starting
+ * from the bottom of RAM.
+ *
+ * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM,
+ * it must be within the first 128M of RAM in order for the kernel's
+ * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed
+ * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The
+ * decompressor also likes to relocate itself to right past the end of the
+ * decompressed kernel, so in total the sum of the compressed and
+ * decompressed kernel needs to be reserved.
+ *
+ * For Aarch64, the kernel image is uncompressed and must be loaded at
+ * text_offset bytes (specified in the header of the Image) into a 2MB
+ * boundary. The 'booti' command relocates the image if necessary. Linux uses
+ * a default text_offset of 0x80000. In summary, loading at 0x80000
+ * satisfies all these constraints and reserving memory up to 0x02400000
+ * permits fairly large (roughly 36M) kernels.
+ *
+ * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't
+ * conflict with something else. Reserving 1M for each of them at
+ * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty.
+ *
+ * On ARM, both the DTB and any possible initrd must be loaded such that they
+ * fit inside the lowmem mapping in Linux. In practice, this usually means not
+ * more than ~700M away from the start of the kernel image but this number can
+ * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line
+ * parameter given to the kernel. So reserving memory from low to high
+ * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for
+ * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000.
+ * Even with the smallest possible CPU-GPU memory split of the CPU getting
+ * only 64M, the remaining 25M starting at 0x02700000 should allow quite
+ * large initrds before they start colliding with U-Boot.
+ */
+#ifdef CONFIG_ARM64
+fdt_high=ffffffffffffffff
+initrd_high=ffffffffffffffff
+#else
+fdt_high=ffffffff
+initrd_high=ffffffff
+#endif
+kernel_addr_r=0x00080000
+scriptaddr=0x02400000
+pxefile_addr_r=0x02500000
+fdt_addr_r=0x02600000
+ramdisk_addr_r=0x02700000
+
+boot_targets=mmc usb pxe dhcp
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 4160db2d8e14..8e56bdc84a89 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -13,8 +13,6 @@
#include <asm/arch/base.h>
#endif
-/* Architecture, CPU, etc.*/
-
/* Use SoC timer for AArch32, but architected timer for AArch64 */
#ifndef CONFIG_ARM64
#define CFG_SYS_TIMER_RATE 1000000
@@ -33,102 +31,4 @@
*/
#define CFG_SYS_SDRAM_SIZE SZ_128M
-/* Devices */
-/* LCD */
-
-/* DFU over USB/UDC */
-#ifdef CONFIG_CMD_DFU
-#ifdef CONFIG_ARM64
-#define KERNEL_FILENAME "Image"
-#else
-#define KERNEL_FILENAME "zImage"
-#endif
-
-#define ENV_DFU_SETTINGS \
- "dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1;" \
- "config.txt fat 0 1;" \
- KERNEL_FILENAME " fat 0 1\0"
-#else
-#define ENV_DFU_SETTINGS ""
-#endif
-
-/* Console configuration */
-
-/* Environment */
-
-/* Shell */
-
-/* Environment */
-#define ENV_DEVICE_SETTINGS \
- "stdin=serial,usbkbd\0" \
- "stdout=serial,vidconsole\0" \
- "stderr=serial,vidconsole\0"
-
-#ifdef CONFIG_ARM64
-#define FDT_HIGH "ffffffffffffffff"
-#define INITRD_HIGH "ffffffffffffffff"
-#else
-#define FDT_HIGH "ffffffff"
-#define INITRD_HIGH "ffffffff"
-#endif
-
-/*
- * Memory layout for where various images get loaded by boot scripts:
- *
- * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this.
- *
- * Older versions of the boot firmware place the firmware-loaded DTB at 0x100,
- * newer versions place it in high memory. So prevent U-Boot from doing its own
- * DTB + initrd relocation so that we won't accidentally relocate the initrd
- * over the firmware-loaded DTB and generally try to lay out things starting
- * from the bottom of RAM.
- *
- * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM,
- * it must be within the first 128M of RAM in order for the kernel's
- * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed
- * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The
- * decompressor also likes to relocate itself to right past the end of the
- * decompressed kernel, so in total the sum of the compressed and and
- * decompressed kernel needs to be reserved.
- *
- * For Aarch64, the kernel image is uncompressed and must be loaded at
- * text_offset bytes (specified in the header of the Image) into a 2MB
- * boundary. The 'booti' command relocates the image if necessary. Linux uses
- * a default text_offset of 0x80000. In summary, loading at 0x80000
- * satisfies all these constraints and reserving memory up to 0x02400000
- * permits fairly large (roughly 36M) kernels.
- *
- * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't
- * conflict with something else. Reserving 1M for each of them at
- * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty.
- *
- * On ARM, both the DTB and any possible initrd must be loaded such that they
- * fit inside the lowmem mapping in Linux. In practice, this usually means not
- * more than ~700M away from the start of the kernel image but this number can
- * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line
- * parameter given to the kernel. So reserving memory from low to high
- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for
- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000.
- * Even with the smallest possible CPU-GPU memory split of the CPU getting
- * only 64M, the remaining 25M starting at 0x02700000 should allow quite
- * large initrds before they start colliding with U-Boot.
- */
-#define ENV_MEM_LAYOUT_SETTINGS \
- "fdt_high=" FDT_HIGH "\0" \
- "initrd_high=" INITRD_HIGH "\0" \
- "kernel_addr_r=0x00080000\0" \
- "scriptaddr=0x02400000\0" \
- "pxefile_addr_r=0x02500000\0" \
- "fdt_addr_r=0x02600000\0" \
- "ramdisk_addr_r=0x02700000\0"
-
-#define BOOT_TARGETS "mmc usb pxe dhcp"
-
-#define CFG_EXTRA_ENV_SETTINGS \
- "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \
- ENV_DEVICE_SETTINGS \
- ENV_DFU_SETTINGS \
- ENV_MEM_LAYOUT_SETTINGS \
- "boot_targets=" BOOT_TARGETS "\0"
-
#endif

View File

@ -1 +1 @@
SHA512 (u-boot-2023.10-rc3.tar.bz2) = 920190c47faca085c44fbd747669379f47461e3a3de5041e6a0d28d073116f1b18b0711876fb3c49eacd130e6fd2aa9d5ec84cb5fe0b2f7617b2438804317e81
SHA512 (u-boot-2023.10.tar.bz2) = f238a69b9cc08ee0a69ea8ca2fa26975f2f2ede14e978b4db274b1e4095e43af0052307ac39034658a72ec9706951cd03c0f316d0591f391adecaf2cc9496fc4

View File

@ -1,4 +1,4 @@
%global candidate rc3
#global candidate rc0
%if 0%{?rhel}
%bcond_with toolsonly
%else
@ -7,7 +7,7 @@
Name: uboot-tools
Version: 2023.10
Release: 0.4%{?candidate:.%{candidate}}%{?dist}
Release: 0.7%{?candidate:.%{candidate}}%{?dist}
Summary: U-Boot utilities
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot
@ -16,13 +16,12 @@ ExcludeArch: s390x
Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2
Source1: aarch64-boards
# Fedoraisms patches
# Needed to find DT on boot partition that's not the first partition
Patch1: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
Patch1: uefi-Boot-var-automatic-management-for-removable-medias.patch
Patch2: smbios-Simplify-reporting-of-unknown-values.patch
Patch3: disable-VBE-by-default.patch
Patch4: enable-bootmenu-by-default.patch
Patch5: Add-video-damage-tracking.patch
Patch6: bootstd-Scan-all-bootdevs-in-a-boot_targets-entry.patch
# Board fixes and enablement
# RPi - uses RPI firmware device tree for HAT support
@ -30,7 +29,6 @@ Patch10: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
# Rockchips improvements
Patch11: rockchip-Add-initial-support-for-the-PinePhone-Pro.patch
#Patch12: 0001-Revert-rockchip-rockpro64-Build-u-boot-rockchip-spi..patch
Patch13: rpi-Convert-to-standard-boot.patch
BuildRequires: bc
BuildRequires: bison
@ -215,6 +213,10 @@ cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand
%endif
%changelog
* Mon Oct 02 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.7
- Update to 2023.10 GA
- Some upstream fixes
* Mon Aug 21 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.4.rc3
- Update to 2023.10 RC3

View File

@ -0,0 +1,550 @@
From patchwork Mon Oct 16 06:45:24 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Patchwork-Submitter: Masahisa Kojima <masahisa.kojima@linaro.org>
X-Patchwork-Id: 1849182
X-Patchwork-Delegate: trini@ti.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256
header.s=google header.b=Ul1XEHOs;
dkim-atps=neutral
Authentication-Results: legolas.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=patchwork.ozlabs.org)
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 ECDSA (secp384r1))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4S874K5Xxfz20Pd
for <incoming@patchwork.ozlabs.org>; Mon, 16 Oct 2023 17:48:49 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id CEAE986C65;
Mon, 16 Oct 2023 08:47:35 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (2048-bit key;
unprotected) header.d=linaro.org header.i=@linaro.org header.b="Ul1XEHOs";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 8D53786DB3; Mon, 16 Oct 2023 08:47:30 +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 mail-pf1-x42e.google.com (mail-pf1-x42e.google.com
[IPv6:2607:f8b0:4864:20::42e])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id CDE3A86E17
for <u-boot@lists.denx.de>; Mon, 16 Oct 2023 08:47:09 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=masahisa.kojima@linaro.org
Received: by mail-pf1-x42e.google.com with SMTP id
d2e1a72fcca58-6b9af7d41d2so1095255b3a.0
for <u-boot@lists.denx.de>; Sun, 15 Oct 2023 23:47:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1697438827; x=1698043627; darn=lists.denx.de;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=a4zZ4HlSkK/oY3qfyV9r1nYVhNuROFuLhRstgf1Rv2c=;
b=Ul1XEHOsGM4s5ZXhl8izVuRgdzwBvimAZkXuoqhECUyzZ5Ez0xE4L1Hg3jaebkJtT4
Obo7iWdiOztGGXAQsCc6aArrMkn5aWaxldZj3Pk7wiMXDQQwkaTGjRCvrTsNYEXGqaYa
lgGsDUHQY9XV9evUyGDM53AoPvEQpMUn6Ise6OpLox6UUZP1F50ibABAcCqCaWEz+1nq
4lVN8G9iVN+cmBLHgyABIM/ySQviS1kOYG+YTltUb5HvVaMxir4vqsa4+x6vd/tTxXMk
56wvCrB5HMNqfSgdipSasXwMLCFgHXkBq93i2kbuzMIQ7Ysvv3C8BVI0G+1f6oLwENLk
e/CQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1697438827; x=1698043627;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=a4zZ4HlSkK/oY3qfyV9r1nYVhNuROFuLhRstgf1Rv2c=;
b=OcOEUqe358XOG7Zc6Hy+FF1rfaLYWmEF0A8OizdzAhGDLivYKjNd4BoOEHO4KvOACh
FZMZ1CB92hAiYJu1Ndf90dBBML5rNhQNU2W7UeXtS71umYvHozHLjFpF1yhECni/jQQU
4oOX+5SMFsICbIbh7s4rTv7wQiw9WfipvTiPbJAhIlFiWT90CFt3hyN8/9KlKbl0Sclz
gllfdag+B/kpFHp53cH9u/zyihobAX9mjV7UWzK5LavAIv6z62RlsRMaICfqqhzWdiCQ
HVNQr2zZEmvsRXg8I0bE1n51DSkTLQ3tXeACm5nhLyxgtyqWwailoFeacOUsF7GMlCcD
qEbw==
X-Gm-Message-State: AOJu0YzjJEUEStoUb3N4IXyZxHifoMSiHxGU6B4mx7PQowC7gzvn1TnE
xTthn5FBg1s44Z9M4SsWxKIzkdvcmlpYkXlx7zA=
X-Google-Smtp-Source:
AGHT+IHbD6oyEamNHq3LhzVqk9GmlOVQEB1PUP0LTuRVh232jV1wx8mVR7sYKvotrVqHEVfJnRLFMA==
X-Received: by 2002:a05:6a00:1511:b0:690:4362:7011 with SMTP id
q17-20020a056a00151100b0069043627011mr35009133pfu.24.1697438827170;
Sun, 15 Oct 2023 23:47:07 -0700 (PDT)
Received: from localhost ([164.70.16.189]) by smtp.gmail.com with ESMTPSA id
fa13-20020a056a002d0d00b006b1c14a493fsm5242447pfb.71.2023.10.15.23.47.06
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 15 Oct 2023 23:47:06 -0700 (PDT)
From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: u-boot@lists.denx.de
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Simon Glass <sjg@chromium.org>,
Takahiro Akashi <takahiro.akashi@linaro.org>,
Michal Simek <michal.simek@amd.com>, Raymond Mao <raymond.mao@linaro.org>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
Joao Marcos Costa <jmcosta944@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH v7 7/9] Boot var automatic management for removable medias
Date: Mon, 16 Oct 2023 15:45:24 +0900
Message-Id: <20231016064526.2410856-8-masahisa.kojima@linaro.org>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20231016064526.2410856-1-masahisa.kojima@linaro.org>
References: <20231016064526.2410856-1-masahisa.kojima@linaro.org>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
From: Raymond Mao <raymond.mao@linaro.org>
Changes for complying to EFI spec §3.5.1.1
'Removable Media Boot Behavior'.
Boot variables can be automatically generated during a removable
media is probed. At the same time, unused boot variables will be
detected and removed.
Please note that currently the function 'efi_disk_remove' has no
ability to distinguish below two scenarios
a) Unplugging of a removable media under U-Boot
b) U-Boot exiting and booting an OS
Thus currently the boot variables management is not added into
'efi_disk_remove' to avoid boot options being added/erased
repeatedly under scenario b) during power cycles
See TODO comments under function 'efi_disk_remove' for more details
The original efi_secboot tests expect that BootOrder EFI variable
is not defined. With this commit, the BootOrder EFI variable is
automatically added when the disk is detected. The original
efi_secboot tests end up with unexpected failure.
The efi_secboot tests need to be modified to explicitly set
the BootOrder EFI variable.
squashfs ls test is also affected by this modification, need to
clear the previous state before squashfs ls test starts.
Co-developed-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
---
lib/efi_loader/efi_disk.c | 18 ++++++++
lib/efi_loader/efi_setup.c | 7 ++++
test/py/tests/test_efi_secboot/test_signed.py | 42 +++++++++----------
.../test_efi_secboot/test_signed_intca.py | 14 +++----
.../tests/test_efi_secboot/test_unsigned.py | 14 +++----
.../test_fs/test_squashfs/test_sqfs_ls.py | 6 +++
6 files changed, 66 insertions(+), 35 deletions(-)
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index f0d76113b0..b808a7fe62 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -690,6 +690,13 @@ int efi_disk_probe(void *ctx, struct event *event)
return -1;
}
+ /* only do the boot option management when UEFI sub-system is initialized */
+ if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR) && efi_obj_list_initialized == EFI_SUCCESS) {
+ ret = efi_bootmgr_update_media_device_boot_option();
+ if (ret != EFI_SUCCESS)
+ return -1;
+ }
+
return 0;
}
@@ -742,6 +749,17 @@ int efi_disk_remove(void *ctx, struct event *event)
dev_tag_del(dev, DM_TAG_EFI);
return 0;
+
+ /*
+ * TODO A flag to distinguish below 2 different scenarios of this
+ * function call is needed:
+ * a) Unplugging of a removable media under U-Boot
+ * b) U-Boot exiting and booting an OS
+ * In case of scenario a), efi_bootmgr_update_media_device_boot_option()
+ * needs to be invoked here to update the boot options and remove the
+ * unnecessary ones.
+ */
+
}
/**
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index e6de685e87..37359a77bb 100644
--- a/lib/efi_loader/efi_setup.c
+++ b/lib/efi_loader/efi_setup.c
@@ -245,6 +245,13 @@ efi_status_t efi_init_obj_list(void)
if (ret != EFI_SUCCESS)
goto out;
+ if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) {
+ /* update boot option after variable service initialized */
+ ret = efi_bootmgr_update_media_device_boot_option();
+ if (ret != EFI_SUCCESS)
+ goto out;
+ }
+
/* Define supported languages */
ret = efi_init_platform_lang();
if (ret != EFI_SUCCESS)
diff --git a/test/py/tests/test_efi_secboot/test_signed.py b/test/py/tests/test_efi_secboot/test_signed.py
index ca52e853d8..2f862a259a 100644
--- a/test/py/tests/test_efi_secboot/test_signed.py
+++ b/test/py/tests/test_efi_secboot/test_signed.py
@@ -29,7 +29,7 @@ class TestEfiSignedImage(object):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'efidebug boot add -b 1 HELLO1 host 0:1 /helloworld.efi.signed -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'bootefi bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -37,7 +37,7 @@ class TestEfiSignedImage(object):
# Test Case 1b, run unsigned image if no PK
output = u_boot_console.run_command_list([
'efidebug boot add -b 2 HELLO2 host 0:1 /helloworld.efi -s ""',
- 'efidebug boot next 2',
+ 'efidebug boot order 2',
'bootefi bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -59,13 +59,13 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO1 host 0:1 /helloworld.efi.signed -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert('\'HELLO1\' failed' in ''.join(output))
assert('efi_start_image() returned: 26' in ''.join(output))
output = u_boot_console.run_command_list([
'efidebug boot add -b 2 HELLO2 host 0:1 /helloworld.efi -s ""',
- 'efidebug boot next 2',
+ 'efidebug boot order 2',
'efidebug test bootmgr'])
assert '\'HELLO2\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -77,12 +77,12 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -i 4000000:$filesize db'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 2',
+ 'efidebug boot order 2',
'efidebug test bootmgr'])
assert '\'HELLO2\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'bootefi bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -105,7 +105,7 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi.signed -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -117,7 +117,7 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -i 4000000:$filesize db'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -143,7 +143,7 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi.signed -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -170,7 +170,7 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi.signed_2sigs -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -181,7 +181,7 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -a -i 4000000:$filesize db'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -193,7 +193,7 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -205,7 +205,7 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -a -i 4000000:$filesize dbx'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -230,7 +230,7 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi.signed_2sigs -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -254,7 +254,7 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi.signed -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'bootefi bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -265,7 +265,7 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -279,7 +279,7 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -307,7 +307,7 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi.signed_2sigs -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -330,7 +330,7 @@ class TestEfiSignedImage(object):
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi.signed_2sigs -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -349,7 +349,7 @@ class TestEfiSignedImage(object):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'efidebug boot add -b 1 HELLO1 host 0:1 /helloworld_forged.efi.signed -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert('hELLO, world!' in ''.join(output))
@@ -364,7 +364,7 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert(not 'hELLO, world!' in ''.join(output))
assert('\'HELLO1\' failed' in ''.join(output))
diff --git a/test/py/tests/test_efi_secboot/test_signed_intca.py b/test/py/tests/test_efi_secboot/test_signed_intca.py
index d8d599d22f..8d9a5f3e7f 100644
--- a/test/py/tests/test_efi_secboot/test_signed_intca.py
+++ b/test/py/tests/test_efi_secboot/test_signed_intca.py
@@ -40,7 +40,7 @@ class TestEfiSignedImageIntca(object):
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO_a host 0:1 /helloworld.efi.signed_a -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO_a\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -49,7 +49,7 @@ class TestEfiSignedImageIntca(object):
# Test Case 1b, signed and authenticated by root CA
output = u_boot_console.run_command_list([
'efidebug boot add -b 2 HELLO_ab host 0:1 /helloworld.efi.signed_ab -s ""',
- 'efidebug boot next 2',
+ 'efidebug boot order 2',
'bootefi bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -71,7 +71,7 @@ class TestEfiSignedImageIntca(object):
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO_abc host 0:1 /helloworld.efi.signed_abc -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO_abc\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -81,7 +81,7 @@ class TestEfiSignedImageIntca(object):
output = u_boot_console.run_command_list([
'fatload host 0:1 4000000 db_b.auth',
'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO_abc\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
@@ -91,7 +91,7 @@ class TestEfiSignedImageIntca(object):
output = u_boot_console.run_command_list([
'fatload host 0:1 4000000 db_c.auth',
'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -117,7 +117,7 @@ class TestEfiSignedImageIntca(object):
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO_abc host 0:1 /helloworld.efi.signed_abc -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert 'Hello, world!' in ''.join(output)
# Or,
@@ -129,7 +129,7 @@ class TestEfiSignedImageIntca(object):
output = u_boot_console.run_command_list([
'fatload host 0:1 4000000 dbx_c.auth',
'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert '\'HELLO_abc\' failed' in ''.join(output)
assert 'efi_start_image() returned: 26' in ''.join(output)
diff --git a/test/py/tests/test_efi_secboot/test_unsigned.py b/test/py/tests/test_efi_secboot/test_unsigned.py
index df63f0df08..7c078f220d 100644
--- a/test/py/tests/test_efi_secboot/test_unsigned.py
+++ b/test/py/tests/test_efi_secboot/test_unsigned.py
@@ -36,11 +36,11 @@ class TestEfiUnsignedImage(object):
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'bootefi bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert 'efi_start_image() returned: 26' in ''.join(output)
assert 'Hello, world!' not in ''.join(output)
@@ -65,7 +65,7 @@ class TestEfiUnsignedImage(object):
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'bootefi bootmgr'])
assert 'Hello, world!' in ''.join(output)
@@ -89,11 +89,11 @@ class TestEfiUnsignedImage(object):
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'bootefi bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert 'efi_start_image() returned: 26' in ''.join(output)
assert 'Hello, world!' not in ''.join(output)
@@ -107,11 +107,11 @@ class TestEfiUnsignedImage(object):
output = u_boot_console.run_command_list([
'efidebug boot add -b 1 HELLO host 0:1 /helloworld.efi -s ""',
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'bootefi bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot next 1',
+ 'efidebug boot order 1',
'efidebug test bootmgr'])
assert 'efi_start_image() returned: 26' in ''.join(output)
assert 'Hello, world!' not in ''.join(output)
diff --git a/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py b/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py
index 527a556ed8..3b8118104f 100644
--- a/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py
+++ b/test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py
@@ -118,6 +118,12 @@ def test_sqfs_ls(u_boot_console):
"""
build_dir = u_boot_console.config.build_dir
+ # If the EFI subsystem is enabled, default file(e.g. EFI/BOOT/BOOTAA64.EFI)
+ # is scanned when the new disk is detected. This ends up with the unexpected
+ # output at the first 'sqfsls' command.
+ # Clear the previous state.
+ u_boot_console.restart_uboot()
+
# setup test environment
check_mksquashfs_version()
generate_sqfs_src_dir(build_dir)