Install archlinux ARM on Rock Pi 4

This is for ARMv8 based devices

Install archlinux ARM on Rock Pi 4

Postby benhub » Sat Apr 27, 2019 5:48 pm

Hi! I tried to install archlinux ARM on Rock Pi 4 but without any success yet. This is what I tried so far:

https://gist.github.com/benhubert/e003b ... 8cc6b1cf54

Maybe you have some ideas what to do next? Or maybe you want to achieve the same, then feel free to take this guide as starting point and let me know if you found out more details.
benhub
 
Posts: 1
Joined: Sat Apr 27, 2019 5:43 pm

Re: Install archlinux ARM on Rock Pi 4

Postby summers » Mon Apr 29, 2019 12:08 pm

Well I don't have a Rock Pi 4; so just some idle thoughts from me on installing ArchLiux Arm on a new device.

The board will almost certainly have a UART connection, it is worth wiring this up to another computer, so you can follow whats going on. Most arm UART are 3.3V level - so you'll need an adapter that does that and not an RS323 device ...

Monitoring the UART, and you'll see uboot coming up, and so can see where it fails ...

looking at your logs, you are formatting with GPT partition table, usually I use the MSDOS partition table. Now looks like uboot has the EFI code in it - so with GPT-EFI uboot should be able to understand the partition table, if that has been compiled in ...

The boot code on most arms, is set up to just direct access a certain location in flash/sd card/etc. Now this usually means that the uboot has to be at a specific location on the sd card (or eMMC, etc). Now where that location is you'll have to research for the Rock Pi 4; and more specifically for whatever cpu chip you have. You'll need to write uboot to that location.

Once you get uboot to come up (in the uart), its usually fairly straight forward from there to boot into linux. Make sure you have the device tree for Rock Pi 4; as you'll need that. You may (or may not) need a kernel with patches for the Rock Pi 4.

Hope these ideas help.

Oh yes - here are the details on how the CPU boots, which you need to read: http://opensource.rock-chips.com/wiki_Boot_option
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Install archlinux ARM on Rock Pi 4

Postby sehraf » Thu May 23, 2019 8:57 am

Hey

i'm running ALARM on an Rock Pi 4. Since kernel 5.1 it is officially supported (=dts/dtb file is included).
I don't know anymore from where i got uboot from but i would suspect some debian/ubuntu versions from the internet.
It uses /boot/extlinux/extlinux.conf for it's configuration and i'm using this config:
$this->bbcode_second_pass_code('', '
label kernel-mainline
kernel /Image
fdt /dtbs/rockchip/rk3399-rock-pi-4.dtb
initrd /initramfs-linux.img
append earlyprintk ro root=/dev/disk/by-label/root rootwait
')
This requires the root partition being labeled as "root" obviously.

Regarding your log: Since i was using a ready-to-go debian/ubuntu image, i could skip the uboot installation and went straight to ALARMs rootfs (in the beginning i was even using the kernel from debian/ubuntu - but as it turned out ALARMs kernel runs fine, too)

As summers pointed out, serial access makes your live a lot easier.
sehraf
 
Posts: 69
Joined: Mon Feb 03, 2014 10:06 pm

Re: Install archlinux ARM on Rock Pi 4

Postby StuartIanNaylor » Mon May 27, 2019 7:47 am

Hey if you can post which source and uboot you used that would be ace.
Manjaro are supporting the RockPro64
https://forum.manjaro.org/t/manjaro-arm ... 4/88287/18

Which with the right DTS could be really good for RockPi4 also.

Also the panfrost drivers arrive in 5.2 so the timing looks really good.
StuartIanNaylor
 
Posts: 11
Joined: Sun Apr 21, 2019 6:31 am

Re: Install archlinux ARM on Rock Pi 4

Postby sehraf » Mon May 27, 2019 4:26 pm

So i did some investigations/grep:
I was using rockpi4_debian_stretch_lxde_armhf_20181105_2120-gpt.img from https://wiki.radxa.com/Rockpi4/downloads. Ditched the rootfs (fifth partition) and installed/copied ALARMs rootfs (remember to mount /boot (fourth partition) before. Then fix up extlinux.conf and you should be good to go :mrgreen:

As usual: serial access makes life a lot easier.
sehraf
 
Posts: 69
Joined: Mon Feb 03, 2014 10:06 pm

Re: Install archlinux ARM on Rock Pi 4

Postby moonlinux » Tue Jun 04, 2019 2:10 am

I see the issue it using the wrong u-boot img, below u-boot binary is meant for rk3328 used for ROCK64

https://archlinuxarm.org/platforms/armv8/rockchip/rock64
$this->bbcode_second_pass_code('', 'wget http://os.archlinuxarm.org/os/rockchip/boot/rock64/idbloader.img
wget http://os.archlinuxarm.org/os/rockchip/boot/rock64/uboot.img
wget http://os.archlinuxarm.org/os/rockchip/boot/rock64/trust.img
dd if=idbloader.img of=/dev/sdX seek=64
dd if=uboot.img of=/dev/sdX seek=16384
dd if=trust.img of=/dev/sdX seek=24576 ')

You need to generate the u-boot img for your boards (rk3399) using latest u-boot.
moonlinux
 
Posts: 14
Joined: Mon Jul 13, 2015 5:38 pm

Re: Install archlinux ARM on Rock Pi 4

Postby StuartIanNaylor » Thu Jun 13, 2019 2:22 am

Manjaro are currently testing rockpi4 and rockpro64 so likely there should be official images.
StuartIanNaylor
 
Posts: 11
Joined: Sun Apr 21, 2019 6:31 am


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 10 guests