Skip to content
Frank Bauernöppel edited this page Oct 7, 2018 · 7 revisions

Der universelle Boot Loader http://www.denx.de/wiki/U-Boot

# cross-compile toolchain and some tools must be installed
sudo apt install git bison flex gcc-arm-linux-gnueabi 

git clone git://git.denx.de/u-boot.git
cd u-boot/

# make rpi_3_32b_defconfig
# for Raspi Zero W
make rpi_0_w_defconfig

# cross-compilation (using 64-Bit Ubuntu 18.04 build host)
export CROSS_COMPILE=arm-linux-gnueabi-
export ARCH=arm
make

Power-down the Raspi, put the micro-SD card into the build host. The boot partition should mount. Copy the file buildroot/output/images/u-boot.bin to the boot partition (same directory as zImage) and edit the file config.txt:

Add (or change) the line kernel=u-boot.bin to start U-Boot instead of the kernel and add a line enable_uart=1 below. Comment out a line dtoverlay=pi3-miniuart-bt if present. Save and unmount the card.

Attach a serial port cable to the Raspi and insert the micro-SD card. Open a minicom serial console to the Raspi from the host. Power-up the Raspi and quickly press a key in the serial console to interrupt the boot process.

For testing kernel boot, the following commands can be executed:

mmc dev 0
fatload mmc 0:1 ${kernel_addr_r} zImage
fatload mmc 0:1 ${fdt_addr_r} bcm2710-rpi-3-b.dtb
setenv bootargs earlyprintk  console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd
bootz ${kernel_addr_r} -  ${fdt_addr_r}

see

Clone this wiki locally