From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 21 Mar 2014 14:53:58 -0400 Subject: [U-Boot] [PATCH 2/6] add header with a generic set of boot commands defined. In-Reply-To: <201403211937.52314.marex@denx.de> References: <1392659798-1665-1-git-send-email-dennis@ausil.us> <1395353581-5839-1-git-send-email-dennis@ausil.us> <1395353581-5839-3-git-send-email-dennis@ausil.us> <201403211937.52314.marex@denx.de> Message-ID: <20140321185358.GS16360@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > --- > > 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 > > + * > > + * 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: