I saw a few posts regarding this topic, but nothing really helped my cause, and so restating my problem here.
I would like to build my own toolchain, U-boot and the mainline Linux kernel to be ported on a particular processor. Since I currently am in possession of a Raspberry Pi 4B, I decided to use it to test my binaries stage-by-stage on it.
I performed the following so far:
kernel=u-boot.bin
enable_uart=1 7. Tried connecting RPi to the monitor with HDMI cable
What I see: The device seems to switch on, I see some quick green LED blinks, and then it is the red LED only that keeps steady. The monitor gets signal indicated by the fact that it brightens, but the screen is blank. I expected a command prompt with UART > or something, but nothing came.
Questions:
I hope this answers the U-Boot side of the question:
The following worked for me to boot a 1 GiB Raspberry 4 using a 64bit Raspbian kernel:
Build u-boot v2020.10-rc5 (on Debian Bullseye with GCC 10).
make rpi_arm64_defconfig
CROSS_COMPILE=aarch64-linux-gnu- make -j4
Copy u-boot.bin to first partition of the RPi4 SD-card.
Edit config.txt and add these lines:
enable_uart=1
arm_64bit=1
kernel=u-boot.bin
On the serial console of U-Boot I entered the following commands. You could put them into a boot.scr file using mkimage.
U-Boot> setenv bootargs coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 smsc95xx.macaddr=DC:A6:32:05:53:B6 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=7f586f18-02 rootfstype=ext4 elevator=deadline rootwait
U-Boot> load mmc 0:1 $fdt_addr_r bcm2711-rpi-4-b.dtb
47471 bytes read in 26 ms (1.7 MiB/s)
U-Boot> load mmc 0:1 $kernel_addr_r kernel8.img
15483392 bytes read in 823 ms (17.9 MiB/s)
U-Boot> booti $kernel_addr_r - $fdt_addr_r
You will have to adjust the PARTUUID according to match your root partition and the MAC address.