Added a patch from Joshua Kinard <kumba@gentoo.org> to clean up the Pegasos hacks...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 7 Nov 2007 20:44:02 +0000 (20:44 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 7 Nov 2007 20:44:02 +0000 (20:44 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@554 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
gen_cmdline.sh
gen_compile.sh
gen_initramfs.sh
gen_initrd.sh
gen_package.sh
genkernel

index dac3c33a3dfe3a26c87c41cda7451b92eb669880..4f4ac3cce4e02da17b5fdaa6e5bc354b394f6573 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  07 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_cmdline.sh,
+  gen_compile.sh, gen_initramfs.sh, gen_initrd.sh, gen_package.sh,
+  genkernel:
+  Added a patch from Joshua Kinard <kumba@gentoo.org> to clean up the Pegasos
+  hacks in genkernel. This is from bug #193826. This is genkernel 3.4.9_pre7
+  for testing.
+
   07 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_arch.sh:
   Added a simple patch from Andrew Gaffney <agaffney@gentoo.org> to ensure
   that we export ARCH before running menuconfig. This is from bug #190327.
@@ -13,8 +20,8 @@
   Thanks to Robin H. Johnson <robbat2@gentoo.org> for suggesting the changes
   and testing.
 
-  02 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> ++, gen_initramfs.sh,
-  gen_initrd.sh, genkernel:
+  02 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> +generic/modprobe,
+  gen_initramfs.sh, gen_initrd.sh, genkernel:
   Reverting the removal of generic/modprobe for bug #197730. This is genkernel
   3.4.9_pre6 for testing.
 
index 60e78d0a6d4b3e85e6a26ba88aa76c4861535f66..86f3d33f534bbe3d7a5d3a6253b76e9de49d96ce 100755 (executable)
@@ -464,8 +464,8 @@ parse_cmdline() {
                --genzimage)
                        KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
                        KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
-                       GENERATE_Z_IMAGE=1
-                       print_info 2 "GENERATE_Z_IMAGE: ${GENERATE_Z_IMAGE}"
+                       ENABLE_PEGASOS_HACKS="yes"
+                       print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}"
                        ;;
                --disklabel)
                        CMD_DISKLABEL=1
index 333d19197f2e0dbf5de629be69c548da58043d42..809679b87be7cc0e46fc5559438a68bb27fa000c 100644 (file)
@@ -305,7 +305,7 @@ compile_kernel() {
                        "System.map" \
                        "System.map-${KNAME}-${ARCH}-${KV}"
 
-               if [ "${KERNEL_BINARY_2}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ]
+               if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
                then
                        copy_image_with_preserve "kernelz" \
                                "${KERNEL_BINARY_2}" \
@@ -316,7 +316,7 @@ compile_kernel() {
                        gen_die "Could not copy the kernel binary to ${TMPDIR}!"
                cp "System.map" "${TMPDIR}/System.map-${KNAME}-${ARCH}-${KV}" ||
                        gen_die "Could not copy System.map to ${TMPDIR}!"
-               if [ "${KERNEL_BINARY_2}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ]
+               if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
                then
                        cp "${KERNEL_BINARY_2}" "${TMPDIR}/kernelz-${KV}" ||
                                gen_die "Could not copy the kernelz binary to ${TMPDIR}!"
index 852b129bff33ff6efc57d2fcbc40e41552e700a9..ff625bded45bb903aa42a83b7c140f73f48bed2a 100644 (file)
@@ -475,21 +475,21 @@ create_initramfs() {
        gzip -9 "${CPIO}"
        mv -f "${CPIO}.gz" "${CPIO}"
 
-       # Pegasos hack for merging the initramfs into the kernel at compile time
-       [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] ||
-               [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] &&
+       if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
+       then
+                       # Pegasos hack for merging the initramfs into the kernel at compile time
                        cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/powerpc/boot/ramdisk.image.gz &&
                        rm ${TMPDIR}/initramfs-${KV}
-
-       # Mips also mimics Pegasos to merge the initramfs into the kernel
-       if [ ${BUILD_INITRAMFS} -eq 1 ]; then
+       elif [ ${BUILD_INITRAMFS} -eq 1 ]
+       then
+               # Mips also mimics Pegasos to merge the initramfs into the kernel
                cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/initramfs.cpio.gz
                gunzip -f ${KERNEL_DIR}/initramfs.cpio.gz
        fi
 
        if ! isTrue "${CMD_NOINSTALL}"
        then
-               if [ "${GENERATE_Z_IMAGE}" != '1' ]
+               if [ "${ENABLE_PEGASOS_HACKS}" != 'yes' ]
                then
                        copy_image_with_preserve "initramfs" \
                                "${TMPDIR}/initramfs-${KV}" \
index 072e73879e9978274136714b16c6382742014620..5a5e162c7550607671ed1ba22def6e43b26c9ca6 100644 (file)
@@ -384,13 +384,10 @@ create_initrd() {
                        "initrd-${KNAME}-${ARCH}-${KV}"
        fi
 
-       # Pegasos hack for merging the initrd into the kernel at compile time
-       [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] ||
-               [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] &&
+        if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
+        then
+               # Pegasos hack for merging the initramfs into the kernel at compile time
                cp ${TMPDIR}/initrd-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz &&
                rm ${TMPDIR}/initrd-${KV}
-
-       # Mips also mimics Pegasos to merge the initrd into the kernel
-       [ ${BUILD_INITRAMFS} -eq 1 ] \
-               && cp ${TMPDIR}/initrd-${KV} ${KERNEL_DIR}/mips/ramdisk/initrd.img.gz
+       fi
 }
index 3b7c281a7a5a1fdf72e03c6307a9498e8ea65183..44897f0ee5a95f02e6ea28821b6d97db3ce3c0f0 100644 (file)
@@ -7,36 +7,35 @@ gen_minkernpackage()
        mkdir "${TEMP}/minkernpackage" || gen_die 'Could not make a directory for the kernel package!'
        if [ "${CMD_KERNCACHE}" != "" ]
        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}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ]
-            then
-               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernelz-${ARCH}-${KV}
-            fi
+               /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 [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
+               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}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ]
-            then
-               cp "${KERNEL_BINARY_2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package"
-            fi
-
+               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 [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
+               then
+                       cp "${KERNEL_BINARY_2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package"
+               fi
        fi
        
-       if [ "${GENERATE_Z_IMAGE}" != '1' ]
+       if [ "${ENABLE_PEGASOS_HACKS}" != 'yes' ]
        then
-           if [ "${KERN_24}" != '1' ]
-           then
-                   [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; }
-           else
-                   [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initrd-${KV}" "${TEMP}/minkernpackage/initrd-${ARCH}-${KV}" || gen_die 'Could not copy the initrd for the kernel package!'; }
-           fi
+               if [ "${KERN_24}" != '1' ]
+               then
+                       [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; }
+               else
+                       [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initrd-${KV}" "${TEMP}/minkernpackage/initrd-${ARCH}-${KV}" || gen_die 'Could not copy the initrd for the kernel package!'; }
+               fi
        fi
 
        if [ "${CMD_KERNCACHE}" != "" ]
        then
-           /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} System.map-${ARCH}-${KV}
+               /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} System.map-${ARCH}-${KV}
        else
                cp "${KERNEL_DIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!';
        fi
@@ -71,7 +70,7 @@ 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}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ]
+       if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
         then
                cp "${KERNEL_BINARY_2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package"
         fi
@@ -95,17 +94,17 @@ gen_kerncache()
 
 gen_kerncache_extract_kernel()
 {
-    /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj 
+       /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj 
        copy_image_with_preserve "kernel" \
                "${TEMP}/kernel-${ARCH}-${KV}" \
                "kernel-${KNAME}-${ARCH}-${KV}"
 
-       if [ "${KERNEL_BINARY_2}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ]
-    then
+       if [ "${ENABLE_PEGASOS_HACKS}" = 'yes']
+       then
                copy_image_with_preserve "kernelz" \
                        "${TEMP}/kernelz-${ARCH}-${KV}" \
                        "kernelz-${KNAME}-${ARCH}-${KV}"
-    fi
+       fi
     
        copy_image_with_preserve "System.map" \
                "${TEMP}/System.map-${ARCH}-${KV}" \
index 422418808456ce53d4ef15d8b2015e0fb6561460..bcc8fc519bcb17a769b9afd3d7e1e1655ea899fc 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.4.9_pre6'
+GK_V='3.4.9_pre7'
 
 # Set the default for TMPDIR.  May be modified by genkernel.conf or the
 # --tempdir command line option.
@@ -231,7 +231,7 @@ then
 
        # Compile kernel; If using --genzimage, or building a mips kernel, skip compile
        # till after initrd/initramfs is done
-       [ "${GENERATE_Z_IMAGE}" = '' -a ${BUILD_INITRAMFS} -eq 0 ] && compile_kernel
+       [ "${ENABLE_PEGASOS_HACKS}" != 'yes' -a ${BUILD_INITRAMFS} -eq 0 ] && compile_kernel
 
        # Compile modules
        if [ ${BUILD_MODULES} -eq 1 -a ${BUILD_STATIC} -eq 0 ]
@@ -247,7 +247,7 @@ then
        fi
        if [ "${KERNCACHE}" != "" ]
        then
-               if [ "${GENERATE_Z_IMAGE}" = '' -a ${BUILD_INITRAMFS} -eq 0 ]
+               if [ "${ENABLE_PEGASOS_HACKS}" != 'yes' -a ${BUILD_INITRAMFS} -eq 0 ]
                then
                        gen_kerncache
                fi
@@ -331,7 +331,7 @@ else
 fi
 
 # Pegasos fix
-if [ "${GENERATE_Z_IMAGE}" != '' -o ${BUILD_INITRAMFS} -eq 1 ]
+if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' -o ${BUILD_INITRAMFS} -eq 1 ]
 then
        # Compile kernel, intergrating the initrd into it for Pegasos & mips
        compile_kernel