Removed a large chunk of 2.4 kernel support. This will still require some fairly...
authorChris Gianelloni <wolf31o2@gentoo.org>
Mon, 28 Jul 2008 23:31:30 +0000 (16:31 -0700)
committerChris Gianelloni <wolf31o2@gentoo.org>
Mon, 28 Jul 2008 23:31:30 +0000 (16:31 -0700)
ChangeLog
TODO
gen_bootloader.sh
gen_compile.sh
gen_configkernel.sh
gen_determineargs.sh
genkernel

index 57724142e9db5be0f65edc1d1ab08e0e70ebeda3..927384c410940b6f6964e8c6915194ea15099b2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni
 # Distributed under the GPL v2
 
+  28 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> TODO,
+  gen_bootloader.sh, gen_compile.sh, gen_configkernel.sh,
+  gen_determineargs.sh, genkernel:
+  Removed a large chunk of 2.4 kernel support. This will still require some
+  fairly extensive cleaning to completely remove, but I'd say that without a
+  shadow of a doubt, genkernel will not function on 2.4 kernels.
+
   28 Jul 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> genkernel,
   genkernel.8:
   Added a couple more places where I needed to switch INITRD with RAMDISK.
diff --git a/TODO b/TODO
index a8becc1189df148e53720f001836ae2504d6c468..c901351ec320f11ceebe44f85ce42997aafe5cf6 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,7 +2,6 @@
 - Make configs stackable
 - Move modules_load to /etc/genkernel
 - Move main config to /etc/genkernel
-- Remove 2.4 kernel support
 - Refactor code to be more simple and extendable
 - Fix all TODO sections in the code
 - Add all options to genkernel.conf
index a08135c528e7451856bc4c194d34b7d256630aea..17ec15e8e13982e43a91eacd381615df932f3e05 100644 (file)
@@ -74,8 +74,7 @@ EOF
        else
                # grub.conf already exists; so...
                # ... Clone the first boot definition and change the version.
-               local TYPE
-               [ "${KERN_24}" -eq '1' ] && TYPE='rd' || TYPE='ramfs'
+               local TYPE='ramfs'
 
                cp -f ${GRUB_CONF} ${GRUB_CONF}.bak
                awk 'BEGIN { RS="\n"; }
index 80b9a2ed1cbd8a6bed96c33384c2d68ca1c2c782..14488c9dd162ebfd6e21f8010fc085c1e761733d 100644 (file)
@@ -287,31 +287,13 @@ clean_dietlibc_bincache() {
        cd - > /dev/null
 }
 
