mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 00:04:06 -09:00
There are several use cases for installing additional files in the boot
partition that is read by the RPi firmware.
- autoboot.txt is an optional configuration file for the RPi
firmware [1]. Supporting several autoboot files will enable A/B
setups, as using the renameat2() system call with the RENAME_EXCHANGE
flag will let users atomically replace one autoboot configuration
file with the other. This improves reliability in the case of an
update which could potentially be interrupted.
- Multiple cmdline.txt files are useful in the context of a new
[boot_partition] conditional filter introduced in config.txt in
commit [2]. This is useful for A/B systems to have identical BootFS
partitions on both slots, and not have to edit the kernel command line
to ensure the kernel will load the right rootFS after update of the
BootFS.
- rpi-firmware contains DTB overlays for many "standard" hats, but a
custom hat may require a custom overlay.
Although it is possible to install additional files in the boot
partition in the post-image script, it is very convenient to be able to
use the standard RPi post-image script in
board/raspberrypi/post-image.sh. That script looks in
$BINARIES_DIR/rpi-firmware, so it is convenient to be able to place
additional files there.
Add the option BR2_PACKAGE_RPI_FIRMWARE_EXTRA_FILES which is simply a
list of files to be copied to $BINARIES_DIR/rpi-firmware, which will
eventually end up as the boot partition. Make sure that this is done as
the last step of RPI_FIRMWARE_INSTALL_IMAGES_CMDS, so the files can
override files installed by earlier steps.
[1] https://www.raspberrypi.com/documentation/computers/config_txt.html#autoboot-txt
[2] d50b2b32f1
Signed-off-by: Olivier Benjamin <olivier.benjamin@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
113 lines
3.3 KiB
Plaintext
113 lines
3.3 KiB
Plaintext
config BR2_PACKAGE_RPI_FIRMWARE
|
|
bool "rpi-firmware"
|
|
depends on BR2_arm || BR2_aarch64
|
|
help
|
|
RaspberryPi Firmware
|
|
|
|
Pre-compiled binaries of the current bootloader and GPU
|
|
firmware
|
|
|
|
https://github.com/raspberrypi/firmware
|
|
|
|
if BR2_PACKAGE_RPI_FIRMWARE
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN
|
|
bool "rpi 0/1/2/3 bootcode.bin"
|
|
help
|
|
The bootcode.bin for versions Zero/1/2/3 (not needed on rpi4,
|
|
because it has been replaced by boot code in the onboard
|
|
EEPROM).
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI
|
|
bool "rpi 0/1/2/3 (default)"
|
|
help
|
|
The default set of files for versions Zero/1/2/3.
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_X
|
|
bool "rpi 0/1/2/3 (extended)"
|
|
help
|
|
The extended set of files for versions Zero/1/2/3 (additional
|
|
GPU features, eg. more audio/video codecs).
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_CD
|
|
bool "rpi 0/1/2/3 (cut-down)"
|
|
help
|
|
The cut-down set of files for versions Zero/1/2/3 (only
|
|
features required to boot a Linux kernel).
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI_DB
|
|
bool "rpi 0/1/2/3 (debug)"
|
|
help
|
|
The debug set of files for versions Zero/1/2/3.
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4
|
|
bool "rpi 4 (default)"
|
|
help
|
|
The default set of files for versions 4 (standard GPU
|
|
features).
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X
|
|
bool "rpi 4 (extended)"
|
|
help
|
|
The extended set of files for versions 4 (additional GPU
|
|
features, eg. more audio/video codecs).
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_CD
|
|
bool "rpi 4 (cut-down)"
|
|
help
|
|
The cut-down set of files for versions 4 (only features
|
|
required to boot a Linux kernel).
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_DB
|
|
bool "rpi 4 (debug)"
|
|
help
|
|
The debug set of files for versions 4.
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE
|
|
string "Path to a file stored as boot/config.txt"
|
|
help
|
|
Path to a file stored as config.txt in the boot partition
|
|
of the generated SD card image.
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE
|
|
string "Path to a file stored as boot/cmdline.txt"
|
|
default "board/raspberrypi/cmdline.txt" # legacy
|
|
help
|
|
Path to a file stored as cmdline.txt in the boot partition
|
|
of the generated SD card image.
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS
|
|
bool "Install Device Tree Blobs (DTBs)"
|
|
default y
|
|
depends on !BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
help
|
|
If you are using a Linux kernel <= 3.18, you should say 'y'
|
|
here.
|
|
|
|
If you are using a Linux kernel >= 3.19, you should say 'n'
|
|
here, and enable BR2_LINUX_KERNEL_DTS_SUPPORT to let the
|
|
kernel build the DTB.
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
|
|
bool "Install DTB overlays"
|
|
default y
|
|
depends on BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS \
|
|
|| BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
select BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT \
|
|
if BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
help
|
|
Say 'y' here if you need to load one or more of the DTB
|
|
overlays, to support HATs (Hardware Attached on Top, add-on
|
|
modules).
|
|
|
|
config BR2_PACKAGE_RPI_FIRMWARE_EXTRA_FILES
|
|
string "List of path(s) to additional file(s) in boot partition"
|
|
help
|
|
Space-separated path(s) to file(s) that should be stored
|
|
in the boot partition. They will be stored under their own
|
|
name in rpi-firmware. They can override any of the other
|
|
files. Use cases include autoboot configuration,
|
|
alternative cmdline.txt files, additional DTB overlays.
|
|
|
|
endif # BR2_PACKAGE_RPI_FIRMWARE
|