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.
  Reply


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
  Rockpro64 panfrost installation questions user12321 2 115 05-27-2020, 10:17 AM
Last Post: xmixahlx
  RockPro64 Slow Ping on WiFi jl_678 0 39 05-14-2020, 05:08 PM
Last Post: jl_678
  RockPro64 Linux Manjaro HDMI 4K mkne 12 313 05-03-2020, 07:23 AM
Last Post: PakoSt
Question Mainline Debian Buster on RockPro64 ? chrestomanci 12 639 04-27-2020, 09:53 AM
Last Post: kuleszdl
Thumbs Up Batocera for RockPro64 Luke 8 2,745 04-24-2020, 06:40 AM
Last Post: Luke
  Mainline U-Boot with Arch Linux PKGBUILD mmatyas 0 92 04-17-2020, 03:49 AM
Last Post: mmatyas
  Slow/dead ethernet on (non-Ayufan) Linux Mainline (fixed) mmatyas 1 137 04-17-2020, 02:53 AM
Last Post: Thra11
  Call for test: Clonezilla live for Rockpro64 stevenshiau 1 263 04-17-2020, 12:38 AM
Last Post: tllim
Big Grin RETRO GAMING: UPDATED RECALBOX FOR THE RK3399 ROCKPRO64 Mrfixit2001 38 6,360 03-29-2020, 05:37 AM
Last Post: Crnppscls
  slarm64 (unofficial slackware) ROCKPro64 RK3399 (aarch64) mara 30 5,818 03-21-2020, 10:34 AM
Last Post: mara

Forum Jump:


Users browsing this thread: 1 Guest(s)