echo " --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
echo " No modules outside of the initrd will be"
echo " included..."
+ echo " --maxkernpackage=<tbz2> File to output a .tar.bz2'd kernel,initrd,"
+ echo " contents of /lib/modules/ and the kernel config"
}
usage() {
CMD_MINKERNPACKAGE=`parse_opt "$*"`
print_info 2 "MINKERNPACKAGE: $CMD_MINKERNPACKAGE"
;;
+ --maxkernpackage=*)
+ CMD_MAXKERNPACKAGE=`parse_opt "$*"`
+ print_info 2 "MAXKERNPACKAGE: $CMD_MAXKERNPACKAGE"
+ ;;
--linuxrc=*)
CMD_LINUXRC=`parse_opt "$*"`
print_info 2 "CMD_LINUXRC: $CMD_LINUXRC"
MINKERNPACKAGE="${CMD_MINKERNPACKAGE}"
fi
+ if [ "${CMD_MAXKERNPACKAGE}" != '' ]
+ then
+ MAXKERNPACKAGE="${CMD_MAXKERNPACKAGE}"
+ fi
+
if [ "${CMD_NOINITRDMODULES}" != '' ]
then
NOINITRDMODULES="${CMD_NOINITRDMODULES}"
gen_minkernpackage()
{
- print_info 1 'Creating kernel package'
+ print_info 1 'Creating minimal kernel package'
rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1
mkdir "${TEMP}/minkernpackage" || gen_die 'Could not make a directory for the kernel package!'
cd "${KERNEL_DIR}"
tar -jcpf ${MINKERNPACKAGE} * || gen_die 'Could not compress the kernel package!'
cd "${TEMP}" && rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1
}
+
+gen_maxkernpackage()
+{
+ print_info 1 'Creating maximum kernel package'
+ rm -rf "${TEMP}/maxkernpackage" > /dev/null 2>&1
+ mkdir "${TEMP}/maxkernpackage" || gen_die 'Could not make a directory for the kernel package!'
+ cd "${KERNEL_DIR}"
+ cp "${KERNEL_BINARY}" "${TEMP}/maxkernpackage/kernel-${KV}" || gen_die 'Could not the copy kernel for the kernel package!'
+ [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TEMP}/initrd-${KV}" "${TEMP}/maxkernpackage/initrd-${KV}" || gen_die 'Could not copy the initrd for the kernel package!'; }
+ cp "${KERNEL_DIR}/.config" "${TEMP}/maxkernpackage/kernel-config-${ARCH}-${KV}"
+ mkdir -p "${TEMP}/maxkernpackage/lib/modules/"
+ cp -r "/lib/modules/${KV}" "${TEMP}/maxkernpackage/lib/modules/"
+ cd "${TEMP}/maxkernpackage"
+ tar -jcpf ${MAXKERNPACKAGE} * || gen_die 'Could not compress the kernel package!'
+ cd "${TEMP}" && rm -rf "${TEMP}/maxkernpackage" > /dev/null 2>&1
+}
print_info 1 'initrd: Not building since only the kernel was requested...'
fi
[ "${MINKERNPACKAGE}" != "" ] && gen_minkernpackage
+[ "${MAXKERNPACKAGE}" != "" ] && gen_maxkernpackage
# Clean up...
[ -n "${CTEMP}" ] && rm -rf "${TEMP}"
\fB\-\-minkernpackage=\fR<tbz2>
File to output a .tar.bz2'd kernel and initrd: no modules outside of the
initrd will be included...
+.TP
+\fB\-\-maxkernpackage=\fR<tbz2>
+File to output a .tar.bz2'd kernel, initrd, contents of /lib/modules/ and the kernel config"
.SH INITRD OPTIONS
The following options can be passed as kernel parameters from the
bootloader, which the initrd scripts would recognize.