Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2f9d3b1
rockchip/cortexa7: add image recipes for all remaining Luckfox Pico R…
rgrizzell May 6, 2026
1283ebd
rockchip/cortexa7: enable display (VOP/RGB) and GT911 touch kernel dr…
rgrizzell May 7, 2026
52bc9e1
rockchip/cortexa7: add NAND support for Luckfox Pico Plus/WebBee and …
rgrizzell May 29, 2026
20166db
rockchip/cortexa7: wire up eMMC boot for the RV1106 panel/Ultra boards
rgrizzell May 20, 2026
8ed0b5c
rockchip/cortexa7: wire up GT911 touch on the panel boards
rgrizzell May 20, 2026
aeef843
rockchip/cortexa7: add uboot-envtools board file and env fixes
rgrizzell May 29, 2026
21ae448
rockchip/cortexa7: add AIC8800 WiFi support (driver + wifi-scripts in…
rgrizzell May 29, 2026
d6575b6
rockchip/cortexa7: bring up RV1106 VOP/RGB parallel display
rgrizzell May 29, 2026
54209d4
rockchip/cortexa7: add AIC8800 Bluetooth bring-up (hci0 + bluez)
rgrizzell May 29, 2026
c3d78c8
rockchip/cortexa7: enable CONFIG_KEYBOARD_ADC for adc-keys buttons
rgrizzell May 30, 2026
4d9133f
rockchip/cortexa7: enable activity LED trigger
rgrizzell May 30, 2026
fb1e40e
rockchip/cortexa7: present a console login prompt on first boot
rgrizzell May 30, 2026
4f2f934
rockchip/cortexa7: add Femtofox Pro device tree
rgrizzell May 30, 2026
6c2a779
rockchip/cortexa7: add Femtofox Pro image profile
rgrizzell May 30, 2026
67ae533
rockchip/cortexa7: build DS3231 RTC driver in for Femtofox
rgrizzell May 30, 2026
f19e222
rockchip/cortexa7: fix Femtofox spidev compatible so it auto-binds
rgrizzell May 30, 2026
a2031d4
rockchip/cortexa7: bind Femtofox SARADC via rk3588 fallback compatible
rgrizzell May 30, 2026
4439d31
uboot-luckfox: build SD U-Boot for Femtofox Pro
rgrizzell Jul 9, 2026
a8624e4
rockchip/cortexa7: enable CONFIG_NET_CORE so TUN builds
rgrizzell Jul 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion package/boot/rkbin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ define Trusted-Firmware-A/rv1103-nand
TPL:=rv11/rv1106_ddr_924MHz_tb_v1.15.bin
endef

define Trusted-Firmware-A/rv1106-nand
BUILD_SUBTARGET:=cortexa7
ATF:=rv11/rv1106_spl_spi_nand_tb_v1.00.bin
TPL:=rv11/rv1106_ddr_924MHz_tb_v1.15.bin
endef

define Trusted-Firmware-A/rv1106-emmc
BUILD_SUBTARGET:=cortexa7
ATF:=rv11/rv1106_spl_emmc_tb_v1.00.bin
TPL:=rv11/rv1106_ddr_924MHz_tb_v1.15.bin
endef

TFA_TARGETS:= \
rk3308 \
rk3308-rock-pi-s \
Expand All @@ -83,7 +95,9 @@ TFA_TARGETS:= \
rk3568-e25 \
rk3588 \
rv1106 \
rv1103-nand
rv1103-nand \
rv1106-nand \
rv1106-emmc

ifeq ($(BUILD_VARIANT),rk3308-rock-pi-s)
TPL_FILE:=rk3308_ddr_589MHz_uart0_m0_v2.07.bin
Expand Down Expand Up @@ -160,4 +174,32 @@ define Package/trusted-firmware-a-rv1103-nand/install
$(CP) $(PKG_BUILD_DIR)/rv1106_download_v1.15.108.bin $(STAGING_DIR_IMAGE)/rv1103-nand-loader.bin
endef

define Package/trusted-firmware-a-rv1106-nand/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
# Generate NAND idblock.img for RV1106 SPI NAND (Pro, Max, Pro Max) using TB binaries:
# rv1106_ddr_924MHz_tb_v1.15.bin - DDR init (TB variant)
# rv1106_hpmcu_tb_v1.01.bin - HPMCU (loaded at 0x40000)
# rv1106_spl_spi_nand_tb_v1.00.bin - SPL for SPI NAND
chmod +x $(PKG_BUILD_DIR)/tools/boot_merger
cd $(PKG_BUILD_DIR) && ./tools/boot_merger RKBOOT/RV1106MINIALL_SPI_NAND_TB.ini
# INI specifies IDB_PATH=rv1106_idblock_v1.15.100.img
$(CP) $(PKG_BUILD_DIR)/rv1106_idblock_v1.15.100.img $(STAGING_DIR_IMAGE)/rv1106-nand-idblock.img
# USB download loader for rkdeveloptool db (maskrom/USB download mode)
$(CP) $(PKG_BUILD_DIR)/rv1106_download_v1.15.108.bin $(STAGING_DIR_IMAGE)/rv1106-nand-loader.bin
endef

define Package/trusted-firmware-a-rv1106-emmc/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
# Generate eMMC idblock.img for RV1106 eMMC (Ultra, Pi, 86Panel, Zero) using TB binaries:
# rv1106_ddr_924MHz_tb_v1.15.bin - DDR init (TB variant)
# rv1106_hpmcu_tb_v1.01.bin - HPMCU (loaded at 0x40000)
# rv1106_spl_emmc_tb_v1.00.bin - SPL for eMMC
chmod +x $(PKG_BUILD_DIR)/tools/boot_merger
cd $(PKG_BUILD_DIR) && ./tools/boot_merger RKBOOT/RV1106MINIALL_EMMC_TB.ini
# INI specifies IDB_PATH=rv1106_idblock_v1.15.100.img
$(CP) $(PKG_BUILD_DIR)/rv1106_idblock_v1.15.100.img $(STAGING_DIR_IMAGE)/rv1106-emmc-idblock.img
# USB download loader for rkdeveloptool db (maskrom/USB download mode)
$(CP) $(PKG_BUILD_DIR)/rv1106_download_v1.15.108.bin $(STAGING_DIR_IMAGE)/rv1106-emmc-loader.bin
endef

$(eval $(call BuildPackage/Trusted-Firmware-A))
50 changes: 50 additions & 0 deletions package/boot/uboot-envtools/files/rockchip_cortexa7
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
# Copyright (C) 2026 OpenWrt.org
#
[ -e /etc/config/ubootenv ] && exit 0

touch /etc/config/ubootenv

. /lib/uboot-envtools.sh
. /lib/functions.sh

board=$(board_name)

case "$board" in
# SPI-NAND boot: U-Boot env is the 256K "env" MTD partition (mtd0; 128K
# erase block).
luckfox,rv1103-luckfox-pico-mini-nand|\
luckfox,rv1103-luckfox-pico-plus-nand|\
luckfox,rv1103-luckfox-pico-webbee-nand|\
luckfox,rv1106-luckfox-pico-pro-nand|\
luckfox,rv1106-luckfox-pico-max-nand)
ubootenv_add_uci_config "/dev/mtd0" "0x0" "0x40000" "0x20000" "0x2"
;;
# SD-card boot: U-Boot env is 32K at offset 0 of the SD card. The SD
# controller (&sdmmc) is alias mmc1, so the card enumerates as mmcblk1.
luckfox,pico|\
luckfox,rv1103-luckfox-pico-mini-a|\
luckfox,rv1103-luckfox-pico-mini-b|\
luckfox,rv1103-luckfox-pico-plus|\
luckfox,rv1103-luckfox-pico-webbee|\
luckfox,rv1106-luckfox-pico-pro|\
luckfox,rv1106-luckfox-pico-max)
ubootenv_add_uci_config "/dev/mmcblk1" "0x0" "0x8000"
;;
# eMMC boot: U-Boot env is 32K at offset 0 of the eMMC. The eMMC (&emmc)
# is alias mmc0, so it enumerates as mmcblk0.
luckfox,rv1106-luckfox-pico-pi|\
luckfox,rv1106-luckfox-pico-pi-w|\
luckfox,rv1106-luckfox-pico-ultra|\
luckfox,rv1106-luckfox-pico-ultra-w|\
luckfox,rv1106g-luckfox-pico-86panel|\
luckfox,rv1106g-luckfox-pico-zero|\
rockchip,rv1106g-luckfox-pico-86panel-w)
ubootenv_add_uci_config "/dev/mmcblk0" "0x0" "0x8000"
;;
esac

