Custom Armbian build configurations, kernel patches, device tree overlays, and build utilities for NAPI2 (RK3568) and NAPI-C (RK3308) industrial SBCs.
π§ To order boards or discuss integration: dj.novikov@gmail.com
π§ Board documentation and GPIO pinouts: napi-boards
This repository is a drop-in overlay for the Armbian build system. Clone it, copy the files into your Armbian tree, and build β no manual patching needed.
napi-armbian-build/
β
βββ config/
β βββ boards/
β βββ napi2.csc # NAPI2 board config (RK3568J)
β βββ napic.conf # NAPI-C board config (RK3308)
β
βββ userpatches/
β βββ customize-image.sh # Image customization: users, packages,
β β # overlay compilation, desktop tweaks
β βββ lib.config # Armbian lib overrides
β βββ config-default.conf
β βββ bootscripts/
β β βββ boot-rockchip64-ttyS0.cmd
β βββ kernel/
β β βββ archive/rockchip64-6.12/
β β β βββ dt/rk3568-napi2.dts # NAPI2 DTS, mainline 6.12
β β β βββ dt/rk3308-napi-c.dts # NAPI-C DTS, mainline 6.12
β β β βββ 0150-mmc-ignore-sd-read-ext-regs-error.patch
β β βββ rk35xx-vendor-6.1/
β β βββ dt/rk3568-napi2.dts # NAPI2 DTS, vendor 6.1
β β βββ 0150-mmc-ignore-sd-read-ext-regs-error.patch
β βββ overlay/
β β βββ overlays-rk3308/ # NAPI-C device tree overlays
β β βββ overlays-rk3568/ # NAPI2 device tree overlays
β β βββ overlays-rk3568-current/ # NAPI2 overlays, mainline kernel
β β βββ overlays-rk3568-vendor/ # NAPI2 overlays, vendor kernel
β β βββ dt-bindings.tar.gz # DT header includes (packed, ~600 files)
β β βββ includes-rk35xx-vendor.tar.gz
β β βββ etc/ # sysctl.d, apt sources and other system configs
β β βββ services/ # systemd units (create-home, getty)
β β βββ xfce-configs/ # XFCE desktop tweaks
β β βββ lightdm/ # Display manager config
β β βββ chromium-configs/
β β βββ backgrounds/ # Custom wallpaper
β βββ u-boot/
β βββ legacy/u-boot-radxa-rk35xx/ # NAPI2 U-Boot patches
β βββ v2024.10/ # NAPI-C U-Boot patches
β
βββ run-mynapi.sh # Build wrapper (see below)
βββ run-xz-number.sh # Compress output image with xz + sha256
βββ run-clean-images.sh # Delete output images by pattern
βββ check-overlay.sh # Compile single overlay without full kernel build
βββ run-napi-pack.sh # Pack this repo into timestamped archive
git clone --depth=1 https://github.com/armbian/build ~/arbgit clone https://github.com/your-org/napi-armbian-build.git
cd napi-armbian-build
cp -r config/ ~/arb/config/
cp -r userpatches/ ~/arb/userpatches/
cp run-mynapi.sh run-xz-number.sh run-clean-images.sh check-overlay.sh run-napi-pack.sh ~/arb/
chmod +x ~/arb/*.shcd ~/arb
# NAPI2 β minimal image, mainline kernel 6.12
./run-mynapi.sh --napi2 --current --minimal
# NAPI2 β minimal image, vendor kernel 6.1 (recommended for production)
./run-mynapi.sh --napi2 --vendor --minimal
# NAPI2 β XFCE desktop, vendor kernel
./run-mynapi.sh --napi2 --vendor --desktop
# NAPI-C β minimal image (always current, always minimal)
./run-mynapi.sh --napic
# Kernel only (faster iteration)
./run-mynapi.sh --napi2 --current --kernelonlyOutput images: ~/arb/output/images/
Wrapper over compile.sh with sane defaults for NAPI boards.
Options:
--napi2 / --napic Select board (default: napi2)
--current Mainline kernel 6.12
--vendor Rockchip BSP kernel 6.1
--edge Edge kernel
--minimal Minimal console image
--desktop XFCE desktop (napi2 only)
--kernelonly Build kernel package only
--noclean Skip cache cleanup (faster rebuilds)
--skiparmbian Skip apt.armbian.com (if upstream is down)
--help Show usage
Compile a single .dts overlay against the kernel headers β without rebuilding the kernel.
Uses the kernel source tree in ~/arb/cache/sources/.
./check-overlay.sh lvds # β /tmp/lvds.dtbo
./check-overlay.sh rs485-uart3 # β /tmp/rs485-uart3.dtboFind a built image by ID fragment, compress with xz -9 -T8, generate sha256.
./run-xz-number.sh 0317 # finds output/images/*0317*.img β *.img.xz + *.img.xz.sha256Delete output images matching one or more patterns. Supports -y (skip confirmation)
and -s (show contents only).
./run-clean-images.sh napic vendor # delete all images matching *napic* or *vendor*
./run-clean-images.sh -s # show what's in output/images/
./run-clean-images.sh -y 25Mar # delete without confirmationPack all napi-relevant files from ~/arb into a timestamped archive for backup or transfer.
./run-napi-pack.sh
# β ~/tmp/napi-pack-20260405-1423.tar.gz| Branch | Kernel | Use case |
|---|---|---|
current |
6.12 | Mainline β upstream development, overlay debugging |
vendor |
6.1 | Rockchip BSP β production, MPP hardware video (/dev/mpp_service) |
The build uses the Russian Armbian mirror (stpete-mirror.armbian.com), can be changed.
The image includes the Napilab APT repository which provides packages not available in standard Ubuntu Noble repos:
- mbusd β Modbus TCP to RTU gateway daemon
- mbscan β Modbus device scanner
- modbus-slave β Modbus slave emulator
These packages are pre-configured in the image and available via apt-get install.
After build, the image has:
| Parameter | Value |
|---|---|
| User | napi (sudo), root |
| Root password | napilinux |
| Timezone | Europe/Moscow |
| Locale | en_US.UTF-8 |
| Console | ttyS2, 1500000 |
| Auto-login | Disabled |
| IPv6 | Disabled (sysctl) |
| SSH | Enabled |
| First-login wizard | Disabled |
| Kernel headers | Installed (linux-headers-${BRANCH}-${LINUXFAMILY}) |
| APT repos | Ubuntu Noble + Armbian + Napilab |
| Pre-installed | vim, net-tools, can-utils, mbpoll, minicom, tcpdump, screen, i2c-tools, python3-pymodbus, mosquitto, mbusd, memtester, build-essential |
| Desktop (optional) | XFCE, Firefox (non-snap), x11vnc, Mesa/GPU drivers |
Compiled overlay .dtbo files are placed in /boot/dtb/rockchip/overlay/.
Source .dts files are saved to /root/dts/.
Enable in /boot/armbianEnv.txt after flashing:
overlays=rk3568-napi2-rs485-uart3 rk3568-napi2-can0
NAPI2 (RK3568) β overlay/overlays-rk3568*/:
| File | Interface |
|---|---|
rs485-uart3 |
RS485 / UART3 |
rk3568-can2 |
CAN 2.0B |
lvds-current |
LVDS, mainline |
lvds-vendor |
LVDS, vendor |
i2c4-m1 |
I2C4 |
rtc1338 |
RTC DS1338 |
NAPI-C (RK3308) β overlay/overlays-rk3308/:
| File | Interface |
|---|---|
rk3308-uart1/2/3/4 |
UART |
rk3308-i2c1/3 |
I2C |
rk3308-i2c1-ds1307/38 |
I2C + RTC |
rk3308-spi1-w5500 |
SPI Ethernet |
rk3308-usb20-host |
USB 2.0 Host |
- napi-boards β GPIO pinouts, overlay docs, usage examples
- napiworld.ru β Official product page (ru)
- NapiLinux β Custom OS with NapiConfig web interface
- Downloads β Ready-made images
To order NAPI2 / NAPI-C boards or custom carrier boards, or to discuss integration into your project:
π§ dj.novikov@gmail.com
rockchip rk3568 rk3308 armbian embedded-linux device-tree industrial
sbc single-board-computer rs485 can-bus modbus iot-gateway lvds rockchip-rk3568
- Replace gpiod 1.6.3 -> gpiod 2.2 from repi.napilab.ru