[SOLVED] Network boot Pi4 with aarch64 - U-Boot config issue

Discussion about U-Boot and the kernel.

[SOLVED] Network boot Pi4 with aarch64 - U-Boot config issue

Postby Malvineous » Sun Jul 18, 2021 3:00 am

Hi all,

I have successfully gotten a Raspberry Pi 4 booting over the network with the 32-bit version of Arch Linux ARM, however after experiencing some issues (no USB support due to host controller drivers failing with an error, hardware accelerated decoding not working due to missing /dev/vchiq) I am trying to give the 64-bit version a go to see if it supports the Pi4 hardware a bit better.

However for some reason the 64-bit version no longer seems to boot the kernel directly, instead launching U-Boot. This means that I only get as far as U-Boot loading over the network, but then it complains that it can't find any kernel files.

It tries to download a file called "pxelinux.cfg/default" from the TFTP server so I put a KERNEL and APPEND command in there and U-Boot picks this up, downloads the initramfs-linux.img file but then complains that "kernel_comp_addr_r or kernel_comp_size is not provided". It then tries to download "boot.scr.uimg" which isn't included in the original files, just "boot.scr" which has references to the SD card so doesn't seem relevant to my network booting process.

So at this point I'm a bit lost as I'm not sure what sort of memory addresses I'm supposed to pass or how to get the device tree overlay files specified since the included "boot.scr" seems to refer to them.

Are there any instructions or a guide on how to get the 64-bit Arch Linux ARM U-Boot to boot a Pi4 over the network? I presume it would be relatively standard U-Boot commands but the kernel addresses and device tree stuff seems to be Pi specific and has me a bit stumped.
Last edited by Malvineous on Sun Jul 18, 2021 4:30 am, edited 1 time in total.
Malvineous
 
Posts: 40
Joined: Sat Mar 11, 2017 1:45 pm

Re: How to network boot Pi4 with aarch64 - U-Boot config iss

Postby Malvineous » Sun Jul 18, 2021 4:30 am

I think I have it worked out - I didn't realise you have to boot the uncompressed image file.

So to get this to work, you have to create a folder called "pxelinux.cfg" on the TFTP server, and inside that create a file called "default" (or one specific to your Pi's address if you prefer) and put this in it:

$this->bbcode_second_pass_code('', '
DEFAULT aarm64
LABEL aarm64
KERNEL Image
INITRD initramfs-linux.img
APPEND console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=myserver:/path/to/rootfs/ ro ip=dhcp rootwait
# You can use nfsroot=:,v3,hard if your DHCP server provides the rootfs path in the "root-path" DHCP option (17).
')
Unfortunately while this gets the kernel running, it can't mount the root filesystem as the 64-bit kernel is missing the IP autoconfiguration options that are present in the 32-bit kernels, so until that gets fixed or you build your own kernel, it is not possible to network boot 64-bit Arch Linux ARM, and you'll have to stick with the 32-bit version.
Malvineous
 
Posts: 40
Joined: Sat Mar 11, 2017 1:45 pm


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 2 guests