ARM64 – Pi3 Success – Almost..

After more ‘investigation’, I managed to find a working U-Boot for a 64-bit boot of the Raspberry Pi 3, by copying it from the boot directory of this: found towards the end of the latest 64-bit thread on the Pi Forum: .  Thanks to xyinao for putting it all together..

I copied the kernel Image etc into a Fedora 23 aarch64 SDcard, and it booted OK, but I noticed one odd thing…   There were only 3 CPU cores instead of 4..    I tested by booting the original Debian system, with the same kernel image, and there were 4…

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.036066] Detected VIPT I-cache on CPU1
[ 0.036112] CPU1: Booted secondary processor [410fd034]
[ 0.048091] Detected VIPT I-cache on CPU2
[ 0.048120] CPU2: Booted secondary processor [410fd034]
[ 0.060128] Detected VIPT I-cache on CPU3
[ 0.060158] CPU3: Booted secondary processor [410fd034]
[ 0.060218] Brought up 4 CPUs
[ 0.060349] SMP: Total of 4 processors activated.
[ 0.060375] CPU: All CPU(s) started at EL2

I wanted (as usual) to compile my own kernel, and found that the 4.5.0-based one at booted, but then hung..    I tried another (4.6-rc3-based) version at, and this one did boot successfully:

Fedora 23 (Twenty Three)
Kernel 4.6.0-rc3-next-20160413 on an aarch64 (ttyS0)
# uname -a
Linux rgpi3 4.6.0-rc3-next-20160413 #1 SMP Mon Apr 25 21:14:33 EDT 2016 aarch64 aarch64 aarch64 GNU/Linux

But…  I still only had three CPU cores:

# dmesg |grep CPU
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.102974] Detected VIPT I-cache on CPU1
[ 0.103023] CPU1: Booted secondary processor [410fd034]
[ 0.103417] Detected VIPT I-cache on CPU2
[ 0.103449] CPU2: Booted secondary processor [410fd034]
[ 1.107755] CPU3: failed to come online
[ 1.107766] CPU3: failed in unknown state : 0x0
[ 1.107785] Brought up 3 CPUs
[ 1.107801] CPU: All CPU(s) started at EL2

So… Nearly there, but more investigation needed..

Robert Gadsdon.   April 25, 2016.


ARM64 – Pi3 Success – Almost.. — 2 Comments

  1. Hi Robert.
    At first I’d like to thank you for writing this blog. It’s very interesting.
    Recently I also bought a Raspberry Pi3 and Odroid-C2.
    At the moment I try to compile a running kernel for the Raspberry Pi3 in aarch64,
    but always fail. It does not only seem to be a hardware issue,because my kernels fail to boot in qemu-system-aarch64 as well, while the kernel included in the debian image you mentioned above boots at both of them Rpi and qemu. Because I could not get the debian kernel to work with an nfs-root, I try to make my own kernel. I tried to use the /proc/kernel/config.gz from the debian image , copied it to the “anholt” tree. used “make oldconfig” but still the kernel does not boot up. (no more messages after u-boot says “booting kernel”.) I also tried Fedora23 aarch64 kernel configs with “anholt” and a stock 4.6.2 but failed. Could you provide me a config file e.g. for you “anholt” kernel and tell me which commands you use for compiling? I tried cross-compiling on Fedora 23 x86_64 with “make all modules -j -l7 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-” as well as compiling on a odroid-c2 but always fail. Feels like back in the 90s when I started compiling my first x86 kernels.

    Thanks in advance,

    • The Odroid C2 still lacks mmc support in the ‘mainline’ kernel, although it is in the (patched) u-boot.
      I have not had much success with the 64-bit patched kernels for the Pi3 (see latest article).. So..I don’t yet have a working config for either..
      I usually use this sort of workflow (for cross-compiling)

      export ARCH=arm64
      export CROSS_COMPILE=aarch64-linux-gnu-
      export INSTALL_PATH=../
      export INSTALL_MOD_PATH=../ << install locally, in ../boot and ../lib) make defconfig make xconfig make -j4 Image make dtbs make -j4 modules make modules_install make firmware_install - then copy across the kernel Image and xxxx.dtb files, etc... RG.

Leave a Reply

Your email address will not be published. Required fields are marked *