install: Add flashing guide for Chromebooks
Add initial documentation about flashing Libreboot on supported ChromeOS devices. Link the Chromebooks in the hardware index to it. I only have tried firmware work on gru-kevin, so there is an implicit focus on that, but most others should be similar. The one exception is gru-bob, as it is new enough to support Closed Case Debugging which can be used to disable write-protect and flash the firmware externally. Provide links to the ChromiumOS docs for that. Although not supported on Libreboot, x86 Chromebooks still carry the curse that is unreadable non-redistributable Intel ME firmware, so provide a warning against flashing x86 images without it just in case. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>hslick-master
parent
2f712e36fb
commit
21f4d159b9
|
@ -56,20 +56,18 @@ libreboot currently supports the following systems in this release:
|
|||
|
||||
### Laptops (ARM, u-boot, MOSTLY UNTESTED AS OF NOVEMBER 16, 2022)
|
||||
|
||||
- Samsung Chromebook 2 13" (peach-pi)
|
||||
- Samsung Chromebook 2 11" (based on `peach_pit` in coreboot)
|
||||
- HP Chromebook 11 G1 (google/daisy)
|
||||
- Samsung Chromebook XE303 (google/daisy)
|
||||
- HP Chromebook 14 G3 (google/nyan\_blaze)
|
||||
- Acer Chromebook 13 (CB5-311, C810) (google/nyan\_big)
|
||||
- ASUS Chromebit CS10 (google/veyron\_mickey)
|
||||
- ASUS Chromebook Flip C100PA (google/veyron)
|
||||
- ASUS Chromebook C201PA (google/veyron\_speedy)
|
||||
- ASUS Chromebook Flip C101 (google/gru)
|
||||
- Samsung Chromebook Plus (v1) (google/gru)
|
||||
|
||||
NOTE: the above list may be incomplete. For example, `gru_kevin`
|
||||
is also present in lbmk. This needs to be tidied up.
|
||||
- [Samsung Chromebook 2 13" (peach-pi)](../install/chromebooks.md)
|
||||
- [Samsung Chromebook 2 11" (peach-pit)](../install/chromebooks.md)
|
||||
- [HP Chromebook 11 G1 (daisy-spring)](../install/chromebooks.md)
|
||||
- [Samsung Chromebook XE303 (daisy-snow)](../install/chromebooks.md)
|
||||
- [HP Chromebook 14 G3 (nyan-blaze)](../install/chromebooks.md)
|
||||
- [Acer Chromebook 13 (CB5-311, C810) (nyan-big)](../install/chromebooks.md)
|
||||
- [ASUS Chromebit CS10 (veyron-mickey)](../install/chromebooks.md)
|
||||
- [ASUS Chromebook Flip C100PA (veyron-minnie)](../install/chromebooks.md)
|
||||
- [ASUS Chromebook C201PA (veyron-speedy)](../install/chromebooks.md)
|
||||
- [Hisense Chromebook C11 and more (veyron-jerry)](../install/chromebooks.md)
|
||||
- [ASUS Chromebook Flip C101 (gru-bob)](../install/chromebooks.md)
|
||||
- [Samsung Chromebook Plus (v1) (gru-kevin)](../install/chromebooks.md)
|
||||
|
||||
NOTE: ARM hardware is currently undocumented in Libreboot, both for
|
||||
installation of Libreboot and the installation of an operating system. If you
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
---
|
||||
title: Chromebook flashing instructions
|
||||
x-toc-enable: true
|
||||
...
|
||||
|
||||
This page attempts to give a brief, general overview of how to flash
|
||||
custom firmware on ChromeOS devices. This guide usually refers to all of
|
||||
them as "Chromebook"s since it's the most common form factor.
|
||||
|
||||
Enable ChromeOS "Developer Mode"
|
||||
================================
|
||||
|
||||
Chromebooks are locked-down by default to only run ChromeOS. Most things
|
||||
you will want to do on these require you unlock it by enabling their
|
||||
[Developer Mode](https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_mode.md).
|
||||
On most devices, you would press the `Escape + Refresh + Power` key
|
||||
combination to restart into the Recovery Mode, then press `Ctrl + D` and
|
||||
finally confirm enabling Developer Mode with `Enter`.
|
||||
|
||||
On your next boot, it will show you an "OS Verification is disabled"
|
||||
screen. Waiting for 30 seconds or pressing `Ctrl + D` on this screen will
|
||||
proceed to boot into ChromeOS, which then erases all data on the device
|
||||
and reboots again into a clean ChromeOS installation.
|
||||
|
||||
With Developer Mode enabled, you can launch a terminal emulator inside
|
||||
ChromeOS by pressing the `Ctrl + Alt + T` key combination. Run `shell`
|
||||
inside the resulting `crosh` prompt to actually get to a `bash` session
|
||||
where you can run programs. Most of the root file system is read-only,
|
||||
except for `/usr/local` and any mounted drives under `/media/removable`.
|
||||
|
||||
Identify your device
|
||||
====================
|
||||
|
||||
It's more common to refer to ChromeOS boards by their codenames, and
|
||||
many compatible devices can share a single codename. Libreboot ROM
|
||||
images also use these, you should only use the one corresponding to your
|
||||
device's. There are a number of ways to find it, some are:
|
||||
|
||||
- Check the "Model" on the Recovery Mode or Developer Mode screens
|
||||
- Visit `chrome://version` in ChromeOS and check the "Firmware Version"
|
||||
- Run `crossystem hwid` or `crossystem fwid` in a terminal
|
||||
|
||||
Back up stock firmware
|
||||
======================
|
||||
|
||||
The stock firmware on your device comes with some irreplaceable data
|
||||
that is unique to your device. This can include the serial number and
|
||||
hardware ID of the device, network MAC address, HDCP keys, maybe more.
|
||||
The stock firmware is also the only one that will properly boot and run
|
||||
ChromeOS.
|
||||
|
||||
Make sure you back up the original firmware before trying to replace it.
|
||||
The version of flashrom in ChromeOS understands `host` as a programmer
|
||||
to flash firmware internally. To back up stock firmware you can run:
|
||||
|
||||
sudo flashrom -p host -r depthcharge.rom
|
||||
sudo flashrom -p host -v depthcharge.rom
|
||||
|
||||
Keep the resulting `depthcharge.rom` file safe and properly backed up on
|
||||
another device.
|
||||
|
||||
If you can already boot a conventional Linux distro on your Chromebook,
|
||||
you may be able to use `flashrom -p linux_mtd` on that system instead.
|
||||
|
||||
Check external flashability
|
||||
===========================
|
||||
|
||||
If a ROM image you flash is broken, you may need to restore the stock
|
||||
firmware to fix the board to get internal flashing working. Refer to the
|
||||
[external flashing guide](spi.md), and check that the result of
|
||||
`flashrom -r` matches what you get when you run it from the device.
|
||||
Chromebooks may have 1.8V as the supply voltage for the SPI NOR chip, be
|
||||
extra careful about that.
|
||||
|
||||
On newer Chromebooks, there is a root-of-trust chip providing a
|
||||
[Closed Case Debugging](https://chromium.googlesource.com/chromiumos/platform/ec/+/cr50_stab/docs/case_closed_debugging_cr50.md)
|
||||
mechanism that lets you flash externally using a special USB debugging
|
||||
cable. However, most boards that Libreboot supports do not have this.
|
||||
|
||||
Disable write protection
|
||||
========================
|
||||
|
||||
Chromebooks have the SPI flash chip partially write-protected by
|
||||
default, but thankfully this protection can be disabled by the device
|
||||
owner. How to do so depends on the board, refer to the
|
||||
[ChromiumOS documentation on Write Protection](https://chromium.googlesource.com/chromiumos/docs/+/HEAD/write_protection.md)
|
||||
for more info. You will usually need to do this only once for the
|
||||
board's lifetime, unless you manually enable it again.
|
||||
|
||||
On most boards that Libreboot supports, write-protection is enforced by
|
||||
a physical screw. When screwed in, it forms an electrical connection
|
||||
that asserts the WP pin on the flash chip. The screw can be identified
|
||||
by the fact that it bridges electrical contacts, but finding and
|
||||
removing it might require you to disassemble most of the board.
|
||||
|
||||
Newer boards have a root-of-trust chip enforcing write-protection. The
|
||||
[Closed Case Debugging](https://chromium.googlesource.com/chromiumos/platform/ec/+/cr50_stab/docs/case_closed_debugging_cr50.md)
|
||||
mechanism should be used to disable hardware write-protection. Opening
|
||||
the case and disconnecting the battery might also disable it.
|
||||
|
||||
Disabling the write-protect signal doesn't directly make the chip stop
|
||||
protecting its data, it just allows you to disable its write-protection
|
||||
in software. That also needs to be done in ChromeOS afterwards:
|
||||
|
||||
sudo flashrom -p host --wp-status
|
||||
sudo flashrom -p host --wp-disable
|
||||
sudo flashrom -p host --wp-range 0x0,0x0
|
||||
|
||||
The *--wp* arguments are only available on the
|
||||
[ChromiumOS fork of flashrom](https://sites.google.com/a/chromium.org/dev/chromium-os/packages/cros-flashrom).
|
||||
If you are using another OS or an external flasher, you may need to
|
||||
compile and use that flashrom fork to disable write-protection. There is
|
||||
no `lbmk` support yet for automatically building it.
|
||||
|
||||
Prepare the ROM image
|
||||
=====================
|
||||
|
||||
Libreboot ROM image layouts are currently incompatible with the regions
|
||||
that should be carried over from the stock firmware. However, the
|
||||
released images should still be somewhat usable, since the Chromebooks
|
||||
supported so far don't require any non-redistributable blobs to be
|
||||
injected by the end user.
|
||||
|
||||
Future Libreboot versions will likely require post-processing to
|
||||
preserve irreplaceable data in the firmware image. For now, make sure to
|
||||
keep backups of the original firmware.
|
||||
|
||||
TODO: Instructions to preserve vital data when FMAPs are compatible.
|
||||
|
||||
Flash the ROM image
|
||||
===================
|
||||
|
||||
WARNING: Although none are supported yet, make sure not to flash ROM
|
||||
images on x86 Chromebooks without injecting non-redistributable blobs
|
||||
first (like Intel ME firmware). This is not yet documented here.
|
||||
|
||||
You can flash the ROM image both internally and externally. For the
|
||||
latter, see the [external flashing guide](spi.md) and the ChromiumOS
|
||||
[Closed Case Debugging](https://chromium.googlesource.com/chromiumos/platform/ec/+/cr50_stab/docs/case_closed_debugging_cr50.md)
|
||||
documentation if your board supports it.
|
||||
|
||||
To flash the entire ROM image internally, run within ChromeOS:
|
||||
|
||||
sudo flashrom -p host -w libreboot.rom
|
||||
sudo flashrom -p host -v libreboot.rom
|
||||
|
||||
If you can already boot a conventional Linux distro on your Chromebook,
|
||||
you may be able to use `flashrom -p linux_mtd` on that system instead.
|
||||
|
||||
See also
|
||||
========
|
||||
* [ChromiumOS Documentation](https://chromium.googlesource.com/chromiumos/docs/+/HEAD/)
|
||||
* [ChromiumOS Firmware Test Manual](https://chromium.googlesource.com/chromiumos/docs/+/HEAD/firmware_test_manual.md)
|
||||
* [ChromiumOS Flashrom Fork Information](https://www.chromium.org/chromium-os/packages/cros-flashrom/)
|
||||
* [MrChromebox's Unbricking Guide](https://wiki.mrchromebox.tech/Unbricking)
|
||||
* [MrChromebox's Write-Protection Notes](https://wiki.mrchromebox.tech/Firmware_Write_Protect)
|
||||
* [Coreboot Tutorial as used in ChromeOS](https://docs.google.com/presentation/d/1eGPMu03vCxIO0a3oNX8Hmij_Qwwz6R6ViFC_1HlHOYQ/preview)
|
Loading…
Reference in New Issue