Arch Linux on RockPro64
#1
Hello,

I have been tinkering with my RockPro64 in the last few days, and as I have Arch Linux running on almost every computer in my home (unfortunately I could not find a port for my router), I was also looking into the possibility to bring a preferably vanilla Arch Linux to the RockPro64. I especially like this as this gives me the opportunity to use the precompiled packages from the Arch Linux ARM community and thus have a nice and up-to-date package source.

This also promised to be a good opportunity for me to learn how images for such embedded boards can be created, as I have never done such a thing before.

What I tried:
There is an official Arch Linux image for the Rock64 on the Arch Linux ARM webpage, on top of that there is a somewhat ambiguous description in a forum on how Arch Linux can be ported to Rock64: https://me.m01.eu/blog/2017/12/rock64-arch-linux/
This basically combines the projects of Ayufan to compile u-boot and the arm-trusted-firmware packages, creates an image with guestfish in the format required by RockChip and extracts the stock ARMv8 Arch Linux ARM image into the /root partition.


My idea was that this project could nicely be used as the starting point for my idea, as I hoped to be able to just replace every occurence of Rock64 with RockPro64 in the configuration files. Unfortunately this turned out to be harder than expected (what doesn't if you are compiling your own images?). I fought quite a lot with the strange curiosity that aarch64-linux-gnu- threw all kinds of errors when compiling u-boot under my arch build machine, but compiled nicely when under a debian host... Opposite was the behavior of guestfish, that only wanted to work under arch linux. Nevertheless, this failed as the created image simply refused to boot for some reason. I have to admit though that I still did not really understand, what the build scripts do and where it all pulls files from Ayufans compiled results. I also had problems to understand what Ayufan did in the configuration of u-boot for example (I also could not figure out yet where the compiled files from arm-trusted-firmware are ever used) but that can well have its reason in my inexperience. His images work, so he must have done some awesome magic.

So, after some frustration I had a dirty backup plan:
I just burned Ayufans latest Debian Stretch image to my SD card and then deleted everything on / except /boot. After that I extracted everything but the boot folder from the Arch Linux ARM file onto / on the SD card.

I don't have to say, my surprise was huge as this image suddenly booted on my RockPro64. After doing an initialisation of pacman and a first package update, I noticed that Arch Linux suggested to update my kernel from 4.4 to 4.17. I thought this will happen as Ayufans Stretch images incorporate the rockchip custom 4.4 kernel. Anyways I hit the update. To my fortune the stock Arch Linux kernel is called "Image" with "initramfs-linux.img" as the init system, so instead of overwriting Ayufans kernel it just packed the stock one next to it. Then I only had to add an other entry to /boot/extlinux/extlinux.conf before the entries of Ayufan to use the stock kernel and now my RockPro64 is running vanilla Arch Linux ARM!

However, this is only a first test and proof-of-concept, so there are some drawbacks:
u-boot will never be upgraded in this constellation as arch linux simply does not know that there is u-boot installed on the system and there is also no package in the sources that it could use for an upgrade. Also, I did not get my HDMI monitor to work yet (but as I plan to use my RockPro as a headless server I don't care about that very much). I will also have to look to get PCIe working form my SATA card.

But still, I have a vanilla Arch Linux running on my machine.  I know, it was a very dirty way of getting it to run, but I will need to read more in the rockchip wiki on compiling linux and creating images to finally get this to work the traditional way... Is there anyone with interest to port Arch Linux to the RockPro with a little experience in linux and u-boot and image creation?

Greetings

Update after some minutes of testing:

As Arch Linux uses a bleeding edge kernel, the PCIe does not seem to work, at least there is no output to the lspci command. Switching back to the 4.4 kernel at least shows my sata controller. As I just realised, the HDMI also works with this kernel, so at least I can see that there is some error displayed when I connect a HDD, so I will need to look into that.


Messages In This Thread
Arch Linux on RockPro64 - by mmatyas - 07-29-2018, 03:31 PM
RE: Arch Linux on RockPro64 - by Tigger - 08-06-2018, 01:29 PM
RE: Arch Linux on RockPro64 - by hiccupstix - 08-06-2018, 03:40 PM
RE: Arch Linux on RockPro64 - by Tigger - 08-07-2018, 03:02 AM
RE: Arch Linux on RockPro64 - by mmatyas - 08-08-2018, 01:49 AM
Arch Linux on RockPro64 - by hiccupstix - 08-07-2018, 03:17 AM
RE: Arch Linux on RockPro64 - by Tigger - 08-08-2018, 04:48 AM
RE: Arch Linux on RockPro64 - by ah- - 08-28-2018, 03:14 PM
RE: Arch Linux on RockPro64 - by dukla2000 - 08-29-2018, 03:37 AM
RE: Arch Linux on RockPro64 - by ah- - 08-29-2018, 11:25 AM
RE: Arch Linux on RockPro64 - by ali - 11-09-2018, 08:54 AM
RE: Arch Linux on RockPro64 - by mmatyas - 11-06-2018, 03:47 PM
RE: Arch Linux on RockPro64 - by mmatyas - 11-20-2018, 06:29 PM
RE: Arch Linux on RockPro64 - by ali - 11-27-2018, 12:28 AM
RE: Arch Linux on RockPro64 - by p1x3l3d - 11-22-2018, 05:28 PM
RE: Arch Linux on RockPro64 - by mmatyas - 11-24-2018, 04:09 AM
RE: Arch Linux on RockPro64 - by p1x3l3d - 11-26-2018, 02:11 PM
RE: Arch Linux on RockPro64 - by p1x3l3d - 01-13-2019, 12:41 PM
RE: Arch Linux on RockPro64 - by mmatyas - 01-19-2019, 11:30 AM
RE: Arch Linux on RockPro64 - by mmatyas - 11-27-2018, 01:21 AM
RE: Arch Linux on RockPro64 - by ali - 12-01-2018, 07:16 AM
RE: Arch Linux on RockPro64 - by fosf0r - 12-03-2018, 09:59 AM
RE: Arch Linux on RockPro64 - by ali - 01-11-2019, 02:21 AM
RE: Arch Linux on RockPro64 - by mmatyas - 02-26-2019, 11:31 AM
RE: Arch Linux on RockPro64 - by mmatyas - 02-27-2019, 06:07 PM
RE: Arch Linux on RockPro64 - by mmatyas - 09-10-2019, 01:58 PM
RE: Arch Linux on RockPro64 - by oreggin - 09-26-2019, 03:09 PM
RE: Arch Linux on RockPro64 - by TaborFife - 09-28-2019, 04:30 AM
RE: Arch Linux on RockPro64 - by hev - 03-20-2020, 12:27 AM
RE: Arch Linux on RockPro64 - by rhysperry111 - 05-23-2020, 02:29 PM
RE: Arch Linux on RockPro64 - by mmatyas - 05-30-2020, 12:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  yocto for RockPro64 Fide 1 631 01-16-2024, 10:01 AM
Last Post: Fide
  RockPro64 irradium (based on crux linux) riscv64, aarch64 mara 0 306 12-05-2023, 06:35 AM
Last Post: mara
  Installing Ubuntu Server on RockPro64 deutschlmao 2 2,487 10-29-2023, 04:43 PM
Last Post: brotherj4mes
Exclamation Ethernet regression on Linux Kernel 6.5.4? Deathcrow 3 717 09-22-2023, 04:27 AM
Last Post: diederik
  Vanilla mainline Debian 11 (Bullseye) on the RockPro64 Pete Tandy 22 16,715 08-16-2023, 01:34 AM
Last Post: varac
  slarm64 (unofficial slackware) ROCKPro64 RK3399 (aarch64) mara 54 81,801 08-11-2023, 11:13 AM
Last Post: mara
  Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 Thisone 4 1,148 07-14-2023, 04:22 AM
Last Post: hunderteins
  How to enable CoreSight ETM trace on RockPro64 shpark 0 526 05-21-2023, 11:34 PM
Last Post: shpark
  Linux laptop does not detect the board when plugged in via USB soupy 1 3,905 04-13-2023, 03:01 AM
Last Post: Reynold Grady
  Rockpro64 Dead on arrival? quixoticgeek 1 862 03-12-2023, 06:55 PM
Last Post: quixoticgeek

Forum Jump:


Users browsing this thread: 1 Guest(s)