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 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $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: 07 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> gen_arch.sh:
Added a simple patch from Andrew Gaffney <agaffney@gentoo.org> to ensure Added a simple patch from Andrew Gaffney <agaffney@gentoo.org> to ensure
that we export ARCH before running menuconfig. This is from bug #190327. 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 Thanks to Robin H. Johnson <robbat2@gentoo.org> for suggesting the changes
and testing. and testing.
02 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> ++, gen_initramfs.sh, 02 Nov 2007; Chris Gianelloni <wolf31o2@gentoo.org> +generic/modprobe,
gen_initrd.sh, genkernel: gen_initramfs.sh, gen_initrd.sh, genkernel:
Reverting the removal of generic/modprobe for bug #197730. This is genkernel Reverting the removal of generic/modprobe for bug #197730. This is genkernel
3.4.9_pre6 for testing. 3.4.9_pre6 for testing.

@ -464,8 +464,8 @@ parse_cmdline() {
--genzimage) --genzimage)
KERNEL_MAKE_DIRECTIVE_2='zImage.initrd' KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd' KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
GENERATE_Z_IMAGE=1 ENABLE_PEGASOS_HACKS="yes"
print_info 2 "GENERATE_Z_IMAGE: ${GENERATE_Z_IMAGE}" print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}"
;; ;;
--disklabel) --disklabel)
CMD_DISKLABEL=1 CMD_DISKLABEL=1

