[U-Boot] [PATCH 1/3] config: introduce a generic $bootcmd

Simon Glass sjg at chromium.org
Fri Aug 1 00:03:52 CEST 2014


Hi Stephen,

On 30 July 2014 23:37, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Dennis Gilmore <dennis at ausil.us>
>
> This generic $bootcmd, and associated support macros, automatically
> searches a defined set of storage devices (or network protocols) for an
> extlinux configuration file or U-Boot boot script in various standardized
> locations. Distros that install such a boot config file/script in those
> standard locations will get easy-to-set-up booting on HW that enables
> this generic $bootcmd.
>
> Boards can define the set of devices from which boot is attempted, and
> the order in which they are attempted. Users may later customize this
> set/order by edting $boot_targets.
>
> Users may interrupt the boot process and boot from a specific device
> simply by executing e.g.:
>
> $ run bootcmd_mmc1
> or:
> $ run bootcmd_pxe
>
> This patch was originally written by Dennis Gilmore based on Tegra and
> rpi_b boot scripts. I have made the following modifications since then:
>
> * Boards must define the BOOT_TARGET_DEVICES macro in order to specify
>   the set of devices (and order) from which to attempt boot. If needed,
>   we can define a default directly in config_distro_bootcmd.h.
>
> * Removed $env_import and related variables; nothing used them, and I
>   think it's better for boards to pre-load an environment customization
>   file using CONFIG_PREBOOT if they need.
>
> * Renamed a bunch of variables to suit my whims:-)
>
> Signed-off-by: Dennis Gilmore <dennis at ausil.us>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>

I do understand the desirability of getting something sorted in this
area. But I am not thrilled with all the macro magic. How does this
fit with the new Kconfig setup? It encourages a single setting for
each variable, and I feel that the #ifdefs are not compatible with
that.

Would it be possible to put the settings in the device tree somehow
instead of CONFIGs?

I did send a series some time ago that aimed to improve the default
environment specification in config files - it was parked while
Kconfig was going on, but we could revisit it.

Regards,
Simon


More information about the U-Boot mailing list