Raspberry Pi 4 Kernel and Boot
I have tried running arm64 rpi alpine 3.10.2 on the Raspberry pi 4 and have found a couple of things that need to be adjusted.
The 3.10.2 release does not boot becuase it is missing a couple of new files required by the Raspberry pi 4. These two files are:
start4.elf
fixup4.dat
They can be retrieved from the official raspberry pi repository:
https://github.com/raspberrypi/firmware/tree/master/boot
They go in the top level of the fat32(boot) partition of the 3.10.2 release. I do not see an aport that can be patched to include these and I can not figure out how the releases are generated to create a patch.
The config.txt needs a couple of modifications, arm_control is being depreciated, so
arm_control=0x200 needs to be changed to arm_64bit=1
and the following needs to be added
enable_gic=1
I have tested the above changes, and they allow the raspberry pi 4 to boot with current release 3.10.2. However, no usb devices work. This is because the kernel is not built with the correct defconfig for the raspberry pi 4. The new defconfig is:
bcm2711_defconfig
I looked at the aport for main/linux-rpi and find it too confusing. I created an abuild chroot on a 64-bit arm and tried to build it using bcm2711_defconfig but cannot get past patching. The raspberry pi specific changes from alpine linux seem to fail when I try to build.
Could these changes be included in the next release to allow the raspberry pi 4 to work?
Thank you so much for an amazing distro
Sources of information for changes:
Raspberry pi 4 on Ubuntu https://jamesachambers.com/raspberry-pi-ubuntu-server-18-04-2-installation-guide/
Raspberry pi 4 on Manjaro relase https://www.manjaro.org/download/arm8-raspberry-pi-4-minimal/ I mounted the fat32 (boot) of the image to see what was going on
I am currently using this and it works flawlessly
Official Raspberry pi documentation https://www.raspberrypi.org/documentation/configuration/ specifically https://www.raspberrypi.org/documentation/configuration/boot_folder.md