How to easily run aarch64 on RPi4

This is for ARMv8 based devices

How to easily run aarch64 on RPi4

Postby graysky » Sun Nov 10, 2019 2:12 am

EDIT: Moonman's builds are officially depracated. Use the official aarch64 image.

moonman wrote:Official ALARM image uses mainline kernel + U-Boot to boot it up which is the mainline way to boot up.
My images use the forked RPi kernel which gets loaded and executed without U-Boot.

FYI: my images are now EOL since official ALARM support is here and there will not be updates anymore.


This post is a gem hidden in a longer thread that details how to run aarch64 (64-bit kernel and userland) on your Raspberry Pi 4. As noted, it is unofficial. It does work! You can basically follow the standard setup guide for RPi4 but substitute the tarball at this site generously provided by moonman for the official armv7h one on the install guide. The rest of the steps are as advertised.

Kernel and firmware updates are not provided in an official repo so be sure to visit the URL moonman mentioned in the linked post.

Thank you moonman for the effort and expertise you put into these :ugeek:
graysky
 
Posts: 661
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: How to easily run aarch64 on RPi4

Postby andrewboring » Thu Dec 05, 2019 5:47 pm

I'll throw in a follow-up "thanks" as well.

After reading the entire thread, I was inspired to build an image with aarch64 and the rpi firmware and replicate a configuration that I currently deploy on an armv7 image on the 3B/3B+.

Starting from a base aarch64 installation from rpi-3-latest, I grabbed the weekly AUR build of the raspberry pi kernel (built from Sakaki's Gentoo-on-RPi stuff), built it, installed it, and rebooted. Simple and easy. Nice!

Then I grabbed moonman's raspberrypi-firmware PKGBUILD and built it, and got access to most of the stuff I couldn't get previously in aarch64. Again, simple and easy. NOICE!

The only thing missing for me was the MMAL/OpenMax bits, which is actively being worked on.

I didn't realize the level of effort involved in this kind of work prior to reading this statement and this exchange between sakaki and 6by9.

So I'll echo graysky's thanks to moonman for the PKGBUILDs, rootfs, etc for the RPi-4, and also throw in a quick thanks to soundcheck for talking through the process in that thread so I could easily use the work for my purposes. This exercise also furthered my understanding about the ARM/RPi architectures that I had been struggling with for a while.

On the shoulders of giants...
andrewboring
 
Posts: 11
Joined: Wed Jun 20, 2018 5:07 pm

Re: How to easily run aarch64 on RPi4

Postby clydedroid » Thu Dec 12, 2019 6:37 pm

Huge thanks to moonman from me as well. Was a little iffy on putting Arch on my new Pi 4, especially unsupported, but moonman's rootfs made it easy as pie! Now I'm off to get wireguard running :)
clydedroid
 
Posts: 3
Joined: Mon Dec 02, 2019 12:15 am

Re: How to easily run aarch64 on RPi4

Postby Emilgardis » Thu Jan 23, 2020 8:23 pm

This works great, however, I was unable to make it work with my SSD via a powered SATA -> USB converter like I've done with armv7 armlinux. Is this a know issue?

What happens is that USB sometimes allocates and we correctly boot into the USB drive as rootfs, but most of the times it doesn't work, complaining about timeouts and/or xhci errors. I would have to e2fsck -cpf my drive also after a shutdown on another system to make the drive (maybe) boot into.

I've given up with it for now.
Emilgardis
 
Posts: 1
Joined: Thu Jan 23, 2020 8:11 pm

Re: How to easily run aarch64 on RPi4

Postby moonman » Thu Jan 23, 2020 9:53 pm

This is how mine is set up currently and I have to problems
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: 3302
Joined: Sat Jan 15, 2011 3:36 am

Re: How to easily run aarch64 on RPi4

Postby wdirksen » Wed Mar 11, 2020 6:16 am

I'm trying to get a new RPi4 running on Moonman's aarch64 RPi4 images. After installing rootfs image 2020-03-08 following @Grayski 's advice my Rpi4 boots into rootfs fine. My question is how to install the other necessary packages (rpi 4 kernel, bootloader, etc) to get a fully functional ArchARM running on it. Are these installed in a chroot environment from there?
wdirksen
 
Posts: 11
Joined: Thu Dec 15, 2016 3:19 am

Re: How to easily run aarch64 on RPi4

Postby graysky » Wed Mar 11, 2020 5:31 pm

wdirksen wrote:I'm trying to get a new RPi4 running on Moonman's aarch64 RPi4 images. After installing rootfs image 2020-03-08 following @Grayski 's advice my Rpi4 boots into rootfs fine. My question is how to install the other necessary packages (rpi 4 kernel, bootloader, etc) to get a fully functional ArchARM running on it. Are these installed in a chroot environment from there?


If you have a bootabled aarch64 system, use pacman to pull down whatever packages you need except for those maintained by moonman (kernel and firmware) which are provided at the link in the first post. Those you will manually update since there isn't a formal repo (eg pacman -U http://...)
graysky
 
Posts: 661
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: How to easily run aarch64 on RPi4

Postby wdirksen » Wed Mar 11, 2020 6:38 pm

If you have a bootabled aarch64 system, use pacman to pull down whatever packages you need except for those maintained by moonman (kernel and firmware) which are provided at the link in the first post. Those you will manually update since there isn't a formal repo (eg pacman -U http://...)


That's what I thought but the booted rootfs on its own didn't accept pacman command when I tried it. This is good to get confirmed though. I probably messed something up and will investigate. Thanks grayski :|
wdirksen
 
Posts: 11
Joined: Thu Dec 15, 2016 3:19 am

Re: How to easily run aarch64 on RPi4

Postby andre » Sun Mar 15, 2020 6:40 pm

It seems this image does not set the nameserver through dhcp, even though it did set the ip address.
Had to set the nameserver manually in /etc/resolv.conf
andre
 
Posts: 66
Joined: Wed Jan 25, 2012 1:39 pm
Location: Eindhoven

Re: How to easily run aarch64 on RPi4

Postby graysky » Sun Mar 15, 2020 7:04 pm

andre wrote:It seems this image does not set the nameserver through dhcp, even though it did set the ip address.
Had to set the nameserver manually in /etc/resolv.conf


Yes, there is a small bug in the image. You need to:
Code: Select all
# rm /etc/resolv.conf
# ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
graysky
 
Posts: 661
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Next

Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 2 guests