[PATCH 00/18] bootstd: Add a bootmeth for ChromiumOS on x86
Simon Glass
sjg at chromium.org
Fri Apr 28 21:18:00 CEST 2023
This series adds a simple bootmeth for ChromiumOS on x86. It uses zimage
to boot the kernel.
Full verified boot is not included at this stage - that is still a
separate chunk of code to be brought into standard boot at some point.
For now it just obtains the kernel and command line and boots. This should
be enough to boot Chrome OS from coreboot on all x86 machines in
circulation, although only Brya (2022) and Coral (2017) have been tested.
ChromiumOS needs quite large kernel parameters, to hold the DM verity
settings and other pieces. This makes it painful to modify just one
parameter, since the whole cmdline must be adjusted at once. To cope with
this, a new cmdline-editing feature is provided: the 'bootflow cmdline'
command allows individual parameters to be added, modified and deleted.
To deal with enabling debug console, a variant supports setting 'earlycon'
and 'console' automatically. The 'bdinfo' command is updated to show
serial-port info also.
Booting the zimage is now done programmatically, rather than running
through the command-line interface. Minor tweaks are made to the coreboot
and coral config so that booting works correctly.
Note that the ACPI tables are not updated with the required firmware
information in this series, so a warning is shown on boot. This will be
addressed later since it requires quite a bit of configuration.
Finally, this fixes a recently introduced bug in unit testing and updates
the algorithm to avoid running flat-tree tests which don't actually use
the devicetree.
Simon Glass (18):
test: Restore test behaviour on failure
test: Skip flat-tree tests if devicetree is not used
bootstd: Correct the name of the QEMU bootmeth
bootstd: Use bootdev instead of bootdevice
bootstd: Correct baudrate typo
bootstd: Allow storing the OS command line in the bootflow
bootstd: Use the bootargs env var for changing the cmdline
bootstd: Allow storing x86 setup information
bootstd: Work around missing partition 1
bdinfo: Show information about the serial port
bootstd: Add a function to update a command line
bootstd: Add support for updating elements of the cmdline
bootstd: Support automatically setting Linux parameters
x86: Add a function to boot a zimage
x86: zimage: Export the function to obtain the cmdline
bootstd: Add a simple bootmeth for ChromiumOS
x86: coreboot: Adjust various config options
x86: coral: Adjust various config options
arch/x86/include/asm/zimage.h | 27 +++
arch/x86/lib/zimage.c | 93 ++++++--
boot/Kconfig | 11 +
boot/Makefile | 1 +
boot/bootdev-uclass.c | 9 +-
boot/bootflow.c | 327 ++++++++++++++++++++++++++++-
boot/bootmeth-uclass.c | 2 +-
boot/bootmeth_cros.c | 212 +++++++++++++++++++
boot/bootmeth_qfw.c | 2 +-
cmd/bdinfo.c | 21 ++
cmd/bootflow.c | 74 ++++++-
configs/chromebook_coral_defconfig | 10 +-
configs/coreboot_defconfig | 21 +-
configs/tools-only_defconfig | 1 +
doc/usage/cmd/bootflow.rst | 100 ++++++++-
drivers/mmc/mmc_bootdev.c | 2 +-
drivers/scsi/scsi_bootdev.c | 2 +-
drivers/usb/host/usb_bootdev.c | 2 +-
include/bootdev.h | 2 +-
include/bootflow.h | 100 ++++++++-
include/env_callback.h | 6 +-
include/test/ut.h | 36 ++--
net/eth_bootdev.c | 2 +-
test/boot/bootflow.c | 264 +++++++++++++++++++++++
test/test-main.c | 3 +-
25 files changed, 1268 insertions(+), 62 deletions(-)
create mode 100644 boot/bootmeth_cros.c
--
2.40.1.495.gc816e09b53d-goog
More information about the U-Boot
mailing list