config_load ubootenv
config_foreach ubootenv_add_app_config

exit 0
36 changes: 31 additions & 5 deletions package/boot/uboot-luckfox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rgrizzell/uboot-luckfox.git
PKG_SOURCE_DATE:=2026-04-19
PKG_SOURCE_VERSION:=f230b8a7c75a0f844699a4d3314d62c03b13b1b8
PKG_SOURCE_DATE:=2026-05-09
PKG_SOURCE_VERSION:=b583b574ef8ae139d965cd00c0c4bd2194c7614a
PKG_SOURCE:=uboot-luckfox-$(PKG_SOURCE_DATE)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip

Expand All @@ -29,18 +29,34 @@ define U-Boot/rv1106-sd
NAME:=Luckfox Pico RV1106 SD
UBOOT_CONFIG:=luckfox_rv1106_uboot
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rv1106
BUILD_DEVICES:=luckfox_pico-mini
BUILD_DEVICES:=femtofox luckfox_pico-mini luckfox_pico luckfox_pico-plus luckfox_pico-webbee luckfox_pico-pro luckfox_pico-max
endef

define U-Boot/rv1103-nand
BUILD_SUBTARGET:=cortexa7
NAME:=Luckfox Pico RV1103 SPI NAND
UBOOT_CONFIG:=luckfox_rv1106_spi_nand_tb
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rv1103-nand
BUILD_DEVICES:=luckfox_pico-mini-nand
BUILD_DEVICES:=luckfox_pico-mini-nand luckfox_pico-plus-nand luckfox_pico-webbee-nand
endef

