* [U-Boot] [PATCH] Ability to modify distro boot filename
@ 2018-11-05 17:33 Martyn Welch
2018-11-05 17:38 ` Alexander Graf
0 siblings, 1 reply; 3+ messages in thread
From: Martyn Welch @ 2018-11-05 17:33 UTC (permalink / raw)
To: u-boot
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_config extlinux-rollback.conf; run distro_bootcmd
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
---
include/config_distro_bootcmd.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 373fee78a9..da30a7d84c 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -355,15 +355,16 @@
"boot_script_dhcp=boot.scr.uimg\0" \
BOOTENV_BOOT_TARGETS \
\
+ "boot_config=extlinux.conf\0" \
"boot_extlinux=" \
"sysboot ${devtype} ${devnum}:${distro_bootpart} any " \
- "${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \
+ "${scriptaddr} ${prefix}extlinux/${boot_config}\0"\
\
"scan_dev_for_extlinux=" \
"if test -e ${devtype} " \
"${devnum}:${distro_bootpart} " \
- "${prefix}extlinux/extlinux.conf; then " \
- "echo Found ${prefix}extlinux/extlinux.conf; " \
+ "${prefix}extlinux/${boot_config}; then " \
+ "echo Found ${prefix}extlinux/${boot_config}; " \
"run boot_extlinux; " \
"echo SCRIPT FAILED: continuing...; " \
"fi\0" \
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] Ability to modify distro boot filename
2018-11-05 17:33 [U-Boot] [PATCH] Ability to modify distro boot filename Martyn Welch
@ 2018-11-05 17:38 ` Alexander Graf
2018-11-05 18:16 ` Heinrich Schuchardt
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Graf @ 2018-11-05 17:38 UTC (permalink / raw)
To: u-boot
On 11/05/2018 06:33 PM, Martyn Welch wrote:
> 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_config extlinux-rollback.conf; run distro_bootcmd
>
> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Sounds sensible to me, but ...
>
> ---
>
> include/config_distro_bootcmd.h | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
> index 373fee78a9..da30a7d84c 100644
> --- a/include/config_distro_bootcmd.h
> +++ b/include/config_distro_bootcmd.h
> @@ -355,15 +355,16 @@
> "boot_script_dhcp=boot.scr.uimg\0" \
> BOOTENV_BOOT_TARGETS \
> \
> + "boot_config=extlinux.conf\0" \
... I would prefer to not clutter the normal variable namespace with
extlinux specifics. So can we name this with an obviously extlinux
specific variable name? Something like "$boot_extlinux_conf" maybe? :)
Alex
> "boot_extlinux=" \
> "sysboot ${devtype} ${devnum}:${distro_bootpart} any " \
> - "${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \
> + "${scriptaddr} ${prefix}extlinux/${boot_config}\0"\
> \
> "scan_dev_for_extlinux=" \
> "if test -e ${devtype} " \
> "${devnum}:${distro_bootpart} " \
> - "${prefix}extlinux/extlinux.conf; then " \
> - "echo Found ${prefix}extlinux/extlinux.conf; " \
> + "${prefix}extlinux/${boot_config}; then " \
> + "echo Found ${prefix}extlinux/${boot_config}; " \
> "run boot_extlinux; " \
> "echo SCRIPT FAILED: continuing...; " \
> "fi\0" \
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] Ability to modify distro boot filename
2018-11-05 17:38 ` Alexander Graf
@ 2018-11-05 18:16 ` Heinrich Schuchardt
0 siblings, 0 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2018-11-05 18:16 UTC (permalink / raw)
To: u-boot
On 11/05/2018 06:38 PM, Alexander Graf wrote:
> On 11/05/2018 06:33 PM, Martyn Welch wrote:
>> 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_config extlinux-rollback.conf; run distro_bootcmd
>>
>> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
>
> Sounds sensible to me, but ...
>
>>
>> ---
>>
>> include/config_distro_bootcmd.h | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/config_distro_bootcmd.h
>> b/include/config_distro_bootcmd.h
>> index 373fee78a9..da30a7d84c 100644
>> --- a/include/config_distro_bootcmd.h
>> +++ b/include/config_distro_bootcmd.h
>> @@ -355,15 +355,16 @@
>> "boot_script_dhcp=boot.scr.uimg\0" \
>> BOOTENV_BOOT_TARGETS \
>> \
>> + "boot_config=extlinux.conf\0" \
Why do you only put "extlinux.conf" into the new variable and not
"extlinux/extlinux.conf" and call the variable boot_syslinux_conf.
Wouldn't this provide more flexibility?
Best regards
Heinrich
> ... I would prefer to not clutter the normal variable namespace with
> extlinux specifics. So can we name this with an obviously extlinux
> specific variable name? Something like "$boot_extlinux_conf" maybe? :)
>
>
> Alex
>
>> "boot_extlinux=" \
>> "sysboot ${devtype} ${devnum}:${distro_bootpart} any " \
>> - "${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \
>> + "${scriptaddr} ${prefix}extlinux/${boot_config}\0"\
>> \
>> "scan_dev_for_extlinux=" \
>> "if test -e ${devtype} " \
>> "${devnum}:${distro_bootpart} " \
>> - "${prefix}extlinux/extlinux.conf; then " \
>> - "echo Found ${prefix}extlinux/extlinux.conf; " \
>> + "${prefix}extlinux/${boot_config}; then " \
>> + "echo Found ${prefix}extlinux/${boot_config}; " \
>> "run boot_extlinux; " \
>> "echo SCRIPT FAILED: continuing...; " \
>> "fi\0" \
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-05 18:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 17:33 [U-Boot] [PATCH] Ability to modify distro boot filename Martyn Welch
2018-11-05 17:38 ` Alexander Graf
2018-11-05 18:16 ` Heinrich Schuchardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.