From: Fabio Estevam <festevam@gmail.com>
To: sbabic@denx.de
Cc: u-boot@lists.denx.de, eduard@lionizers.com,
Fabio Estevam <festevam@denx.de>
Subject: [PATCH 13/13] smegw01: Fix fallback to altbootcmd
Date: Tue, 18 Apr 2023 10:47:44 -0300 [thread overview]
Message-ID: <20230418134744.343023-13-festevam@gmail.com> (raw)
In-Reply-To: <20230418134744.343023-1-festevam@gmail.com>
From: Eduard Strehlau <eduard@lionizers.com>
The bootcmd/altbootcmd mechanism is not invoked for bootmenus.
Manually compare bootcount and bootlimit to implement fallback on all
codepaths.
Signed-off-by: Eduard Strehlau <eduard@lionizers.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
configs/smegw01_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/smegw01_defconfig b/configs/smegw01_defconfig
index fe8152f33e..3d2713f528 100644
--- a/configs/smegw01_defconfig
+++ b/configs/smegw01_defconfig
@@ -23,7 +23,7 @@ CONFIG_AUTOBOOT_MENU_SHOW=y
# CONFIG_CMD_BOOTEFI_BOOTMGR is not set
CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE=y
CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="if test \"${ustate}\" = 1; then setenv upgrade_available 1; saveenv; fi; run mmcboot; "
+CONFIG_BOOTCOMMAND="if test \"${bootcount}\" -gt \"${bootlimit}\"; then run altbootcmd; else if test \"${ustate}\" = 1; then setenv upgrade_available 1; saveenv; fi; run mmcboot; fi;"
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="run setup_boot_menu;"
CONFIG_HUSH_PARSER=y
--
2.38.1
next prev parent reply other threads:[~2023-04-18 13:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 13:47 [PATCH 01/13] smegw01: Enable setting additional boot params Fabio Estevam
2023-04-18 13:47 ` [PATCH 02/13] smegw01: Select CONFIG_CMD_SQUASHFS Fabio Estevam
2023-04-18 13:47 ` [PATCH 03/13] smegw01: Select bootcount support Fabio Estevam
2023-04-18 13:47 ` [PATCH 04/13] smegw01: Add altbootcmd Fabio Estevam
2023-04-18 13:47 ` [PATCH 05/13] smegw01: Run altbootcmd in the case of failure Fabio Estevam
2023-04-18 13:47 ` [PATCH 06/13] smegw01: Only commit to new partition if update was successful Fabio Estevam
2023-04-18 13:47 ` [PATCH 07/13] smegw01: Enable EMMC boot from multiple partitions Fabio Estevam
2023-04-18 19:48 ` Pali Rohár
2023-04-18 13:47 ` [PATCH 08/13] smegw01: Change default boot device to eMMC Fabio Estevam
2023-04-18 13:47 ` [PATCH 09/13] smegw01: Switch to fitImage Fabio Estevam
2023-04-18 13:47 ` [PATCH 10/13] smegw01: Add lockdown U-Boot env support Fabio Estevam
2023-04-18 13:47 ` [PATCH 11/13] smegmac: Read the second MAC address Fabio Estevam
2023-04-18 13:47 ` [PATCH 12/13] smegw01: Disable additional boot menu options Fabio Estevam
2023-04-18 13:47 ` Fabio Estevam [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-21 10:56 [PATCH v2 01/13] smegw01: Enable setting additional boot params Fabio Estevam
2023-04-21 10:56 ` [PATCH 13/13] smegw01: Fix fallback to altbootcmd Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230418134744.343023-13-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=eduard@lionizers.com \
--cc=festevam@denx.de \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox