Attempt one step olddefconfig

This commit is contained in:
2025-10-18 11:30:42 -04:00
parent aeead798c3
commit ce2e85d197

View File

@@ -530,7 +530,7 @@ from_source() {
# Pull or clone source repo # Pull or clone source repo
if [[ -d "$SRC_DIR" ]]; then if [[ -d "$SRC_DIR" ]]; then
execute git -C "$SRC_DIR" fetch --all --prune --tags execute git -C "$SRC_DIR" pull --all --tags --prune
else else
execute mkdir -p "$SRC_DIR" execute mkdir -p "$SRC_DIR"
execute git clone "$src_url" "$SRC_DIR" execute git clone "$src_url" "$SRC_DIR"
@@ -629,16 +629,14 @@ from_source() {
config_opts+=("CONFIG_IB=n") config_opts+=("CONFIG_IB=n")
config_opts+=("CONFIG_MAKE_TOOLCHAIN=n") config_opts+=("CONFIG_MAKE_TOOLCHAIN=n")
# Serial make prep is more reliable
execute make "${make_opts[@]}" "-j1" defconfig
# Write options to config seed file # Write options to config seed file
for config in "${config_opts[@]}"; do for config in "${config_opts[@]}"; do
debug "Writing $config to $seed_file" debug "Writing $config to $seed_file"
echo "$config" >> "$seed_file" echo "$config" >> "$seed_file"
done done
execute bash -c "yes '' | make ${make_opts[*]} -j1 oldconfig" # Serial make prep is more reliable
execute make "${make_opts[@]}" "-j1" olddefconfig
# make_opts+=("-j$(($(nproc)-2))") # make_opts+=("-j$(($(nproc)-2))")
((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)-2))") ((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)-2))")
@@ -791,8 +789,8 @@ main() {
read -r release ref < <(normalize_and_ref "$raw_release" "$mode") read -r release ref < <(normalize_and_ref "$raw_release" "$mode")
declare -g SRC_DIR="$BUILD_ROOT/src/.openwrt" declare -g SRC_DIR="$BUILD_ROOT/src/.openwrt"
declare -g BUILD_DIR="$BUILD_ROOT/src/$profile/$mode-$ref" declare -g BUILD_DIR="$BUILD_ROOT/src/$profile/$ref-$mode"
declare -g BIN_DIR="$BUILD_ROOT/bin/$profile/$mode-$ref" declare -g BIN_DIR="$BUILD_ROOT/bin/$profile/$ref-$mode"
if [[ "$release" == "snapshot" ]]; then if [[ "$release" == "snapshot" ]]; then
local url_prefix="https://downloads.openwrt.org/snapshots/targets/$TARGET" local url_prefix="https://downloads.openwrt.org/snapshots/targets/$TARGET"
@@ -816,7 +814,7 @@ main() {
declare -g SYSUPGRADEIMGGZ="$BUILD_DIR/$img_fname-sysupgrade.img.gz" declare -g SYSUPGRADEIMGGZ="$BUILD_DIR/$img_fname-sysupgrade.img.gz"
fi fi
backup "$SYSUPGRADEIMGGZ" "$BACKUP_DIR/$profile/$mode-$ref" backup "$SYSUPGRADEIMGGZ" "$BACKUP_DIR/$profile/$ref-$mode"
if [[ "$mode" == "source" ]]; then if [[ "$mode" == "source" ]]; then
from_source "$seed_url" "$profile" "$ref" || return $? from_source "$seed_url" "$profile" "$ref" || return $?