From: Eric Edgar Date: Mon, 21 Nov 2005 17:01:26 +0000 (+0000) Subject: Fix missing moddeps file by adding a test;Do not keep the initrd/initramfs with a... X-Git-Tag: v3.4.10.902~428 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6875046a4c2effe4041a5d5345ee88b944202bec;p=genkernel.git Fix missing moddeps file by adding a test;Do not keep the initrd/initramfs with a kernelz system as it is already bundled together. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@324 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 736a652..348a730 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -516,6 +516,7 @@ merge_initramfs_cpio_archives(){ [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] || [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] && cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz + rm ${TMPDIR}/initramfs-${KV} # Mips also mimics Pegasos to merge the initramfs into the kernel if [ "${MIPS_EMBEDDED_IMAGE}" != '' ]; then diff --git a/gen_initrd.sh b/gen_initrd.sh index 25058fc..d3b94fe 100644 --- a/gen_initrd.sh +++ b/gen_initrd.sh @@ -398,6 +398,7 @@ create_initrd() { [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] || [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] && 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 [ "${MIPS_EMBEDDED_IMAGE}" != '' ] \ diff --git a/gen_moddeps.sh b/gen_moddeps.sh index 840b2ca..a699e66 100644 --- a/gen_moddeps.sh +++ b/gen_moddeps.sh @@ -62,5 +62,8 @@ gen_dep_list() done # Only list each module once - cat ${TEMP}/moddeps | sort | uniq + if [ -f ${TEMP}/moddeps ] + then + cat ${TEMP}/moddeps | sort | uniq + fi } diff --git a/gen_package.sh b/gen_package.sh index f6391bd..86c8f75 100644 --- a/gen_package.sh +++ b/gen_package.sh @@ -23,12 +23,17 @@ gen_minkernpackage() fi fi - if [ "${KERN_24}" != '1' -a "${CMD_BOOTSPLASH}" != '1' ] + + if [ "${GENERATE_Z_IMAGE}" != '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!'; } + if [ "${KERN_24}" != '1' -a "${CMD_BOOTSPLASH}" != '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 + cd "${TEMP}/minkernpackage" /bin/tar -jcpf ${MINKERNPACKAGE} * || gen_die 'Could not compress the kernel package!' cd "${TEMP}" && rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1