-compile_dep() {
-       # Only run ``make dep'' for 2.4 kernels
-       if [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ]
-       then
-               print_info 1 "kernel: >> Making dependencies..."
-               cd ${KERNEL_DIR}
-               compile_generic dep kernel
-       fi
-}
-
 compile_modules() {
        print_info 1 "        >> Compiling ${KV} modules..."
        cd ${KERNEL_DIR}
        compile_generic modules kernel
        export UNAME_MACHINE="${ARCH}"
-       # On 2.4 kernels, if MAKEOPTS > -j1 it can cause failures
-       if [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ]
-       then
-               MAKEOPTS_SAVE="${MAKEOPTS}"
-               MAKEOPTS="${MAKEOPTS_SAVE/-j?/-j1}"
-       fi
        [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
        compile_generic "modules_install" kernel
-       [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] && MAKEOPTS="${MAKEOPTS_SAVE}"
-       export MAKEOPTS
        unset UNAME_MACHINE
 }
 
index 6b23a8d088ce672e87fd86205de1ed20bc9ba443..278fc499ea562e1ab5f9b85daaf164e79c4b7dee 100644 (file)
@@ -87,18 +87,15 @@ config_kernel() {
                [ "$?" ] || gen_die 'Error: xconfig failed!'
        fi
 
-       # Force this on if we are a 2.4 kernel or less
-       # This is required for initrd support
-       # Initramfs doesn't require this
-       # TODO: force on with --genzimage
-       if [ "${KERN_24}" -eq '1' ]
+       # Force this on if we are using --genzimage
+       if isTrue ${CMD_GENZIMAGE}
        then
                # Make sure Ext2 support is on...
                sed -e 's/#\? \?CONFIG_EXT2_FS[ =].*/CONFIG_EXT2_FS=y/g' \
                        -i ${KERNEL_DIR}/.config 
        fi
 
-       # Make sure lvm modules are on if --lvm/--lvm
+       # Make sure lvm modules are on if --lvm
        if isTrue ${CMD_LVM}
        then
                sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_BLK_DEV_DM is.*/CONFIG_BLK_DEV_DM=m/g'
index 28f0a3467fee938ae1cb669e6ea71702ec43884b..dbe8fd6f9f067c9022922b3a4c8abeab3bd42613 100644 (file)
@@ -6,24 +6,15 @@ get_KV() {
                /bin/tar -xj -C ${TEMP} -f ${KERNCACHE} kerncache.config 
                if [ -e ${TEMP}/kerncache.config ]
                then
-                       KERN_24=0
                        VER=`grep ^VERSION\ \= ${TEMP}/kerncache.config | awk '{ print $3 };'`
                        PAT=`grep ^PATCHLEVEL\ \= ${TEMP}/kerncache.config | awk '{ print $3 };'`
                        SUB=`grep ^SUBLEVEL\ \= ${TEMP}/kerncache.config | awk '{ print $3 };'`
                        EXV=`grep ^EXTRAVERSION\ \= ${TEMP}/kerncache.config | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
-                       if [ "${PAT}" -gt '4' -a "${VER}" -ge '2' ]
-                       then
-                               LOV=`grep ^CONFIG_LOCALVERSION\= ${TEMP}/kerncache.config | sed -e "s/CONFIG_LOCALVERSION=\"\(.*\)\"/\1/"`
-                               KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
-                       else
-                               KERN_24=1
-                               KV=${VER}.${PAT}.${SUB}${EXV}
-                       fi
-
+                       LOV=`grep ^CONFIG_LOCALVERSION\= ${TEMP}/kerncache.config | sed -e "s/CONFIG_LOCALVERSION=\"\(.*\)\"/\1/"`
+                       KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
                else
                        gen_die "Could not find kerncache.config in the kernel cache! Exiting."
                fi
-
        else
                # Configure the kernel
                # If BUILD_KERNEL=0 then assume --no-clean, menuconfig is cleared
@@ -32,34 +23,27 @@ get_KV() {
                PAT=`grep ^PATCHLEVEL\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'`
                SUB=`grep ^SUBLEVEL\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'`
                EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'`
-               if [ "${PAT}" -gt '4' -a "${VER}" -ge '2' -a -e ${KERNEL_DIR}/.config ]
+               cd ${KERNEL_DIR}
+               #compile_generic prepare kernel > /dev/null 2>&1
+               cd - > /dev/null 2>&1
+               [ -f "${KERNEL_DIR}/include/linux/version.h" ] && \
+                       VERSION_SOURCE="${KERNEL_DIR}/include/linux/version.h"
+               [ -f "${KERNEL_DIR}/include/linux/utsrelease.h" ] && \
+                       VERSION_SOURCE="${KERNEL_DIR}/include/linux/utsrelease.h"
+               # Handle new-style releases where version.h doesn't have UTS_RELEASE
+               if [ -f ${KERNEL_DIR}/include/config/kernel.release ]
+               then
+                       UTS_RELEASE=`cat ${KERNEL_DIR}/include/config/kernel.release`
+                       LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"`
+                       KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
+               elif [ -n "${VERSION_SOURCE}" ]
                then
-                       KERN_24=0
-                       cd ${KERNEL_DIR}
-                       #compile_generic prepare kernel > /dev/null 2>&1
-                       cd - > /dev/null 2>&1
-                       [ -f "${KERNEL_DIR}/include/linux/version.h" ] && \
-                               VERSION_SOURCE="${KERNEL_DIR}/include/linux/version.h"
-                       [ -f "${KERNEL_DIR}/include/linux/utsrelease.h" ] && \
-                               VERSION_SOURCE="${KERNEL_DIR}/include/linux/utsrelease.h"
-                       # Handle new-style releases where version.h doesn't have UTS_RELEASE
-                       if [ -f ${KERNEL_DIR}/include/config/kernel.release ]
-                       then
-                               UTS_RELEASE=`cat ${KERNEL_DIR}/include/config/kernel.release`
-                               LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"`
-                               KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
-                       elif [ -n "${VERSION_SOURCE}" ]
-                       then
-                               UTS_RELEASE=`grep UTS_RELEASE ${VERSION_SOURCE} | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'`
-                               LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"`
-                               KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
-                       else
-                               LCV=`grep ^CONFIG_LOCALVERSION= ${KERNEL_DIR}/.config | sed -r -e "s/.*=\"(.*)\"/\1/"`
-                               KV=${VER}.${PAT}.${SUB}${EXV}${LCV}
-                       fi
+                       UTS_RELEASE=`grep UTS_RELEASE ${VERSION_SOURCE} | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'`
+                       LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"`
+                       KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
                else
-                       KERN_24=1
-                       KV=${VER}.${PAT}.${SUB}${EXV}
+                       LCV=`grep ^CONFIG_LOCALVERSION= ${KERNEL_DIR}/.config | sed -r -e "s/.*=\"(.*)\"/\1/"`
+                       KV=${VER}.${PAT}.${SUB}${EXV}${LCV}
                fi
        fi
 }
index a94dec6aa016db3ca2c2d89584be5162e2ab48a1..77170ed815cfbca54de2de238f053dbf217d5383 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -221,9 +221,6 @@ then
        # Configure kernel
        config_kernel
        
-       # Make deps
-       compile_dep
-
        # Make prepare [2.6]
        if [ "${ARCH_HAVENOPREPARE}" = '' ]
        then