@ -305,7 +305,7 @@ compile_kernel() {
"System.map" \ "System.map" \
"System.map-${KNAME}-${ARCH}-${KV}" "System.map-${KNAME}-${ARCH}-${KV}"
if [ "${KERNEL_BINARY_2}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ] if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
then then
copy_image_with_preserve "kernelz" \ copy_image_with_preserve "kernelz" \
"${KERNEL_BINARY_2}" \ "${KERNEL_BINARY_2}" \
@ -316,7 +316,7 @@ compile_kernel() {
gen_die "Could not copy the kernel binary to ${TMPDIR}!" gen_die "Could not copy the kernel binary to ${TMPDIR}!"
cp "System.map" "${TMPDIR}/System.map-${KNAME}-${ARCH}-${KV}" || cp "System.map" "${TMPDIR}/System.map-${KNAME}-${ARCH}-${KV}" ||
gen_die "Could not copy System.map to ${TMPDIR}!" gen_die "Could not copy System.map to ${TMPDIR}!"
if [ "${KERNEL_BINARY_2}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ] if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
then then
cp "${KERNEL_BINARY_2}" "${TMPDIR}/kernelz-${KV}" || cp "${KERNEL_BINARY_2}" "${TMPDIR}/kernelz-${KV}" ||
gen_die "Could not copy the kernelz binary to ${TMPDIR}!" gen_die "Could not copy the kernelz binary to ${TMPDIR}!"

@ -475,21 +475,21 @@ create_initramfs() {
gzip -9 "${CPIO}" gzip -9 "${CPIO}"
mv -f "${CPIO}.gz" "${CPIO}" mv -f "${CPIO}.gz" "${CPIO}"
# Pegasos hack for merging the initramfs into the kernel at compile time if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
[ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] || then
[ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] && # Pegasos hack for merging the initramfs into the kernel at compile time
cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/powerpc/boot/ramdisk.image.gz && cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/powerpc/boot/ramdisk.image.gz &&
rm ${TMPDIR}/initramfs-${KV} rm ${TMPDIR}/initramfs-${KV}
elif [ ${BUILD_INITRAMFS} -eq 1 ]
# Mips also mimics Pegasos to merge the initramfs into the kernel then
if [ ${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 cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/initramfs.cpio.gz
gunzip -f ${KERNEL_DIR}/initramfs.cpio.gz gunzip -f ${KERNEL_DIR}/initramfs.cpio.gz
fi fi
if ! isTrue "${CMD_NOINSTALL}" if ! isTrue "${CMD_NOINSTALL}"
then then
if [ "${GENERATE_Z_IMAGE}" != '1' ] if [ "${ENABLE_PEGASOS_HACKS}" != 'yes' ]
then then
copy_image_with_preserve "initramfs" \ copy_image_with_preserve "initramfs" \
"${TMPDIR}/initramfs-${KV}" \ "${TMPDIR}/initramfs-${KV}" \

@ -384,13 +384,10 @@ create_initrd() {
"initrd-${KNAME}-${ARCH}-${KV}" "initrd-${KNAME}-${ARCH}-${KV}"
fi fi
# Pegasos hack for merging the initrd into the kernel at compile time if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
[ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] || then
[ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] && # 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 && cp ${TMPDIR}/initrd-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz &&
rm ${TMPDIR}/initrd-${KV} rm ${TMPDIR}/initrd-${KV}
fi
# 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
} }

@ -7,36 +7,35 @@ gen_minkernpackage()
mkdir "${TEMP}/minkernpackage" || gen_die 'Could not make a directory for the kernel package!' mkdir "${TEMP}/minkernpackage" || gen_die 'Could not make a directory for the kernel package!'
if [ "${CMD_KERNCACHE}" != "" ] if [ "${CMD_KERNCACHE}" != "" ]
then then
/bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernel-${ARCH}-${KV} /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernel-${ARCH}-${KV}
/bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} config-${ARCH}-${KV} /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} config-${ARCH}-${KV}
if [ "${KERNEL_BINARY_2}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ] if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
then then
/bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernelz-${ARCH}-${KV} /bin/tar -xj -C ${TEMP}/minkernpackage -f ${CMD_KERNCACHE} kernelz-${ARCH}-${KV}
fi fi
else else
cd "${KERNEL_DIR}" cd "${KERNEL_DIR}"
cp "${KERNEL_BINARY}" "${TEMP}/minkernpackage/kernel-${KV}" || gen_die 'Could not the copy kernel for the min kernel package!' 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!' 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' ] if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' ]
then then
cp "${KERNEL_BINARY_2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package" cp "${KERNEL_BINARY_2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package"
fi fi
fi fi
if [ "${GENERATE_Z_IMAGE}" != '1' ] if [ "${ENABLE_PEGASOS_HACKS}" != 'yes' ]
then then
if [ "${KERN_24}" != '1' ] if [ "${KERN_24}" != '1' ]
then 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!'; } [ "${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 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!'; } [ "${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
fi fi
if [ "${CMD_KERNCACHE}" != "" ] if [ "${CMD_KERNCACHE}" != "" ]
then 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 else
cp "${KERNEL_DIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!'; cp "${KERNEL_DIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!';
fi 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_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}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}"
cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${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 then
cp "${KERNEL_BINARY_2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package" cp "${KERNEL_BINARY_2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package"
fi fi
@ -95,17 +94,17 @@ gen_kerncache()
gen_kerncache_extract_kernel() gen_kerncache_extract_kernel()
{ {
/bin/tar -f ${KERNCACHE} -C ${TEMP} -xj /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj
copy_image_with_preserve "kernel" \ copy_image_with_preserve "kernel" \
"${TEMP}/kernel-${ARCH}-${KV}" \ "${TEMP}/kernel-${ARCH}-${KV}" \
"kernel-${KNAME}-${ARCH}-${KV}" "kernel-${KNAME}-${ARCH}-${KV}"
if [ "${KERNEL_BINARY_2}" != '' -a "${GENERATE_Z_IMAGE}" = '1' ] if [ "${ENABLE_PEGASOS_HACKS}" = 'yes']
then then
copy_image_with_preserve "kernelz" \ copy_image_with_preserve "kernelz" \
"${TEMP}/kernelz-${ARCH}-${KV}" \ "${TEMP}/kernelz-${ARCH}-${KV}" \
"kernelz-${KNAME}-${ARCH}-${KV}" "kernelz-${KNAME}-${ARCH}-${KV}"
fi fi
copy_image_with_preserve "System.map" \ copy_image_with_preserve "System.map" \
"${TEMP}/System.map-${ARCH}-${KV}" \ "${TEMP}/System.map-${ARCH}-${KV}" \

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
PATH="/bin:/usr/bin:/sbin:/usr/sbin" 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 # Set the default for TMPDIR. May be modified by genkernel.conf or the
# --tempdir command line option. # --tempdir command line option.
@ -231,7 +231,7 @@ then
# Compile kernel; If using --genzimage, or building a mips kernel, skip compile # Compile kernel; If using --genzimage, or building a mips kernel, skip compile
# till after initrd/initramfs is done # 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 # Compile modules
if [ ${BUILD_MODULES} -eq 1 -a ${BUILD_STATIC} -eq 0 ] if [ ${BUILD_MODULES} -eq 1 -a ${BUILD_STATIC} -eq 0 ]
@ -247,7 +247,7 @@ then
fi fi
if [ "${KERNCACHE}" != "" ] if [ "${KERNCACHE}" != "" ]
then then
if [ "${GENERATE_Z_IMAGE}" = '' -a ${BUILD_INITRAMFS} -eq 0 ] if [ "${ENABLE_PEGASOS_HACKS}" != 'yes' -a ${BUILD_INITRAMFS} -eq 0 ]
then then
gen_kerncache gen_kerncache
fi fi
@ -331,7 +331,7 @@ else
fi fi
# Pegasos fix # Pegasos fix
if [ "${GENERATE_Z_IMAGE}" != '' -o ${BUILD_INITRAMFS} -eq 1 ] if [ "${ENABLE_PEGASOS_HACKS}" = 'yes' -o ${BUILD_INITRAMFS} -eq 1 ]
then then
# Compile kernel, intergrating the initrd into it for Pegasos & mips # Compile kernel, intergrating the initrd into it for Pegasos & mips
compile_kernel compile_kernel

Loading…
Cancel
Save