UBOOT_TARGETS := rv1106-sd rv1103-nand
define U-Boot/rv1106-nand
BUILD_SUBTARGET:=cortexa7
NAME:=Luckfox Pico RV1106 SPI NAND
UBOOT_CONFIG:=luckfox_rv1106_spi_nand_tb
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rv1106-nand
BUILD_DEVICES:=luckfox_pico-pro-nand luckfox_pico-max-nand
endef

define U-Boot/rv1106-emmc
BUILD_SUBTARGET:=cortexa7
NAME:=Luckfox Pico RV1106 eMMC
UBOOT_CONFIG:=luckfox_rv1106_uboot_emmc_tb
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rv1106-emmc
BUILD_DEVICES:=luckfox_pico-86panel-w luckfox_pico-86panel luckfox_pico-ultra luckfox_pico-ultra-w luckfox_pico-pi luckfox_pico-pi-w luckfox_pico-zero
endef

UBOOT_TARGETS := rv1106-sd rv1103-nand rv1106-nand rv1106-emmc

# Vendor U-Boot 2017.09 uses _defconfig (no _config compat rule)
define Build/Configure
Expand All @@ -59,6 +75,16 @@ ifeq ($(BUILD_VARIANT),rv1103-nand)
# for recovery/download mode; normal TB boot does not use this partition.
$(INSTALL_BIN) $(PKG_BUILD_DIR)/u-boot.img \
$(STAGING_DIR_IMAGE)/rv1103-nand-uboot.img
else ifeq ($(BUILD_VARIANT),rv1106-nand)
# Stage u-boot.img for RV1106 SPI NAND (Pro, Max, Pro Max).
# The rkbin NAND SPL boots the kernel directly (TB); this img is for
# recovery/download mode only.
$(INSTALL_BIN) $(PKG_BUILD_DIR)/u-boot.img \
$(STAGING_DIR_IMAGE)/rv1106-nand-uboot.img
else ifeq ($(BUILD_VARIANT),rv1106-emmc)
# Stage u-boot.img for RV1106 eMMC (Ultra, Pi, 86Panel, Zero).
$(INSTALL_BIN) $(PKG_BUILD_DIR)/u-boot.img \
$(STAGING_DIR_IMAGE)/rv1106-emmc-uboot.img
else
# Stage u-boot.img (FIT format, d00dfeed magic) directly.
# The rkbin SD SPL (rv1106_spl_v1.02.bin) is a U-Boot SPL that expects
Expand Down
102 changes: 102 additions & 0 deletions package/kernel/aic8800/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#
# Copyright (C) 2026 OpenWrt.org
#
include $(TOPDIR)/rules.mk

