Manjaro ARM for Rock5B

Features

  • All features of Manjaro
  • Plenty of drivers enabled, including network cards, usb devices, even amd gpus

Building instruction

(probably only support manjaro)

  1. Install manjaro arm tool
    sudo pacman -S manjaro-arm-tools

  2. Build the kernel (or grab a prebuilt one)
    Kernel PKGBUILD repo: linux-vendor-RK3588-PKGBUILD

    git clone https://github.com/happyme531/linux-vendor-RK3588-PKGBUILD
    mv linux-vendor-RK3588-PKGBUILD linux
    MAKEFLAGS="<your make flags>" sudo buildarmpkg -p linux
    

    Note: On x86 machines the kernel build time is insane (~1.5hrs on high-end desktop cpu), please be patient. Building on an ARM machine is highly recommended if you have one.

  3. Build image

    sudo buildarmimg -d generic -e minimal -p btrfs -i <built-kernel-pkg>,<built-kernel-header-pkg>
    

    the image will be built in /var/cache/manjaro-arm-tools/img/

  4. Flash the image into an SD card using the tool you like (I recommend usbimager).

Prebuilt images

Coming soon

Current issues

  • Desktop environment not working
  • Serial console is hanging from time to time
  • GPU not working (apperantly)
  • Many features untested

Note

  • You need an u-boot in spi flash in order to boot this image. You can follow this guide to install it.
  • For some tf cards the u-boot is unable to boot automatically. This should be treated as a bug, but a current workaround to manually boot is executing these commands in the u-boot shell:
    mmc list
    run bootcmd
    
  • Don’t upgrade the “linux” package from the official manjaro arm repo!
    To do that add this to /etc/pacman.conf as soon as possible
    IgnorePkg = linux
    
  • Sometimes the boot partition is not mounted correctly. Manually mount it if you want to install new kernel.
5 Likes

Thank you for working on Manjaro Arm.

Does it compile successfully on latest gcc?
You can rename the kernel pkgname to something else to avoid user updating it by mistake.

The upstream kernel already supports rk3588. I have tested it myself on 2 of the rk3588 variant boards.
The current working IO :

  1. Emmc
  2. Sd card
  3. Uart
  4. Lan (onboard only)
  5. Pcie3 (recently tested)

I don’t see why there should be the need to work on bsp kernel but it’s good to see contributors contributing with bsp support.

1 Like

I tried to build the kernel, but I’m getting this error message:

  INSTALL /build/pkg/linux/boot/dtbs/rockchip/rk3588s-rock-5a.dtb
  INSTALL /build/pkg/linux/boot/dtbs/rockchip/rk3588s-tablet-rk806-single-v10.dtb
  INSTALL /build/pkg/linux/boot/dtbs/rockchip/rk3588s-tablet-v11.dtb
  INSTALL /build/pkg/linux/boot/dtbs/rockchip/rk3588s-tablet-v10.dtb
/usr/sbin/ln: failed to create symbolic link '/build/pkg/linux/usr/lib/modules/5.10.66-5-3588testing+/extramodules': No such file or directory
==> ERROR: A failure occurred in package_linux().
    Aborting...
  -> Pruning and unmounting package cache...
==> no candidate packages found for pruning
  -> Removing build files from rootfs...

==> Package linux failed to build, aborting

I wonder if this might be the best Operative System for the ROCK 5B…

Any idea if NVME works with upstream kernel?

Yes it works with custom patches which will be upstreamed soon.

4 Likes

I am hitting the same error, looks like the PKGBUILD is quite old and needs to be fixed for all the arch…

@spikerguy Any news on the Manjaro image?

No it’s very very early to make an image for end users.

There is no hdmi output nor usb support on mainline kernel for rk3588

Hopefully soon though.

regarding arch ? found a package targetting rk3588 in AUR
not sure how to use it though.

That is the PKGBUILD for the BSP kernel. Guess you could compile it on an ARM machine like this. Usually you would install it via an AUR helper on the machine itself like this, but that only makes sense if you can boot a kernel on the rk3588 in the first place

I’m not an expert, what does BSP means? if it is present in AUR I would think there is a way to use it . otherwise would be egg/chicken. I’m a bit surprised seeing manjaro made available before arch though

BSP means board support package. Hardware vendors usually ship a BSP with their board that also contains a patched Linux kernel. This kernel is not mainline, meaning not the official one from https://github.com/torvalds/linux

The PKGBUILD basically grabs this prebuilt BSP kernel from the Armbian website and strips the .deb files to get to the kernel. It than builds Arch packages from those files, which you can install with pacman.

Just do a

git clone https://aur.archlinux.org/linux-rockchip-rk3588-bin.git
cd linux-rockchip-rk3588-bin
makepkg --ignorearch

makepkg will then download the BSP kernel and build Arch packages from it. In the above description you should pass those packages, namely the kernel and the header files. Currently trying to get that to work

1 Like

thanks for explanations, this clarifies

Problem is when you run makepkg with --ignorearch it will mark those packages as x86_64 and they will be rejected by buildarmimg.

Converting the packages with debtap also doesn’t work. Can’t find a quick fix for this. Will maybe try again some other time.

Anyway, I also don’t think that the resulting image will be satisfying. It is probably better to wait for a release by Manjaro or Arch.

Thanks for the update. that’s what I thought looking at previous build commands.
I suppose --ignorearch is used to bypass architecture checks but then we have wrong cpu arch.

Won’t be of massive help here, as I’m not used to build kernels for foreign arch …
Looked a bit to archlinuxarm forums, but didn’t see much regarding that board
I wonder what the package mainteainer was able to do though.

I guess we’ll need to wait for more people having access to that board, or from radxha team maybe. I can imagine they have more priority issues to deal with such as improving graphics drivers support. I would rather have GPU acceleration available on linux than support for arch.

edit: finally found that topic

have you tried cross-compilation?
found that from archlinuxarm wiki:

This is the official cross-compiling method used at Arch Linux ARM. If you plan on building a lot of packages and want to speed up the process, the following guide will turn an x86 Linux computer into an ARM cross-compiler. It’s also much easier than most cross-compile setups.

not sure if relevant here but could be worth trying

Not yet. Feel free to try it if you want

well not sure I’ll be able to dedicate time for now as it will probably require efforts before making it work
might give a try when having more free time this week-end.

also from forums topic I post before, some one provided this build instruction:

Grab the ubuntu kernel, and replace the one in multi-platform tarball (make sure to remove the package with pacman), and you will have archlinux arm on your device.

a bit vague, but someone may know what it means