Raspberry Pi 4 64bit support

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Raspberry Pi 4 64bit support

Postby Pietrotti97 » Thu Sep 05, 2019 8:01 pm

Hello everyone, I'm new to this forum.
I installed archlinux arm on my rpi4 but I noticed there is no 64bit support.
In the page for the pi3 there is a section for 64bit support.
Is there any way to get 64bit support on this board?
Thankyou
Pietrotti97
 
Posts: 4
Joined: Thu Sep 05, 2019 7:50 pm

Re: Raspberry Pi 4 64bit support

Postby Blodo » Fri Sep 06, 2019 9:59 pm

See this thread for more info on aarch64 support: viewtopic.php?f=8&t=13734&start=50

Long story short, it's likely to be a while, with support being merged for the 5.4 mainline kernel mostly. You could try building the rpi foundation kernel which theoretically has support for aarch64, but no idea if it will have issues or not as they focus on 32 bit support pretty much exclusively and have no intention on moving away from that.
Blodo
 
Posts: 4
Joined: Fri Jul 26, 2019 12:18 pm

Re: Raspberry Pi 4 64bit support

Postby Pietrotti97 » Sat Sep 07, 2019 9:13 am

Ok then,
Thankyou
Pietrotti97
 
Posts: 4
Joined: Thu Sep 05, 2019 7:50 pm

Re: Raspberry Pi 4 64bit support

Postby lategoodbye » Sun Sep 08, 2019 6:46 am

$this->bbcode_second_pass_quote('', 'L')ong story short, it's likely to be a while, with support being merged for the 5.4 mainline kernel mostly.


Unfortunately i need to correct this. Mainline Linux 5.4 will only contain preparation steps for BCM2711, but no bootable system. The DTS hasn't been accepted yet.

Here is the current state:
https://github.com/lategoodbye/rpi-zero/issues/43
lategoodbye
 
Posts: 124
Joined: Sat Dec 29, 2018 1:24 am

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Wed Oct 09, 2019 9:03 am

Hi.

I successfully compiled and installed the recent RPI 64bit kernel on a 32bit ALARM image.


My question is. Is there a way to get a 64-bit userland going?

Meanwhile Gentoo has a full blown 64-bit based image with RPI kernel up'n running.
There are ways. ;)


I read comments that 20-30% performance improvements can be expected in certain areas.
Therefore I think it is well worth to look into it - and to verify it.

THX.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

Re: Raspberry Pi 4 64bit support

Postby Kabbone » Wed Oct 09, 2019 3:40 pm

You can just take the Rpi3 arm64 bit image and use your compiled kernel. Should work
Kabbone
 
Posts: 155
Joined: Thu Jul 25, 2013 9:20 am

Re: Raspberry Pi 4 64bit support

Postby Pietrotti97 » Wed Oct 09, 2019 3:44 pm

I think the better way is to use a generic aarch64 image, putting the 64bit rpi4 compiled kernel inside.
Still, I'm not able to compile my own 64bit rpi4 kernel so I can't try.
Is there someone that can link me a guide to do it?
Btw I don't know if the rpi3 image is different than the aarch64. I think it is btw
Pietrotti97
 
Posts: 4
Joined: Thu Sep 05, 2019 7:50 pm

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Thu Oct 10, 2019 10:18 am

I tried the 64bit RPI3 armv8 image on a 3B+.

That image is mainline and uboot if I'm not mistaken.
I didn't make it work by just copying the usual kernel stuff.
That's why I ended up here.

I do my kernel pretty much in line with below:

https://github.com/sakaki-/gentoo-on-rpi-64bit/wiki/Build-an-RPi3-64bit-Kernel-on-your-crossdev-PC

I do compile it under Ubuntu on a NUC , using the linaro based crosscompiler: "aarch64-linux-gnu-"

I think the question here is how to replace uboot with the RPI boot stuff.

E.g. I just figured that I'd also need another config.txt and cmdline.txt on the RPI3 image.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Thu Oct 10, 2019 1:32 pm

Hi.

I managed to merge the 64bit RPI kernel and 64bit userland based on the Alarm-RPI3-64 package for the PI3B+. ;)

$this->bbcode_second_pass_code('', '
Linux alarm64 4.19.76-rt25-sc1 #1 SMP PREEMPT RT Sun Oct 6 14:11:00 CEST 2019 aarch64 GNU/Linux
')

$this->bbcode_second_pass_code('', '
#file /usr/bin/ls
/usr/bin/ls: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=d3d0049a9af71d4be7a4dafff7d668b248b75319, for GNU/Linux 3.7.0, stripped
')



* I took the PI3 64bit image.
* removed /boot/Image* files, otherwise the mmc1 (boot) partition would have been too small
* /boot/overlays had to be created
* copied my crosscompiled 64bit kernel and associated files modules, .dtb(s) etc.
* copied cmdline and config.txt from my 32bit userland installation
Note: config.txt requires below lines to boot the RPI64bit kernel

$this->bbcode_second_pass_code('', '
kernel=kernel8.img
arm_64bit=1
')

* and finally rebooted

And that was it. :D

As you can see above I'm running my own 64-bit rt-kernel, which comes with a pretty much stripped down .config based on bcmrpi3_defconfig.
I'm running the PI headless, no fancy graphics or alike. I can't tell if all that "fancy" stuff works flawless.
My audio HAT and Wifi works - that'll do for me. ;)


Great stuff.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

Re: Raspberry Pi 4 64bit support

Postby Pietrotti97 » Thu Oct 10, 2019 1:35 pm

Can you please upload somewhere your compiled kernel with all the needed files to boot?
I would like to try that kernel with aarch64 base system

Thankyou
Pietrotti97
 
Posts: 4
Joined: Thu Sep 05, 2019 7:50 pm

Next

Return to ARMv8

Who is online

Users browsing this forum: No registered users and 21 guests