Skip to main content
Topic: Aarch64 image / ArtixARM (Read 25855 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic. Redirected from MOVED: Porting to other architectures

Aarch64 image / ArtixARM

Hi all!
I became owner of Orange Pi PC2 and i want to use it as router. I installed Arch on it and made all needed hardware work but configuring systemd is just a hell.
What is the basic list of packages (aside from init system, eudev and elogind) which should be rebuild to make system work without systemd?
ARMtix

Re: Porting to other architectures

Reply #1
Hi all!
I became owner of Orange Pi PC2 and i want to use it as router. I installed Arch on it and made all needed hardware work but configuring systemd is just a hell.
What is the basic list of packages (aside from init system, eudev and elogind) which should be rebuild to make system work without systemd?
What you listed pretty much covers it. Just keep in mind that some packages are built against systemd libs and that you might need the systemd dummy packages to get some things working.
Chris Cromer

Re: Porting to other architectures

Reply #2
The image can boot now (runit is used as init) but every second i get messages from dmesg:
elogind: Failed to fully start up daemon: No such file or directory
elogind: Failed to connect to system bus: No such file or directory

Dbus service is at least added to default runlevel. Are there any ideas how to fix this error or at least suppress these messages?
ARMtix


Re: Porting to other architectures

Reply #4
The problem with elogind is caused by dbus error: /usr/share/dbus-1/system.conf is empty and it cannot start
The bigger problem is that most of curses programs don't work and print error: cannot open terminal: linux
So, there is much work to configure
ARMtix

Re: Porting to other architectures

Reply #5
The image seems to work now. I will clean it from logs, .pacnew files and probably some packages and upload it somewhere nearest days.
ARMtix

Re: Porting to other architectures

Reply #6
This is it: https://yadi.sk/d/AkiIC1B2Q2hC8g
Runit is used as init system. Root password=user name=user password: artixarm. The image mostly corresponds to Arch one, but:
-haveged is installed but not started
-wired interface is configured with init script
-dkms, nfs client and wpa_supplicant are included
-Artix repos are included to install scripts. Though it may cause architecture conflict on update
-user has full sudo access
Some extra notes:
-to rebuild most of Artix packages it is enough to add aarch64 to arch list in PKGBUILD. This doesn't work for kernel and mkinitcpio-busybox
-be careful installing dkms modules: most of dkms packages don't have real aarch64 support. This can be fixed with manual patching
-there may occur problems if you try to unpack image on non-ext4 filesystem
I hope this will work on any aarch64 device
ARMtix

Re: Porting to other architectures

Reply #7
Good work, @phoenix_king_rus. Moved and pinned to software development. Please, change the topic to a more descriptive title (e.g. Artix aarch64 image for Orange Pi).

Re: Aarch64 image

Reply #8
For those who wants to migrate to Artix from ArchARM i publish here archive with rebuilt packages. It containes runit as init system and some other packages:
https://yadi.sk/d/GDk0dITtRa1s4Q
Unfortunately, most of them are outdated and i can't say when i will update them
ARMtix

Re: Aarch64 image

Reply #9
So, by this moment i have built full [system] repo (except for linux-lts and grub which are not included in ALARM also) and parts of [world] and [galaxy] for aarch64. If this topic is of interest i can upload packages and modified PKGBUILDs and will maintain built packages.
ARMtix

Re: Aarch64 image

Reply #10
So, by this moment i have built full [system] repo (except for linux-lts and grub which are not included in ALARM also) and parts of [world] and [galaxy] for aarch64. If this topic is of interest i can upload packages and modified PKGBUILDs and will maintain built packages.

I would be interested in the PKGBUILD files.  If you could post those.  Thanks for all the work.
runit is my game.


Re: Aarch64 image

Reply #12
Thankyou.
runit is my game.

Re: Aarch64 image

Reply #13
I have two good news:
1) New images, this time both for OpenRC and for Runit. Here are the following notes about them:
-installed packages: base, base-devel, dkms, haveged, wpa_supplicant, openssh, nfs-utils, init scripts for dhcpcd, haveged, wpa_supplicant and openssh (they are installed but not started)
-root password, user name and user password are 'artixarm'
-user has full sudo access (you will possibly need to run 'chmod +s /bin/sudo')
2) I have found a way to run these images in qemu like on real hardware. The recipe is following:
-download u-boot source and build it as following:
Code: [Select]
CROSS_COMPILE=aarch64-linux-gnu- make qemu_arm64_defconfig
CROSS_COMPILE=aarch64-linux-gnu- make
In order to use it you need to append '-bios u-boot.bin' to qemu command line
-create disk image, partition it and write image on it. You need to have partition which u-boot can read from (vfat and ext4 will work).
-tty1 will not work, so you need to run agetty on ttyAMA0 in order to log in and work with system
-u-boot requires boot.scr binary to boot system (if you don't want to type all boot commands manually each time). The binary should be located on partition u-boot can read from. The disk with this partition should be added to VM with command line options as following:
Code: [Select]
-drive id=disk,file=root.img,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0
Then it will be detected as scsi device by u-boot. The binary itself should be build from the following script:
Code: [Select]
setenv bootargs root=<your root partition> rw rootwait
load scsi 0:1 ${kernel_addr_r} /Image
load scsi 0:1 ${ramdisk_addr_r} /initramfs-linux.img
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}
This script implies that you have /boot partition on /dev/sda1. To build it use the following command from uboot-tools package:
Code: [Select]
mkimage -C none -A arm64 -T script -d <scriptname> boot.scr
-finally, your qemu command line should look like following:
Code: [Select]
qemu-system-aarch64 -machine virt -cpu cortex-a53  -drive id=disk,file=root.img,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -bios u-boot.bin

I hope i didn't forget anything important :)
ARMtix

Re: Aarch64 image

Reply #14
Firefly RK3399: works perfect with mainline u-boot and mainline kernel, but device tree requires patches.
To see boot log over serial interface with mainline kernel you should add
Code: [Select]
console=ttyS2,1500000n8 earlycon=uart8250,mmio32,0xff1a0000
to kernel command line (for rockchip kernel ttyFIQ0 is used instead of ttyS2)
What does't work: internal sound card is not detected, only HDMI sound works; RTC does not save time. However, they work with rockchip kernel.
Panfrost provides rather good hardware acceleration: i can play OpenMW (however, with very low graphics settings) with average ~30 fps (sometimes it raises up to ~70)
ARMtix