Raspberry Pi 4 64bit support

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

Re: Raspberry Pi 4 64bit support

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

No. I can't.
And I won't, even if I could. Sorry.

I gave directions. And showed that it works. That'll be it.


It requires quite a skill set and energy to bring it all together. And to provide a generic well tested package.


What's required is a new 64-bit ALARM package with RPI kernel and 64bit userland.
Now. Looking back. It doesn't seem to be that complex.

We (you) should somehow convince the ALARM folks in charge to build a package.


And I even havn't been checking out the PI4 situation yet. It seems that the 64-bit Alarm RPI3 package can't be used.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

Re: Raspberry Pi 4 64bit support

Postby Kabbone » Thu Oct 10, 2019 6:31 pm

Nice, already wanted to test it myself with the kernel from the foundation repository. I would also just run it headless even without any gpio, wifi, bt, so it should not be too big of a problem.
As of the Rpi3 aarch64 kernel being the mainline kernel, I don't think there will be some seperate package for the Rpi4 until it has a usable mainline kernel
Kabbone
 
Posts: 153
Joined: Thu Jul 25, 2013 9:20 am

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Fri Oct 11, 2019 8:04 am

BTW there's also an AUR maintained precompiled 64bit RPI kernel:

https://aur.archlinux.org/packages/linux-aarch64-raspberrypi-bin/

The package basically installs a prebuilt Gentoo kernel.
It might also installs on the RPI3 image.

*******************


I just figured that there are no firmware "vc" tools, such as tvservice under /opt on the ALARM RPI3 image.
Let see where I can get these in 64bit. Any ideas ? Let see if I can find them on the Gentoo site.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Fri Oct 11, 2019 12:45 pm

Hi.

As I already mentioned, the so called RPI userland tools @64bit, such as tvservice, are missing on the 64bit Alarm RPI3 image. On a (uboot-)mainline kernel these wouldn't make any sense.

That's why we need to build them ourselves.

Below I'll quickly show how I made it work on my booted RPI 64bit installation:

