Compile and boot u-boot
Download toolchain
go to https://gitlab.arm.com/tooling/gnu-toolchains-for-arm and then scrol down and click on latest Release. then scroll down and click on aarch64 Linux hosted cross toolchains and download arm-gnu-toolchain-XX.X.relX-aarch64-aarch64-none-linux-gnu.tar.xz
Clone u-boot source
git clone https://source.denx.de/u-boot/u-boot.git
cd u-boot
Choose your Board Configuration
| Raspberry Pi Model | Bit Arch | Target Defconfig Name | Cross-Compiler Prefix |
|---|---|---|---|
| Raspberry Pi 5 | 64-bit | rpi_arm64_defconfig | aarch64-linux-gnu- |
| Raspberry Pi 4 / 4B | 64-bit | rpi_4_defconfig | aarch64-linux-gnu- |
| Raspberry Pi 3 / 3B+ | 64-bit | rpi_3_defconfig | aarch64-linux-gnu- |
| Raspberry Pi Zero 2 W | 64-bit | rpi_zero_2_w_defconfig | aarch64-linux-gnu- |
| Raspberry Pi 4 (32-bit) | 32-bit | rpi_4_32b_defconfig | arm-linux-gnueabihf- |
| Raspberry Pi 3 (32-bit) | 32-bit | rpi_3_32b_defconfig | arm-linux-gnueabihf- |
| Raspberry Pi 2 | 32-bit | rpi_2_defconfig | arm-linux-gnueabihf- |
| Raspberry Pi 1 / Zero / Zero W | 32-bit | rpi_0_w_defconfig | arm-linux-gnueabihf- |
make distclean export CROSS_COMPILE=aarch64-linux-gnu- make rpi_4_defconfig make -j$(nproc)
u-boot.bin
Copy u-boot.bin onto the FAT32 boot partition of your SD card. Open the existing config.txt file on your SD card and configure the Pi's proprietary firmware to target the U-Boot binary by adding
kernel=u-boot.bin
©2023-2024 rculock.com