Pikube node setup - ODROID
příprava eMMC image
git clone --depth 1 https://github.com/armbian/build ; cd buildmkdir -p userpatchescat > userpatches/config-odroidc4-pikube.conf:# Amlogic S905X3 quad core 4GB RAM SoC eMMC GBE USB3 SPI BOARD_NAME="Odroid C4" BOARDFAMILY="meson-sm1" BOOTCONFIG="odroid-c4_defconfig" KERNEL_TARGET="legacy,current,edge" SERIALCON="ttyAML0" BOOT_LOGO="desktop" KERNEL_CONFIGURE="no" BUILD_DESKTOP="no" BUILD_MINIMAL="no" BOARD="odroidc4" BRANCH="current" RELEASE="trixie" CONSOLE_AUTOLOGIN="no"cat > userpatches/config-odroidm1-pikube.conf:KERNEL_CONFIGURE="no" BUILD_DESKTOP="no" BUILD_MINIMAL="no" BOARD="odroidm1" BRANCH="current" RELEASE="trixie" CONSOLE_AUTOLOGIN="nocat > userpatches/customize-image.sh:#!/bin/bash echo "piks03" > /etc/hostname rm -f /root/.not_logged_in_yet echo -e "AeYoo5Mu\nAeYoo5Mu" | (passwd root) mkdir -p /root/.ssh chmod go= /root/.ssh echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICjDVooNghJMSAYBzOhIL62lM7LgkUL7iVeq+r7W1zrD appauto' > /root/.ssh/authorized_keyschmod a+x userpatches/customize-image.sh./compile.sh odroidm1-pikubesudo dd if=output/images/Armbian_21.08.0-trunk_Odroidc4_buster_current_5.10.47.img of=/dev/sda bs=64k oflag=dsync status=progress ; sync- nabootovat odroid, upravit statické IP v USG a případně rebootovat
- pro Odroid M1 viz https://www.armbian.com/odroid-m1/:
- Boot from eMMC/SD by holding the recovery (RCY) button while powering on the board.
- Release RCY button after the blue LED flashes once.
- Once booted, use
armbian-installto write u-boot to MTD (SPI flash) (option Install/Update the bootloader on MTD Flash). This completely and irrevocably removes Petitboot, replacing it with mainline u-boot.
- pro Odroid M1 viz https://www.armbian.com/odroid-m1/:
- pustit ansible playbook:
ansible-playbook -e "ansible_user=root target=piks01" setup-pikube-piksXX.yml - rebootovat odroid, kvůli změnám v logování syslogu, novému FS...
- po instalaci k3s opět rebootovat kvůli změnám v nastavení cgroups
ODROID M1/M1S/M2: Alternate Kernel for NPU Support
Standard Armbian mainline kernels (6.x) don't include RKNPU driver support for Rockchip NPUs. To enable NPU functionality for applications like Immich machine learning, you can install the ODROID vendor kernel (5.10.x) with RKNPU support.
Supported Models: - ODROID M1 (RK3568, 1 TOPS NPU) - ODROID M1S (RK3566, 1 TOPS NPU) - ODROID M2 (RK3588S2, 6 TOPS NPU)
Prerequisites
- Existing Armbian installation on ODROID M1/M1S/M2
- Root access to the node
- Backup of important data (kernel changes can be risky)
Installation Steps
1. Add Repository GPG Key
sudo mkdir -p /etc/apt/keyrings
wget http://ppa.linuxfactory.or.kr/ppa-gpg.asc -O /etc/apt/keyrings/odroid-archive-keyring.gpg
2. Add ODROID Repository
Create /etc/apt/sources.list.d/odroid.list with signed-by directive:
echo "deb [signed-by=/etc/apt/keyrings/odroid-archive-keyring.asc] http://ppa.linuxfactory.or.kr focal main" | sudo tee /etc/apt/sources.list.d/odroid.list
3. Pin Kernel Packages
Create /etc/apt/preferences.d/odroid-kernel to prefer any ODROID kernel over Armbian:
sudo tee /etc/apt/preferences.d/odroid-kernel << 'EOF'
Package: linux-image-*-odroid-arm64 linux-headers-*-odroid-arm64 linux-dtb-*-odroid-arm64
Pin: origin ppa.linuxfactory.or.kr
Pin-Priority: 1001
EOF
4. Install ODROID Kernel
Recommended: Start with 6.6 LTS kernel (known stable):
sudo apt update
sudo apt install linux-image-6.6.0-odroid-arm64
Alternative: Try latest 6.17 kernel if 6.6 doesn't have RKNPU support:
sudo apt install linux-image-6.17.0-odroid-arm64
Available ODROID kernels (as of 2025-10-28):
- 6.17.0-odroid-arm64 - Latest (October 2025)
- 6.6.0-odroid-arm64 - LTS (September 2025)
- 6.1.0-odroid-arm64 - LTS (October 2025)
- 5.15.0-odroid-arm64 - Older LTS
5. Enable RKNPU Device Tree Overlay
Add rknpu to the overlays in /boot/armbianEnv.txt:
# If overlays line already exists, add rknpu to it
# Example: overlays=existing-overlay rknpu
sudo sed -i '/^overlays=/s/$/ rknpu/' /boot/armbianEnv.txt
# Or if overlays line doesn't exist:
echo "overlays=rknpu" | sudo tee -a /boot/armbianEnv.txt
6. Enable RKNPU Module at Boot
echo "rknpu" | sudo tee -a /etc/modules
7. Reboot
sudo reboot
8. Verify Installation
After reboot, verify the kernel and RKNPU driver:
# Check kernel version (should be x.x.x-odroid-arm64)
uname -r
# Check RKNPU module is loaded
lsmod | grep rknpu
# Check RKNPU driver version (should show 0.9.8 or later)
cat /sys/kernel/debug/rknpu/version
# Check dmesg for NPU initialization
dmesg | grep -i "rknpu\|npu"
Important Notes
- Downgrade Warning: This replaces the newer 6.x kernel with older 5.10.x kernel
- Armbian Updates: Future Armbian kernel updates may overwrite the ODROID kernel. Use apt pinning to prevent this
- Compatibility: Test on one node first before applying to all cluster nodes
- Rollback: Keep the original Armbian kernel package to allow rollback if needed
- RKNPU Support: Only compatible with 5.10.x kernel; 6.x kernels don't support RKNPU yet
Reverting to Armbian Kernel
If you need to revert:
sudo apt remove linux-image-5.10.0-odroid-arm64
sudo apt install linux-image-current-rockchip64
sudo rm /etc/apt/sources.list.d/odroid.list
sudo rm /etc/apt/preferences.d/odroid-kernel
sudo sed -i 's/ rknpu//g' /boot/armbianEnv.txt
sudo sed -i '/^rknpu$/d' /etc/modules
sudo reboot
Use Case
This alternate kernel is required for: - Immich machine learning with NPU acceleration - Other applications requiring RKNPU support on RK3566/RK3568/RK3588 - Maximum ML inference performance on ODROID M1/M1S/M2 - Frigate NVR with RKNN object detection
Additional Information
NPU Performance Comparison: - M1/M1S: 1 TOPS (RK3566/RK3568) - suitable for single-stream ML inference - M2: 6 TOPS (RK3588S2) - suitable for multiple concurrent ML streams
Repository Updates:
- The same linux-image-5.10.0-odroid-arm64 package works across all three models
- RKNPU driver version 0.9.8 or later is included
- Updates available for Ubuntu 20.04, 22.04, and 24.04