Skip to content

Commit

Permalink
Ability to modify distro boot filename
Browse files Browse the repository at this point in the history
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

Signed-off-by: Martyn Welch <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
mwelchuk authored and trini committed Nov 16, 2018
1 parent 907837d commit ad5fbc6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/config_distro_bootcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit ad5fbc6

Please sign in to comment.