From: Eric Edgar Date: Mon, 25 Jul 2005 13:52:14 +0000 (+0000) Subject: Add kernelz- to minkernpackage and kerncache X-Git-Tag: v3.4.10.902~473 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8e4e996198ec34b010de01817b959477e5665d81;p=genkernel.git Add kernelz- to minkernpackage and kerncache git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@279 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 32f916c..102a6c9 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -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 diff --git a/gen_package.sh b/gen_package.sh index eac457c..80ec71c 100644 --- a/gen_package.sh +++ b/gen_package.sh @@ -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 diff --git a/genkernel b/genkernel index ac63430..0f5568c 100755 --- 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.