From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 19 Feb 2014 14:16:59 -0500 Subject: [U-Boot] [RFC PATCH 1/3] add file with a default boot environment based heavily on Stephen Warrens recent tegra work. In-Reply-To: <5305006B.7070103@ti.com> References: <1392659798-1665-1-git-send-email-dennis@ausil.us> <1392659798-1665-2-git-send-email-dennis@ausil.us> <5304FB87.3020208@ti.com> <5304FC99.8070009@wwwdotorg.org> <5304FD57.3040508@ti.com> <5304FE7E.2060805@wwwdotorg.org> <5304FFBE.7080104@boundarydevices.com> <5305006B.7070103@ti.com> Message-ID: <20140219191659.GA19081@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 Wed, Feb 19, 2014 at 01:05:15PM -0600, Dan Murphy wrote: > On 02/19/2014 01:02 PM, Eric Nelson wrote: > > On 02/19/2014 11:57 AM, Stephen Warren wrote: > >> On 02/19/2014 11:52 AM, Dan Murphy wrote: > >>> On 02/19/2014 12:48 PM, Stephen Warren wrote: > >>>> On 02/19/2014 11:44 AM, Dan Murphy wrote: > >>>>> On 02/17/2014 11:56 AM, Dennis Gilmore wrote: > >>>>>> Signed-off-by: Dennis Gilmore > >>>>>> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h > >>>>>> +#ifdef CONFIG_CMD_USB > >>>>>> +#define BOOTCMD_INIT_USB "run usb_init; " > >>>>>> +#define BOOTCMDS_USB \ > >>>>>> + "usb_init=" \ > >>>>>> + "if ${usb_need_init}; then " \ > >>>>>> + "set usb_need_init false; " \ > >>>>>> + "usb start 0; " \ > >>>>>> + "fi\0" \ > >>>>>> + \ > >>>>>> + "usb_boot=" \ > >>>>>> + "setenv devtype usb; " \ > >>>>>> + BOOTCMD_INIT_USB \ > >>>>>> + "if usb dev ${devnum}; then " \ > >>>>> This may have already been highlighted but I don't see where the kernel command line arguments can be set. > >>>>> If you have the file system on the USB stick won't you need to direct the root to the stick? > >>>> They would be set in boot.scr or extlinux.cfg on the disk that the > >>>> system boots from; the kernel cmdline is part of the OS that's installed > >>>> there, not part of U-Boot. This is why these boot scripts load a > >>>> script/config-file from the disk which in turn defines which > >>>> kernel/DTB/cmdline to use, rather than directly loading a kernel and > >>>> DTB. This approach should even be suitable for booting a non-Linux-OS, > >>>> with suitable commands in boot.scr. > >>> > >>> But shouldn't the config file just be an override? > >>> > >>> I don't know if we should be having to need to load a boot.scr or any config file just to get the kernel to boot. > >>> > >>> If no config file exists should we not try to default to a known good default tested case? > >> > >> I believe always loading a script/config-file is the simplest and most > >> flexible approach, for a *distro* *oriented* boot process. > > > > +1 > > > > Scripts have the benefit of putting everything into a relatively > > easy-to-read form that only uses documented U-Boot commands, not > > board-specific constructs. > > > > Oh don't get me wrong I agree with having the scripts. > > Just sayin we should not rely on the scripts being there and mandating > their usage. > We may want to have a fall back to a known good tested configuration. I think I see where you're coming from, but it's already expected that you're passing in a good device tree too, so it would be making sure that you also have a useful env file to get loaded in the DHCP or PXE case. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: