Add kernelz- to minkernpackage and kerncache
authorEric Edgar <rocket@gentoo.org>
Mon, 25 Jul 2005 13:52:14 +0000 (13:52 +0000)
committerEric Edgar <rocket@gentoo.org>
Mon, 25 Jul 2005 13:52:14 +0000 (13:52 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@279 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_determineargs.sh
gen_package.sh
genkernel

index 32f916ce91714a5408c905bbe1abf0dbb7a1a840..102a6c9a30053656cdc5970e02721074140c4ca6 100644 (file)
@@ -3,6 +3,10 @@
 get_KV() {
        if [ "${CMD_NO_KERNEL_SOURCES}" = '1' -a -e "${CMD_KERNCACHE}" ]
        then
+               #[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
+               #(umask 077 && mkdir ${TEMP}) || {
+               #       gen_die "Could not create temporary directory! Exiting."
+               #}
                /bin/tar -xj -C ${TEMP} -f ${CMD_KERNCACHE} kerncache.config 
                if [ -e ${TEMP}/kerncache.config ]
                then
@@ -21,8 +25,10 @@ get_KV() {
                        fi
 
                else
+                       #rm -r ${TEMP}
                        gen_die "Could not find kerncache.config in the kernel cache! Exiting."
                fi
+               #rm -r ${TEMP}
 
        else
                # Configure the kernel
index eac457c48fab4ecd325b464b3573ec9112451658..80ec71c3cb00ec637adb3c56fddcc6f91d2c313a 100644 (file)
@@ -9,10 +9,19 @@ gen_minkernpackage()
        then
            /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernel-${ARCH}-${KV}
            /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} config-${ARCH}-${KV}
+           if [ "${KERNEL_BINARY_2}" != '' ]
+            then
+               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernelz-${ARCH}-${KV}
+            fi
        else
            cd "${KERNEL_DIR}"
            cp "${KERNEL_BINARY}" "${TEMP}/minkernpackage/kernel-${KV}" || gen_die 'Could not the copy kernel for the min kernel package!'
            cp ".config" "${TEMP}/minkernpackage/config-${ARCH}-${KV}" || gen_die 'Could not the copy kernel config for the min kernel package!'
+           if [ "${KERNEL_BINARY_2}" != '' ]
+            then
+               cp "${KERNEL_BINARY_2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package"
+            fi
+
        fi
        if [ "${KERN_24}" != '1' -a  "${CMD_BOOTSPLASH}" != '1' ]
        then
@@ -50,6 +59,10 @@ gen_kerncache()
        cp "${KERNEL_BINARY}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!'
        cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}"
        cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}"
+       if [ "${KERNEL_BINARY_2}" != '' ]
+        then
+               cp "${KERNEL_BINARY_2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package"
+        fi
        
        echo "VERSION = ${VER}" > "${TEMP}/kerncache/kerncache.config"
        echo "PATCHLEVEL = ${PAT}" >> "${TEMP}/kerncache/kerncache.config"
@@ -70,15 +83,17 @@ gen_kerncache()
 
 gen_kerncache_extract_kernel()
 {
+       #[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
+       #(umask 077 && mkdir ${TEMP}) || {
+       #    gen_die "Could not create temporary directory! Exiting."
+       #}
                /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj 
-       cp "${TEMP}/kernel-${ARCH}-${KV}" "/boot/kernel-${KNAME}-${ARCH}-${KV}" || {
-               gen_die 'Could not copy the kernel binary to /boot!'
-               }
-        cp "${TEMP}/System.map-${ARCH}-${KV}" "/boot/System.map-${KNAME}-${ARCH}-${KV}" || {
-               gen_die 'Could not copy System.map to /boot!'
-               }
-       rm -r ${TEMP}
-}
+       cp "${TEMP}/kernel-${ARCH}-${KV}" "/boot/kernel-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy the kernel binary to /boot!'
+       if [ "${KERNEL_BINARY_2}" != '' ]
+        then
+               cp "${TEMP}/kernelz-${ARCH}-${KV}" "/boot/kernelz-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy the kernel binary to /boot!'
+        fi
+        cp "${TEMP}/System.map-${ARCH}-${KV}" "/boot/System.map-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy System.map to /boot!'
 
 gen_kerncache_extract_modules()
 {
@@ -102,6 +117,10 @@ gen_kerncache_is_valid()
                
                BUILD_KERNEL=0
                # Can make this more secure ....
+               #[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
+               #(umask 077 && mkdir ${TEMP}) || {
+               #    gen_die "Could not create temporary directory! Exiting."
+               #}
                
                /bin/tar -xj -f ${KERNCACHE} -C ${TEMP}
                if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ] 
@@ -109,9 +128,16 @@ gen_kerncache_is_valid()
                        print_info 1 'Valid kernel cache found; no sources will be used'
                        KERNCACHE_IS_VALID=1
                fi
+               #/bin/rm -r ${TEMP}
         else
                if [ -e "${KERNCACHE}" ] 
                then
+                       #[ -d ${TEMP} ] && gen_die "temporary directory already exists! Exiting."
+                       #(umask 077 && mkdir ${TEMP}) || {
+                       #    gen_die "Could not create temporary directory! Exiting."
+                       #    
+                       #}
+               
                        /bin/tar -xj -f ${KERNCACHE} -C ${TEMP}
                        if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e /${KERNEL_DIR}/.config ]
                        then
@@ -127,6 +153,7 @@ gen_kerncache_is_valid()
                                        KERNCACHE_IS_VALID=1
                                fi
                        fi
+                       #/bin/rm -r ${TEMP}
                fi
        fi
        export KERNCACHE_IS_VALID       
index ac634305d09f794e1fb2d63bac3f103deee59dce..0f5568cd4a2710e6c87f8238f2ab4e1749f6fa86 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -2,7 +2,7 @@
 # Genkernel v3
 
 PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.2.7'
+GK_V='3.2.12'
 
 TMPDIR='/var/tmp/genkernel'
 TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.