Advice on working with barebox bootloader on Raspberry Pi Cmpute Module 4 will be helpful.
I recently got my hands on a RPi CM4 Lite and now I want to build Yocto image with barebox as bootloader. I have few doubts before I get started.
- How should I do the Barebox configuration? For example, for raspberrypi3 we can have machine config in
conf/local.confas:
BAREBOX_CONFIG_raspberrypi3 = "rpi_defconfig"
BAREBOX_IMAGE_SRC_raspberrypi3 = "images/barebox-raspberry-pi-3.img"
COMPATIBLE_MACHINE_pn-barebox_raspberrypi3 = "raspberrypi3"
For RPi CM4, I am using
MACHINE="raspberrypi4-64". How should this be used for barebox config?In order to boot from uSD (for CM4 Lite) how should I copy the bootloader files? Will there be any difference between BCM283x RPi like RPi2/3 and BCM2711 based RPi CM4 Lite? In the Barebox manual steps are given for BCM283x machines.
I am trying to understand how boot process happens for RPi CM4 with barebox bootloader and yocto. My goal is to build an update with RAUC and Barebox.
Has anyone tried to configure barebox for RPi CM4?
Your help will be much appreciated.
Thanks in advance.
rpi_defconfigis the 32-bit config. You need to userpi_v8_defconfigfor 64-bit ARMv8-A.If your MACHINE is capable of booting Linux directly via config.txt, it should be able to boot barebox first
You'll have to provide the barebox device tree to the barebox binary. Otherwise, the VideoCore behaves strangely. See this commit for details.
Starting with barebox v2022.08.0, there's now first upstream barebox support for the Raspberry Pi 4. There's still stuff missing, e.g. Ethernet for network boot, but Linux can be booted from SD. If you are willing to help with getting it to run on the CM4, you can mention that on the mailing list: https://lists.infradead.org/mailman/listinfo/barebox