summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad House <brad_mssw@gentoo.org>2004-01-28 02:36:39 +0000
committerBrad House <brad_mssw@gentoo.org>2004-01-28 02:36:39 +0000
commit554a695c9c31d0db3298dadb656b0b5a0fbcc6c9 (patch)
tree6dae3c4519ea94d8c27a3577fce9c8b5383e6eb5 /gen_configkernel.sh
parentnew default config, works well with gentoo-sources (diff)
downloadgenkernel-554a695c9c31d0db3298dadb656b0b5a0fbcc6c9.tar.gz
genkernel-554a695c9c31d0db3298dadb656b0b5a0fbcc6c9.tar.bz2
genkernel-554a695c9c31d0db3298dadb656b0b5a0fbcc6c9.zip
misc fixes in relation to kernel configs
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@59 67a159dc-881f-0410-a524-ba9dfbe2cb84
Diffstat (limited to 'gen_configkernel.sh')
-rw-r--r--gen_configkernel.sh22
1 files changed, 15 insertions, 7 deletions
diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index bcaff5a8..69307ef3 100644
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -4,6 +4,12 @@ determine_config_file() {
if [ "${CMD_KERNEL_CONFIG}" != "" ]
then
KERNEL_CONFIG="${CMD_KERNEL_CONFIG}"
+ elif [ -f "/etc/kernels/kernel-config-${ARCH}-${KV}" ]
+ then
+ KERNEL_CONFIG="/etc/kernels/kernel-config-${ARCH}-${KV}"
+ elif [ -f "${GK_SHARE}/${ARCH}/kernel-config-${KV}" ]
+ then
+ KERNEL_CONFIG="${GK_SHARE}/${ARCH}/kernel-config-${KV}"
elif [ "${DEFAULT_KERNEL_CONFIG}" != "" -a -f "${DEFAULT_KERNEL_CONFIG}" ]
then
KERNEL_CONFIG="${DEFAULT_KERNEL_CONFIG}"
@@ -35,22 +41,24 @@ config_kernel() {
# or we might screw up something someone is trying to test.
if isTrue ${CLEAN}
then
- print_info 1 "kernel: using config from ${KERNEL_CONFIG}"
+ print_info 1 "kernel: using config from ${KERNEL_CONFIG} -- prev backed up to .config.bak"
cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die "could not copy config file"
+ cp "${KERNEL_DIR}/.config" "${KERNEL_DIR}/.config.bak" > /dev/null 2>&1
print_info 1 "kernel: running oldconfig"
yes "" | compile_generic "oldconfig" kernel
- if isTrue ${MENUCONFIG}
- then
- print_info 1 "kernel: running menuconfig"
- make menuconfig
- fi
-
print_info 1 "kernel: running clean"
compile_generic "clean" kernel
else
print_info 1 "kernel: skipping copy of config. CLEAN is OFF"
fi
+
+ if isTrue ${MENUCONFIG}
+ then
+ print_info 1 "kernel: running menuconfig"
+ make menuconfig
+ [ "$?" != "0" ] && gen_die "menuconfig failed"
+ fi
}