$this->bbcode_second_pass_code('', '
sudo su
pacman -S --needed base-devel cmake git
cd /tmp
git clone --depth=1 https://github.com/raspberrypi/userland.git
cd userland
sed -i 's/^ARCH=.*/ARCH=$(uname -m)/g' ./buildme
sed -i 's/^ARM64=OFF/ARM64=ON/g' ./buildme
./buildme

cp /opt/vc/lib/*{.a,.so} /usr/lib
ldconfig

###cleanup
cd
rm -rf /tmp/userland
')

Result:

$this->bbcode_second_pass_code('', '
root@boss64:~# tvservice -o
Powering off HDMI
')


All related data will be automatically installed under /opt/vc and the PATH variable in /root/.bashrc will also be updated accordingly.

Enjoy. :D
Last edited by soundcheck on Fri Oct 18, 2019 12:21 pm, edited 1 time in total.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Tue Oct 15, 2019 6:37 am

Yesterday I finished my phase1 Pi4 setup based on the PI4 alarm package, which is basically also a Pi2 userland package.
I then made and integrated my 64bit PI4 (rt-)kernel based on the bcm2711_defconfig.

Result: No obvious issues so far. :D

The biggest issue, from what I read which would affect my usecase , used to be the 1GB RAM limitation issue when running the 64bit kernel. You had to add "total_mem=1024" to config.txt.
I now took that total_mem=1024 out. The system booted and I do see 4GB RAM. Hmmh. Perhaps the issue got solved. :?:

So far so good.


Next comes, the PI4 64bit userland. Let see how this goes. ;)

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

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Thu Oct 17, 2019 2:56 pm

Hi.

FYI.

Finally. I'm now running my own RPI4 ALARM 64bit installation - RPI kernel and userland! :D

$this->bbcode_second_pass_code('', '
root@boss64:~# cat /proc/device-tree/model
Raspberry Pi 4 Model B Rev 1.1

root@boss64:~# uname -a
Linux boss64 4.19.79-rt25-sc1 #2 SMP PREEMPT RT Mon Oct 14 09:35:28 CEST 2019 aarch64 GNU/Linux

root@boss64:~# file /usr/bin/ls
/usr/bin/ls: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV)
')


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

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Thu Oct 17, 2019 5:53 pm

Just to mention it.

Above PI4 installation is based on my earlier described RPI3B+-64bit image. Just the kernel and related files got adapted to PI4.
And remember, the userland tools I had already installed on that image.

Two more things.

1.
The PI4 comes with an eeprom. That holds the bootloader. This firmware needs to be updated regularly.
New and important features are popping up now and then.
My recently purchased PI4 still held the initial firmware from May btw.

I havn't seen an AUR or similar package. I therefore built rpi-eeprom myself. And ran the update.

rpi-eeprom: https://github.com/raspberrypi/rpi-eeprom

This toolset should be part of any ALARM PI4 installation.

2. VLI USB controller

The USB controller also holds an important firmware. And that one also needs to be updated manually.
And the related tool also need to be installed manually.
The PI4 VLI USB controller firmware is work-in-progress. There are IMO quite valuable enhancements that can be
made accessible with newer packages. E.g. One of the recent firmwares comes with power saving features.
That SW IMO should also be part of any standard ALARM PI4 package at one point in time.

Here 's the discussion thread: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=250990&sid=f73f6b64f638016f57f2fe0437fb74dd

That thread also holds download infos etc.

****

That'll be it. It's been quite a hacking journey. Let see if we see a proper 64-bit PI4 image with RPI kernel and all the above mentioned tools popping up sooner or later.

Enjoy.
Last edited by soundcheck on Wed Oct 23, 2019 6:43 am, edited 1 time in total.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

Re: Raspberry Pi 4 64bit support

Postby moonman » Wed Oct 23, 2019 12:12 am

I got the 64-bit kernel / config.txt + raspberrypi-firmware compiled for aarch64 and it works perfectly.
Combine this with aarch64 generic rootfs +firmware-raspberrypi + raspberrypi-bootloader and you've got yourself a fully working aarch64 image.

rootfs, kernel + raspberrypi-firmware are here
$this->bbcode_second_pass_code('', 'https://olegtown.pw/Public/ArchLinuxArm/RPi4/')
PKGBUILDs are available here
$this->bbcode_second_pass_code('', 'https://github.com/moonman/MyPKGBUILDs')

Please note this is by no means an official support, and there likely will not be any official support until rpi-foundation starts supporting aarch64 officially.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Raspberry Pi 4 64bit support

Postby lategoodbye » Wed Oct 23, 2019 5:19 am

FWIW the pull request with initial Raspberry Pi 4 support (incl. arm64) is on its way to Mainline Linux 5.5:
https://marc.info/?l=linux-arm-kernel&m ... 609762&w=2

Unfortunately no V3D or GENET yet.
lategoodbye
 
Posts: 116
Joined: Sat Dec 29, 2018 1:24 am

Re: Raspberry Pi 4 64bit support

Postby soundcheck » Wed Oct 23, 2019 5:36 am

@moonman
That's what I'm saying, explaining and running for a quite while. ;)

@lategoodbye
I think mainline will continue to be a pretty bad compromise compared to the RPI kernel. It simply lacks tons of features
and adaptations, which most probably would never be accepted by mainline. I mean. It's that RPI kernel what makes the PI unique

Luckily we have a 64bit RPI kernel now. I'd strongly vote for getting rid of the mainline kernels and uboot and replace these
with the RPI kernels on the aarch64 ALARM packages. It's actually IMO a must to go that path for compatibility reasons.
soundcheck
 
Posts: 39
Joined: Sun Sep 01, 2013 4:56 pm

PreviousNext

Return to ARMv8

Who is online

Users browsing this forum: No registered users and 21 guests