Latest RPI4 kernel on aarch64

This is for ARMv8 based devices

Latest RPI4 kernel on aarch64

Postby keithspg » Wed Dec 23, 2020 2:55 pm

I have been building my own kernel for aarch64 for a few months based on moonman's PKGBUILDs. I have booted it on Pi4, Pi3 and 3+ without issue. Well, I just did a pacman -Syu on my PRiB3+ and it appears that the linux-raspberrypi4 kernel is an official Arch Arm aarch64 package! This is good news. I still build my own kernel to build in some capability that is not in the default package, but that it is 'current' is good news IMO.

The problem, though, is that after upgrade My Pi3B+ will not boot because the upgrade puts the broadcom dtbs in /boot/broadcom and this location requires a config line calling the proper btb for the correct board. The other architecture kernels (armv6 and armv7) put them in /boot. Why is this? If they are in /boot, it appears that at boot time, if the btb for the board is present in /boot, the proper dtb is selected and the Pi boots. If not, it halts. If the call out is wrong for the board in /boot/config, it also halts. If the SD card is used in a different Pi (pi4 versus pi3 or 2v1.2) it will not boot unless the proper dtb is in the config.txt. Is there a reason they are in /boot/broadcom instead of /boot? The linux-raspberrypi4 only boots on broadcom cards, no? If they were in /boot like the other RPI kernels it would make the resulting package more 'universal, I would think.

Am I missing something?
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: Latest RPI4 kernel on aarch64

Postby graysky » Wed Dec 23, 2020 3:33 pm

They are in /boot/broadcom following moonman's lead. See: https://github.com/moonman/MyPKGBUILDs/ ... ig8.txt#L7

It could be that the arm64 kernel wants them there, need to dig into it to learn more: https://github.com/archlinuxarm/PKGBUIL ... BUILD#L112

Did you diff your /boot/config.txt against the pacnew version? As of today (5.4.83 kernel), it should look like this by default:
$this->bbcode_second_pass_code('', 'gpu_mem=64
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
device_tree=broadcom/bcm2711-rpi-4-b.dtb
enable_gic=1')
graysky
Developer
 
Posts: 1880
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Latest RPI4 kernel on aarch64

Postby keithspg » Wed Dec 23, 2020 4:54 pm

The /boot/config.txt does look like that, but when that happens, the resulting kernel and image is now tied to the pi4 yet it can boot on other Pis... I am just looking for consistency between all the Pis and how they boot.

You are right that the aarch64 kernel puts the broadcom dtbs in /boot/broadcom at build. For my images, I move the rpi*.dtbs from /boot/broadcom to /boot so that the resulting image can boot on all Pis that it can.

As it is, the 'ugly duckling' of kernel packages it the 32 bit armv7 as it is only 'needed' for the Pi2v1.1 The pi2v1.2 and all pib3s and pib4s can all boot with the aarch64 raspberrypi4 kernel. The armv6 boots the original Pi A/B and the Zero AFAIK.

Keith
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: Latest RPI4 kernel on aarch64

Postby graysky » Wed Dec 23, 2020 6:16 pm

graysky
Developer
 
Posts: 1880
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Latest RPI4 kernel on aarch64

Postby keithspg » Fri Dec 25, 2020 4:42 pm

Awesome, thanks!

I guess my suggestion makes sense, then...
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 5 guests