xmake: Add option -W for build without WiFi activation

This commit is contained in:
remittor
2026-02-06 15:32:05 +03:00
parent 4be0aa94a4
commit c8bbce4d22
2 changed files with 8 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ else
fi
log_msg() {
printf "%s\n" "$1" >&$OUTPUT_PIPE
printf "%s\n" "$1" >&8 || printf "%s\n" "$1"
}
log_err() {
@@ -28,7 +28,7 @@ log_err() {
_R=\\033[31m
_N=\\033[m
fi
printf "$_R%s$_N\n" "ERROR: $msg" >&$OUTPUT_PIPE
printf "$_R%s$_N\n" "ERROR: $msg" >&8 || printf "$_R%s$_N\n" "ERROR: $msg"
}
die() {
@@ -150,6 +150,8 @@ if [ -f "$WIFI77_FN" ]; then
WIFI_COUNTRY=$( get_param_qq CONFIG_PACKAGE_MAC80211_COUNTRY "$TOPDIR/.config" )
sed -i "s#%COUNTRY%#${WIFI_COUNTRY}#g" "$WIFI77_FN"
fi
else
rm -f "$WIFI77_FN"
fi
fi

View File

@@ -12,16 +12,18 @@ fi
MAKE_JOBS=
XTARGET=
OPT_FULL_REBUILD=false
WIFI_EN=true
KALLSYMS=false
TESTING_KERNEL=false
BUILD_ONLY_INITRAMFS=false
ONLY_INIT=false
while getopts "j:t:fiskTI" opt; do
while getopts "j:t:fisWkTI" opt; do
case $opt in
j) MAKE_JOBS=$OPTARG;;
t) XTARGET=$OPTARG;;
f) OPT_FULL_REBUILD=true;;
W) WIFI_EN=false;;
k) KALLSYMS=true;;
T) TESTING_KERNEL=true;;
i) BUILD_ONLY_INITRAMFS=true;;
@@ -70,6 +72,7 @@ function build_target {
for inc in $inclst; do
incfn=$XDIR/_cfginc/$inc
[ ! -f $incfn ] && die "File '$inc' not found!"
[ "$WIFI_EN" == false -a $inc == "_wifi_en.config" ] && continue
sed -i "/#include $inc/a <<LF>><<LF>>" $CFG
sed -i "s/<<LF>>/\n/g" $CFG
sed -i "/#include $inc/ r $incfn" $CFG