Browse Source

Only compile our target

bryan 2 years ago
parent
commit
31a4aac014
1 changed files with 13 additions and 4 deletions
  1. 13 4
      openwrtbuilder

+ 13 - 4
openwrtbuilder

@@ -549,13 +549,17 @@ fromSource() {
         git checkout "v$RELEASE"
     fi
 
-    ./scripts/feeds update -a
+    # Update packages
+    ./scripts/feeds update -a &&
     ./scripts/feeds install -a
 
     # Grab the release seed config
-    if [[ ! -f .config ]]; then
-        if ! curl -so .config "$SEED_URL"; then
-            echo "Could not obtain seed config"
+    if [[ -f .config ]]; then
+        echo ".config already exists"
+        if askOk "Replace?"; then
+            if ! curl -so .config "$SEED_URL"; then
+                echo "Could not obtain seed config"
+            fi
         fi
     else
         echo "Reusing existing .config"
@@ -570,6 +574,11 @@ fromSource() {
         fi
     done
 
+    # Only compile our target
+    echo "CONFIG_TARGET_MULTI_PROFILE=n" >> .config
+    sed -i '/CONFIG_TARGET_DEVICE_/d' myfile.txt
+    echo "CONFIG_TARGET_DEVICE_${P_ARR[target]//\//_}_DEVICE_${P_ARR[profile]}=y" >> .config
+
     make defconfig # normalize .config and remove dupes
     make targetclean
     make download &&