Re: Google Embedded Controller blob - how does that get to the EC?

Matt DeVillier <[email protected]>
Newsgroups gmane.linux.bios
Message-ID <CAFTm+6Crxq5GQ=SqV0gz_G61Dsbv3W6cWR7n+fDi7-5CHDv_3g@mail.gmail.com>
As Martin said, if you're coming from the latest ChromeOS firmware, then
you already have the latest *Google* EC-RW firmware.

My MrChromebox distribution includes my own updated EC firmware which
resolves some bugs / adds some features when running an OS other than
ChromeOS. If you're coming from my current MrChromebox firmware, then you
already have that custom EC-RW firmware update applied.

Under ChromeOS, the EC-RW firmware is updated as part of verified boot --
the RO system firmware verifies (and if necessary, updates) the RW system
firmware, and similarly the RW EC firmware is verified/updated as part of
vboot.

Since my MrChromebox firmware does not use vboot, I have ported the EC-RW
firmware update code from vboot to coreboot, and check if an EC-RW update
is needed on each boot as part of EC init in ramstage. This code is in my
tree on github for inspection.

It's not necessary to build your own EC-RW firmware or even update it
unless there's a specific issue you're trying to resolve.

On Sun, Dec 17, 2023 at 1:35 AM Martin Roth <[email protected]> wrote:

> You shouldn't need to worry about the EC firmware at all unless you need
> to update it. Google builds the EC firmware into the system firmware image
> so that it can be updated automatically when needed, but if you've already
> booted the chromeos firmware, that EC image is already flashed.
>
> If you do need to update the EC firmware, just flash it manually. Don't
> bother with the automatic update. It doesn't make sense for you to build it
> into the firmware.
>
> If you want to learn more about all of this, check out the documentation
> at https://www.chromium.org/chromium-os/
> This should walk you through the steps of downloading everything and
> installing the chromeos chroot:
> https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_guide.md
>
>
> Dec 17, 2023 at 00:18 by [email protected]:
>
> >>> I'm hoping that other extracted Google blobs are not so finicky - the
> Embedded Controller blob, for instance?
> >>>
> >> As far as the EC, it's all open source, and in public repos at Google.
> You can rebuild it instead of using their binary.
> >>
> >
> > Thanks for that Martin.  Still, I'm intimidated by the EC blob.
> >
> > On my board, Google's forked flashrom says: Found Nuvoton flash chip
> "NPCX796F".  Some Nuvoton ECs, and probably this one, are ARM chips.
> >
> > 3rdparty/chromeec/README.md says:
> > If you want instant gratification, you can fetch the source code
> directly. However, you will need the tool-chain provided by the Chromium OS
> development environment to build a binary.
> >
> > And then, at http://goo.gl/i5sMq, "Flashrom @ Chromium.org" says:
> > For these examples, we assume the x86 firmware ROM is connected directly
> to the host via SPI  and the EC ROM is connected via the EC to LPC.
> >
> > And then, no matter how this EC blob is acquired, that Google page does
> not seem to disclose exactly *how* this EC ROM image is suppose to get from
> the coreboot ROM image, and into the separate EC ROM.
> >
> > But, for instance, I see u-boot/cmd/Kconfig actually has:
> > menu "Firmware commands"
> > config CMD_CROS_EC
> >  bool "Enable crosec command"
> >  depends on CROS_EC
> >  default y
> >  help
> >  Enable command-line access to the Chrome OS EC (Embedded
> >  Controller). This provides the 'crosec' command which has
> >  a number of sub-commands for performing EC tasks such as
> >  updating its flash, accessing a small saved context area
> >  and talking to the I2C bus behind the EC (if there is one).
> >
> > So, even after going to the trouble of getting an EC ROM image into
> coreboot, how does this get into the EC ROM?  Does coreboot have some
> "magic" that checks the EC ROM version, and then automatically flash the EC
> ROM?  Or, does this have to be done manually?
> >
> > And, if manually, and if u-boot is not being used, does this "crosec"
> command have to be found or built, to run in an x86 linux for instance, and
> used to actually flash the EC ROM?
> >
>
>

_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.