PKG_NAME:=aic8800
PKG_VERSION:=6.4.3.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Robert Grizzell <robert@grizzell.me>

include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk

AIC_FW_PATH:=/lib/firmware/aic8800dc_fw

define KernelPackage/aic8800-bsp
SUBMENU:=Wireless Drivers
TITLE:=AIC8800DC SDIO platform/BSP module
DEPENDS:=@TARGET_rockchip_cortexa7 +aic8800-firmware
FILES:=$(PKG_BUILD_DIR)/aic8800_bsp/aic8800_bsp.ko
AUTOLOAD:=$(call AutoProbe,aic8800_bsp)
endef

define KernelPackage/aic8800-bsp/description
SDIO platform/BSP module for the AICSemi AIC8800DC combo chip.
Handles firmware download and exports the symbols used by the WiFi
and Bluetooth modules.
endef

define KernelPackage/aic8800-wifi
SUBMENU:=Wireless Drivers
TITLE:=AIC8800DC fullmac WiFi driver
DEPENDS:=+kmod-aic8800-bsp +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT
FILES:=$(PKG_BUILD_DIR)/aic8800_fdrv/aic8800_fdrv.ko
AUTOLOAD:=$(call AutoProbe,aic8800_fdrv)
endef

define KernelPackage/aic8800-bt
SUBMENU:=Wireless Drivers
TITLE:=AIC8800DC Bluetooth rfkill / low-power module
DEPENDS:=+kmod-aic8800-bsp
FILES:=$(PKG_BUILD_DIR)/aic8800_btlpm/aic8800_btlpm.ko
AUTOLOAD:=$(call AutoProbe,aic8800_btlpm)
endef

define Package/aic8800-firmware
SECTION:=firmware
CATEGORY:=Firmware
TITLE:=AIC8800DC firmware blobs
endef

define Package/aic8800-bt-attach
SECTION:=net
CATEGORY:=Network
TITLE:=AIC8800DC Bluetooth HCI UART attach
DEPENDS:=+kmod-aic8800-bt +bluez-utils
endef

define Package/aic8800-bt-attach/description
procd init script that attaches the AIC8800DC Bluetooth UART (uart1 /
/dev/ttyS1) to the kernel HCI H4 line discipline via hciattach, bringing
up hci0. The BSP powers BT on and loads its firmware over SDIO, so this
only binds the line discipline.
endef

KMAKE:= \
$(KERNEL_MAKE) $(PKG_JOBS) \
CONFIG_PLATFORM_ROCKCHIP=y \
CONFIG_PLATFORM_UBUNTU=n \
CONFIG_AIC_FW_PATH=$(AIC_FW_PATH)

define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/. $(PKG_BUILD_DIR)/
endef

define Build/Compile
+$(KMAKE) M="$(PKG_BUILD_DIR)/aic8800_bsp" modules
+$(KMAKE) M="$(PKG_BUILD_DIR)/aic8800_fdrv" \
KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/aic8800_bsp/Module.symvers" \
modules
+$(KMAKE) M="$(PKG_BUILD_DIR)/aic8800_btlpm" \
KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/aic8800_bsp/Module.symvers" \
modules
endef

define Package/aic8800-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/aic8800dc_fw
$(INSTALL_DATA) ./firmware/* $(1)/lib/firmware/aic8800dc_fw/
endef

define Package/aic8800-bt-attach/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/aic8800-bt.init $(1)/etc/init.d/aic8800-bt
endef

$(eval $(call KernelPackage,aic8800-bsp))
$(eval $(call KernelPackage,aic8800-wifi))
$(eval $(call KernelPackage,aic8800-bt))
$(eval $(call BuildPackage,aic8800-firmware))
$(eval $(call BuildPackage,aic8800-bt-attach))
25 changes: 25 additions & 0 deletions package/kernel/aic8800/files/aic8800-bt.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh /etc/rc.common

# Attach the AIC8800 Bluetooth UART to the kernel HCI H4 line discipline so
# hci0 appears. The AIC BSP powers BT on and downloads its firmware over SDIO
# at module load, so the chip is already live on uart1 (/dev/ttyS1) by the
# time procd reaches userspace; hciattach only binds the line discipline. The
# chip speaks generic H4 ("any") - no vendor HCI proto or over-HCI patching.

START=99
USE_PROCD=1

BT_TTY=/dev/ttyS1
BT_BAUD=1500000

start_service() {
[ -c "$BT_TTY" ] || return 0

procd_open_instance hciattach
# -n keeps hciattach in the foreground: it must stay alive to hold the
# line discipline (hci0 disappears if it exits), so procd respawns it.
procd_set_param command /usr/bin/hciattach -n -s "$BT_BAUD" "$BT_TTY" any "$BT_BAUD" flow nosleep
procd_set_param respawn
procd_set_param stderr 1
procd_close_instance
}
56 changes: 56 additions & 0 deletions package/kernel/aic8800/firmware/aic_userconfig_8800dc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# AIC USERCONFIG 2022/0803/1707

# txpwr_lvl
enable=1
lvl_11b_11ag_1m_2g4=20
lvl_11b_11ag_2m_2g4=20
lvl_11b_11ag_5m5_2g4=20
lvl_11b_11ag_11m_2g4=20
lvl_11b_11ag_6m_2g4=20
lvl_11b_11ag_9m_2g4=20
lvl_11b_11ag_12m_2g4=20
lvl_11b_11ag_18m_2g4=20
lvl_11b_11ag_24m_2g4=18
lvl_11b_11ag_36m_2g4=18
lvl_11b_11ag_48m_2g4=16
lvl_11b_11ag_54m_2g4=16
lvl_11n_11ac_mcs0_2g4=20
lvl_11n_11ac_mcs1_2g4=20
lvl_11n_11ac_mcs2_2g4=20
lvl_11n_11ac_mcs3_2g4=20
lvl_11n_11ac_mcs4_2g4=18
lvl_11n_11ac_mcs5_2g4=18
lvl_11n_11ac_mcs6_2g4=16
lvl_11n_11ac_mcs7_2g4=16
lvl_11n_11ac_mcs8_2g4=16
lvl_11n_11ac_mcs9_2g4=16
lvl_11ax_mcs0_2g4=20
lvl_11ax_mcs1_2g4=20
lvl_11ax_mcs2_2g4=20
lvl_11ax_mcs3_2g4=20
lvl_11ax_mcs4_2g4=18
lvl_11ax_mcs5_2g4=18
lvl_11ax_mcs6_2g4=16
lvl_11ax_mcs7_2g4=16
lvl_11ax_mcs8_2g4=16
lvl_11ax_mcs9_2g4=16
lvl_11ax_mcs10_2g4=15
lvl_11ax_mcs11_2g4=15

# txpwr_ofst
ofst_enable=0
ofst_chan_1_4=0
ofst_chan_5_9=0
ofst_chan_10_13=0
ofst_chan_36_64=0
ofst_chan_100_120=0
ofst_chan_122_140=0
ofst_chan_142_165=0

# xtal cap
xtal_enable=0
xtal_cap=24
xtal_cap_fine=31



Loading