make friendly with 2.4
authorBrad House <brad_mssw@gentoo.org>
Tue, 9 Dec 2003 01:30:41 +0000 (01:30 +0000)
committerBrad House <brad_mssw@gentoo.org>
Tue, 9 Dec 2003 01:30:41 +0000 (01:30 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@5 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_configkernel.sh
gen_determineargs.sh
genkernel.conf
x86/kernel-config-2.6 [moved from x86/kernel-config with 100% similarity]
x86_64/kernel-config-2.6 [moved from x86_64/kernel-config with 100% similarity]

index c2936abfce3117103e31f84f69d05f7f2b45b950..8368645ff328006da27790e0d286977652d3eb8b 100644 (file)
@@ -1,19 +1,27 @@
 #!/bin/bash
 
-config_kernel() {
-       print_info 1 "kernel: configuring source"
+determine_config_file() {
        if [ "${CMD_KERNEL_CONFIG}" != "" ]
        then
                KERNEL_CONFIG="${CMD_KERNEL_CONFIG}"
-       elif [ "${DEFAULT_KERNEL_CONFIG}" != "" ]
+       elif [ "${DEFAULT_KERNEL_CONFIG}" != "" -a -f "${DEFAULT_KERNEL_CONFIG}" ]
        then
                KERNEL_CONFIG="${DEFAULT_KERNEL_CONFIG}"
+       elif [ -f "${GK_SHARE}/${ARCH}/kernel-config-${VER}.${PAT}" ]
+       then
+               KERNEL_CONFIG="${GK_SHARE}/${ARCH}/kernel-config-${VER}.${PAT}"
+       elif [ -f "${GK_SHARE}/${ARCH}/kernel-config" ]
+       then
+               KERNEL_CONFIG="${GK_SHARE}/${ARCH}/kernel-config"
        else
-               gen_die "no kernel config specified"
+               gen_die "no kernel config specified, or file not found"
        fi
+}
 
-       [ ! -f "${KERNEL_CONFIG}" ] && gen_die "kernel config not found at specified location"
+config_kernel() {
+       print_info 1 "kernel: configuring source"
 
+       determine_config_file
 
        cd "${KERNEL_DIR}" || gen_die "could not switch to kernel directory"
 
index d968645c5592fa768dfc47cceb8112f2fe87991b..6ae2d2a4c5fb76101507f2080cf05dab5f58d8ce 100644 (file)
@@ -1,7 +1,8 @@
 #!/bin/bash
 
 get_KV() {
-       local VER
+# don't want VER local anymore, used when finding kernelconfig to use
+#      local VER
 # don't want PAT local anymore, used in initrd
 #      local PAT
        local SUB
index 3c700aab0039a659ba418c7a82a7790a4c905492..5087a0f9cebd9e06512ca16caef0664b1458b127 100755 (executable)
@@ -47,8 +47,8 @@ DEBUGLEVEL=1
 
 # Default location of kernel source
 DEFAULT_KERNEL_SOURCE="/usr/src/linux"
-# Default kernel config
-DEFAULT_KERNEL_CONFIG="${GK_SHARE}/%%ARCH%%/kernel-config"
+# Default kernel config (only use to override using %%ARCH%%/kernel-config-${VER}.${PAT} !)
+DEFAULT_KERNEL_CONFIG="${GK_SHARE}/%%ARCH%%/kernel-config"
 
 # Configuration file for busybox
 BUSYBOX_CONFIG="${GK_SHARE}/%%ARCH%%/busy-config"
similarity index 100%
rename from x86/kernel-config
rename to x86/kernel-config-2.6