[coreboot] Coreboot + Depthcharge

Julius Werner jwerner at chromium.org
Wed Mar 14 01:49:50 CET 2018


On Thu, Mar 1, 2018 at 6:38 AM, Peter Stuge <peter at stuge.se> wrote:

> Marshall Dawson wrote:
> >    1. You can skip this step in your instructions.  Instead, when running
> >    make menuconfig, look in Chipset / ChromeOS and select "Build for
> >    ChromeOS".  This should cause Depthcharge to appear as a payload
> option.
>
> I think this is a design issue in coreboot that ought to be fixed.
>
> Depthcharge can be useful on its own, it should not be artificially tied
> down.
>

Depthcharge is an external (to coreboot) project with the only goal to
support booting Chrome OS. You shouldn't really expect it to do anything
else unless you want to maintain a fork for that on your own. Any other use
that may work now can break upstream (on chromium.googlesource.com) at any
moment, and I think we just regularly sync that repository back into the
coreboot.org mirror.

That said, CONFIG_CHROMEOS in coreboot doesn't really mean "this has to
boot Chrome OS and nothing else"... it rather means "select code and
features that are required for Chrome OS devices". Much of that "required
for Chrome OS devices" is specifically "required to run depthcharge" (e.g.
the lb_gpios in the coreboot table, or the vboot-capable FMAP), so
disabling it just means depthcharge won't work right. If you want to
build/run depthcharge for whatever reason (even to boot some other Linux
distro as long as you package its kernel in a vblock), just leaving
CONFIG_CHROMEOS enabled is probably the right thing. In many ways
CONFIG_CHROMEOS in coreboot really just means
CONFIG_SUPPORT_FOR_DEPTHCHARGE.

The Speedy issue seems to be a simple bug / missing feature in the
payloads/external/depthcharge/Makefile. The configs in
payload/libpayload/configs/ were originally just added as an FYI that
people could manually copy in for make oldconfig. Then someone seems to
have later written that depthcharge Makefile with the expectation that
there'd always be a config for every board. That wasn't the intention and I
don't think we want to go there, because often a config is shared across
all boards in a family (e.g. configs/veyron for veyron_jerry and
veyron_speedy, or configs/gru for kevin and bob). If we want to have that
automatic selection from a Makefile, we should set up a simple translation
table somewhere so it can find out which config belongs to which board.
(Symlinks would also be an option, but I think some people don't like them
in Git because of Windows. I don't think we should just duplicate the files
because that always becomes a mess sooner or later.)

While we're at it, I think the depthcharge Makefile should also inject
CONFIG_CHROMEOS=y in the libpayload config. That's how they're built for
Chrome OS and that's the only way they're guaranteed to be compatible with
depthcharge. (Again, it's not so much a "can only boot Chrome OS" option,
more of a "select the right defaults for Chromebooks/depthcharge" option.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180313/31df15aa/attachment.html>


More information about the coreboot mailing list