Skip to contentSkip to conversation

Ability to modify distro boot filename

PATCH New Martyn Welch 3 participants 3 messages Nov 6, 2018 – Nov 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Ability to modify distro boot filename

Add in the ability to modify the distro boot filename. Whilst not immediately useful in normal usage, it allows an alternative configuration to be provided when other u-boot functionality is used, such as bootcount limit, to fallback to an alternative boot configuration. In this case we can follow the same boot path as for normal boot, just using an alternatively named configuration file.

For example, by providing the following altbootcmd when bootcount is in use:

altbootcmd=setenv boot_extlinx_conf extlinux-rollback.conf; \
run distro_bootcmd

---

Changes in v3:
- Moving path to config variable, rename boot_syslinux_conf

Changes in v2:
- Moving config variable from boot_config to boot_extlinux_conf

 include/config_distro_bootcmd.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
include/config_distro_bootcmd.h +4 -3
index 373fee78a9..5838eb3477 100644
@@ -355,15 +355,16 @@
 	"boot_script_dhcp=boot.scr.uimg\0" \
 	BOOTENV_BOOT_TARGETS \
 	\
+	"boot_syslinux_conf=extlinux/extlinux.conf\0" \
 	"boot_extlinux="                                                  \
 		"sysboot ${devtype} ${devnum}:${distro_bootpart} any "    \
-			"${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \
+			"${scriptaddr} ${prefix}${boot_syslinux_conf}\0"  \
 	\
 	"scan_dev_for_extlinux="                                          \
 		"if test -e ${devtype} "                                  \
 				"${devnum}:${distro_bootpart} "           \
-				"${prefix}extlinux/extlinux.conf; then "  \
-			"echo Found ${prefix}extlinux/extlinux.conf; "    \
+				"${prefix}${boot_syslinux_conf}; then "   \
+			"echo Found ${prefix}${boot_syslinux_conf}; "     \
 			"run boot_extlinux; "                             \
 			"echo SCRIPT FAILED: continuing...; "             \
 		"fi\0"                                                    \
Signature · 1 line
2.11.0
#1 lore raw

PATCH v3 1/1 Ability to modify distro boot filename

Quoted 7 lines · Martyn Welch

Add in the ability to modify the distro boot filename. Whilst not immediately useful in normal usage, it allows an alternative configuration to be provided when other u-boot functionality is used, such as bootcount limit, to fallback to an alternative boot configuration. In this case we can follow the same boot path as for normal boot, just using an alternatively named configuration file.

Quoted 7 lines

For example, by providing the following altbootcmd when bootcount is in use:

altbootcmd=setenv boot_extlinx_conf extlinux-rollback.conf; \
run distro_bootcmd

Quoted 37 lines

---

Changes in v3:
- Moving path to config variable, rename boot_syslinux_conf

Changes in v2:
- Moving config variable from boot_config to boot_extlinux_conf

 include/config_distro_bootcmd.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
include/config_distro_bootcmd.h +4 -3
index 373fee78a9..5838eb3477 100644
@@ -355,15 +355,16 @@
 	"boot_script_dhcp=boot.scr.uimg\0" \
 	BOOTENV_BOOT_TARGETS \
 	\
+	"boot_syslinux_conf=extlinux/extlinux.conf\0" \
 	"boot_extlinux="                                                  \
 		"sysboot ${devtype} ${devnum}:${distro_bootpart} any "    \
-			"${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \
+			"${scriptaddr} ${prefix}${boot_syslinux_conf}\0"  \
 	\
 	"scan_dev_for_extlinux="                                          \
 		"if test -e ${devtype} "                                  \
 				"${devnum}:${distro_bootpart} "           \
-				"${prefix}extlinux/extlinux.conf; then "  \
-			"echo Found ${prefix}extlinux/extlinux.conf; "    \
+				"${prefix}${boot_syslinux_conf}; then "   \
+			"echo Found ${prefix}${boot_syslinux_conf}; "     \
 			"run boot_extlinux; "                             \
 			"echo SCRIPT FAILED: continuing...; "             \
 		"fi\0"                                                    \
#2 lore raw

PATCH v3 1/1 Ability to modify distro boot filename

In reply to Martyn Welch
Quoted 7 lines · Martyn Welch

Add in the ability to modify the distro boot filename. Whilst not immediately useful in normal usage, it allows an alternative configuration to be provided when other u-boot functionality is used, such as bootcount limit, to fallback to an alternative boot configuration. In this case we can follow the same boot path as for normal boot, just using an alternatively named configuration file.

Quoted 8 lines

For example, by providing the following altbootcmd when bootcount is in use:

altbootcmd=setenv boot_extlinx_conf extlinux-rollback.conf; \
run distro_bootcmd

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181117/856f9e16/attachment.sig>