Armbian for Rock 3A (unofficial build) with mainline kernel

Why Gnome over XFCE? I prefer Gnome, but even with Panfrost wouldn’t this be a little much? RK3568 isn’t top tier.
I’m currently trying to build it now. I’ve had to setup a ubuntu jammy virtual machine and took a while to find the script that was causing the whole build to fail because my download speed wasn’t “fast enough”. (anyone that comes across this, it’s somewhere in the lib folder)

Well the build finished, but Panfrost is not being used. I checked 3dsupport and the final output was showing the flag 3dsupport as well. I’m getting llvm with no hardware acceleration and no panfrost. The build also seems to have defaulted to X11 instead of wayland for gnome, even though the wayland sesion is being chosen at login vs the x11 session.


Vendor: Mesa/ (0xffffffff)
Device: llvmpipe (LLVM 11.0.1, 128 bits) (0xffffffff)
Version: 20.3.5
Accelerated: no
Video memory: 7690MB
Unified memory: no
OpenGL vendor string: Mesa/
OpenGL renderer string: llvmpipe (LLVM 11.0.1, 128 bits)

Also, PCIe does not seem to work correctly. I have an AR9462 (QCNA222) m.2 wifi card. I enabled all ath9k settings in the kernel configuration because this card didn’t work on the Debian minimal image either. It still doesn’t work and is failing with the exact same error in dmesg.


0000:00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)
0000:01:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01)
0002:20:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3566 (rev 01)


ath9k 0000:01:00.0: enabling device (0000 -> 0002)
ath9k 0000:01:00.0: request_irq failed
ath9k: probe of 0000:01:00.0 failed with error -22

I also enabled the ath9k debug but I’m not sure where to even begin using it. What I can see is that IRQ events are not being properly handled by the kernel. This card works perfectly fine on 2 of my other machines.

The echo 1 > /sys/bus/pci/rescan command does not change anything either. Nothing in dmesg, nothing gets loaded.

Last message on output.log

Displaying message: Repeat Build Options ./ BOARD=rock-3a BRANCH=edge RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=yes KERNEL_CONFIGURE=no DESKTOP_ENVIRONMENT=gnome DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base DESKTOP_APPGROUPS_SELECTED="3dsupport browsers chat desktop_tools editors internet multimedia office programming remote_desktop" COMPRESS_OUTPUTIMAGE=sha,gpg,img ext

I’m currently downloading
instead. It’s from the github in OP I believe.
After install, it works with wayland and panfrost, but the same error for wifi shows up. it’s not handling IRQ properly.

To sum up, building this image for this board has not at all been worth it and does not work correctly and PCIe still needs a lot of work.

Relevance to this thread
PCIe does not work in this build, custom build, or Armbian official build with an AR9462 QCNA222 M.2 WiFi card. This card is the best open source blob-free wifi adapter so should have the highest compatibility, but on this board it doesn’t.

Hi, I hope this will be useful to enable hw 3d on debian bullseye. I think I’ve managed to build mesa with panfrost to enable hw, but need to perform more testing to confirm it. I used the newest image from armbian CLI bullseye with kernel 6.0.
Currently I’m on a clean new install with xfce, but tested earlier with wayland - KDE and GNOME were working fine. All the info and credit is to this thread, I’ve just changed a few lines in order for it to work with debian bullseye and rk3568.

This are the steps:

  1. download mesa 21.3 from github (with upper version I had dependency error for outdated package)
  2. install dependencies: sudo apt install meson ninja-build pkg-config zlib1g-dev libexpat-dev libdrm-dev libunwind-dev libwayland-dev wayland-protocols libwayland-egl-backend-dev libx11-dev libxext-dev libxdamage-dev libx11-xcb-dev python3-pip xcb* libx11-xcb-dev libxcb* libxshmfence* byacc flex libxxf86vm1-dbg libxxf86vm-dev libxrandr-dev libxrandr2 bison valgrind
  3. Additional dependencies: pip3 install setuptools mako
  4. Unzip mesa and cd into it
  5. Now build: mkdir build;
    meson build/ -Dgallium-drivers=lima,panfrost,kmsro,swrast -Dplatforms=x11,auto -Dvulkan-drivers= -Ddri-drivers= -Dllvm=false;
    ninja -C build/; ##(this could take a while)
    sudo ninja -C build/ install;
  6. If everything went fine need to install mesa-utils:
    sudo apt install mesa-utils
    After that check with glxinfo | grep render or glxinfo -B. It should still show software rendering. Reboot the system and check again with glxinfo. It should display this:
    glxinfo -B
    name of display: :0.0
    display: :0 screen: 0
    direct rendering: Yes
    Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Panfrost (0xffffffff)
    Device: Mali-G52 r1 (Panfrost) (0xffffffff)
    Version: 21.3.9
    Accelerated: yes
    Video memory: 7690MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.1
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
    OpenGL vendor string: Panfrost
    OpenGL renderer string: Mali-G52 r1 (Panfrost)
    OpenGL core profile version string: 3.1 Mesa 21.3.9
    OpenGL core profile shading language version string: 1.40
    OpenGL core profile context flags: (none)

OpenGL version string: 3.1 Mesa 21.3.9
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.3.9
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

And this:

glxinfo | grep render
direct rendering: Yes
GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_NV_float_buffer,
GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_OML_swap_method,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Mali-G52 r1 (Panfrost)
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_INGR_blend_func_separate, GL_INTEL_blackhole_render,
GL_MESA_window_pos, GL_NV_blend_square, GL_NV_conditional_render,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_INGR_blend_func_separate, GL_INTEL_blackhole_render,
GL_MESA_window_pos, GL_NV_blend_square, GL_NV_conditional_render,
GL_EXT_multisampled_render_to_texture2, GL_EXT_occlusion_query_boolean,
GL_EXT_texture_view, GL_EXT_unpack_subimage, GL_INTEL_blackhole_render,
GL_NV_conditional_render, GL_NV_draw_buffers, GL_NV_fbo_color_attachments,
GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_gpu_shader5,

Hope this helps someone. I still have to test it and unfortunately watching youtube was still very laggy in chromium. I don’t know if there is any difference and if this build is alright?

(As a side note, after installing mesa first time xfce changed font from the system to white and couldn’t get it back, switched to lxde and still was white theme but at least font was alright. Now xfce is fine but login screen font from text is white. Don’t know why)

1 Like

Thanks for sharing :slight_smile:

Hello and respect
We have made a board with the RK3568 chip and it gives the following error when booting:
please help

DDR Version V1.13 20220218
unknown device

Maybe you have a wrong ddr bin.

I have designed the hardware of this board myself and the schematic is exactly similar to Nano Pi R5S.

How to generate bin file?

Somebody tested NPU on mainline kernel?
I tried, but it doesn’t worked
(latest kernel build config haven’t CONFIG_ROCKCHIP_RKNPU option enabled so it may cause that problem)

rock@rock-3a:~/npu$ cat /usr/src/linux-headers-6.1.50-current-rockchip64/.config | grep CONFIG_ROCKCHIP_RKNPU

I tried to run this test

sudo dpkg -i rknpu2-rk356x_1.5.2-3_arm64.deb
rm rknpu2-rk356x_1.5.2-3_arm64.deb
git clone
cd rknpu2/examples/rknn_yolov5_demo/
chmod +x
cd install/rknn_yolov5_demo_Linux/

Npu is not supported in mainline kernel.

1 Like