Archlinux on R2

Hi,

Are there specific instructions to install archlinux on an R2? I tried the ubuntu/debian images, but I would like to build my system from scratch using archlinux (my current box to replace would be a rpi3 running archlinux).

1 Like

The easiest way on an SD-card is to:

  1. Flash the latest ubuntu image.
  2. Either cross-compile your own kernel or copy&save /lib/modules and /lib/firmware from the rootfs.
  3. Re-format the rootfs partition and extract the default ARM image to it, see details here
  4. Either install your own kernel and modules to the sd-card, or copy just the saved modules from step 2.

You probably have to manually fix fstab, booting services, etc.

Thanks! Couldn’t get it to boot… I’ll try getting a serial-usb adapter to at least get see what’s going on in the console.

I could image my sd-card with Archlinux if that would help you. It consists of a cross-compiled kernel (BPI-R2 master with some minor local changes to fix it for gcc7) and a nearly vanilla ArchlinuxARM rootfs. Best would be to create it yourself of course, but it might help you to quickly evaluate the OS on the board.

thanks! That would be extremely useful! :slight_smile: I would appreciate if you can put that image somewhere, at least to play with the system until I can build my own image.

Sent you a DM with the link, didnt want to go through the trouble to host it on a public service.

Thanks! I tried your image and mine (built with your instructions), mine was working just fine, just the hdmi output is not working. Connecting through the serial console works great :slight_smile: Now I’m trying to figure out how to get the network to work :stuck_out_tongue:

Does HDMI work with my image? Does my image boot for you at all? It might have something to do with the kernel. Do you get the colored screen just after power on?

Use netctl in archlinux for network configuration :slight_smile:

no… no hdmi output with your image either. I’ve been having problems setting up network. so I’ll try to have that working first and then see if I can fix hdmi (less priority for me).

ok, network is working with my image. No idea why it didn’t work before. The “WAN” port is not working though… So far, I’m using the kernel + libs from the ubuntu image (using that boot partition and copying the modules + firmware as you suggested). Next step would be to compile a new kernel.

Can you send me the link, I want to setup ArchLinux on Banana Pi R2

Hey Bin,

Could you please try the instructions above, as that image from last year would be very outdated already. It would be much better to get the ‘latest greatest’ as Archlinux is a bleeding edge distro.

If there is anything unclear I would be happy to assist. I can update the instructions so other people can use them as well!

Anyone still interested in ArchLinux? Or anyone have tried it ?

Do you have an Archlinux image prepared for R2 ?

I’m using Archlinux for many years on PC but never tried it on ARM.

Yes But facing some issue with login service. But I was able to boot it.

Here is the Boot log

From the boot log is hard to detect why the login service is failing. Maybe you could try and boot into single user mode by appending this

systemd.unit=rescue.target

to the kernel command line which should allow you login as root and see the full journalctl log for further troubleshooting.

Can you explain more about where to put this?

Since you are using Uboot I think you need to edit the uEnv.txt file and append this

systemd.unit=rescue.target

to the bootargs line.

I’m not sure if you can edit the Uboot kernel options inline as you can do with GRUB. Here you can find some information about kernel parameters in uBoot

https://www.denx.de/wiki/view/DULG/LinuxKernelArgs

No I don’t think I can do it. As it loads uImage directly.

my uboot looks for uenv.txt in BPI-BOOT/bananapi/bpi-r2/linux/ on startup before display bootmenu (where default entry is booted after 3 seconds)