[U-Boot] [PATCH 18/20] Add Chrome OS config header

Stephen Warren swarren at wwwdotorg.org
Fri May 15 17:27:54 CEST 2015


On 05/13/2015 07:19 AM, Simon Glass wrote:
> Hi Stephen,
>
> On 25 February 2015 at 16:28, Stephen Warren <swarren at wwwdotorg.org> wrote:
>>
>> On 02/17/2015 03:29 PM, Simon Glass wrote:
>>>
>>> From: Doug Anderson <dianders at chromium.org>
>>>
>>> This header includes useful scripts which can be used with any board that
>>> can boot Chrome OS.
>>>
>>> In particular, 'run nvboot' will boot a board without verified boot enabled.
>>
>> I think this needs a bit of minification for an upstream U-Boot. In
 >> particular, many of the environment variables overlap semantically or
 >> by name with those from include/config_distro_*.h, and I'd like to
 >> see any U-Boot for the Tegra Chromebooks (at least) support booting both
 >> ChromeOS kernels and arbitrary distros using the environment from
 >> config_distro_bootcmd.h.
>
> That would be good. I think it is possible also, although I haven't
> been able to make it work so far. I can get it to find the kernel,
> although not the one that it needs and the U-Boot scripts are in a
> different place on the disk in Chrome OS. Also the command line args
> are wrong.

I would not expect the scripts from config_distro_bootcmd.h to just work 
for ChromeOS; I'd expect it to be an alternate set of scripts. I'm 
mainly looking for the ChromeOS scripts to use the same variables where 
they mean the same thing, to avoid having two completely different sets.

Re: the command-line; wouldn't the ChromeOS scripts just set bootargs 
from scratch whenever they were used? The scripts in 
config_distro_bootcmd.h expect the complete command-line to come from 
the extlinux.conf or boot.scr file that they load; the scripts in 
config_distro_bootcmd.h shouldn't be providing a command-line.

> So I think for now we should either apply this as it is (since it
> works) or wait until someone has time to rationalise things a bit and
> figure out how to support Chrome OS booting in the distro stuff.

I really think this should be cleaned up before it's applied. As soon as 
it's applied, it'll serve as an example and other boards will pick up 
the same code. That'll make the eventual required cleanup more involved.

>>> +#define CONFIG_CROS_FULL
>>
>>
>> There are a ton of macros in here without much in the way of explanation.
 >> Shouldn't everything be documented in the README?
>
> The documentation for these is at the top of the file:
>
> + * In anticipation of implementing early firmware selection, these defines
> + * signal the features that are required in U-Boot.

Not all of them by far; I mean things like CONFIG_CHROMEOS, 
CONFIG_CHROMEOS_TEST, CONFIG_CHROMEOS_CONST_FLAG, 
CONFIG_VBOOT_REGION_READ, CONFIG_CROS_RO, CONFIG_CHROMEOS_DISPLAY, 
CONFIG_CROS_LEGACY_VBOOT, CONFIG_CHROMEOS_USB, and probably a variety of 
others I didn't pick up in a quick scan. I don't see any of those in 
u-boot/master as of a few days ago either, so I think they're all 
introduced new in this patch?


More information about the U-Boot mailing list