[kernel] Move the 'prep all configs' to a separate script.

Dave Jones davej at fedoraproject.org
Mon Mar 19 21:31:28 UTC 2012


commit 384fed008db95925ccee2c0c632dbc4e6133f40c
Author: Dave Jones <davej at redhat.com>
Date:   Mon Mar 19 17:30:04 2012 -0400

    Move the 'prep all configs' to a separate script.
    
    This cuts make prep time down from 53s to 10s on my desktop.
    A full run across all archs can be done from within a source
    tree by running ../../scripts/allarchconfig.sh

 kernel.spec              |   18 +-----------------
 scripts/allarchconfig.sh |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 2bbdc09..b0c8e82 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -424,14 +424,6 @@ Summary: The Linux kernel
 %endif
 %endif
 
-# Should make listnewconfig fail if there's config options
-# printed out?
-%if %{nopatches}%{using_upstream_branch}
-%define listnewconfig_fail 0
-%else
-%define listnewconfig_fail 1
-%endif
-
 # To temporarily exclude an architecture from being built, add it to
 # %%nobuildarches. Do _NOT_ use the ExclusiveArch: line, because if we
 # don't build kernel-headers then the new build system will no longer let
@@ -1517,18 +1509,10 @@ rm -f kernel-%{version}-*debug.config
 %endif
 
 # now run oldconfig over all the config files
-for i in *.config
+for i in kernel-*-$(uname -p)*.config
 do
   mv $i .config
   Arch=`head -1 .config | cut -b 3-`
-  make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true
-%if %{listnewconfig_fail}
-  if [ -s .newoptions ]; then
-    cat .newoptions
-    exit 1
-  fi
-%endif
-  rm -f .newoptions
   make ARCH=$Arch oldnoconfig
   echo "# $Arch" > configs/$i
   cat .config >> configs/$i
diff --git a/scripts/allarchconfig.sh b/scripts/allarchconfig.sh
new file mode 100755
index 0000000..f80c231
--- /dev/null
+++ b/scripts/allarchconfig.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Run from within a source tree.
+
+for i in configs/kernel-*.config
+do
+  cp -f $i .config
+  Arch=`head -1 .config | cut -b 3-`
+  echo $Arch \($i\)
+  make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true;
+  if [ -s .newoptions ]; then
+    cat .newoptions;
+    exit 1;
+  fi;
+  rm -f .newoptions;
+done
+


More information about the scm-commits mailing list