Skip to main content

Bring up Voyager SDK in NanoPC-T6

This guide covers installing Ubuntu 22.04 and the Voyager SDK on a NanoPC-T6 (RK3588 Arm) board, then modifying the device tree so the Axelera Embedded 110m card enumerates correctly.

Install Ubuntu 22.04​

Download the Ubuntu 22.04 image from the ubuntu-rockchip NanoPC-T6 page.

The tested image was ubuntu-22.04-preinstalled-desktop-arm64-nanopc-t6.img.xz (v2.4.0).

Flash the image to the SD card you will use with your NanoPC-T6. We recommend Raspberry Pi Imager.

Preinstallation requirements​

Install the following packages:

sudo apt-get update
sudo apt-get install -y \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools

Install the Voyager SDK​

Clone the Voyager SDK repository and install as usual:

./install.sh -a --YES
Missed the preinstallation steps?

If you forgot to complete the preinstallation requirements before running install.sh, install them and then run:

make clobber-libs && make operators

Why the device tree needs changing​

The driver probe initially fails because the PCIe Root Complex (RC) port behind Metis does not have enough space for the Metis device's non-prefetchable memory. The default SOC device tree assigns less than 33 MB for non-prefetchable memory windows per PCIe root complex.

You need to increase this size in a custom device tree, or insert a PCIe overlay.

Find the Metis "fe" port​

Find the fe port where the RC behind Metis is located, using lspci and ls -l /sys/bus/pci/devices/. For example:

ubuntu@ubuntu-desktop:~$ lspci
0000:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01)
0000:01:00.0 Processing accelerators: Axelera AI Metis AIPU (rev 02)
0002:20:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01)
0002:21:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
0003:30:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01)
0003:31:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
0004:40:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01)
0004:41:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
ubuntu@ubuntu-desktop:~$ ls -l /sys/bus/pci/devices/
total 0
lrwxrwxrwx 1 root root 0 Oct 22 2024 0000:00:00.0 -> ../../../devices/platform/fe150000.pcie/pci0000:00/0000:00:00.0
lrwxrwxrwx 1 root root 0 Oct 22 2024 0000:01:00.0 -> ../../../devices/platform/fe150000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0
lrwxrwxrwx 1 root root 0 Jan 1 2021 0002:20:00.0 -> ../../../devices/platform/fe170000.pcie/pci0002:20/0002:20:00.0
lrwxrwxrwx 1 root root 0 Jan 1 2021 0002:21:00.0 -> ../../../devices/platform/fe170000.pcie/pci0002:20/0002:20:00.0/0002:21:00.0
lrwxrwxrwx 1 root root 0 Jan 1 2021 0003:30:00.0 -> ../../../devices/platform/fe180000.pcie/pci0003:30/0003:30:00.0
lrwxrwxrwx 1 root root 0 Jan 1 2021 0003:31:00.0 -> ../../../devices/platform/fe180000.pcie/pci0003:30/0003:30:00.0/0003:31:00.0
lrwxrwxrwx 1 root root 0 Jan 1 2021 0004:40:00.0 -> ../../../devices/platform/fe190000.pcie/pci0004:40/0004:40:00.0
lrwxrwxrwx 1 root root 0 Jan 1 2021 0004:41:00.0 -> ../../../devices/platform/fe190000.pcie/pci0004:40/0004:40:00.0/0004:41:00.0

The line for Metis is:

lrwxrwxrwx 1 root root 0 Oct 22  2024 0000:01:00.0 -> ../../../devices/platform/fe150000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0

fe150000 is what you need to modify in the device tree.

Update the device tree​

The NanoPC-T6 device tree is at /lib/firmware/5.10.0-1012-rockchip/device-tree/rockchip/rk3588-nanopc-t6.dtb.

  1. Generate the .dts and save it (here, to the home folder as nanopc-t6.dts):

    dtc -I dtb -O dts /lib/firmware/5.10.0-1012-rockchip/device-tree/rockchip/rk3588-nanopc-t6.dtb -o ~/nanopc-t6.dts
  2. Make a copy to modify, and keep the original nanopc-t6.dts as a backup:

    cp nanopc-t6.dts modified-nanopc-t6.dts
  3. Modify the ranges in the RC behind Metis in modified-nanopc-t6.dts:

    	pcie@fe150000 {
    ...
    ranges = <0x800 0x00 0xf0000000 0x00 0xf0000000 0x00 0x100000
    0x81000000 0x00 0xf0100000 0x00 0xf0100000 0x00 0x100000
    0x82000000 0x00 0x40000000 0x09 0x00 0x00 0x20000000
    0xc3000000 0x00 0x60000000 0x09 0x20000000 0x00 0x20000000>;
  4. Generate the .dtb from the modified .dts:

    dtc -I dts -O dtb -o modified-nanopc-t6.dtb modified-nanopc-t6.dts
  5. Copy the modified .dtb to your preferred location (here, /lib/firmware/):

    sudo cp modified-nanopc-t6.dtb /lib/firmware/

For more detail, follow the ubuntu-rockchip guide to changing the device tree.

Open /etc/default/u-boot and set U_BOOT_FDT to the modified device tree:

U_BOOT_FDT="/lib/firmware/modified-nanopc-t6.dtb"

Run the u-boot-update utility so the new device tree loads on the next boot:

sudo u-boot-update

Power-cycle the machine. You are now ready to use the Voyager SDK with Metis on your NanoPC-T6.

Power and MVM utilisation

Power delivery on the NanoPC-T6 can be limited, which may affect some models. If inference crashes, limit MVM utilisation on Metis. From our internal testing we recommend a 20% limit on the NanoPC-T6 (tested on Voyager SDK 1.5.1):

AXELERA_CONFIGURE_BOARD=,20 ./inference.py yolov8l-coco-onnx ./media/traffic1_480p.mp4 --no-display