[U-Boot] [RFC PATCH 6/7] Add support for loading environment from uEnv.txt in config_distro_bootcmd.
Vagrant Cascadian
vagrant at debian.org
Tue Oct 7 08:26:37 CEST 2014
On 2014-10-06, Stephen Warren wrote:
> On 10/03/2014 03:08 PM, Vagrant Cascadian wrote:
>
>> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
>
>> "for prefix in ${boot_prefixes}; do " \
>> "run scan_dev_for_extlinux; " \
>> "run scan_dev_for_scripts; " \
>> + "run scan_dev_for_uenv_files; " \
>> "done;" \
>
> I've always thought of uEnv.txt being stored in a single hard-coded
> location, and used to set e.g. $boot_targets to influence which
> locations get searched for boot files. However, this patch appears to
> use it to house actual boot command sequences.
I took the behavior of the am335x_evm.h based boards and tryed to
generalize it. If that's not desired, then allowing for some hook to
maintain backwards compatibility for those boards would be nice to make
it feasible for boards to migrate to config_distro_bootcmd without
breaking backwards compatibility.
> In other words, I intended:
>
> * (Optionally, and preferably via CONFIG_PREBOOT) load uEnv.txt from a
> hard-coded location.
> * Search a list of locations for boot files, of type extlinux.conf (or
> for legacy reasons, boot .scr)
>
> However, this patch now allows:
>
> * Search a list of locations for boot files, of type extlinux.conf, or
> for legacy reasons, boot .scr, or uEnv.txt
> I don't think that's something we should encourage in
> config_distro_bootcmd.h; the entire point of this header file is to
> define a single way (extlinux.conf) for distros to define the available
> boot options. Yes unfortunately we have boot.scr too as a legacy option,
> but perhaps someday we can drop that. If we grow more options (allowing
> boot scripts in uEnv.txt) that removes the standardization.
Sure.
> If we absolutely have to support uEnv.txt for legacy reasons on some
> platforms, we should at least make it optional so that we don't add
> support for it to all the other platforms that don't want to pick up
> legacy stuff. Perhaps we should "run scan_dev_hook" and allow boards to
> define arbitrary stuff there, so there's no mention at all of uEnv.txt
> in config_distro_bootcmd.h.
Sounds reasonable. It might be desireable to have multiple hook
locations, to be able to run before or after various points. Some of the
other patches in this series implement generic hooks to be run as part
of "bootcmd". Obviously, there's a balance to be struck not putting too
many hooks in.
Thanks for the review and comments!
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141006/30e9fac7/attachment.pgp>
More information about the U-Boot
mailing list