From: Brad House Date: Tue, 9 Dec 2003 01:30:41 +0000 (+0000) Subject: make friendly with 2.4 X-Git-Tag: v3.4.10.902~747 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b7bfc8cfd18a4125a0df618df5071338010d0d4e;p=genkernel.git make friendly with 2.4 git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@5 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_configkernel.sh b/gen_configkernel.sh index c2936ab..8368645 100644 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -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" diff --git a/gen_determineargs.sh b/gen_determineargs.sh index d968645..6ae2d2a 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -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 diff --git a/genkernel.conf b/genkernel.conf index 3c700aa..5087a0f 100755 --- a/genkernel.conf +++ b/genkernel.conf @@ -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" diff --git a/x86/kernel-config b/x86/kernel-config-2.6 similarity index 100% rename from x86/kernel-config rename to x86/kernel-config-2.6 diff --git a/x86_64/kernel-config b/x86_64/kernel-config-2.6 similarity index 100% rename from x86_64/kernel-config rename to x86_64/kernel-config-2.6