mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-06 21:24:29 +00:00
538437ed39
Coreboot is a first-stage bootloader mostly used on x86 devices as an alternative to UEFI. Coreboot runs in 32-bit mode. U-Boot currently supports booting from coreboot as a second-stage bootloader, also in 32-bit mode. However it is useful to be able to run U-Boot in 64-bit mode. To do this we can have a 32-bit SPL which switches over the CPU and jumps to a 64-bit U-Boot proper. Add a new 'coreboot64' board for running 64-bit U-Boot from coreboot. This uses binman to create an image with a 32-bit SPL and a 64-bit U-Boot. This allows running 64-bit EFI images on x86, for example, without needing a native U-Boot port for a board. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
52 lines
2 KiB
ReStructuredText
52 lines
2 KiB
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0+
|
|
.. sectionauthor:: Bin Meng <bmeng.cn@gmail.com>
|
|
|
|
Coreboot
|
|
========
|
|
|
|
Build Instructions for U-Boot as coreboot payload
|
|
-------------------------------------------------
|
|
Building U-Boot as a coreboot payload is just like building U-Boot for targets
|
|
on other architectures, like below::
|
|
|
|
$ make coreboot_defconfig
|
|
$ make all
|
|
|
|
Test with coreboot
|
|
------------------
|
|
For testing U-Boot as the coreboot payload, there are things that need be paid
|
|
attention to. coreboot supports loading an ELF executable and a 32-bit plain
|
|
binary, as well as other supported payloads. With the default configuration,
|
|
U-Boot is set up to use a separate Device Tree Blob (dtb). As of today, the
|
|
generated u-boot-dtb.bin needs to be packaged by the cbfstool utility (a tool
|
|
provided by coreboot) manually as coreboot's 'make menuconfig' does not provide
|
|
this capability yet. The command is as follows::
|
|
|
|
# in the coreboot root directory
|
|
$ ./build/util/cbfstool/cbfstool build/coreboot.rom add-flat-binary \
|
|
-f u-boot-dtb.bin -n fallback/payload -c lzma -l 0x1110000 -e 0x1110000
|
|
|
|
Make sure 0x1110000 matches CONFIG_SYS_TEXT_BASE, which is the symbol address
|
|
of _x86boot_start (in arch/x86/cpu/start.S).
|
|
|
|
If you want to use ELF as the coreboot payload, change U-Boot configuration to
|
|
use CONFIG_OF_EMBED instead of CONFIG_OF_SEPARATE.
|
|
|
|
To enable video you must enable these options in coreboot:
|
|
|
|
- Set framebuffer graphics resolution (1280x1024 32k-color (1:5:5))
|
|
- Keep VESA framebuffer
|
|
|
|
At present it seems that for Minnowboard Max, coreboot does not pass through
|
|
the video information correctly (it always says the resolution is 0x0). This
|
|
works correctly for link though.
|
|
|
|
64-bit U-Boot
|
|
-------------
|
|
|
|
In addition to the 32-bit 'coreboot' build there is a 'coreboot64' build. This
|
|
produces an image which can be booted from coreboot (32-bit). Internally it
|
|
works by using a 32-bit SPL binary to switch to 64-bit for running U-Boot. It
|
|
can be useful for running UEFI applications, for example.
|
|
|
|
This has only been lightly tested.
|