View | Details | Raw Unified
Collapse All | Expand All

(-) genkernel.orig/trunk/gen_cmdline.sh (-2 / +2 lines)
 Lines 459-466   parse_cmdline() { Link Here 
		--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
(-) genkernel.orig/trunk/gen_compile.sh (-2 / +2 lines)
 Lines 307-313   compile_kernel() { Link Here 
			"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}" \
 Lines 318-324   compile_kernel() { Link Here 
			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}!"
(-) genkernel.orig/trunk/gen_initramfs.sh (-7 / +7 lines)
 Lines 456-476   create_initramfs() { Link Here 
	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}" \
(-) genkernel.orig/trunk/gen_initrd.sh (-7 / +4 lines)
 Lines 384-396   create_initrd() { Link Here 
			"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
}
}
(-) genkernel.orig/trunk/gen_package.sh (-28 / +27 lines)
 Lines 7-42   gen_minkernpackage() Link Here 
	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
 Lines 71-77   gen_kerncache() Link Here 
	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
 Lines 95-111   gen_kerncache() Link Here 
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}" \
(-) genkernel.orig/trunk/genkernel (-3 / +3 lines)
 Lines 232-238   then Link Here 
	# 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 ]
 Lines 248-254   then Link Here 
	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
 Lines 332-338   else Link Here 
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