depthcharge
depthcharge is google's custom firmware replacing BIOS/UEFI on all [citation needed] chromebooks. It expects a custom ChromeOS kernel partition with specific GPT flags set, otherwise it refuses to boot. In developer mode, it will beep very loudly on every boot failure.
Some of the partition flags have been documented in the Submarine Docs.
Currently, the common wisdom is to replace depthcharge with a build of edk2 or SeaBIOS on all x86_64 platforms. However, the community firmware stack isn't as mature on aarch64 platforms, thus using depthcharge to load LinuxBoot (or a plain Linux kernel directly) may be a sensible option.
Architecture
Depthcharge lives fully in the SPI flash; This means that even with a completely broken partition layout, it should start up with a recovery screen, prompting for external media.
In developer mode (entered through ChromeOS or else), depthcharge allows you to pull boot logs, and pick between booting from external and internal media.
Setting flags with futility
depthcharge uses specific GBB Flags for the internal config. They allow you to change specific boot behavior. To set them, one needs to already have flash write access, and a couple common utilities:
- read your rom with flashrom (e.g.
flashrom -p internal -r dump.bin
). make a copy of it. - get futility (in alpine, packaged as vboot-utils)
futility gbb --flags dump.bin
- this will show you the current flags. If the number is 0x00..., then you don't have any flags set.- paste that number into gbbflaginator, which will list you currently enabled flags
- modify the flags, copy the result
futility gbb --set --flags=0x123abc dump.bin
- write the modified dump
- ???
- profit