coreboot.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. .. sectionauthor:: Bin Meng <bmeng.cn@gmail.com>
  3. Coreboot
  4. ========
  5. Build Instructions for U-Boot as coreboot payload
  6. -------------------------------------------------
  7. Building U-Boot as a coreboot payload is just like building U-Boot for targets
  8. on other architectures, like below::
  9. $ make coreboot_defconfig
  10. $ make all
  11. Test with coreboot
  12. ------------------
  13. For testing U-Boot as the coreboot payload, there are things that need be paid
  14. attention to. coreboot supports loading an ELF executable and a 32-bit plain
  15. binary, as well as other supported payloads. With the default configuration,
  16. U-Boot is set up to use a separate Device Tree Blob (dtb). As of today, the
  17. generated u-boot-dtb.bin needs to be packaged by the cbfstool utility (a tool
  18. provided by coreboot) manually as coreboot's 'make menuconfig' does not provide
  19. this capability yet. The command is as follows::
  20. # in the coreboot root directory
  21. $ ./build/util/cbfstool/cbfstool build/coreboot.rom add-flat-binary \
  22. -f u-boot-dtb.bin -n fallback/payload -c lzma -l 0x1110000 -e 0x1110000
  23. Make sure 0x1110000 matches CONFIG_SYS_TEXT_BASE, which is the symbol address
  24. of _x86boot_start (in arch/x86/cpu/start.S).
  25. If you want to use ELF as the coreboot payload, change U-Boot configuration to
  26. use CONFIG_OF_EMBED instead of CONFIG_OF_SEPARATE.
  27. To enable video you must enable these options in coreboot:
  28. - Set framebuffer graphics resolution (1280x1024 32k-color (1:5:5))
  29. - Keep VESA framebuffer
  30. At present it seems that for Minnowboard Max, coreboot does not pass through
  31. the video information correctly (it always says the resolution is 0x0). This
  32. works correctly for link though.
  33. 64-bit U-Boot
  34. -------------
  35. In addition to the 32-bit 'coreboot' build there is a 'coreboot64' build. This
  36. produces an image which can be booted from coreboot (32-bit). Internally it
  37. works by using a 32-bit SPL binary to switch to 64-bit for running U-Boot. It
  38. can be useful for running UEFI applications, for example.
  39. This has only been lightly tested.