#!/bin/bash
# 此脚本在Imagebuilder 根目录运行
source custom-packages.sh
echo "第三方软件包: $CUSTOM_PACKAGES"
LOGFILE="/tmp/uci-defaults-log.txt"
echo "Starting 99-custom.sh at $(date)" >> $LOGFILE
echo "Include Docker: $INCLUDE_DOCKER"

if [ -z "$CUSTOM_PACKAGES" ]; then
  echo "⚪️ 未选择 任何第三方软件包"
else
  # ============= 同步第三方插件库==============
  # 同步第三方软件仓库run/ipk
  echo "🔄 正在同步第三方软件仓库 Cloning run file repo..."
  git clone --depth=1 https://github.com/wukongdaily/store.git /tmp/store-run-repo

  # 拷贝 run/arm64 下所有 run 文件和ipk文件 到 extra-packages 目录
  mkdir -p extra-packages
  cp -r /tmp/store-run-repo/run/arm64/* extra-packages/

  echo "✅ Run files copied to extra-packages:"
  ls -lh extra-packages/*.run
  # 解压并拷贝ipk到packages目录
  sh prepare-packages.sh
  echo "打印imagebuilder/packages目录结构"
  ls -lah packages/ |grep partexp
fi

# 输出调试信息
echo "$(date '+%Y-%m-%d %H:%M:%S') - 开始构建固件..."

# ============= iStoreOS 24.10 官方集成插件===================
# ============= 若启用 则打开注释 ============================

# 定义初始化变量
PACKAGES=""

# iStoreOS官方集成列表，若启用则打开注释
#PACKAGES="$PACKAGES adb"                          # Android调试桥，用于与Android设备通信调试（未启用）
#PACKAGES="$PACKAGES adb-enablemodem"              # 启用ADB调制解调器模式的工具（未启用）
#PACKAGES="$PACKAGES appfilter"                    # 应用过滤工具（未启用）
PACKAGES="$PACKAGES attr"                         # 文件属性管理工具
PACKAGES="$PACKAGES avahi-dbus-daemon"            # Avahi服务的D-Bus守护进程，支持零配置网络
PACKAGES="$PACKAGES avahi-utils"                  # Avahi零配置网络工具集
PACKAGES="$PACKAGES badblocks"                    # 磁盘坏块检测工具
PACKAGES="$PACKAGES base-files"                   # 系统基础文件集合
PACKAGES="$PACKAGES bash"                         # Bourne Again Shell，命令行解释器
PACKAGES="$PACKAGES blkid"                        # 块设备识别工具，获取设备信息
PACKAGES="$PACKAGES block-mount"                  # 块设备挂载管理工具
PACKAGES="$PACKAGES bnx2x-firmware"               # BNX2X系列网卡固件
PACKAGES="$PACKAGES btrfs-progs"                  # Btrfs文件系统管理工具
PACKAGES="$PACKAGES busybox"                      # 集成多种基础命令的精简工具集
PACKAGES="$PACKAGES bzip2"                        # bzip2压缩/解压缩工具
PACKAGES="$PACKAGES ca-bundle"                    # CA证书集合，用于SSL/TLS验证
PACKAGES="$PACKAGES ca-certificates"              # 证书颁发机构证书集合
PACKAGES="$PACKAGES cgi-io"                       # CGI接口输入输出工具
PACKAGES="$PACKAGES chat"                         # 与串行设备交互的工具，常用于PPP拨号
PACKAGES="$PACKAGES cifsmount"                    # CIFS文件系统挂载工具，用于挂载Windows共享
#PACKAGES="$PACKAGES comgt"                        # 移动宽带调制解调器控制工具
#PACKAGES="$PACKAGES comgt-directip"               # comgt扩展，支持Direct IP协议
#PACKAGES="$PACKAGES comgt-ncm"                    # comgt扩展，支持NCM协议调制解调器
PACKAGES="$PACKAGES containerd"                   # 容器运行时核心组件
PACKAGES="$PACKAGES coreutils"                    # GNU核心工具集
PACKAGES="$PACKAGES coreutils-stat"               # coreutils中的文件状态查看工具
PACKAGES="$PACKAGES coreutils-stty"               # coreutils中的终端设置工具
PACKAGES="$PACKAGES curl"                         # 网络数据传输工具，支持多种协议
PACKAGES="$PACKAGES davfs2"                       # WebDAV文件系统客户端
PACKAGES="$PACKAGES dbus"                         # D-Bus消息总线系统
#PACKAGES="$PACKAGES ddns-scripts"                 # DDNS动态域名解析脚本（未启用）
#PACKAGES="$PACKAGES ddns-scripts-cloudflare"      # Cloudflare的DDNS脚本（未启用）
#PACKAGES="$PACKAGES ddns-scripts-dnspod"          # DNSPod的DDNS脚本（未启用）
#PACKAGES="$PACKAGES ddns-scripts-services"        # 多种服务的DDNS脚本（未启用）
#PACKAGES="$PACKAGES ddns-scripts_aliyun"          # 阿里云的DDNS脚本（未启用）
#PACKAGES="$PACKAGES ddnsto"                       # DDNSTO内网穿透工具（未启用）
PACKAGES="$PACKAGES dkml"                         # DKMS内核模块管理工具
PACKAGES="$PACKAGES -dnsmasq"                     # 移除轻量DNS服务器dnsmasq
PACKAGES="$PACKAGES dnsmasq-full"                 # 全功能DNS服务器和DHCP服务器
if [ "$INCLUDE_DOCKER" = "yes" ]; then
    PACKAGES="$PACKAGES docker"                       # Docker容器引擎
    PACKAGES="$PACKAGES docker-compose"               # Docker容器编排工具
    PACKAGES="$PACKAGES dockerd"                      # Docker守护进程
fi
PACKAGES="$PACKAGES dropbear"                     # 轻量级SSH服务器
PACKAGES="$PACKAGES ds-lite"
PACKAGES="$PACKAGES e100-firmware"                # Intel E100系列网卡固件
PACKAGES="$PACKAGES e2fsprogs"                    # Ext系列文件系统工具
PACKAGES="$PACKAGES edgeport-firmware"            # Edgeport串口设备固件
PACKAGES="$PACKAGES etherwake"                    # 网络唤醒工具
PACKAGES="$PACKAGES ethtool"                      # 以太网接口配置工具
PACKAGES="$PACKAGES external-protocol"            # 外部协议支持工具
PACKAGES="$PACKAGES fdisk"                        # 磁盘分区工具
PACKAGES="$PACKAGES firewall4"                    # 第四代防火墙管理工具
PACKAGES="$PACKAGES fstools"                      # 文件系统工具集
PACKAGES="$PACKAGES fwtool"                       # 固件操作工具
PACKAGES="$PACKAGES getrandom"                    # 随机数生成工具
PACKAGES="$PACKAGES glib2"                        # GLib2库，提供基础编程功能
PACKAGES="$PACKAGES gre"                          # GRE隧道协议支持
PACKAGES="$PACKAGES grub2-efi-arm"                # ARM架构的GRUB2 EFI引导程序
#PACKAGES="$PACKAGES hd-idle"                      # 硬盘自动休眠工具（未启用）
PACKAGES="$PACKAGES hostapd-common"               # hostapd公共组件，用于无线接入点
PACKAGES="$PACKAGES hostapd-openssl"              # 基于OpenSSL的无线接入点管理工具
PACKAGES="$PACKAGES htop"                         # 交互式系统监控工具
PACKAGES="$PACKAGES ip-full"                      # 全功能IP配置工具
PACKAGES="$PACKAGES ip6tables-nft"                # IPv6的nftables防火墙工具
PACKAGES="$PACKAGES iperf3"                       # 网络带宽测试工具
PACKAGES="$PACKAGES ipip"
PACKAGES="$PACKAGES ipset"                        # IP集合管理工具，用于防火墙规则
PACKAGES="$PACKAGES iptables-mod-conntrack-extra"
PACKAGES="$PACKAGES iptables-mod-extra"           # iptables额外模块
PACKAGES="$PACKAGES iptables-nft"                 # 基于nftables的iptables工具
PACKAGES="$PACKAGES istoreos-files"               # iStoreOS系统文件
PACKAGES="$PACKAGES iw"                           # 无线网卡配置工具
PACKAGES="$PACKAGES iwinfo"                       # 无线信息工具，获取无线设备状态
PACKAGES="$PACKAGES jansson4"                     # Jansson JSON库
PACKAGES="$PACKAGES jshn"                         # JSON解析工具
PACKAGES="$PACKAGES jsonfilter"                   # JSON过滤工具
PACKAGES="$PACKAGES kernel"                       # 系统内核
PACKAGES="$PACKAGES kmod-3c59x"                   # 3Com 59x系列网卡驱动模块
PACKAGES="$PACKAGES kmod-8139cp"                  # Realtek 8139CP网卡驱动模块
PACKAGES="$PACKAGES kmod-8139too"                 # Realtek 8139系列网卡驱动模块
PACKAGES="$PACKAGES kmod-9pnet"                   # 9P网络协议驱动模块
PACKAGES="$PACKAGES kmod-9pvirtio"                # VirtIO上的9P协议驱动模块
PACKAGES="$PACKAGES kmod-acpi-mdio"               # ACPI MDIO总线驱动模块
PACKAGES="$PACKAGES kmod-alx"                     # Atheros ALX网卡驱动模块
PACKAGES="$PACKAGES kmod-amazon-ena"              # Amazon ENA网卡驱动模块
PACKAGES="$PACKAGES kmod-aoe"                     # ATA over Ethernet驱动模块
PACKAGES="$PACKAGES kmod-asn1-decoder"            # ASN.1解码器内核模块
PACKAGES="$PACKAGES kmod-asn1-encoder"            # ASN.1编码器内核模块
PACKAGES="$PACKAGES kmod-ata-ahci"                # AHCI SATA控制器驱动模块
PACKAGES="$PACKAGES kmod-ata-artop"               # ARTOP ATA控制器驱动模块
PACKAGES="$PACKAGES kmod-ata-core"                # ATA核心驱动模块
PACKAGES="$PACKAGES kmod-ata-dwc"                 # DesignWare ATA控制器驱动模块
PACKAGES="$PACKAGES kmod-ata-nvidia-sata"         # NVIDIA SATA控制器驱动模块
PACKAGES="$PACKAGES kmod-ata-piix"                # Intel PIIX ATA控制器驱动模块
PACKAGES="$PACKAGES kmod-ata-sil"                 # Silicon Image ATA控制器驱动模块
PACKAGES="$PACKAGES kmod-ata-sil24"               # Silicon Image 24xx ATA控制器驱动模块
PACKAGES="$PACKAGES kmod-ath"                     # Atheros无线核心驱动模块
PACKAGES="$PACKAGES kmod-ath10k"                  # Atheros ath10k无线网卡驱动模块
#PACKAGES="$PACKAGES kmod-ath11k"                  # Atheros ath11k无线网卡驱动模块
PACKAGES="$PACKAGES kmod-ath11k-pci"              # PCI接口的ath11k驱动模块
#PACKAGES="$PACKAGES kmod-ath12k"                  # Atheros ath12k无线网卡驱动模块
PACKAGES="$PACKAGES kmod-atl1"                    # Atheros L1网卡驱动模块
PACKAGES="$PACKAGES kmod-atl1c"                   # Atheros L1C网卡驱动模块
PACKAGES="$PACKAGES kmod-atl1e"                   # Atheros L1E网卡驱动模块
PACKAGES="$PACKAGES kmod-atl2"                    # Atheros L2网卡驱动模块
PACKAGES="$PACKAGES kmod-atlantic"                # Aquantia Atlantic网卡驱动模块
PACKAGES="$PACKAGES kmod-atm"                     # ATM网络驱动模块
PACKAGES="$PACKAGES kmod-b44"                     # Broadcom B44网卡驱动模块
PACKAGES="$PACKAGES kmod-bcmgenet"                # Broadcom GENET网卡驱动模块
PACKAGES="$PACKAGES kmod-be2net"                  # Broadcom be2net网卡驱动模块
PACKAGES="$PACKAGES kmod-block2mtd"               # 块设备转MTD设备驱动模块
PACKAGES="$PACKAGES kmod-bnx2x"                   # Broadcom BNX2X网卡驱动模块
PACKAGES="$PACKAGES kmod-bonding"                 # 网卡绑定驱动模块
PACKAGES="$PACKAGES kmod-br-netfilter"            # 网桥网络过滤驱动模块
PACKAGES="$PACKAGES kmod-cdrom"                   # CD-ROM设备驱动模块
PACKAGES="$PACKAGES kmod-cfg80211"                # 802.11配置接口驱动模块
PACKAGES="$PACKAGES kmod-chaoskey"                # ChaosKey随机数生成器驱动模块
PACKAGES="$PACKAGES kmod-crypto-acompress"        # 加密压缩算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-aead"             # 认证加密算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-arc4"             # ARC4加密算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-authenc"          # 认证加密组合算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-blake2b"          # BLAKE2b哈希算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-cbc"              # CBC加密模式驱动模块
PACKAGES="$PACKAGES kmod-crypto-ccm"              # CCM加密模式驱动模块
PACKAGES="$PACKAGES kmod-crypto-cmac"             # CMAC消息认证码驱动模块
PACKAGES="$PACKAGES kmod-crypto-crc32"            # CRC32校验算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-crc32c"           # CRC32C校验算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-ctr"              # CTR加密模式驱动模块
PACKAGES="$PACKAGES kmod-crypto-cts"              # CTS加密模式驱动模块
PACKAGES="$PACKAGES kmod-crypto-deflate"          # Deflate压缩算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-des"              # DES加密算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-ecb"              # ECB加密模式驱动模块
PACKAGES="$PACKAGES kmod-crypto-echainiv"         # 加密链IV生成器驱动模块
PACKAGES="$PACKAGES kmod-crypto-fcrypt"           # FCrypt加密算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-gcm"              # GCM加密模式驱动模块
PACKAGES="$PACKAGES kmod-crypto-geniv"            # 通用IV生成器驱动模块
PACKAGES="$PACKAGES kmod-crypto-gf128"            # GF(2^128)运算驱动模块
PACKAGES="$PACKAGES kmod-crypto-ghash"            # GHASH消息认证码驱动模块
PACKAGES="$PACKAGES kmod-crypto-hash"             # 哈希算法核心驱动模块
PACKAGES="$PACKAGES kmod-crypto-hmac"             # HMAC消息认证码驱动模块
PACKAGES="$PACKAGES kmod-crypto-kpp"              # 密钥封装机制驱动模块
PACKAGES="$PACKAGES kmod-crypto-lib-chacha20"     # ChaCha20加密库驱动模块
PACKAGES="$PACKAGES kmod-crypto-lib-chacha20poly1305" # ChaCha20-Poly1305组合算法库驱动模块
PACKAGES="$PACKAGES kmod-crypto-lib-curve25519"   # Curve25519椭圆曲线算法库驱动模块
PACKAGES="$PACKAGES kmod-crypto-lib-poly1305"     # Poly1305消息认证码库驱动模块
PACKAGES="$PACKAGES kmod-crypto-manager"          # 加密管理器驱动模块
PACKAGES="$PACKAGES kmod-crypto-md5"              # MD5哈希算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-michael-mic"      # Michael MIC算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-null"             # 空加密算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-pcbc"             # PCBC加密模式驱动模块
PACKAGES="$PACKAGES kmod-crypto-rng"              # 随机数生成器驱动模块
PACKAGES="$PACKAGES kmod-crypto-seqiv"            # 序列IV生成器驱动模块
PACKAGES="$PACKAGES kmod-crypto-sha1"             # SHA1哈希算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-sha256"           # SHA256哈希算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-sha3"             # SHA3哈希算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-sha512"           # SHA512哈希算法驱动模块
PACKAGES="$PACKAGES kmod-crypto-user"             # 用户空间加密接口驱动模块
PACKAGES="$PACKAGES kmod-crypto-xxhash"           # XXHash哈希算法驱动模块
PACKAGES="$PACKAGES kmod-dax"                     # 直接访问内存驱动模块
PACKAGES="$PACKAGES kmod-dm"                      # 设备映射器驱动模块
PACKAGES="$PACKAGES kmod-dm-raid"                 # 设备映射器RAID驱动模块
PACKAGES="$PACKAGES kmod-dm9000"                  # DM9000以太网控制器驱动模块
PACKAGES="$PACKAGES kmod-dma-buf"                 # DMA缓冲区共享驱动模块
PACKAGES="$PACKAGES kmod-dnsresolver"             # DNS解析器驱动模块
PACKAGES="$PACKAGES kmod-dummy"                   # 虚拟网络接口驱动模块
PACKAGES="$PACKAGES kmod-dwmac-imx"               # i.MX系列DWMAC以太网驱动模块
PACKAGES="$PACKAGES kmod-dwmac-rockchip"          # Rockchip系列DWMAC以太网驱动模块
PACKAGES="$PACKAGES kmod-dwmac-sun8i"             # Allwinner Sun8i系列DWMAC以太网驱动模块
PACKAGES="$PACKAGES kmod-e100"                    # Intel E100网卡驱动模块
PACKAGES="$PACKAGES kmod-e1000"                   # Intel E1000网卡驱动模块
PACKAGES="$PACKAGES kmod-e1000e"                  # Intel E1000E网卡驱动模块
PACKAGES="$PACKAGES kmod-et131x"                  # Agere ET131x网卡驱动模块
PACKAGES="$PACKAGES kmod-ethoc"                   # OpenCores以太网控制器驱动模块
PACKAGES="$PACKAGES kmod-fixed-phy"               # 固定PHY驱动模块
PACKAGES="$PACKAGES kmod-fs-9p"                   # 9P文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-autofs4"              # autofs4自动挂载文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-binfmt-misc"          # 二进制格式misc驱动模块
PACKAGES="$PACKAGES kmod-fs-btrfs"                # Btrfs文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-cifs"                 # CIFS文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-cramfs"               # Cramfs压缩文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-exfat"                # exFAT文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-exportfs"             # 导出文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-ext4"                 # Ext4文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-f2fs"                 # F2FS文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-fscache"              # 文件系统缓存驱动模块
#PACKAGES="$PACKAGES kmod-fs-hfs"                  # HFS文件系统驱动模块
#PACKAGES="$PACKAGES kmod-fs-hfsplus"              # HFS+文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-isofs"                # ISO9660文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-jfs"                  # JFS文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-ksmbd"                # KSMBD CIFS/SMB服务器驱动模块
PACKAGES="$PACKAGES kmod-fs-minix"                # Minix文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-msdos"                # MS-DOS文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-netfs"                # 网络文件系统核心驱动模块
PACKAGES="$PACKAGES kmod-fs-nfs"                  # NFS文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-nfs-common"           # NFS公共组件驱动模块
PACKAGES="$PACKAGES kmod-fs-nfs-common-rpcsec"    # NFS RPC安全驱动模块
PACKAGES="$PACKAGES kmod-fs-nfs-v3"               # NFSv3文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-nfs-v4"               # NFSv4文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-nfsd"                 # NFS服务器驱动模块
PACKAGES="$PACKAGES kmod-fs-ntfs3"                # NTFS3文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-reiserfs"             # ReiserFS文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-smbfs-common"         # SMB文件系统公共组件驱动模块
PACKAGES="$PACKAGES kmod-fs-squashfs"             # Squashfs压缩文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-udf"                  # UDF文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-vfat"                 # VFAT文件系统驱动模块
PACKAGES="$PACKAGES kmod-fs-xfs"                  # XFS文件系统驱动模块
PACKAGES="$PACKAGES kmod-fsl-dpaa1-net"           # Freescale DPAA1网络驱动模块
PACKAGES="$PACKAGES kmod-fsl-dpaa2-net"           # Freescale DPAA2网络驱动模块
PACKAGES="$PACKAGES kmod-fsl-enetc-net"           # Freescale ENETC网络驱动模块
PACKAGES="$PACKAGES kmod-fsl-fec"                 # Freescale FEC以太网驱动模块
PACKAGES="$PACKAGES kmod-fsl-mc-dpio"             # Freescale MC DPAA I/O驱动模块
PACKAGES="$PACKAGES kmod-fsl-pcs-lynx"            # Freescale Lynx PCS驱动模块
PACKAGES="$PACKAGES kmod-fsl-xgmac-mdio"          # Freescale XGMAC MDIO驱动模块
PACKAGES="$PACKAGES kmod-fuse"                    # FUSE用户空间文件系统驱动模块
PACKAGES="$PACKAGES kmod-gpio-pca953x"            # PCA953x GPIO扩展芯片驱动模块
PACKAGES="$PACKAGES kmod-gre"                     # GRE隧道协议驱动模块
PACKAGES="$PACKAGES kmod-gre6"                    # GREv6隧道协议驱动模块
PACKAGES="$PACKAGES kmod-hfcmulti"                # HFC Multi调制解调器驱动模块
PACKAGES="$PACKAGES kmod-hfcpci"                  # HFC PCI调制解调器驱动模块
PACKAGES="$PACKAGES kmod-hid"                     # HID设备核心驱动模块
PACKAGES="$PACKAGES kmod-hid-generic"             # 通用HID设备驱动模块
PACKAGES="$PACKAGES kmod-hwmon-core"              # 硬件监控核心驱动模块
PACKAGES="$PACKAGES kmod-hwmon-drivetemp"         # 硬盘温度监控驱动模块
PACKAGES="$PACKAGES kmod-hwmon-pwmfan"            # PWM风扇监控驱动模块
PACKAGES="$PACKAGES kmod-i2c-algo-bit"            # I2C位算法驱动模块
PACKAGES="$PACKAGES kmod-i2c-core"                # I2C核心驱动模块
PACKAGES="$PACKAGES kmod-i2c-mux"                 # I2C多路复用器驱动模块
PACKAGES="$PACKAGES kmod-i2c-mux-pca954x"         # PCA954x I2C多路复用器驱动模块
PACKAGES="$PACKAGES kmod-iavf"                    # Intel AVF网卡驱动模块
PACKAGES="$PACKAGES kmod-ifb"                     # 中间功能块网络设备驱动模块
PACKAGES="$PACKAGES kmod-igb"                     # Intel IGB网卡驱动模块
PACKAGES="$PACKAGES kmod-igc"                     # Intel IGC网卡驱动模块
PACKAGES="$PACKAGES kmod-inet-diag"               # 互联网诊断驱动模块
PACKAGES="$PACKAGES kmod-input-core"              # 输入设备核心驱动模块
PACKAGES="$PACKAGES kmod-input-evdev"             # EVDEV输入设备驱动模块
PACKAGES="$PACKAGES kmod-ip6-tunnel"              # IPv6隧道驱动模块
PACKAGES="$PACKAGES kmod-ip6tables"               # IPv6表驱动模块
PACKAGES="$PACKAGES kmod-ipip"                    # IPIP隧道驱动模块
PACKAGES="$PACKAGES kmod-ipsec"                   # IPsec核心驱动模块
PACKAGES="$PACKAGES kmod-ipsec4"                  # IPv4 IPsec驱动模块
PACKAGES="$PACKAGES kmod-ipsec6"                  # IPv6 IPsec驱动模块
PACKAGES="$PACKAGES kmod-ipvlan"
PACKAGES="$PACKAGES kmod-ipt-conntrack"           # iptables连接跟踪驱动模块
PACKAGES="$PACKAGES kmod-ipt-conntrack-extra"     # iptables额外连接跟踪驱动模块
PACKAGES="$PACKAGES kmod-ipt-core"                # iptables核心驱动模块
PACKAGES="$PACKAGES kmod-ipt-extra"               # iptables额外模块驱动模块
PACKAGES="$PACKAGES kmod-ipt-ipset"               # iptables ipset支持驱动模块
PACKAGES="$PACKAGES kmod-ipt-nat"                 # iptables NAT驱动模块
PACKAGES="$PACKAGES kmod-ipt-nat6"                # iptables IPv6 NAT驱动模块
PACKAGES="$PACKAGES kmod-ipt-physdev"             # iptables物理设备匹配驱动模块
PACKAGES="$PACKAGES kmod-iptunnel"                # IP隧道核心驱动模块
PACKAGES="$PACKAGES kmod-iptunnel4"               # IPv4隧道驱动模块
PACKAGES="$PACKAGES kmod-iptunnel6"               # IPv6隧道驱动模块
PACKAGES="$PACKAGES kmod-irqbypass"               # IRQ旁路驱动模块
PACKAGES="$PACKAGES kmod-iscsi-initiator"         # iSCSI发起器驱动模块
PACKAGES="$PACKAGES kmod-ixgbe"                   # Intel IXGBE网卡驱动模块
PACKAGES="$PACKAGES kmod-ixgbevf"                 # Intel IXGBEVF虚拟网卡驱动模块
PACKAGES="$PACKAGES kmod-keys-encrypted"          # 加密密钥驱动模块
PACKAGES="$PACKAGES kmod-keys-trusted"            # 可信密钥驱动模块
PACKAGES="$PACKAGES kmod-l2tp"                    # L2TP核心驱动模块
PACKAGES="$PACKAGES kmod-l2tp-eth"                # L2TP以太网驱动模块
PACKAGES="$PACKAGES kmod-l2tp-ip"                 # L2TP IP驱动模块
PACKAGES="$PACKAGES kmod-ledtrig-activity"        # 活动状态LED触发器驱动模块
PACKAGES="$PACKAGES kmod-lib-crc-ccitt"           # CRC-CCITT校验库驱动模块
PACKAGES="$PACKAGES kmod-lib-crc-itu-t"           # CRC-ITU-T校验库驱动模块
PACKAGES="$PACKAGES kmod-lib-crc16"               # CRC16校验库驱动模块
PACKAGES="$PACKAGES kmod-lib-crc32c"              # CRC32C校验库驱动模块
PACKAGES="$PACKAGES kmod-lib-crc7"                # CRC7校验库驱动模块
PACKAGES="$PACKAGES kmod-lib-crc8"                # CRC8校验库驱动模块
PACKAGES="$PACKAGES kmod-lib-lzo"                 # LZO压缩库驱动模块
PACKAGES="$PACKAGES kmod-lib-raid6"               # RAID6算法库驱动模块
PACKAGES="$PACKAGES kmod-lib-textsearch"          # 文本搜索库驱动模块
PACKAGES="$PACKAGES kmod-lib-xor"                 # XOR算法库驱动模块
PACKAGES="$PACKAGES kmod-lib-xxhash"              # XXHash算法库驱动模块
PACKAGES="$PACKAGES kmod-lib-zlib-deflate"        # zlib压缩库驱动模块
PACKAGES="$PACKAGES kmod-lib-zlib-inflate"        # zlib解压缩库驱动模块
PACKAGES="$PACKAGES kmod-lib-zstd"                # Zstd压缩库驱动模块
PACKAGES="$PACKAGES kmod-libfc"                   # Fibre Channel库驱动模块
PACKAGES="$PACKAGES kmod-libfcoe"                 # FCoE库驱动模块
PACKAGES="$PACKAGES kmod-libphy"                  # PHY库驱动模块
PACKAGES="$PACKAGES kmod-loop"                    # 循环设备驱动模块
PACKAGES="$PACKAGES kmod-mac80211"                # 802.11 MAC层驱动模块
PACKAGES="$PACKAGES kmod-macsec"                  # MACsec加密驱动模块
PACKAGES="$PACKAGES kmod-macvlan"                 # MACVLAN虚拟网卡驱动模块
PACKAGES="$PACKAGES kmod-marvell-mdio"            # Marvell MDIO驱动模块
PACKAGES="$PACKAGES kmod-md-linear"               # 线性MD RAID驱动模块
PACKAGES="$PACKAGES kmod-md-mod"                  # MD RAID核心驱动模块
PACKAGES="$PACKAGES kmod-md-multipath"            # 多路径MD RAID驱动模块
PACKAGES="$PACKAGES kmod-md-raid0"                # RAID0驱动模块
PACKAGES="$PACKAGES kmod-md-raid1"                # RAID1驱动模块
PACKAGES="$PACKAGES kmod-md-raid10"               # RAID10驱动模块
PACKAGES="$PACKAGES kmod-md-raid456"              # RAID4/5/6驱动模块
PACKAGES="$PACKAGES kmod-mdio"                    # MDIO总线驱动模块
PACKAGES="$PACKAGES kmod-mdio-bcm-unimac"         # Broadcom UniMAC MDIO驱动模块
PACKAGES="$PACKAGES kmod-mdio-bus-mux"            # MDIO总线多路复用器驱动模块
PACKAGES="$PACKAGES kmod-mdio-devres"             # MDIO设备资源驱动模块
PACKAGES="$PACKAGES kmod-mdio-gpio"               # GPIO MDIO驱动模块
PACKAGES="$PACKAGES kmod-media-controller"        # 媒体控制器驱动模块
#PACKAGES="$PACKAGES kmod-mhi-bus"                 # MHI总线驱动模块
#PACKAGES="$PACKAGES kmod-mhi-net"                 # MHI网络驱动模块
PACKAGES="$PACKAGES kmod-mhi-pci-generic"         # 通用PCI MHI驱动模块
#PACKAGES="$PACKAGES kmod-mhi-wwan-ctrl"           # MHI WWAN控制驱动模块
#PACKAGES="$PACKAGES kmod-mhi-wwan-mbim"           # MHI WWAN MBIM驱动模块
PACKAGES="$PACKAGES kmod-mii"                     # MII总线驱动模块
PACKAGES="$PACKAGES kmod-misdn"                   # mISDN驱动模块
PACKAGES="$PACKAGES kmod-mlx4-core"               # Mellanox MLX4核心驱动模块
PACKAGES="$PACKAGES kmod-mlx5-core"               # Mellanox MLX5核心驱动模块
PACKAGES="$PACKAGES kmod-mlxfw"                   # Mellanox固件驱动模块
PACKAGES="$PACKAGES kmod-mmc"                     # MMC/SD卡核心驱动模块
PACKAGES="$PACKAGES kmod-mmc-spi"                 # SPI接口MMC/SD卡驱动模块
PACKAGES="$PACKAGES kmod-mppe"                    # MPPE加密驱动模块
PACKAGES="$PACKAGES kmod-mt76-connac"             # MediaTek MT76 CONNAC驱动模块
PACKAGES="$PACKAGES kmod-mt76-core"               # MediaTek MT76核心驱动模块
PACKAGES="$PACKAGES kmod-mt76-usb"                # USB接口MT76驱动模块
PACKAGES="$PACKAGES kmod-mt7615-common"           # MT7615系列公共驱动模块
PACKAGES="$PACKAGES kmod-mt7615-firmware"         # MT7615固件驱动模块
#PACKAGES="$PACKAGES kmod-mt7615e"                 # MT7615E无线网卡驱动模块
PACKAGES="$PACKAGES kmod-mt7622-firmware"         # MT7622固件驱动模块
PACKAGES="$PACKAGES kmod-mt7663-firmware-ap"      # MT7663 AP固件驱动模块
PACKAGES="$PACKAGES kmod-mt7663-usb-sdio"         # USB/SDIO接口MT7663驱动模块
#PACKAGES="$PACKAGES kmod-mt7663u"                 # USB接口MT7663U驱动模块
PACKAGES="$PACKAGES kmod-mt76x0-common"           # MT76x0系列公共驱动模块
PACKAGES="$PACKAGES kmod-mt76x02-common"          # MT76x02系列公共驱动模块
PACKAGES="$PACKAGES kmod-mt76x02-usb"             # USB接口MT76x02驱动模块
PACKAGES="$PACKAGES kmod-mt76x0u"                 # USB接口MT76x0U驱动模块
PACKAGES="$PACKAGES kmod-mt76x2-common"           # MT76x2系列公共驱动模块
PACKAGES="$PACKAGES kmod-mt76x2u"                 # USB接口MT76x2U驱动模块
PACKAGES="$PACKAGES kmod-mt7915-firmware"         # MT7915固件驱动模块
#PACKAGES="$PACKAGES kmod-mt7915e"                 # MT7915E无线网卡驱动模块
PACKAGES="$PACKAGES kmod-mt7916-firmware"         # MT7916固件驱动模块
PACKAGES="$PACKAGES kmod-mt7921-common"           # MT7921系列公共驱动模块
PACKAGES="$PACKAGES kmod-mt7921-firmware"         # MT7921固件驱动模块
#PACKAGES="$PACKAGES kmod-mt7921e"                 # MT7921E无线网卡驱动模块
PACKAGES="$PACKAGES kmod-mt7921u"                 # USB接口MT7921U驱动模块
PACKAGES="$PACKAGES kmod-mt7922-firmware"         # MT7922固件驱动模块
PACKAGES="$PACKAGES kmod-mt7925-common"           # MT7925系列公共驱动模块
PACKAGES="$PACKAGES kmod-mt7925-firmware"         # MT7925固件驱动模块
PACKAGES="$PACKAGES kmod-mt7925e"                 # MT7925E无线网卡驱动模块
PACKAGES="$PACKAGES kmod-mt7925u"                 # USB接口MT7925U驱动模块
PACKAGES="$PACKAGES kmod-mt792x-common"           # MT792x系列公共驱动模块
PACKAGES="$PACKAGES kmod-mt792x-usb"              # USB接口MT792x驱动模块
PACKAGES="$PACKAGES kmod-mt7992-23-firmware"      # MT7992 23固件驱动模块
PACKAGES="$PACKAGES kmod-mt7992-firmware"         # MT7992固件驱动模块
PACKAGES="$PACKAGES kmod-mt7996-233-firmware"     # MT7996 233固件驱动模块
PACKAGES="$PACKAGES kmod-mt7996-firmware"         # MT7996固件驱动模块
PACKAGES="$PACKAGES kmod-mt7996-firmware-common"  # MT7996固件公共驱动模块
PACKAGES="$PACKAGES kmod-mt7996e"                 # MT7996E无线网卡驱动模块
PACKAGES="$PACKAGES kmod-mtk-t7xx"                # MediaTek T7xx驱动模块
PACKAGES="$PACKAGES kmod-mvneta"                  # Marvell MVNETA网卡驱动模块
PACKAGES="$PACKAGES kmod-mvpp2"                   # Marvell MVPP2网卡驱动模块
PACKAGES="$PACKAGES kmod-mwifiex-pcie"            # Marvell MWifiex PCIE无线驱动模块
PACKAGES="$PACKAGES kmod-nat46"                   # NAT46地址转换驱动模块
#PACKAGES="$PACKAGES kmod-natsemi"                 # National Semiconductor网卡驱动模块（未启用）
PACKAGES="$PACKAGES kmod-nbd"                     # 网络块设备驱动模块
PACKAGES="$PACKAGES kmod-ne2k-pci"                # NE2000兼容PCI网卡驱动模块
PACKAGES="$PACKAGES kmod-net-selftests"           # 网络自测试驱动模块
PACKAGES="$PACKAGES kmod-netlink-diag"            # Netlink诊断驱动模块
PACKAGES="$PACKAGES kmod-nf-conncount"            # 连接计数驱动模块
PACKAGES="$PACKAGES kmod-nf-conntrack"            # 连接跟踪核心驱动模块
PACKAGES="$PACKAGES kmod-nf-conntrack-netlink"    # 连接跟踪Netlink驱动模块
PACKAGES="$PACKAGES kmod-nf-conntrack6"           # IPv6连接跟踪驱动模块
PACKAGES="$PACKAGES kmod-nf-flow"                 # 流表驱动模块
PACKAGES="$PACKAGES kmod-nf-ipt"                  # iptables netfilter驱动模块
PACKAGES="$PACKAGES kmod-nf-ipt6"                 # IPv6 iptables netfilter驱动模块
PACKAGES="$PACKAGES kmod-nf-ipvs"                 # IP虚拟服务器驱动模块
PACKAGES="$PACKAGES kmod-nf-log"                  # 日志驱动模块
PACKAGES="$PACKAGES kmod-nf-log6"                 # IPv6日志驱动模块
PACKAGES="$PACKAGES kmod-nf-nat"                  # NAT核心驱动模块
PACKAGES="$PACKAGES kmod-nf-nat6"                 # IPv6 NAT驱动模块
PACKAGES="$PACKAGES kmod-nf-nathelper"            # NAT辅助驱动模块
PACKAGES="$PACKAGES kmod-nf-nathelper-extra"      # 额外NAT辅助驱动模块
PACKAGES="$PACKAGES kmod-nf-reject"               # 拒绝数据包驱动模块
PACKAGES="$PACKAGES kmod-nf-reject6"              # IPv6拒绝数据包驱动模块
PACKAGES="$PACKAGES kmod-nf-socket"               # 套接字匹配驱动模块
PACKAGES="$PACKAGES kmod-nf-tproxy"               # 透明代理驱动模块
PACKAGES="$PACKAGES kmod-nfnetlink"               # Netfilter Netlink驱动模块
PACKAGES="$PACKAGES kmod-nft-bridge"              # 网桥nftables驱动模块
PACKAGES="$PACKAGES kmod-nft-compat"              # nftables兼容性驱动模块
PACKAGES="$PACKAGES kmod-nft-core"                # nftables核心驱动模块
PACKAGES="$PACKAGES kmod-nft-fib"                 # FIB nftables驱动模块
PACKAGES="$PACKAGES kmod-nft-nat"                 # NAT nftables驱动模块
PACKAGES="$PACKAGES kmod-nft-netdev"              # 网络设备nftables驱动模块
PACKAGES="$PACKAGES kmod-nft-offload"             # 卸载nftables驱动模块
PACKAGES="$PACKAGES kmod-nft-socket"              # 套接字nftables驱动模块
PACKAGES="$PACKAGES kmod-nft-tproxy"              # 透明代理nftables驱动模块
PACKAGES="$PACKAGES kmod-niu"                     # NIU网卡驱动模块
PACKAGES="$PACKAGES kmod-nls-base"                # 国际化支持基础驱动模块
PACKAGES="$PACKAGES kmod-nls-cp437"               # CP437字符集驱动模块
PACKAGES="$PACKAGES kmod-nls-cp936"               # CP936(GB2312)字符集驱动模块
PACKAGES="$PACKAGES kmod-nls-iso8859-1"           # ISO8859-1字符集驱动模块
PACKAGES="$PACKAGES kmod-nls-ucs2-utils"          # UCS2字符集工具驱动模块
PACKAGES="$PACKAGES kmod-nls-utf8"                # UTF8字符集驱动模块
#PACKAGES="$PACKAGES kmod-oaf"                     # 应用层过滤驱动模块（未启用）
PACKAGES="$PACKAGES kmod-octeontx2-net"           # OcteonTX2网络驱动模块
PACKAGES="$PACKAGES kmod-of-mdio"                 # OpenFirmware MDIO驱动模块
PACKAGES="$PACKAGES kmod-oid-registry"            # OID注册表驱动模块
PACKAGES="$PACKAGES kmod-pcnet32"                 # AMD PCNet32网卡驱动模块
PACKAGES="$PACKAGES kmod-pcs-xpcs"                # XPCS PCS驱动模块
PACKAGES="$PACKAGES kmod-phy-aquantia"            # Aquantia PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-ax88796b"            # ASIX AX88796B PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-bcm84881"            # Broadcom BCM84881 PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-broadcom"            # Broadcom PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-marvell"             # Marvell PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-marvell-10g"         # Marvell 10G PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-microchip"           # Microchip PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-realtek"             # Realtek PHY驱动模块
PACKAGES="$PACKAGES kmod-phy-smsc"                # SMSC PHY驱动模块
PACKAGES="$PACKAGES kmod-phylib-broadcom"         # Broadcom PHY库驱动模块
PACKAGES="$PACKAGES kmod-phylink"                 # PHY链接驱动模块
PACKAGES="$PACKAGES kmod-ppdev"                   # 并行端口设备驱动模块
PACKAGES="$PACKAGES kmod-ppp"                     # PPP协议驱动模块
PACKAGES="$PACKAGES kmod-pppoe"                   # PPPoE协议驱动模块
PACKAGES="$PACKAGES kmod-pppol2tp"                # PPP over L2TP驱动模块
PACKAGES="$PACKAGES kmod-pppox"                   # PPP over X驱动模块
PACKAGES="$PACKAGES kmod-pps"                     # PPS（脉冲每秒）驱动模块
PACKAGES="$PACKAGES kmod-pptp"                    # PPTP协议驱动模块
PACKAGES="$PACKAGES kmod-ptp"                     # PTP（精确时间协议）驱动模块
PACKAGES="$PACKAGES kmod-qcom-qmi-helpers"        # Qualcomm QMI辅助驱动模块
PACKAGES="$PACKAGES kmod-qed"                     # QLogic QED驱动模块
PACKAGES="$PACKAGES kmod-qede"                    # QLogic QEDE驱动模块
PACKAGES="$PACKAGES kmod-qedf"                    # QLogic QEDF驱动模块
PACKAGES="$PACKAGES kmod-qrtr"                    # QRTR（Qualcomm Remote Test Request）驱动模块
PACKAGES="$PACKAGES kmod-qrtr-mhi"                # MHI上的QRTR驱动模块
PACKAGES="$PACKAGES kmod-qrtr-tun"                # QRTR隧道驱动模块
PACKAGES="$PACKAGES kmod-r6040"                   # Ralink R6040无线驱动模块
PACKAGES="$PACKAGES kmod-r8125"                   # Realtek R8125网卡驱动模块
PACKAGES="$PACKAGES kmod-r8126"                   # Realtek R8126网卡驱动模块
PACKAGES="$PACKAGES kmod-r8127"                   # Realtek R8127网卡驱动模块
PACKAGES="$PACKAGES kmod-r8168"                   # Realtek R8168网卡驱动模块
PACKAGES="$PACKAGES kmod-r8169"                   # Realtek R8169网卡驱动模块
PACKAGES="$PACKAGES kmod-random-core"             # 随机数核心驱动模块
PACKAGES="$PACKAGES kmod-regmap-core"             # Regmap核心驱动模块
PACKAGES="$PACKAGES kmod-regmap-i2c"              # I2C Regmap驱动模块
PACKAGES="$PACKAGES kmod-renesas-net-avb"         # Renesas AVB网络驱动模块
PACKAGES="$PACKAGES kmod-rtc-rx8025"              # RX8025 RTC驱动模块
PACKAGES="$PACKAGES kmod-rtl8192c-common"         # Realtek RTL8192C系列公共驱动模块
#PACKAGES="$PACKAGES kmod-rtl8192cu"               # Realtek RTL8192CU无线驱动模块
PACKAGES="$PACKAGES kmod-rtl8192d-common"         # Realtek RTL8192D系列公共驱动模块
PACKAGES="$PACKAGES kmod-rtl8192de"               # Realtek RTL8192DE无线驱动模块
PACKAGES="$PACKAGES kmod-rtl8192se"               # Realtek RTL8192SE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtl8821ae"               # Realtek RTL8821AE无线驱动模块
PACKAGES="$PACKAGES kmod-rtl8xxxu"                # Realtek RTL8xxxU无线驱动模块
PACKAGES="$PACKAGES kmod-rtlwifi"                 # Realtek RTLWiFi核心驱动模块
PACKAGES="$PACKAGES kmod-rtlwifi-btcoexist"       # RTLWiFi蓝牙共存驱动模块
PACKAGES="$PACKAGES kmod-rtlwifi-pci"             # PCI接口RTLWiFi驱动模块
PACKAGES="$PACKAGES kmod-rtlwifi-usb"             # USB接口RTLWiFi驱动模块
PACKAGES="$PACKAGES kmod-rtw88"                   # Realtek RTW88核心驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8723d"             # RTW88 8723D无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8723de"            # RTW88 8723DE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8723du"            # RTW88 8723DU无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8723x"             # RTW88 8723X无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8812a"             # RTW88 8812A无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8812au"            # RTW88 8812AU无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8821a"             # RTW88 8821A无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8821au"            # RTW88 8821AU无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8821c"             # RTW88 8821C无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8821ce"            # RTW88 8821CE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8821cu"            # RTW88 8821CU无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8822b"             # RTW88 8822B无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8822be"            # RTW88 8822BE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8822bu"            # RTW88 8822BU无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8822c"             # RTW88 8822C无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8822ce"            # RTW88 8822CE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-8822cu"            # RTW88 8822CU无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-88xxa"             # RTW88 88XXA无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-pci"               # PCI接口RTW88驱动模块
#PACKAGES="$PACKAGES kmod-rtw88-usb"               # USB接口RTW88驱动模块
#PACKAGES="$PACKAGES kmod-rtw89"                   # Realtek RTW89核心驱动模块
#PACKAGES="$PACKAGES kmod-rtw89-8851be"            # RTW89 8851BE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw89-8852ae"            # RTW89 8852AE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw89-8852b-common"      # RTW89 8852B系列公共驱动模块
#PACKAGES="$PACKAGES kmod-rtw89-8852be"            # RTW89 8852BE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw89-8852ce"            # RTW89 8852CE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw89-8922ae"            # RTW89 8922AE无线驱动模块
#PACKAGES="$PACKAGES kmod-rtw89-pci"               # PCI接口RTW89驱动模块
PACKAGES="$PACKAGES kmod-sched"                   # 调度器核心驱动模块
PACKAGES="$PACKAGES kmod-sched-bpf"               # BPF调度器驱动模块
PACKAGES="$PACKAGES kmod-sched-cake"              # CAKE调度器驱动模块
PACKAGES="$PACKAGES kmod-sched-connmark"          # 连接标记调度驱动模块
PACKAGES="$PACKAGES kmod-sched-core"              # 调度核心驱动模块
PACKAGES="$PACKAGES kmod-sched-ctinfo"            # 连接跟踪信息调度驱动模块
PACKAGES="$PACKAGES kmod-sched-flower"            # Flower调度器驱动模块
PACKAGES="$PACKAGES kmod-sched-ipset"             # IPset调度驱动模块
PACKAGES="$PACKAGES kmod-sched-mqprio"            # MQPRIO调度器驱动模块
PACKAGES="$PACKAGES kmod-sched-mqprio-common"     # MQPRIO公共调度驱动模块
PACKAGES="$PACKAGES kmod-scsi-cdrom"              # SCSI CD-ROM驱动模块
PACKAGES="$PACKAGES kmod-scsi-core"               # SCSI核心驱动模块
PACKAGES="$PACKAGES kmod-scsi-generic"            # SCSI通用驱动模块
PACKAGES="$PACKAGES kmod-scsi-tape"               # SCSI磁带驱动模块
PACKAGES="$PACKAGES kmod-sctp"                    # SCTP协议驱动模块
PACKAGES="$PACKAGES kmod-sfc"                     # Solarflare SFC网卡驱动模块
PACKAGES="$PACKAGES kmod-sfc-falcon"              # Solarflare Falcon网卡驱动模块
PACKAGES="$PACKAGES kmod-sfp"                     # SFP光模块驱动模块
PACKAGES="$PACKAGES kmod-siit"                    # SIIT IPv6/IPv4转换驱动模块
PACKAGES="$PACKAGES kmod-sit"                     # SIT隧道驱动模块
PACKAGES="$PACKAGES kmod-skge"                    # Marvell SKGE网卡驱动模块
PACKAGES="$PACKAGES kmod-sky2"                    # Marvell SKY2网卡驱动模块
PACKAGES="$PACKAGES kmod-slhc"                    # 串行线路头压缩驱动模块
PACKAGES="$PACKAGES kmod-solos-pci"               # Solos PCI调制解调器驱动模块
PACKAGES="$PACKAGES kmod-sound-core"              # 声音核心驱动模块
PACKAGES="$PACKAGES kmod-spi-ks8995"              # KS8995 SPI驱动模块
PACKAGES="$PACKAGES kmod-ssb"                     # Sonics Silicon Backplane驱动模块
PACKAGES="$PACKAGES kmod-stmmac-core"             # STMMAC核心驱动模块
PACKAGES="$PACKAGES kmod-swconfig"                # 交换机配置驱动模块
PACKAGES="$PACKAGES kmod-switch-ip17xx"           # IP17xx交换机驱动模块
PACKAGES="$PACKAGES kmod-switch-rtl8306"          # RTL8306交换机驱动模块
PACKAGES="$PACKAGES kmod-switch-rtl8366-smi"      # RTL8366 SMI交换机驱动模块
PACKAGES="$PACKAGES kmod-switch-rtl8366rb"        # RTL8366RB交换机驱动模块
PACKAGES="$PACKAGES kmod-switch-rtl8366s"         # RTL8366S交换机驱动模块
PACKAGES="$PACKAGES kmod-switch-rtl8367b"         # RTL8367B交换机驱动模块
PACKAGES="$PACKAGES kmod-tg3"                     # Broadcom TG3网卡驱动模块
PACKAGES="$PACKAGES kmod-thermal"                 #  thermal（温度）驱动模块
PACKAGES="$PACKAGES kmod-tls"                     # TLS协议驱动模块
PACKAGES="$PACKAGES kmod-tpm"                     # TPM（可信平台模块）驱动模块
PACKAGES="$PACKAGES kmod-trelay"                  # 流量中继驱动模块
#PACKAGES="$PACKAGES kmod-tulip"                  # Tulip网卡驱动模块（未启用）
PACKAGES="$PACKAGES kmod-tun"                     # TUN/TAP虚拟网络设备驱动模块
PACKAGES="$PACKAGES kmod-udptunnel4"              # UDPv4隧道驱动模块
PACKAGES="$PACKAGES kmod-udptunnel6"              # UDPv6隧道驱动模块
PACKAGES="$PACKAGES kmod-usb-acm"                 # USB ACM调制解调器驱动模块
PACKAGES="$PACKAGES kmod-usb-atm"                 # USB ATM驱动模块
PACKAGES="$PACKAGES kmod-usb-audio"               # USB音频设备驱动模块
PACKAGES="$PACKAGES kmod-usb-cm109"               # USB CM109音频驱动模块
PACKAGES="$PACKAGES kmod-usb-core"                # USB核心驱动模块
PACKAGES="$PACKAGES kmod-usb-dwc2"                # DesignWare USB 2.0驱动模块
PACKAGES="$PACKAGES kmod-usb-dwc3"                # DesignWare USB 3.0驱动模块
PACKAGES="$PACKAGES kmod-usb-ehci"                # USB EHCI主机控制器驱动模块
PACKAGES="$PACKAGES kmod-usb-hid"                 # USB HID设备驱动模块
PACKAGES="$PACKAGES kmod-usb-hid-cp2112"          # CP2112 USB HID驱动模块
PACKAGES="$PACKAGES kmod-usb-ledtrig-usbport"     # USB端口LED触发器驱动模块
PACKAGES="$PACKAGES kmod-usb-net"                 # USB网络设备核心驱动模块
PACKAGES="$PACKAGES kmod-usb-net-aqc111"          # AQC111 USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-asix"            # ASIX USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-asix-ax88179"    # ASIX AX88179 USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-cdc-eem"         # CDC EEM USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-cdc-ether"       # CDC Ethernet USB网络驱动模块
#PACKAGES="$PACKAGES kmod-usb-net-cdc-mbim"        # CDC MBIM USB网络驱动模块（未启用）
PACKAGES="$PACKAGES kmod-usb-net-cdc-ncm"         # CDC NCM USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-cdc-subset"      # CDC子集USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-dm9601-ether"    # DM9601 USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-hso"             # HSO USB网络驱动模块
#PACKAGES="$PACKAGES kmod-usb-net-huawei-cdc-ncm"  # 华为CDC NCM USB网络驱动模块（未启用）
PACKAGES="$PACKAGES kmod-usb-net-ipheth"          # iPhone USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-kalmia"          # Kalmia USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-kaweth"          # Kaweth USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-lan78xx"         # LAN78xx USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-mcs7830"         # MCS7830 USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-pegasus"         # Pegasus USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-pl"              # Prolific USB网卡驱动模块
#PACKAGES="$PACKAGES kmod-usb-net-qmi-wwan"        # QMI WWAN USB网络驱动模块（未启用）
PACKAGES="$PACKAGES kmod-usb-net-rndis"           # RNDIS USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-rtl8150"         # RTL8150 USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-rtl8152"         # RTL8152 USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-sierrawireless"  # Sierra Wireless USB网络驱动模块
PACKAGES="$PACKAGES kmod-usb-net-smsc75xx"        # SMSC75xx USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-smsc95xx"        # SMSC95xx USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-net-sr9700"          # SR9700 USB网卡驱动模块
PACKAGES="$PACKAGES kmod-usb-ohci"                # USB OHCI主机控制器驱动模块
PACKAGES="$PACKAGES kmod-usb-ohci-pci"            # PCI接口USB OHCI驱动模块
PACKAGES="$PACKAGES kmod-usb-printer"             # USB打印机驱动模块
PACKAGES="$PACKAGES kmod-usb-roles"               # USB角色切换驱动模块
PACKAGES="$PACKAGES kmod-usb-serial"              # USB串行设备核心驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-ark3116"      # ARK3116 USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-belkin"       # Belkin USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-ch341"        # CH341 USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-cp210x"       # CP210x USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-cypress-m8"   # Cypress M8 USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-dmx_usb_module" # DMX USB模块驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-edgeport"     # Edgeport USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-ftdi"         # FTDI USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-garmin"       # Garmin USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-ipw"          # IPW USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-keyspan"      # Keyspan USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-mct"          # MCT USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-mos7720"      # MOS7720 USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-mos7840"      # MOS7840 USB串行驱动模块
#PACKAGES="$PACKAGES kmod-usb-serial-option"       # Option USB串行驱动模块（未启用）
PACKAGES="$PACKAGES kmod-usb-serial-oti6858"      # OTI6858 USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-pl2303"       # PL2303 USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-qualcomm"     # Qualcomm USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-sierrawireless" # Sierra Wireless USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-simple"       # 简单USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-ti-usb"       # TI USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-visor"        # Visor USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-wwan"         # WWAN USB串行驱动模块
PACKAGES="$PACKAGES kmod-usb-serial-xr_usb_serial_common" # XR USB串行公共驱动模块
PACKAGES="$PACKAGES kmod-usb-storage"             # USB存储设备驱动模块
PACKAGES="$PACKAGES kmod-usb-storage-extras"      # 额外USB存储驱动模块
PACKAGES="$PACKAGES kmod-usb-storage-uas"         # USB附加存储驱动模块
PACKAGES="$PACKAGES kmod-usb-uhci"                # USB UHCI主机控制器驱动模块
PACKAGES="$PACKAGES kmod-usb-wdm"                 # USB WDM驱动模块
PACKAGES="$PACKAGES kmod-usb-xhci-hcd"            # USB XHCI主机控制器驱动模块
PACKAGES="$PACKAGES kmod-usb2"                    # USB 2.0驱动模块
PACKAGES="$PACKAGES kmod-usb2-pci"                # PCI接口USB 2.0驱动模块
PACKAGES="$PACKAGES kmod-usb3"                    # USB 3.0驱动模块
PACKAGES="$PACKAGES kmod-veth"                    # 虚拟以太网驱动模块
PACKAGES="$PACKAGES kmod-vfio"                    # VFIO设备驱动模块
PACKAGES="$PACKAGES kmod-vfio-pci"                # PCI VFIO驱动模块
PACKAGES="$PACKAGES kmod-vhost"                   # vhost核心驱动模块
PACKAGES="$PACKAGES kmod-vhost-net"               # vhost网络驱动模块
PACKAGES="$PACKAGES kmod-video-core"              # 视频核心驱动模块
PACKAGES="$PACKAGES kmod-video-uvc"               # USB视频类设备驱动模块
PACKAGES="$PACKAGES kmod-video-videobuf2"         # 视频缓冲区2驱动模块
PACKAGES="$PACKAGES kmod-vmxnet3"                 # VMware VMXNET3网卡驱动模块
PACKAGES="$PACKAGES kmod-vxlan"                   # VXLAN隧道驱动模块
PACKAGES="$PACKAGES kmod-wdt-sp805"               # SP805 watchdog驱动模块
PACKAGES="$PACKAGES kmod-wireguard"               # WireGuard VPN驱动模块
#PACKAGES="$PACKAGES kmod-wwan"                    # 无线广域网驱动模块
PACKAGES="$PACKAGES kmod-xdp-sockets-diag"        # XDP套接字诊断驱动模块
PACKAGES="$PACKAGES kmod-zram"                    # ZRAM压缩内存驱动模块
PACKAGES="$PACKAGES libacl"                       # ACL库
PACKAGES="$PACKAGES libatomic1"                   # 原子操作库
PACKAGES="$PACKAGES libattr"                      # 属性库
PACKAGES="$PACKAGES libavahi-client"              # Avahi客户端库
PACKAGES="$PACKAGES libavahi-dbus-support"        # Avahi D-Bus支持库
PACKAGES="$PACKAGES libblkid1"                    # blkid库
PACKAGES="$PACKAGES libblobmsg-json20240329"      # blobmsg JSON库
PACKAGES="$PACKAGES libbpf1"                      # BPF库
PACKAGES="$PACKAGES libbz2-1.0"                   # bzip2库
PACKAGES="$PACKAGES libc"                         # C标准库
PACKAGES="$PACKAGES libcap"                       # 能力库
PACKAGES="$PACKAGES libcap-ng"                    # 下一代能力库
PACKAGES="$PACKAGES libcomerr0"                   # 公共错误库
PACKAGES="$PACKAGES libcurl4"                     # curl库
PACKAGES="$PACKAGES libdaemon"                    # 守护进程库
PACKAGES="$PACKAGES libdbus"                      # D-Bus库
PACKAGES="$PACKAGES libdevmapper"                 # 设备映射器库
PACKAGES="$PACKAGES libe2p2"                      # e2p库
PACKAGES="$PACKAGES libelf1"                      # ELF格式库
PACKAGES="$PACKAGES libevdev"                     # evdev输入设备库
PACKAGES="$PACKAGES libevent2-7"
PACKAGES="$PACKAGES libexpat"                     # Expat XML解析库
PACKAGES="$PACKAGES libext2fs2"                   # Ext2文件系统库
PACKAGES="$PACKAGES libf2fs6"                     # F2FS文件系统库
PACKAGES="$PACKAGES libfdisk1"                    # fdisk库
PACKAGES="$PACKAGES libffi"                       # FFI库
PACKAGES="$PACKAGES libfuse1"                     # FUSE库
PACKAGES="$PACKAGES libgcc1"                      # GCC支持库
PACKAGES="$PACKAGES libgcrypt"                    # GCRYPT加密库
PACKAGES="$PACKAGES libgdbm"                      # GDBM数据库库
PACKAGES="$PACKAGES libgmp10"                     # GMP大数库
PACKAGES="$PACKAGES libgnutls"                    # GnuTLS库
PACKAGES="$PACKAGES libgpg-error"                 # GPG错误库
PACKAGES="$PACKAGES libiperf3"                    # iperf3库
PACKAGES="$PACKAGES libipset13"                   # ipset库
PACKAGES="$PACKAGES libiptext-nft0"               # iptext nftables库
PACKAGES="$PACKAGES libiptext0"                   # iptext库
PACKAGES="$PACKAGES libiptext6-0"                 # IPv6 iptext库
PACKAGES="$PACKAGES libiwinfo-data"               # iwinfo数据文件
PACKAGES="$PACKAGES libiwinfo20230701"            # iwinfo库
PACKAGES="$PACKAGES libjson-c5"                   # JSON-C库
PACKAGES="$PACKAGES libjson-script20240329"       # JSON脚本库
PACKAGES="$PACKAGES libkeyutils1"                 # 密钥工具库
PACKAGES="$PACKAGES libkmod"                      # kmod库
PACKAGES="$PACKAGES liblua5.1.5"                  # Lua 5.1.5库
PACKAGES="$PACKAGES liblucihttp-lua"              # Lua的lucihttp库
PACKAGES="$PACKAGES liblucihttp-ucode"            # ucode的lucihttp库
PACKAGES="$PACKAGES liblucihttp0"                 # lucihttp库
PACKAGES="$PACKAGES liblzma"                      # LZMA压缩库
PACKAGES="$PACKAGES liblzo2"                      # LZO压缩库
PACKAGES="$PACKAGES libmbedtls21"                 # mbedTLS库
PACKAGES="$PACKAGES libmbim"                      # MBIM库
PACKAGES="$PACKAGES libmnl0"                      # libmnl库
PACKAGES="$PACKAGES libmount1"                    # mount库
PACKAGES="$PACKAGES libnatpmp1"                   # NAT-PMP库
PACKAGES="$PACKAGES libncurses6"                  # ncurses终端库
PACKAGES="$PACKAGES libneon"                      # Neon HTTP客户端库
PACKAGES="$PACKAGES libnetfilter-conntrack3"      # Netfilter连接跟踪库
PACKAGES="$PACKAGES libnettle8"                   # Nettle加密库
PACKAGES="$PACKAGES libnfnetlink0"                # libnfnetlink库
PACKAGES="$PACKAGES libnftnl11"                   # libnftnl库
PACKAGES="$PACKAGES libnghttp2-14"                # nghttp2库
PACKAGES="$PACKAGES libnl-tiny1"                  # 简化版libnl库
PACKAGES="$PACKAGES libopenssl-conf"              # OpenSSL配置库
PACKAGES="$PACKAGES libopenssl-legacy"            # OpenSSL遗留支持库
PACKAGES="$PACKAGES libopenssl3"                  # OpenSSL 3库
PACKAGES="$PACKAGES libparted"                    # parted库
PACKAGES="$PACKAGES libpcap1"                     # libpcap库
PACKAGES="$PACKAGES libpci"                       # PCI库
PACKAGES="$PACKAGES libpcre2"                     # PCRE2正则库
PACKAGES="$PACKAGES libpopt0"                     # popt命令行解析库
PACKAGES="$PACKAGES libpthread"                   # POSIX线程库
PACKAGES="$PACKAGES libqmi"                       # QMI库
PACKAGES="$PACKAGES libqrtr-glib"                 # QRTR GLib库
PACKAGES="$PACKAGES libreadline8"                 # readline库
PACKAGES="$PACKAGES librt"                        # 实时库
PACKAGES="$PACKAGES libseccomp"                   # seccomp库
PACKAGES="$PACKAGES libsensors5"                  # 传感器库
PACKAGES="$PACKAGES libsmartcols1"                # smartcols库
PACKAGES="$PACKAGES libss2"                       # ss库
PACKAGES="$PACKAGES libstdcpp6"                   # C++标准库
PACKAGES="$PACKAGES libsysfs2"                    # sysfs库
PACKAGES="$PACKAGES libtasn1"                     # ASN.1库
PACKAGES="$PACKAGES libtirpc"                     # TIRPC库
PACKAGES="$PACKAGES libubox20240329"              # ubox库
PACKAGES="$PACKAGES libubus-lua"                  # Lua的ubus库
PACKAGES="$PACKAGES libubus20250102"              # ubus库
PACKAGES="$PACKAGES libuci-lua"                   # Lua的uci库
PACKAGES="$PACKAGES libuci20250120"               # uci库
PACKAGES="$PACKAGES libuclient20201210"           # uclient库
PACKAGES="$PACKAGES libucode20230711"             # ucode库
PACKAGES="$PACKAGES libudebug"                    # udebug库
PACKAGES="$PACKAGES libudev-zero"                 # udev-zero库
PACKAGES="$PACKAGES liburing"                     # io_uring库
PACKAGES="$PACKAGES libusb-1.0-0"                 # libusb 1.0库
PACKAGES="$PACKAGES libustream-openssl20201210"   # OpenSSL的ustream库
PACKAGES="$PACKAGES libuuid1"                     # UUID库
PACKAGES="$PACKAGES libuv1"                       # libuv库
PACKAGES="$PACKAGES libwebsockets-full"           # 完整的websockets库
PACKAGES="$PACKAGES libwrap"                      # TCP包装库
PACKAGES="$PACKAGES libxtables12"                 # xtables库
PACKAGES="$PACKAGES libzstd"                      # Zstd压缩库
#PACKAGES="$PACKAGES linkease"                     # LinkEase工具（未启用）
#PACKAGES="$PACKAGES linkmount"                    # 链接挂载工具
PACKAGES="$PACKAGES lm-sensors"                   # 硬件监控工具
PACKAGES="$PACKAGES lm-sensors-detect"            # 传感器检测工具
PACKAGES="$PACKAGES logd"                         # 日志守护进程
PACKAGES="$PACKAGES losetup"                      # 循环设备设置工具
PACKAGES="$PACKAGES lsblk"                        # 块设备列表工具
PACKAGES="$PACKAGES lscpu"                        # CPU信息查看工具
PACKAGES="$PACKAGES lua"                          # Lua解释器
PACKAGES="$PACKAGES luci"                         # Luci Web界面
PACKAGES="$PACKAGES luci-app-argon-config"        # Argon主题配置
PACKAGES="$PACKAGES luci-app-cifs-mount"          # CIFS挂载应用
PACKAGES="$PACKAGES luci-app-cpufreq"             # CPU频率控制应用
#PACKAGES="$PACKAGES luci-app-ddns"                # DDNS应用（未启用）
#PACKAGES="$PACKAGES luci-app-ddnsto"              # DDNSTO应用（未启用）
PACKAGES="$PACKAGES luci-app-diskman"             # 磁盘管理应用
if [ "$INCLUDE_DOCKER" = "yes" ]; then
    PACKAGES="$PACKAGES luci-app-dockerman"           # Docker管理应用
fi
PACKAGES="$PACKAGES luci-app-fan"                 # 风扇控制应用
#PACKAGES="$PACKAGES luci-app-filetransfer"        # 文件传输应用（未启用）
PACKAGES="$PACKAGES luci-app-firewall"            # 防火墙应用
#PACKAGES="$PACKAGES luci-app-hd-idle"             # 硬盘休眠应用（未启用）
#PACKAGES="$PACKAGES luci-app-linkease"            # LinkEase应用（未启用）
#PACKAGES="$PACKAGES luci-app-mergerfs"
PACKAGES="$PACKAGES luci-app-nfs"                 # NFS应用
#PACKAGES="$PACKAGES luci-app-oaf"                 # OAF应用（未启用）
#PACKAGES="$PACKAGES luci-app-ota"                 # OTA升级应用（未启用）
PACKAGES="$PACKAGES luci-app-package-manager"     # 包管理应用
PACKAGES="$PACKAGES luci-app-quickstart"          # 快速启动应用
PACKAGES="$PACKAGES luci-app-samba4"              # Samba4应用
PACKAGES="$PACKAGES luci-app-store"               # 应用商店
PACKAGES="$PACKAGES luci-app-ttyd"                # TTYd终端应用
PACKAGES="$PACKAGES luci-app-unishare"            # UniShare应用
PACKAGES="$PACKAGES luci-app-upnp"                # UPnP应用
PACKAGES="$PACKAGES luci-app-wol"                 # 网络唤醒应用
PACKAGES="$PACKAGES luci-base"                    # Luci基础组件
PACKAGES="$PACKAGES luci-compat"                  # Luci兼容性组件
PACKAGES="$PACKAGES luci-i18n-argon-config-zh-cn" # Argon配置中文语言包
PACKAGES="$PACKAGES luci-i18n-argon-zh-cn"        # Argon主题中文语言包
PACKAGES="$PACKAGES luci-i18n-base-zh-cn"         # 基础组件中文语言包
PACKAGES="$PACKAGES luci-i18n-cifs-mount-zh-cn"   # CIFS挂载中文语言包
PACKAGES="$PACKAGES luci-i18n-cpufreq-zh-cn"      # CPU频率控制中文语言包
#PACKAGES="$PACKAGES luci-i18n-ddns-zh-cn"         # DDNS中文语言包（未启用）
#PACKAGES="$PACKAGES luci-i18n-ddnsto-zh-cn"       # DDNSTO中文语言包（未启用）
PACKAGES="$PACKAGES luci-i18n-diskman-zh-cn"      # 磁盘管理中文语言包
if [ "$INCLUDE_DOCKER" = "yes" ]; then
    PACKAGES="$PACKAGES luci-i18n-dockerman-zh-cn"    # Docker管理中文语言包
fi
PACKAGES="$PACKAGES luci-i18n-fan-zh-cn"          # 风扇控制中文语言包
#PACKAGES="$PACKAGES luci-i18n-filetransfer-zh-cn" # 文件传输中文语言包（未启用）
PACKAGES="$PACKAGES luci-i18n-firewall-zh-cn"     # 防火墙中文语言包
#PACKAGES="$PACKAGES luci-i18n-hd-idle-zh-cn"      # 硬盘休眠中文语言包（未启用）
#PACKAGES="$PACKAGES luci-i18n-linkease-zh-cn"     # LinkEase中文语言包（未启用）
#PACKAGES="$PACKAGES luci-i18n-mergerfs-zh-cn"
PACKAGES="$PACKAGES luci-i18n-nfs-zh-cn"          # NFS中文语言包
#PACKAGES="$PACKAGES luci-i18n-oaf-zh-cn"          # OAF中文语言包（未启用）
#PACKAGES="$PACKAGES luci-i18n-ota-zh-cn"          # OTA升级中文语言包（未启用）
PACKAGES="$PACKAGES luci-i18n-package-manager-zh-cn" # 包管理中文语言包
PACKAGES="$PACKAGES luci-i18n-quickstart-zh-cn"   # 快速启动中文语言包
PACKAGES="$PACKAGES luci-i18n-samba4-zh-cn"       # Samba4中文语言包
PACKAGES="$PACKAGES luci-i18n-ttyd-zh-cn"         # TTYd终端中文语言包
PACKAGES="$PACKAGES luci-i18n-unishare-zh-cn"     # UniShare中文语言包
PACKAGES="$PACKAGES luci-i18n-upnp-zh-cn"         # UPnP中文语言包
PACKAGES="$PACKAGES luci-i18n-wol-zh-cn"          # 网络唤醒中文语言包
PACKAGES="$PACKAGES luci-lib-base"                # Luci基础库
if [ "$INCLUDE_DOCKER" = "yes" ]; then
    PACKAGES="$PACKAGES luci-lib-docker"              # Luci Docker库
fi
#PACKAGES="$PACKAGES luci-lib-fs"                  # Luci文件系统库
PACKAGES="$PACKAGES luci-lib-ip"                  # Luci IP库
PACKAGES="$PACKAGES luci-lib-ipkg"                # Luci IPKG库
PACKAGES="$PACKAGES luci-lib-jsonc"               # Luci JSON-C库
PACKAGES="$PACKAGES luci-lib-mac-vendor"          # Luci MAC厂商库
PACKAGES="$PACKAGES luci-lib-nixio"               # Luci NixIO库
PACKAGES="$PACKAGES luci-lib-taskd"               # Luci任务库
PACKAGES="$PACKAGES luci-lib-uqr"
PACKAGES="$PACKAGES luci-lib-xterm"               # Luci Xterm库
PACKAGES="$PACKAGES luci-light"                   # 轻量版Luci
PACKAGES="$PACKAGES luci-lua-runtime"             # Luci Lua运行时
PACKAGES="$PACKAGES luci-mod-admin-full"          # 完整管理模块
PACKAGES="$PACKAGES luci-mod-network"             # 网络模块
PACKAGES="$PACKAGES luci-mod-status"              # 状态模块
PACKAGES="$PACKAGES luci-mod-system"              # 系统模块
#PACKAGES="$PACKAGES luci-proto-3g"                # 3G协议支持（未启用）
PACKAGES="$PACKAGES luci-proto-external"          # 外部协议支持
PACKAGES="$PACKAGES luci-proto-gre"               # GRE协议支持
PACKAGES="$PACKAGES luci-proto-ipip"
PACKAGES="$PACKAGES luci-proto-ipv6"              # IPv6协议支持
#PACKAGES="$PACKAGES luci-proto-mbim"              # MBIM协议支持（未启用）
#PACKAGES="$PACKAGES luci-proto-modemmanager"      # ModemManager协议支持（未启用）
#PACKAGES="$PACKAGES luci-proto-ncm"               # NCM协议支持（未启用）
PACKAGES="$PACKAGES luci-proto-ppp"               # PPP协议支持
#PACKAGES="$PACKAGES luci-proto-qmi"               # QMI协议支持（未启用）
PACKAGES="$PACKAGES luci-proto-relay"             # 中继协议支持
PACKAGES="$PACKAGES luci-proto-sstp"
#PACKAGES="$PACKAGES luci-proto-unet"              # UniNet协议支持
#PACKAGES="$PACKAGES luci-proto-wireguard"
PACKAGES="$PACKAGES luci-ssl-openssl"             # OpenSSL的Luci SSL支持
PACKAGES="$PACKAGES luci-theme-argon"             # Argon主题
PACKAGES="$PACKAGES luci-theme-bootstrap"         # Bootstrap主题
PACKAGES="$PACKAGES map"
PACKAGES="$PACKAGES mdadm"                        # RAID管理工具
#PACKAGES="$PACKAGES mergerfs"
PACKAGES="$PACKAGES miniupnpd-nftables"           # NFTables的MiniUPnPd
PACKAGES="$PACKAGES mkf2fs"                       # F2FS文件系统创建工具
#PACKAGES="$PACKAGES modemmanager"                 # 调制解调器管理器（未启用）
PACKAGES="$PACKAGES mount-utils"                  # 挂载工具集
PACKAGES="$PACKAGES mtd"                          # MTD工具
PACKAGES="$PACKAGES mwifiex-pcie-firmware"        # MWifiex PCIE固件
PACKAGES="$PACKAGES netifd"                       # 网络接口守护进程
PACKAGES="$PACKAGES nfs-kernel-server"            # NFS内核服务器
PACKAGES="$PACKAGES nfs-kernel-server-utils"      # NFS服务器工具
PACKAGES="$PACKAGES nfs-utils"                    # NFS工具集
PACKAGES="$PACKAGES nfs-utils-libs"               # NFS工具库
PACKAGES="$PACKAGES nftables-json"                # JSON支持的nftables
PACKAGES="$PACKAGES ntfs3-mount"                  # NTFS3挂载工具
PACKAGES="$PACKAGES ntfsprogs"                    # NTFS文件系统工具
PACKAGES="$PACKAGES odhcp6c"                      # DHCPv6客户端
PACKAGES="$PACKAGES odhcpd-ipv6only"              # 仅IPv6的DHCP服务器
PACKAGES="$PACKAGES openssh-sftp-server"          # OpenSSH SFTP服务器
PACKAGES="$PACKAGES openssl-util"                 # OpenSSL工具
PACKAGES="$PACKAGES openwrt-keyring"              # OpenWRT密钥环
PACKAGES="$PACKAGES opkg"                         # 包管理器
PACKAGES="$PACKAGES parted"                       # 磁盘分区工具
PACKAGES="$PACKAGES partx-utils"                  # 分区工具
PACKAGES="$PACKAGES pciids"                       # PCI ID数据库
PACKAGES="$PACKAGES pciutils"                     # PCI工具集
PACKAGES="$PACKAGES perl"                         # Perl解释器
PACKAGES="$PACKAGES perlbase-base"                # Perl基础模块
PACKAGES="$PACKAGES perlbase-bytes"               # Perl字节模块
PACKAGES="$PACKAGES perlbase-class"               # Perl类模块
PACKAGES="$PACKAGES perlbase-config"              # Perl配置模块
PACKAGES="$PACKAGES perlbase-cwd"                 # Perl当前工作目录模块
PACKAGES="$PACKAGES perlbase-errno"               # Perl错误号模块
PACKAGES="$PACKAGES perlbase-essential"           # Perl必要模块
PACKAGES="$PACKAGES perlbase-fcntl"               # Perl文件控制模块
PACKAGES="$PACKAGES perlbase-file"                # Perl文件模块
PACKAGES="$PACKAGES perlbase-filehandle"          # Perl文件句柄模块
PACKAGES="$PACKAGES perlbase-i18n"                # Perl国际化模块
PACKAGES="$PACKAGES perlbase-integer"             # Perl整数模块
PACKAGES="$PACKAGES perlbase-io"                  # Perl IO模块
PACKAGES="$PACKAGES perlbase-list"                # Perl列表模块
PACKAGES="$PACKAGES perlbase-locale"              # Perl区域设置模块
PACKAGES="$PACKAGES perlbase-params"              # Perl参数模块
PACKAGES="$PACKAGES perlbase-posix"               # Perl POSIX模块
PACKAGES="$PACKAGES perlbase-re"                  # Perl正则表达式模块
PACKAGES="$PACKAGES perlbase-scalar"              # Perl标量模块
PACKAGES="$PACKAGES perlbase-selectsaver"         # Perl选择保存器模块
PACKAGES="$PACKAGES perlbase-socket"              # Perl套接字模块
PACKAGES="$PACKAGES perlbase-symbol"              # Perl符号模块
PACKAGES="$PACKAGES perlbase-tie"                 # Perl绑定模块
PACKAGES="$PACKAGES perlbase-unicore"             # Perl Unicode核心模块
PACKAGES="$PACKAGES perlbase-utf8"                # Perl UTF8模块
PACKAGES="$PACKAGES perlbase-xsloader"            # Perl XS加载器模块
PACKAGES="$PACKAGES ppp"                          # PPP协议工具
PACKAGES="$PACKAGES ppp-mod-pppoe"                # PPPoE模块
PACKAGES="$PACKAGES procd"                        # 进程管理守护进程
PACKAGES="$PACKAGES procd-seccomp"                # procd的seccomp支持
PACKAGES="$PACKAGES procd-ujail"                  # procd的ujail支持
PACKAGES="$PACKAGES procps-ng"                    # 进程工具集
PACKAGES="$PACKAGES procps-ng-vmstat"             # 虚拟内存统计工具
PACKAGES="$PACKAGES proto-bonding"                # 网卡绑定协议
PACKAGES="$PACKAGES qed-firmware"                 # QED固件
#PACKAGES="$PACKAGES qmi-utils"                    # QMI工具（未启用）
PACKAGES="$PACKAGES quickstart"                   # 快速启动工具
PACKAGES="$PACKAGES r8152-firmware"               # R8152网卡固件
PACKAGES="$PACKAGES r8169-firmware"               # R8169网卡固件
PACKAGES="$PACKAGES relayd"                       # 中继守护进程
PACKAGES="$PACKAGES resize2fs"                    # Ext文件系统 resize工具
PACKAGES="$PACKAGES resolveip"                    # IP解析工具
PACKAGES="$PACKAGES rpcbind"                      # RPC绑定服务
PACKAGES="$PACKAGES rpcd"                         # ubus RPC守护进程
PACKAGES="$PACKAGES rpcd-mod-file"                # rpcd文件模块
PACKAGES="$PACKAGES rpcd-mod-iwinfo"              # rpcd iwinfo模块
PACKAGES="$PACKAGES rpcd-mod-luci"                # rpcd Luci模块
PACKAGES="$PACKAGES rpcd-mod-rrdns"               # rpcd rrdns模块
PACKAGES="$PACKAGES rpcd-mod-ucode"               # rpcd ucode模块
PACKAGES="$PACKAGES rtl8192cu-firmware"           # RTL8192CU固件
PACKAGES="$PACKAGES rtl8192de-firmware"           # RTL8192DE固件
PACKAGES="$PACKAGES rtl8192se-firmware"           # RTL8192SE固件
PACKAGES="$PACKAGES rtl8723de-firmware"           # RTL8723DE固件
PACKAGES="$PACKAGES rtl8812a-firmware"            # RTL8812A固件
PACKAGES="$PACKAGES rtl8821a-firmware"            # RTL8821A固件
PACKAGES="$PACKAGES rtl8821ae-firmware"           # RTL8821AE固件
PACKAGES="$PACKAGES rtl8821ce-firmware"           # RTL8821CE固件
PACKAGES="$PACKAGES rtl8822be-firmware"           # RTL8822BE固件
PACKAGES="$PACKAGES rtl8822ce-firmware"           # RTL8822CE固件
PACKAGES="$PACKAGES rtl8851be-firmware"           # RTL8851BE固件
PACKAGES="$PACKAGES rtl8852ae-firmware"           # RTL8852AE固件
PACKAGES="$PACKAGES rtl8852be-firmware"           # RTL8852BE固件
PACKAGES="$PACKAGES rtl8852ce-firmware"           # RTL8852CE固件
PACKAGES="$PACKAGES rtl8922ae-firmware"           # RTL8922AE固件
PACKAGES="$PACKAGES runc"                         # 容器运行时
PACKAGES="$PACKAGES samba4-libs"                  # Samba4库
PACKAGES="$PACKAGES samba4-server"                # Samba4服务器
PACKAGES="$PACKAGES script-utils"                 # 脚本工具集
PACKAGES="$PACKAGES shadow"                       # Shadow工具集（用户管理）
PACKAGES="$PACKAGES shadow-chage"                 # 用户密码有效期工具
PACKAGES="$PACKAGES shadow-chfn"                  # 更改用户全名工具
PACKAGES="$PACKAGES shadow-chgpasswd"             # 批量更改密码工具
PACKAGES="$PACKAGES shadow-chpasswd"              # 更改用户密码工具
PACKAGES="$PACKAGES shadow-chsh"                  # 更改用户shell工具
PACKAGES="$PACKAGES shadow-common"                # Shadow公共文件
PACKAGES="$PACKAGES shadow-expiry"                # 密码过期工具
PACKAGES="$PACKAGES shadow-faillog"               # 登录失败日志工具
PACKAGES="$PACKAGES shadow-gpasswd"               # 组密码管理工具
PACKAGES="$PACKAGES shadow-groupadd"              # 添加组工具
PACKAGES="$PACKAGES shadow-groupdel"              # 删除组工具
PACKAGES="$PACKAGES shadow-groupmems"             # 组成员管理工具
PACKAGES="$PACKAGES shadow-groupmod"              # 修改组工具
PACKAGES="$PACKAGES shadow-groups"                # 组文件
PACKAGES="$PACKAGES shadow-grpck"                 # 组文件检查工具
PACKAGES="$PACKAGES shadow-grpconv"               # 转换组文件格式工具
PACKAGES="$PACKAGES shadow-grpunconv"             # 反转组文件格式工具
PACKAGES="$PACKAGES shadow-lastlog"               # 最后登录记录工具
PACKAGES="$PACKAGES shadow-login"                 # 登录工具
PACKAGES="$PACKAGES shadow-logoutd"               # 注销守护进程
PACKAGES="$PACKAGES shadow-newgidmap"             # 新GID映射工具
PACKAGES="$PACKAGES shadow-newgrp"                # 切换组工具
PACKAGES="$PACKAGES shadow-newuidmap"             # 新UID映射工具
PACKAGES="$PACKAGES shadow-newusers"              # 批量添加用户工具
PACKAGES="$PACKAGES shadow-nologin"               # 禁止登录工具
PACKAGES="$PACKAGES shadow-passwd"                # 密码管理工具
PACKAGES="$PACKAGES shadow-pwck"                  # 密码文件检查工具
PACKAGES="$PACKAGES shadow-pwconv"                # 转换密码文件格式工具
PACKAGES="$PACKAGES shadow-pwunconv"              # 反转密码文件格式工具
PACKAGES="$PACKAGES shadow-su"                    # 切换用户工具
PACKAGES="$PACKAGES shadow-useradd"               # 添加用户工具
PACKAGES="$PACKAGES shadow-userdel"               # 删除用户工具
PACKAGES="$PACKAGES shadow-usermod"               # 修改用户工具
PACKAGES="$PACKAGES shadow-utils"                 # Shadow工具集
PACKAGES="$PACKAGES shadow-vipw"                  # 编辑密码文件工具
PACKAGES="$PACKAGES smartd"                       # S.M.A.R.T.监控守护进程
PACKAGES="$PACKAGES smartmontools"                # S.M.A.R.T.工具集
PACKAGES="$PACKAGES sstp-client"
#PACKAGES="$PACKAGES strace"                       # 系统调用跟踪工具（未启用）
PACKAGES="$PACKAGES swap-utils"                   # 交换分区工具
PACKAGES="$PACKAGES sysfsutils"                   # sysfs工具集
PACKAGES="$PACKAGES sysstat"                      # 系统统计工具
PACKAGES="$PACKAGES tar"                          # tar归档工具
PACKAGES="$PACKAGES taskd"                        # 任务守护进程
#PACKAGES="$PACKAGES tcpdump"                      # 网络抓包工具（未启用）
PACKAGES="$PACKAGES terminfo"                     # 终端信息数据库
PACKAGES="$PACKAGES tini"                         # 微小的初始化进程
PACKAGES="$PACKAGES ttyd"                         # 终端共享工具
PACKAGES="$PACKAGES tune2fs"                      # Ext文件系统调整工具
PACKAGES="$PACKAGES ubox"                         # ubox工具集
PACKAGES="$PACKAGES ubus"                         # ubus工具
PACKAGES="$PACKAGES ubusd"                        # ubus守护进程
PACKAGES="$PACKAGES uci"                          # 配置管理工具
PACKAGES="$PACKAGES uclient-fetch"                # 网络下载工具
PACKAGES="$PACKAGES ucode"                        # ucode脚本语言
PACKAGES="$PACKAGES ucode-mod-fs"                 # ucode文件系统模块
PACKAGES="$PACKAGES ucode-mod-html"               # ucode HTML模块
PACKAGES="$PACKAGES ucode-mod-lua"                # ucode Lua模块
PACKAGES="$PACKAGES ucode-mod-math"               # ucode数学模块
PACKAGES="$PACKAGES ucode-mod-nl80211"            # ucode nl80211模块
PACKAGES="$PACKAGES ucode-mod-rtnl"               # ucode RTNL模块
PACKAGES="$PACKAGES ucode-mod-ubus"               # ucode ubus模块
PACKAGES="$PACKAGES ucode-mod-uci"                # ucode uci模块
PACKAGES="$PACKAGES ucode-mod-uloop"              # ucode uloop模块
PACKAGES="$PACKAGES uhttpd"                       # uHTTPd Web服务器
PACKAGES="$PACKAGES uhttpd-mod-ubus"              # uHTTPd ubus模块
#PACKAGES="$PACKAGES umbim"                        # MBIM工具（未启用）
#PACKAGES="$PACKAGES unet-cli"                     # UniNet命令行工具
#PACKAGES="$PACKAGES unetd"                        # UniNet守护进程
PACKAGES="$PACKAGES unishare"                     # UniShare工具
PACKAGES="$PACKAGES unzip"                        # 解压缩工具
#PACKAGES="$PACKAGES uqmi"                         # QMI工具
PACKAGES="$PACKAGES urandom-seed"                 # 随机数种子工具
PACKAGES="$PACKAGES urngd"                        # 随机数生成守护进程
PACKAGES="$PACKAGES usb-modeswitch"               # USB模式切换工具
PACKAGES="$PACKAGES usbids"                       # USB ID数据库
PACKAGES="$PACKAGES usbutils"                     # USB工具集
PACKAGES="$PACKAGES usign"                        # 签名工具
PACKAGES="$PACKAGES webdav2"                      # WebDAV服务器
PACKAGES="$PACKAGES wget-ssl"                     # 带SSL支持的wget
PACKAGES="$PACKAGES wifi-scripts"                 # 无线脚本
#PACKAGES="$PACKAGES wireguard-tools"
PACKAGES="$PACKAGES wireless-regdb"               # 无线 regulatory 数据库
PACKAGES="$PACKAGES wpa-cli"                      # WPA命令行工具
PACKAGES="$PACKAGES wpa-supplicant-openssl"       # 带OpenSSL的WPA客户端
PACKAGES="$PACKAGES wsdd2"                        # Web服务发现守护进程
#PACKAGES="$PACKAGES wwan"                         # 无线广域网工具（未启用）
PACKAGES="$PACKAGES xtables-nft"                  # 基于nftables的xtables
PACKAGES="$PACKAGES xz"                           # XZ压缩工具
PACKAGES="$PACKAGES xz-utils"                     # XZ工具集
PACKAGES="$PACKAGES zlib"                         # zlib压缩库
PACKAGES="$PACKAGES zram-swap"                    # ZRAM交换工具
PACKAGES="$PACKAGES -libustream-mbedtls"          # 移除mbedtls的ustream库

# 固件打包脚本必要依赖，其他依赖官方列表已集成
PACKAGES="$PACKAGES perlbase-time"

# 斐讯N1无线：此固件未考虑无线，需自行研究；其中iw和iwinfo官方列表已集成
#PACKAGES="$PACKAGES kmod-brcmfmac wpad-basic-mbedtls"

# file/packages目录的第三方可选插件
PACKAGES="$PACKAGES filebrowser luci-app-filebrowser-go luci-i18n-filebrowser-go-zh-cn"
PACKAGES="$PACKAGES luci-app-amlogic luci-i18n-amlogic-zh-cn"
PACKAGES="$PACKAGES lucky luci-app-lucky luci-i18n-lucky-zh-cn"
PACKAGES="$PACKAGES openlist2 luci-app-openlist2 luci-i18n-openlist2-zh-cn"
PACKAGES="$PACKAGES luci-app-ramfree luci-i18n-ramfree-zh-cn"
PACKAGES="$PACKAGES luci-app-adguardhome luci-i18n-adguardhome-zh-cn"

# opc-rely依赖，其他会自动集成
PACKAGES="$PACKAGES ruby ruby-pstore ruby-psych ruby-yaml"

# 追加自定义包
PACKAGES="$PACKAGES $CUSTOM_PACKAGES"

# 构建镜像
echo "开始构建......打印所有包名===="
echo "$PACKAGES"

# 开始构建
make image PROFILE=generic PACKAGES="$PACKAGES" FILES="files"

if [ $? -ne 0 ]; then
    echo "$(date '+%Y-%m-%d %H:%M:%S') - Error: Build failed!"
    exit 1
fi

echo "$(date '+%Y-%m-%d %H:%M:%S') - 构建成功."
