add config for 25.12.2, fix add packages script

Signed-off-by: Zhe Yuan <yuanzhe1999@outlook.com>
This commit is contained in:
2026-04-03 23:37:37 -04:00
parent ab0fd51af9
commit add8293042
4 changed files with 25 additions and 6 deletions

View File

@@ -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