From add82930428d717e34ce965b9a3fc8304d9afde0 Mon Sep 17 00:00:00 2001 From: Zhe Yuan Date: Fri, 3 Apr 2026 23:37:37 -0400 Subject: [PATCH] add config for 25.12.2, fix add packages script Signed-off-by: Zhe Yuan --- add-openwrt-packages.sh | 25 ++++++++++++++----- .../apply-dahdi-patches.sh | 0 .../packages_cudy_tr3000_v1_25.12.2.txt | 3 +++ .../packages_linksys_mx8500_25.12.2.txt | 3 +++ 4 files changed, 25 insertions(+), 6 deletions(-) rename apply-dahdi-patches.sh => config_24.10.4/apply-dahdi-patches.sh (100%) create mode 100644 config_25.12.2/packages_cudy_tr3000_v1_25.12.2.txt create mode 100644 config_25.12.2/packages_linksys_mx8500_25.12.2.txt diff --git a/add-openwrt-packages.sh b/add-openwrt-packages.sh index 4a45865..8e59167 100755 --- a/add-openwrt-packages.sh +++ b/add-openwrt-packages.sh @@ -48,16 +48,21 @@ if [ ! -f "$PACKAGE_INDEX" ] && [ ! -f "$PACKAGE_INFO" ]; then make defconfig >/dev/null fi -is_already_enabled() { +is_already_builtin() { local pkg="$1" awk -v package_y="CONFIG_PACKAGE_${pkg}=y" \ - -v package_m="CONFIG_PACKAGE_${pkg}=m" \ -v default_y="CONFIG_DEFAULT_${pkg}=y" \ - '$0 == package_y || $0 == package_m || $0 == default_y { found=1; exit } + '$0 == package_y || $0 == default_y { found=1; exit } END { exit !found }' .config } +is_module() { + local pkg="$1" + + grep -qx "CONFIG_PACKAGE_${pkg}=m" .config +} + package_exists() { local pkg="$1" @@ -85,9 +90,17 @@ MISSING=() for pkg in $PACKAGES; do CONFIG_NAME="CONFIG_PACKAGE_${pkg}" - # Skip if already enabled - if is_already_enabled "$pkg"; then - echo "✅ Already enabled: $pkg" + # Skip if already built-in + if is_already_builtin "$pkg"; then + echo "✅ Already built-in: $pkg" + continue + fi + + # Upgrade module to built-in + if is_module "$pkg"; then + sed -i "s/^CONFIG_PACKAGE_${pkg}=m$/CONFIG_PACKAGE_${pkg}=y/" .config + ADDED+=("$pkg") + echo "⬆️ Module → built-in: $pkg" continue fi diff --git a/apply-dahdi-patches.sh b/config_24.10.4/apply-dahdi-patches.sh similarity index 100% rename from apply-dahdi-patches.sh rename to config_24.10.4/apply-dahdi-patches.sh diff --git a/config_25.12.2/packages_cudy_tr3000_v1_25.12.2.txt b/config_25.12.2/packages_cudy_tr3000_v1_25.12.2.txt new file mode 100644 index 0000000..66e5b53 --- /dev/null +++ b/config_25.12.2/packages_cudy_tr3000_v1_25.12.2.txt @@ -0,0 +1,3 @@ +apk-mbedtls base-files ca-bundle dnsmasq dropbear firewall4 fitblk fstools kmod-crypto-hw-safexcel kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c odhcpd-ipv6only ppp ppp-mod-pppoe procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd wpad kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware luci luci-app-attendedsysupgrade +curl yq unzip ip-full kmod-inet-diag kmod-nft-socket kmod-nft-tproxy kmod-tun luci-app-upnp luci-app-ttyd luci-app-filemanager luci-app-wol luci-app-mwan3 iptables-nft ip6tables-nft tailscale zerotier adguardhome +easytier luci-app-netspeedtest luci-app-easytier \ No newline at end of file diff --git a/config_25.12.2/packages_linksys_mx8500_25.12.2.txt b/config_25.12.2/packages_linksys_mx8500_25.12.2.txt new file mode 100644 index 0000000..8518ef2 --- /dev/null +++ b/config_25.12.2/packages_linksys_mx8500_25.12.2.txt @@ -0,0 +1,3 @@ +apk-mbedtls ath11k-firmware-ipq8074 base-files ca-bundle dnsmasq dropbear e2fsprogs firewall4 fstools kmod-ath11k-ahb kmod-fs-ext4 kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload kmod-phy-aquantia kmod-qca-nss-dp kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-usb3 libc libgcc libustream-mbedtls logd losetup mtd netifd nftables odhcp6c odhcpd-ipv6only ppp ppp-mod-pppoe procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls kmod-leds-pca963x ipq-wifi-linksys_mx8500 kmod-ath11k-pci ath11k-firmware-qcn9074 kmod-hci-uart luci luci-app-attendedsysupgrade +curl yq unzip ip-full kmod-mtd-rw kmod-inet-diag kmod-nft-socket kmod-nft-tproxy kmod-tun luci-app-upnp luci-app-ttyd luci-app-filemanager luci-app-wol luci-app-mwan3 iptables-nft ip6tables-nft luci-app-openvpn luci-proto-wireguard luci-app-cloudflared qrencode tailscale zerotier adguardhome +easytier luci-app-netspeedtest luci-app-easytier \ No newline at end of file