diff options
author | Eric Edgar <rocket@gentoo.org> | 2005-07-25 13:52:14 +0000 |
---|---|---|
committer | Eric Edgar <rocket@gentoo.org> | 2005-07-25 13:52:14 +0000 |
commit | 8e4e996198ec34b010de01817b959477e5665d81 (patch) | |
tree | 57fe51809b649746d25f0ad602853af822b4a223 /gen_package.sh | |
parent | Remove extra checks that fail (diff) | |
download | genkernel-8e4e996198ec34b010de01817b959477e5665d81.tar.gz genkernel-8e4e996198ec34b010de01817b959477e5665d81.tar.bz2 genkernel-8e4e996198ec34b010de01817b959477e5665d81.zip |
Add kernelz- to minkernpackage and kerncache
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@279 67a159dc-881f-0410-a524-ba9dfbe2cb84
Diffstat (limited to 'gen_package.sh')
-rw-r--r-- | gen_package.sh | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/gen_package.sh b/gen_package.sh index eac457c4..80ec71c3 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 |