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.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@554 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 17 years ago
parent 77598a72d7
commit d0667a6beb

@ -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.

@ -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

@ -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}!"

@ -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}" \

@ -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
}

@ -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}" \

@ -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

Loading…
Cancel
Save