this change should let the build select the kernel config to use
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 4 Mar 2010 14:46:46 +0000 (14:46 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 4 Mar 2010 14:46:46 +0000 (14:46 +0000)
default is to search config after pldistro like we did before
but can be overridden in the mk file with e.g.
kernel-SPECVARS := kernelconfig=planetlab

kernel-2.6.spec
onelab-2.6.27-i686.config [deleted symlink]
onelab-2.6.27-x86_64.config [deleted symlink]

index 4cf01eb..6d91e46 100644 (file)
@@ -14,7 +14,14 @@ Summary: The Linux kernel (the core of the Linux operating system)
 %define builddoc 0
 %define headers 1
 
-# from 2.6.27 iwlwifi in builtin
+%{!?pldistro:%global pldistro planetlab}
+
+# default is to search the config file after pldistro
+# e.g. set
+# kernel-SPECVARS := kernelconfig=planetlab
+# to use the planetlab config from another pldistro 
+# without having to manage symlinks
+%{!?kernelconfig:%global kernelconfig %{pldistro}}
 
 # Versions of various parts
 
@@ -42,8 +49,6 @@ Summary: The Linux kernel (the core of the Linux operating system)
 
 %define release vs%{vsversion}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 
-%{!?pldistro:%global pldistro planetlab}
-
 %define signmodules 0
 %define make_target bzImage
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
@@ -126,13 +131,13 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb
 
 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
 
-Source11: %{pldistro}-%{kversion}-i686.config
-Source12: %{pldistro}-%{kversion}-x86_64.config
+Source11: %{kernelconfig}-%{kversion}-i686.config
+Source12: %{kernelconfig}-%{kversion}-x86_64.config
 %if %{builduml}
-Source20: %{pldistro}-%{kversion}-i686-uml.config
+Source20: %{kernelconfig}-%{kversion}-i686-uml.config
 %endif
 %if %{buildxen}
-Source30: %{pldistro}-%{kversion}-i686-xenU.config
+Source30: %{kernelconfig}-%{kversion}-i686-xenU.config
 %endif
 
 # Mainline patches
@@ -186,6 +191,7 @@ The kernel package contains the Linux kernel (vmlinuz), the core of any
 Linux operating system.  The kernel handles the basic functions
 of the operating system:  memory allocation, process allocation, device
 input and output, etc.
+Configured with kernelconfig=%{kernelconfig}
 
 %package devel
 Summary: Development package for building kernel modules to match the kernel.
@@ -415,11 +421,11 @@ BuildKernel() {
 
     # Pick the right config file for the kernel we're building
     if [ -n "$Flavour" ] ; then
-      Config=%{pldistro}-%{kversion}-%{_target_cpu}-$Flavour.config
+      Config=%{kernelconfig}-%{kversion}-%{_target_cpu}-$Flavour.config
       DevelDir=/usr/src/kernels/%{KVERREL}-$Flavour-%{_target_cpu}
       DevelLink=/usr/src/kernels/%{KVERREL}$Flavour-%{_target_cpu}
     else
-      Config=%{pldistro}-%{kversion}-%{_target_cpu}.config
+      Config=%{kernelconfig}-%{kversion}-%{_target_cpu}.config
       DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
       DevelLink=
     fi
diff --git a/onelab-2.6.27-i686.config b/onelab-2.6.27-i686.config
deleted file mode 120000 (symlink)
index 83d91e7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-planetlab-2.6.27-i686.config
\ No newline at end of file
diff --git a/onelab-2.6.27-x86_64.config b/onelab-2.6.27-x86_64.config
deleted file mode 120000 (symlink)
index 40b44f1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-planetlab-2.6.27-x86_64.config
\ No newline at end of file