cbwww/site/docs/uboot/index.md

86 lines
3.9 KiB
Markdown
Raw Normal View History

---
title: U-Boot payload
x-toc-enable: true
...
extreme cleanup / grandiose gesture make canoeboot a truly GNU FSDG compliant coreboot distro, by removing all overly positive reference to Libreboot; what remains is technical in nature, so as to provide historical context since Canoeboot is a fork of Libreboot. I've stated before that I wish to take a more neutral tone toward the FSF, in contrast to the *coldboot war* of 2023 when GNU Boot started. Canoeboot was heavily linking to Libreboot, even going so far as to call itself "inferior" and tell the reader to use Libreboot. From now on, Canoeboot will be maintained as though I actually believed in FSF propoganda. I don't, but its users do. Treat them with respect. My reason for providing Canoeboot is precisely that I wish for such people to have a high quality coreboot distro, much unlike the inferior *GNU Boot* project; inferior because to this day, it's still based on very old Libreboot, with not much changed (of any real substance) relative to the Libreboot 20220710 release on which it forked. In general, I've also found a lot of stragglers from when Canoeboot started, where paragraphs referred to Libreboot that should have actually referred to Canoeboot, or paragraphs with Libreboot-specific information that does not make sense in the Canoeboot project e.g. references to vendor scripts. The resulting canoeboot.org will now look no different to any typical reader than a typical FSF-aligned project. There is a next stage to this, which will become apparent to everyone if I have my way. Signed-off-by: Leah Rowe <info@minifree.org>
2024-05-10 02:12:44 +00:00
Canoeboot has experimental support for using U-Boot as a coreboot payload.
Refer to [docs/hardware/](../hardware/) for a complete list of U-Boot
targets in Libreboot. Canoeboot inherited U-Boot support from Libreboot.
U-Boot integration in Canoeboot is currently at a proof-of-concept
stage, with most boards completely untested and most likely not working.
ROM images for them are mostly intended for further testing and
development. If you have one of these machines and want to help fix
things, you can ping `alpernebbi` on Libera IRC, who ported these boards
to Canoeboot.
Make sure you have the latest `cbmk` from the Git repository,
and the build dependencies are installed like so, from `cbmk/` as root:
./build dependencies debian
This installs everything needed for `./build boot roms`, and part of the
build process makes use of coreboot's own cross-compile toolchain.
[QEMU x86/ARM64 virtual machines](../misc/emulation.md) are also
supported, which should be easy targets to start tinkering on if you
want to contribute.
Usage
=====
When your board is powered on, U-Boot will ideally turn on the display
and start printing console messages there. After a countdown of a few
seconds it will proceed to automatically boot whatever it can find.
U-Boot will fall back to an interactive prompt if its boot sequence
fails or if you interrupt the countdown.
U-Boot supports UEFI to some extent, enough to run a GRUB package that
would be installed by whatever OS you want to have on your device. The
boot sequence checks for the standard UEFI removable media paths like
`/efi/boot/bootaa64.efi`, so you should be able to use your desired OS'
generic installer images. For details, see upstream documentation for
[UEFI on U-Boot](https://u-boot.readthedocs.io/en/latest/develop/uefi/uefi.html).
Otherwise, the boot sequence also checks an `extlinux.conf` file that
can configure which kernel, initramfs, device-tree file and kernel
command line arguments should be used. See upstream documentation for
[Generic Distro Configuration Concept](https://u-boot.readthedocs.io/en/latest/develop/distro.html).
If you want to work inside the U-Boot shell, see an incomplete list of
[shell commands](https://u-boot.readthedocs.io/en/latest/usage/index.html#shell-commands),
or use the `help` command inside the prompt. Configuration is done via
[environment variables](https://u-boot.readthedocs.io/en/latest/usage/environment.html)
inside the shell, which can be saved to and automatically loaded from
persistent storage configured at build-time.
WARNING: Environment variable storage has not been explicitly configured
so far and is untested in the context of Canoeboot. It may cause data
loss or even brick your device by overwriting your disk's partition
table, unexpected parts of the SPI ROM image, or do something else
entirely.
Known issues
============
U-Boot integration in Canoeboot is incomplete. Here is a list of known
issues that affect all boards:
- Branding is U-Boot with their logo (Canoeboot only in version number)
- Splash screen might be better instead of console messages
- Cursor/drawing bugs with video improvements patches
- Environment storage is likely dangerously broken
- SMBIOS info is missing, `Unknown`, `Unknown Product`, etc.
- Coreboot tables are ignored, unavailable to the OS
- Re-inits display instead of using coreboot framebuffer
- Chromebook FMAP layouts should match stock layout for GBB, VPD
- Chromebook GBB, VPD are not handled, data may be unavailable to OS
- U-Boot "coreboot\*" defconfigs needs more work and an ARM64 version
- UEFI support is incomplete
See also
========
- [U-Boot documentation](https://u-boot.readthedocs.io/en/latest/)
- [U-Boot documentation (unmigrated files)](https://source.denx.de/u-boot/u-boot/-/tree/master/doc)
- [U-Boot and generic distro boot](https://marcin.juszkiewicz.com.pl/2021/03/14/u-boot-and-generic-distro-boot/)