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

Marek Vasut marex at denx.de
Fri Mar 21 22:00:38 CET 2014


On Friday, March 21, 2014 at 07:53:58 PM, Tom Rini wrote:
> 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..

Because we want to weed out the old/legacy syntax and use the new one . The 
'env' command is also more powerful and setenv/saveenv/... should just go away.

> > > +		"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

I have one on my table right now right here. I also have a mutilated M28EVK with 
three SD cards , so these systems do exist. Oh, but hey, we can of course say 
"systems with three SD cards are not supported", I saw "someone" from RH take 
that kind of attitude already ...

> , rather than saying #3+ is for
> SDIO type things and more on-board SD slots being via USB where that's
> cheap).

Best regards,
Marek Vasut


More information about the U-Boot mailing list