[U-Boot] [PATCH 2/6] add header with a generic set of boot commands defined.

Tom Rini trini at ti.com
Fri Mar 21 19:53:58 CET 2014


On Fri, Mar 21, 2014 at 07:37:52PM +0100, Marek Vasut wrote:
> On Thursday, March 20, 2014 at 11:12:57 PM, Dennis Gilmore wrote:
> > As the next step in a generic config we are introducing a set of generic
> > boot paramaters. Depending on the hardwares configuration, booting from
> > supported hardware will be enabled, mmc, usb, sata, scsi, ide, pxe and
> > dhcp.
> > 
> > There is nothing to stop this being extended to support nand and any other
> > type of storage that comes along. An ideal future enhancement will be to
> > allow the user to dynamically reorder the boot devices, and allow one off
> > boots. for example simply be able to pxe boot to reinstall
> > 
> > Signed-off-by: Dennis Gilmore <dennis at ausil.us>
> > ---
> >  include/config_distro_bootcmd.h | 208
> > ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+)
> >  create mode 100644 include/config_distro_bootcmd.h
> > 
> > diff --git a/include/config_distro_bootcmd.h
> > b/include/config_distro_bootcmd.h new file mode 100644
> > index 0000000..0fe94be
> > --- /dev/null
> > +++ b/include/config_distro_bootcmd.h
> > @@ -0,0 +1,208 @@
> > +/*
> > + * (C) Copyright 2014
> > + * NVIDIA Corporation <www.nvidia.com>
> > + *
> > + * Copyright 2014 Red Hat, Inc.
> > + *
> > + * SPDX-License-Identifier:     GPL-2.0+
> > + */
> > +
> > +#ifndef _CONFIG_CMD_DISTRO_BOOTCMD_H
> > +#define _CONFIG_CMD_DISTRO_BOOTCMD_H
> > +
> > +
> > +#ifdef CONFIG_CMD_MMC
> > +#define BOOTCMDS_MMC \
> > +	"mmc_boot=" \
> > +		"setenv devtype mmc; " \
> 
> Please use 'env set ...'

Why?  Almost nothing uses that syntax..

> > +		"if mmc dev ${devnum}; then " \
> > +			"run scan_boot; " \
> > +		"fi\0" \
> > +	"bootcmd_mmc0=setenv devnum 0; run mmc_boot;\0" \
> > +	"bootcmd_mmc1=setenv devnum 1; run mmc_boot;\0"
> > +#define BOOT_TARGETS_MMC "mmc1 mmc0"
> 
> This will not work on a boot with three MMC cards ... this does not scale and 
> needs re-thinking.

Maybe once we have device model and can see how many MMCs have been
probed?  I'm not worried about a 3 mmc card system (those are
"expensive" to add, I'd be surprised about a system with some
combination of 3 or more setup for SD/eMMC, rather than saying #3+ is for
SDIO type things and more on-board SD slots being via USB where that's
cheap).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140321/cf093058/attachment.pgp>


More information about the U-Boot mailing list