[U-Boot] [PATCH 18/20] Add Chrome OS config header
Simon Glass
sjg at chromium.org
Mon May 18 23:40:22 CEST 2015
Hi Stephen,
On 15 May 2015 at 09:27, Stephen Warren <swarren at wwwdotorg.org> wrote:
> 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.
OK I see.
>
> 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.
The command line really should be read from the storage. But
chromeos.h uses a hard-coded command line. This is good enough to
boot.
>
>> 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.
OK. Well if we apply the other patches we at least get the code in. We
won't be able to boot Chrome OS, but it's close.
>
>>>> +#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?
What is missing here is the verified boot implementation. There are
several patches that can sit on top of this patch to add full verified
boot. The ones you identify are used by that code. I'm quite keen to
move them to Kconfig but that work has not done yet.
My objective is to allow Chrome OS verified boot to be applied as a
small number of patches on mainline.
Regards,
Simon
More information about the U-Boot
mailing list