diff --git a/hook_prepare_rootfs.sh b/hook_prepare_rootfs.sh index bf42f28..af1ca84 100755 --- a/hook_prepare_rootfs.sh +++ b/hook_prepare_rootfs.sh @@ -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 diff --git a/xmake.sh b/xmake.sh index 3e1e2da..53c435a 100755 --- a/xmake.sh +++ b/xmake.sh @@ -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 <><>" $CFG sed -i "s/<>/\n/g" $CFG sed -i "/#include $inc/ r $incfn" $CFG