[ "${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
[ "${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}" != '' ] \
done
# Only list each module once
- cat ${TEMP}/moddeps | sort | uniq
+ if [ -f ${TEMP}/moddeps ]
+ then
+ cat ${TEMP}/moddeps | sort | uniq
+ fi
}
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