DougieLawson wrote: ↑
Sat Jul 06, 2019 11:52 am
I assume that'll work for the RPI3B, 3B+ & 3A that are all 64-bit capable (as demostrated with Sakaki's Gentoo64)?
The issue agherzan is addressing in his (very nice) guide, is how to get the Pi4
booting in 64-bit mode, and further how to convert an existing 32-bit image (Raspbian Buster) to boot under a 64-bit kernel on this device.
Point being (as regards your question), the Pi4 has a different SoC from the Pi3 which (in this case) requires a differently configured 64-bit kernel
). Also, at the moment, you need an armstub8-gic.bin as well (for the Pi4, also dealt with in agherzan's guide), plus a few other changes (to config.txt, etc.) to make it work properly in 64-bit mode.
So, while there isn't, therefore, a direct read-across from his guide to converting 32-bit images for the Pi3
(to 64-bit boot), the process required to cross-compile a 64-bit kernel for the RPi3
is very similar to that agherzan gives (just with a different defconfig). (I also have instructions for building such a 64-bit kernel for the RPi3 (on a Gentoo PC using crossdev) here
.) And actually, once you have an appropriate 64-bit Pi3 (bcmrpi3_defconfig -> kernel8.img) kernel+dtb and matching module set compiled and placed on the bootfs and rootfs accordingly, your Pi3 will automagically use them and start up in 64-bit mode, so in a sense the conversion process is simpler (but different) for the RPi3.
Incidentally, I maintain a weekly autobuild of the bcmrpi3_config kernel here
(and of a slightly tweaked version, here
), should that be of interest (if you follow the Installation
instructions on either page when booted into a 32-bit RPi3 system (which has the bootfs mounted at /boot), and restart, you should find you come back up under a 64-bit kernel!)
Finally, in case it is of interest, I have also posted a convenience tarball of the necessary Pi4
64-bit bootfs and rootfs files, and instructions for image conversion using it (if you want to avoid compilation); see here
for further details. This can be used to simply adapt most 32-bit (such as Raspbian Buster) RPi3/4-capable or 64bit (such as gentoo-on-rpi3-64bit) RPi3-capable images for 64-bit boot on the Pi4 (the downside is that the compiled kernel in the tarball will rapidly get out-of-date as fixes are applied).
I intend to bring up a bcm2711_defconfig weekly kernel autobuild in due course.