Jump to content

m1zfs

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by m1zfs

  1. Hello Armbian-Community! TL;DR I've successfully enabled the Rockchip RK3568 NPU (0.8 TOPS INT8) on the ODROID-M1 with 8GB RAM running Armbian 6.18.9-current-rockchip64. The only thing needed to make this work for everyone is a 1-line kernel patch in Armbian build that I've already submitted: https://github.com/armbian/build/pull/9403 Once this patch is merged into Armbian, the DKMS modules will work out-of-the-box on all RK3568 boards. The Problem 1. Hardkernel and Rockchip provide NPU patches for quite old kernel versions: rockchip <= 6.6 hardkernel <= 5.10 2. IOMMU page table allocation bug — On systems with >4GB RAM, the kernel's IOMMU allocates page tables above 4GB, but the NPU can only access the first 4GB of physical memory, causing DMA mapping failures and inference timeouts The Solution 1. Kernel Patch (1 line!) - .gfp_flags = 0, + .gfp_flags = GFP_DMA32, This forces IOMMU page tables to be allocated below 4GB, fixing NPU operation on 8GB boards. 2. DKMS Driver Package I've created a complete DKMS package that: - Includes DT overlays for NPU, IOMMU, power-domain, and clock configuration - Supports dynamic frequency scaling (100 MHz - 1000 MHz) - Provides `/dev/dri/renderD129` (DRM/GEM interface) for RKNN Runtime - Would compile against Armbian's stock kernel headers with the above patch merged The Questions 1. What would be the best way to provide those modules for installation in the armbian system? 2. Has someone a 4 GB version of the M1 and could test the modules?
  2. I can confirm that booting Odroid M1 from SD card does not work with U-Boot versions newer than 2024.04. Many thanks to IAV for providing a workaround. Perhaps most people are booting from NVMe now, so this issue has flown under the radar? # Install U-Boot 24.5.1 (maps to upstream v2024.04) apt-get install -y linux-u-boot-odroidm1-edge=24.5.1 # Freeze the package at that version "printf 'linux-u-boot-odroidm1-edge hold\n' | sudo dpkg --set-selections" # Flash SPI directly from the package artifacts (or via armbian-install) flashcp -v /usr/lib/linux-u-boot-edge-odroidm1/idbloader.img /dev/mtd0 flashcp -v /usr/lib/linux-u-boot-edge-odroidm1/u-boot.itb /dev/mtd2 # Confirm strings /dev/mtd0 | grep -m1 "U-Boot" # U-Boot SPL 2024.04 (Jan 10 2026 - 10:54:44 +0100) strings /dev/mtd2 | grep -m1 "U-Boot" # FIT image for U-Boot with bl31 (TF-A) Now I can boot from sdcard again w/o RCY button. To use only ZFS on my system I compiled zfs into U-Boot. That worked but the problem was still with U-Boot's handling of the mmc1 somehow. Even though zfsls/zfsload were present in the SPI-flashed U-Boot, that build immediately reinitialized mmc1 in HS200 (1.8 V) mode and hit the “Card did not respond to voltage select! : -110” failure before the boot script could run. So the inability to boot the ZFS v28 pool was due to the SPI U-Boot’s bad MMC tuning, not the ZFS commands themselves. For future reference I’ll leave here on how to built U-Boot with ZFS support from the upstream sources: # Workspace & Dependencies apt install git gcc-aarch64-linux-gnu bison flex device-tree-compiler libssl-dev make python3 ninja-build build-essential mkdir -p ~/work/u-boot && cd ~/work/u-boot # Upstream U-Boot git clone --depth=1 --branch v2024.04 https://source.denx.de/u-boot/u-boot.git # Firmare blobs git clone --depth=1 https://github.com/rockchip-linux/rkbin.git # Prepare .config cd u-boot cp configs/odroid-m1-rk3568_defconfig .config scripts/config --file .config --enable CONFIG_CMD_ZFS yes "" | olddefconfig # Compile make -j$(nproc) \ BL31=../rkbin/bin/rk35/rk3568_bl31_v1.45.elf \ ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.23.bin # Flash SPI directly from the package artifacts (or via armbian-install) cp spl/u-boot-spl.bin /usr/lib/linux-u-boot-edge-odroidm1/idbloader.img cp u-boot.itb /usr/lib/linux-u-boot-edge-odroidm1/u-boot.itb flashcp -v /usr/lib/linux-u-boot-edge-odroidm1/idbloader.img /dev/mtd0 flashcp -v /usr/lib/linux-u-boot-edge-odroidm1/u-boot.itb /dev/mtd2
  3. # cat /boot/armbianEnv.txt verbosity=1 bootlogo=true console=both extraargs=cma=256M overlay_prefix=rockchip-rk3568-hk fdtfile=rockchip/rk3568-odroid-m1.dtb rootdev=UUID=0a9f09a7-bbb5-493f-a7af-b0e62f4aff8e rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u It seems the UUID can be changed in `/boot/armbianEnv.txt`.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines