Files
openwrtbuilder/profiles
2026-05-25 21:46:29 -04:00

224 lines
7.5 KiB
Bash

#!/usr/bin/env bash
# Device profiles for openwrtbuilder
# shellcheck disable=SC2034
DEFAULT_RELEASE="25.12.4" # overrides default release in openwrtbuilder
# Default packages (precede with "-" to exclude)
default_packages=(
ca-bundle base-files apk-mbedtls libustream-mbedtls openssh-sftp-server dropbear
fstools libc libgcc logd mtd netifd
nano vim htop diffutils tar iperf3 zsh rsync tcpdump ethtool
odhcp6c ppp ppp-mod-pppoe procd-ujail
uboot-envtools uci uclient-fetch urandom-seed urngd
luci luci-ssl luci-app-statistics luci-app-filemanager luci-app-attendedsysupgrade
lm-sensors collectd-mod-sensors collectd-mod-thermal collectd-mod-conntrack collectd-mod-cpu
tailscale
)
default_router=("${default_packages[@]}"
dnsmasq odhcpd-ipv6only nftables firewall4
luci-proto-wireguard luci-app-sqm
adblock luci-app-adblock
kmod-nft-offload
)
default_ap=("${default_packages[@]}"
-dnsmasq -odhcpd-ipv6only -nftables -firewall4
-kmod-nft-offload
)
# Default kernel configs
default_kconfigs=(
)
# Current devices
# Nanopi R4S router w/ btrfs
declare -Ag router=(
[mode]="source"
[device]="friendlyarm_nanopi-r4s"
[target]="rockchip/armv8"
[filesystem]="ext4"
[packages]="${default_router[*]} \
kmod-r8169 \
collectd-mod-df usbutils kmod-usb-storage kmod-usb-storage-uas \
kmod-fs-btrfs btrfs-progs block-mount \
smcroute avahi-daemon"
[kconfigs]="${default_kconfigs[*]} \
CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=32 \
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_PROGS_ZSTD=y"
)
# Redmi AX6000 router w/ stock layout in full router mode
declare -Ag abby_router=(
[mode]="imagebuilder"
[device]="xiaomi_redmi-router-ax6000-stock"
[target]="mediatek/filogic"
[filesystem]="squashfs"
[packages]="${default_router[*]} \
wpad-basic-mbedtls \
kmod-leds-ws2812b kmod-mt7915e \
kmod-mt7986-firmware mt7986-wo-firmware"
)
declare -Ag ax6000_uboot_ap=(
[mode]="imagebuilder"
[device]="xiaomi_redmi-router-ax6000-ubootmod"
[target]="mediatek/filogic"
[release]="snapshot"
[filesystem]="squashfs"
[packages]="${default_ap[*]} \
wpad-basic-mbedtls \
kmod-leds-ws2812b kmod-mt7915e \
kmod-mt7986-firmware mt7986-wo-firmware"
)
# Testing
declare -Ag w1700k_ap=(
[mode]="source"
[device]="gemtek_w1700k-ubi"
[target]="airoha/an7581"
[filesystem]="squashfs"
[release]="snapshot"
[packages]="${default_ap[*]} \
wpad-basic-mbedtls libiwinfo-data \
kmod-gpio-button-hotplug kmod-leds-gpio \
airoha-en7581-npu-firmware airoha-en7581-mt7996-npu-firmware \
kmod-i2c-an7581 kmod-hwmon-nct7802 kmod-mt7996-firmware kmod-phy-rtl8261n \
fitblk"
)
declare -Ag w1700k_ap_fanboy=(
[mode]="source"
[device]="gemtek_w1700k-ubi"
[target]="airoha/an7581"
[filesystem]="squashfs"
[release]="snapshot"
[packages]="${default_ap[*]} \
wpad-basic-mbedtls libiwinfo-data \
kmod-gpio-button-hotplug kmod-leds-gpio \
airoha-en7581-npu-firmware airoha-en7581-mt7996-npu-firmware \
kmod-i2c-an7581 kmod-hwmon-nct7802 kmod-mt7996-firmware kmod-phy-rtl8261n \
fitblk"
[branches]="https://github.com/OpenWRT-fanboy/OpenW1700k.git@ubi2"
)
declare -Ag w1700k=(
[mode]="source"
[device]="gemtek_w1700k-ubi"
[target]="airoha/an7581"
[filesystem]="squashfs"
[release]="snapshot"
[packages]="${default_router[*]} \
wpad-basic-mbedtls libiwinfo-data \
kmod-gpio-button-hotplug kmod-leds-gpio \
airoha-en7581-npu-firmware airoha-en7581-mt7996-npu-firmware \
kmod-i2c-an7581 kmod-hwmon-nct7802 kmod-mt7996-firmware kmod-phy-rtl8261n \
fitblk"
# tools: m4: update to 1.4.21 (fixes GCC15/C23 _Generic build failure)
[cherrypicks]="https://github.com/openwrt/openwrt@main:ce9a0ff3fb88d037080aaf95af92ac5da4fcfdba"
)
# Deprecated: Last working profile for w1700k with stock (non-ubi) partitions
declare -Ag w1700k_fanboy=(
[mode]="source"
[device]="gemtek_w1700k-ubi"
[target]="airoha/an7581"
[filesystem]="squashfs"
[release]="snapshot"
[packages]="${default_router[*]} \
wpad-basic-mbedtls libiwinfo-data \
kmod-gpio-button-hotplug kmod-leds-gpio \
airoha-en7581-npu-firmware airoha-en7581-mt7996-npu-firmware \
kmod-i2c-an7581 kmod-hwmon-nct7802 kmod-mt7996-firmware kmod-phy-rtl8261n \
fitblk"
# [cherrypicks]="\
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:8d449e968cfaa774ab7a219b3a5ab4251b2f9352 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:3033241393ef6eb562539c6a3ccb9d3cf1a25d05 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:79a21e0986a9efe6de3a07394a71ac15a2107b16 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:2f8a1cbf901df0d325dfe112fdfe8013a72c8305 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:71b09bc5852797cdbf7cb3b56a7d8fcd9d4ca9db \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:fe0135f0b7037a9cc1985d5937dd24cb99bfccb1 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:cdb937180fb971fe702078f0e0fef63f2fcce337 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:6dc847c802b9dc597fc2c64711ca85499f128d1d \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:b6e6cf911915dd987eecde908a2013419565cff4 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:708089948949e66f5234249fc631e0453b58942e \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:9841a707a577385498591bcfb56b836176325c2f \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:8446ec6431a3247683a27070d3c69f2789b52c70 \
# https://github.com/OpenWRT-fanboy/OpenW1700k.git@lumos:05380e2ef5fb96c171da23453ba32aa349a4b126"
# [branches]="https://github.com/OpenWRT-fanboy/OpenW1700k.git@minimal"
)
declare -Ag rpi4=(
[device]="rpi-4"
[target]="bcm27xx/bcm2711"
[filesystem]="ext4"
[packages]="${default_router[*]} \
luci-app-pbr -dnsmasq dnsmasq-full \
kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152"
)
declare -Ag r4s_stock=(
[device]="friendlyarm_nanopi-r4s"
[target]="rockchip/armv8"
[filesystem]="ext4"
[release]="snapshot"
)
# Retired devices
declare -Ag n5100=(
[device]="generic"
[target]="x86/64"
[filesystem]="squashfs"
[packages]="${default_router[*]} \
irqbalance collectd-mod-df \
usbutils kmod-usb-storage kmod-usb-storage-uas kmod-fs-btrfs \
btrfs-progs block-mount cryptsetup kmod-crypto-xts smcroute \
avahi-daemon smartmontools intel-microcode \
samba4-server luci-app-samba4 shadow-useradd"
[kconfigs]="${default_kconfigs[*]} \
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_PROGS_ZSTD=y \
CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=32"
)
declare -Ag totolink=(
[device]="totolink_x5000r"
[target]="ramips/mt7621"
[filesystem]="squashfs"
[packages]="${default_ap[*]}"
)
declare -Ag archer=(
[device]="tplink_archer-c7-v2"
[target]="ath79/generic"
[filesystem]="squashfs"
[packages]="${default_ap[*]} \
-ath10k-firmware-qca988x-ct ath10k-firmware-qca988x-ct-full-htt"
)
declare -Ag linksys=(
[device]="linksys_ea8300"
[target]="ipq40xx/generic"
[filesystem]="squashfs"
[packages]="${default_ap[*]}"
)
declare -Ag r2s=(
[device]="friendlyarm_nanopi-r2s"
[target]="rockchip/armv8"
[filesystem]="ext4"
[packages]="${default_router[*]} \
kmod-usb-net-rtl8152 \
luci-app-upnp luci-app-pbr -dnsmasq dnsmasq-full smcroute"
)
declare -Ag r2s_tr=(
[device]="friendlyarm_nanopi-r2s"
[target]="rockchip/armv8"
[filesystem]="ext4"
[packages]="${default_router[*]} \
kmod-usb-net-rtl8152 \
luci-app-upnp luci-app-pbr -dnsmasq dnsmasq-full \
travelmate"
)