Archlinux on roc-RK3328-cc

This is for ARMv8 based devices

Archlinux on roc-RK3328-cc

Postby Peedy » Fri Mar 30, 2018 4:00 pm

Hello, Folks!

I successfully got archlinuxARM on the Firefly/LibreComputer-Plattform roc-RK3328-cc working.

First, I compiled the kernel and u-boot as described in
http://en.t-firefly.com/doc/product/info/id/396.html
in a separate directory like ~/rk3328.

after this, we'll going on in current directory ~/rk3328.

Download latest armv8-64bit rootfs:
$this->bbcode_second_pass_code('', 'wget http://archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz')
For defaults in this rootfs refer: https://archlinuxarm.org/platforms/armv8/generic

Prepare your sdcard:
$this->bbcode_second_pass_code('', 'fdisk /dev/sdX')
delete all partitions: d #repeat step, if more than one partiton exists
write changse to disk: w

now, write kernel and u-boot with all required stuff to sdcard:
$this->bbcode_second_pass_code('', 'dd if=./out/idbloader.img of=/dev/sdX seek=64 conv=sync,fsync
dd if=./out/uboot.img of=/dev/sdX seek=16384 conv=sync,fsync
dd if=./out/trust.img of=/dev/sdX seek=24576 conv=sync,fsync
dd if=./out/boot.img of=/dev/sdX seek=32768 conv=sync,fsync')

insert sdcard into your board and start to boot-cmd by pressing enter during init process.
Enter in Cmd:
$this->bbcode_second_pass_code('', 'gpt write mmc 1 $partitions')

remove your sdcard and prepare the rootfs-partition.

now, your sdcard partition table should look like:
$this->bbcode_second_pass_code('', 'Device Start End Sectors Size Type
/dev/sdf1 64 8063 8000 3,9M Microsoft basic data
/dev/sdf2 8064 8191 128 64K Microsoft basic data
/dev/sdf3 8192 16383 8192 4M Microsoft basic data
/dev/sdf4 16384 24575 8192 4M Microsoft basic data
/dev/sdf5 24576 32767 8192 4M Microsoft basic data
/dev/sdf6 32768 262143 229376 112M Microsoft basic data
/dev/sdf7 262144 31116254 30854111 14,7G Microsoft basic data')


Format rootfs-partition:
$this->bbcode_second_pass_code('', 'mkfs.ext4 /dev/sdX7')

write and wrepare rootfs to partition:
$this->bbcode_second_pass_code('', 'mount /dev/sdX7 /mnt
bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /mnt && sync
rm -Rf /mnt/boot/*
umount /mnt')

Now, you have a bare and fresh Archlinux!
Have fun!
Peedy
 
Posts: 12
Joined: Fri Jan 02, 2015 3:39 pm

Re: Archlinux on roc-RK3328-cc

Postby WebReflection » Fri Apr 13, 2018 8:14 am

out of curiosity, is there any driver for that Mali that works? I guess the Ubuntu image uses some blob, but I'm not sure you can make it work as easily through ArchLinux.

This board looks better/faster than a Pi3+ (beside the missing wifi) for Kiosk installations, if fully HW accelerated I might give it a try too.

Thanks.
WebReflection
 
Posts: 99
Joined: Tue Apr 02, 2013 6:49 pm

Re: Archlinux on roc-RK3328-cc

Postby HydroDiOxide » Tue Apr 24, 2018 11:12 am

Can this board be added to the list on https://archlinuxarm.org/platforms/armv8/rockchip? It looks very similar to the Rock64. Not sure which one of these two to pick up.
HydroDiOxide
 
Posts: 23
Joined: Mon Apr 23, 2018 1:29 pm

Re: Archlinux on roc-RK3328-cc

Postby thomasjames » Fri May 11, 2018 10:24 pm

Worth noting: official docs on ROC-RK3328-CC are in constant flux, and Team Firefly is clearly working tirelessly on software for this. That being said, there are a TON of discrepancies between one “official” doc and another. For example, if you configure your build environment as instructed here, then don’t bother following the guide currently found on Firefly’s official website, as the kernel build will fail.

So if you decide to use Ubuntu 14.04 as recommended on the official site, ONLY use packages from the 14.04 repo. Same goes with using Xenial 16.04 - if that’s what you want to use, just use that (you’ll just need to install mingw32 manually). Do not “mix and match” guides and tutorials as this will only waste your time. Pick one guide (whether it’s from Firefly or Rockchip or whatever) and stick with it.

To some this may be a no-brainer, but it isn’t explicitly stated anywhere by Firefly or Rockchip or Libre so I figured it’s worth pointing out.
thomasjames
 
Posts: 7
Joined: Tue May 08, 2018 3:14 pm

Re: Archlinux on roc-RK3328-cc

Postby thomasjames » Sun May 13, 2018 5:40 pm

To anyone struggling with kernel compilation, do not follow Firefly’s most up-to-date instructions to run their build script with the -c parameter corresponding to the rk3328 chip. Just run the script as outlined in the original alpha doc, with the specific parameter of roc-rk3328-cc. So:

$this->bbcode_second_pass_code('', './build/mk-kernel.sh roc-rk3328-cc')

Why Firefly is currently recommending anything otherwise is beyond me. ¯\_(ツ)_/¯



CORRECTION: Pardon me, it’s Rockchip that is currently recommending the failed approach. Firefly is consistent.
thomasjames
 
Posts: 7
Joined: Tue May 08, 2018 3:14 pm

Re: Archlinux on roc-RK3328-cc

Postby rontant » Sun May 27, 2018 11:15 am

USB 3.0 doesn't seem to be working on ALARM.
Rock 64, Odroid XU4, Raspberry Pi 3, Pogo 4, Pogo Pink E02, Goflex
rontant
 
Posts: 25
Joined: Sat May 27, 2017 1:10 am
Location: Singapore

Re: Archlinux on roc-RK3328-cc

Postby thomasjames » Mon May 28, 2018 8:55 pm

Okay so I'm apprehensively willing to say I've had TENTATIVE success with an approach similar to that outlined by OP, except I have had more success using this rootfs image than the one provided by OP.
thomasjames
 
Posts: 7
Joined: Tue May 08, 2018 3:14 pm

Re: Archlinux on roc-RK3328-cc

Postby rontant » Tue May 29, 2018 3:32 am

Why not just follow the official steps outlined here: https://archlinuxarm.org/platforms/armv ... hip/rock64 ?

Is it because the USB 3.0 not working?
Rock 64, Odroid XU4, Raspberry Pi 3, Pogo 4, Pogo Pink E02, Goflex
rontant
 
Posts: 25
Joined: Sat May 27, 2017 1:10 am
Location: Singapore

Re: Archlinux on roc-RK3328-cc

Postby thomasjames » Thu Jun 21, 2018 5:09 pm

Got USB 3.0 working by downloading Libre Computer's official Ubuntu image and substituting the ARMV8 generic image for the rootfs.img partition. All peripherals are working well.
thomasjames
 
Posts: 7
Joined: Tue May 08, 2018 3:14 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 4 guests