From: Martyn Welch <martyn.welch@collabora.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] Ability to modify distro boot filename
Date: Tue, 06 Nov 2018 09:30:45 +0000 [thread overview]
Message-ID: <1541496645.13105.1.camel@collabora.co.uk> (raw)
In-Reply-To: <65dd71b8-f45a-9f45-54cb-4698bcfbdce4@gmx.de>
On Mon, 2018-11-05 at 20:43 +0100, Heinrich Schuchardt wrote:
> On 11/05/2018 07:13 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_extlinx_conf extlinux-rollback.conf; \
> > run distro_bootcmd
> >
> > Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
> >
> > ---
> >
> > Changes in v2:
> > - Moving config variable from `boot_config` to `boot_extlinux_conf`
> >
> > include/config_distro_bootcmd.h | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/config_distro_bootcmd.h
> > b/include/config_distro_bootcmd.h
> > index 373fee78a9..1e9f6cb31a 100644
> > --- a/include/config_distro_bootcmd.h
> > +++ b/include/config_distro_bootcmd.h
> > @@ -355,15 +355,19 @@
> > "boot_script_dhcp=boot.scr.uimg\0" \
> > BOOTENV_BOOT_TARGETS \
> > \
> > + "boot_extlinux_conf=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?
>
Sounds good to me.
Martyn
> Best regards
>
> > "boot_extlinux="
> > \
> > "sysboot ${devtype} ${devnum}:${distro_bootpart}
> > any " \
> > - "${scriptaddr}
> > ${prefix}extlinux/extlinux.conf\0" \
> > + "${scriptaddr}
> > " \
> > + "${prefix}extlinux/${boot_extlinux_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}extlinux/${boot_extlinux
> > _conf}; " \
> > + "then
> > " \
> > + "echo Found
> > " \
> > + "${prefix}extlinux/${boot_extlinux
> > _conf}; " \
> > "run boot_extlinux;
> > " \
> > "echo SCRIPT FAILED: continuing...;
> > " \
> > "fi\0"
> > \
> >
>
>
prev parent reply other threads:[~2018-11-06 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 18:13 [U-Boot] [PATCH v2] Ability to modify distro boot filename Martyn Welch
2018-11-05 19:43 ` Heinrich Schuchardt
2018-11-06 9:30 ` Martyn Welch [this message]
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=1541496645.13105.1.camel@collabora.co.uk \
--to=martyn.welch@collabora.co.uk \
--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