echo " --callback=<...> Run the specified arguments after the"
echo " kernel and modules have been compiled"
echo " --static Build a static (monolithic kernel)."
+ echo " --initramfs Builds initramfs before kernel and embeds it"
+ echo " into the kernel."
echo " Kernel settings"
echo " --kerneldir=<dir> Location of the kernel sources"
echo " --kernel-config=<file> Kernel configuration file to use for compilation"
CMD_STATIC=1
print_info 2 "CMD_STATIC: $CMD_STATIC"
;;
+ --initramfs)
+ CMD_INITRAMFS=1
+ print_info 2 "CMD_INITRAMFS: $CMD_INITRAMFS"
+ ;;
--tempdir=*)
TEMP=`parse_opt "$*"`
print_info 2 "TEMP: $TEMP"
BUILD_STATIC=0
fi
+ if [ "${CMD_INITRAMFS}" != '' ]
+ then
+ BUILD_INITRAMFS=${CMD_INITRAMFS}
+ fi
+
+ if isTrue ${BUILD_INITRAMFS}
+ then
+ BUILD_INITRAMFS=1
+ else
+ BUILD_INITRAMFS=0
+ fi
+
if [ "${CMD_SAVE_CONFIG}" != '' ]
then
SAVE_CONFIG="${CMD_SAVE_CONFIG}"
# SGI LiveCDs need the following binary (no better place for it than here)
# getdvhoff is a DEPEND of genkernel, so it *should* exist
- if [ "${MIPS_EMBEDDED_IMAGE}" != '' -a "${MIPS_LIVECD}" != '' ]
+ if [ ${BUILD_INITRAMFS} -eq 1 -a "${MIPS_LIVECD}" != '' ]
then
[ -e /usr/lib/getdvhoff/getdvhoff ] \
&& cp /usr/lib/getdvhoff/getdvhoff ${TEMP}/initramfs-base-temp/bin \
rm ${TMPDIR}/initramfs-${KV}
# Mips also mimics Pegasos to merge the initramfs into the kernel
- if [ "${MIPS_EMBEDDED_IMAGE}" != '' ]; then
+ if [ ${BUILD_INITRAMFS} -eq 1 ]; then
cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/initramfs.cpio.gz
gunzip -f ${KERNEL_DIR}/initramfs.cpio.gz
fi
# SGI LiveCDs need the following binary (no better place for it than here)
# getdvhoff is a DEPEND of genkernel, so it *should* exist
- if [ "${MIPS_EMBEDDED_IMAGE}" != '' ]
+ if [ ${BUILD_INITRAMFS} -eq 1 ]
then
[ -e /usr/lib/getdvhoff/getdvhoff ] \
&& cp /usr/lib/getdvhoff/getdvhoff ${TEMP}/initrd-temp/bin \
rm ${TMPDIR}/initrd-${KV}
# Mips also mimics Pegasos to merge the initrd into the kernel
- [ "${MIPS_EMBEDDED_IMAGE}" != '' ] \
+ [ ${BUILD_INITRAMFS} -eq 1 ] \
&& cp ${TMPDIR}/initrd-${KV} ${KERNEL_DIR}/mips/ramdisk/initrd.img.gz
}
# Genkernel v3
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.3.11_pre7'
+GK_V='3.3.11_pre8'
TMPDIR='/var/tmp/genkernel'
TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.
# Compile kernel; If using --genzimage, or building a mips kernel, skip compile
# till after initrd/initramfs is done
- [ "${GENERATE_Z_IMAGE}" = '' -a "${MIPS_EMBEDDED_IMAGE}" = '' ] && compile_kernel
+ [ "${GENERATE_Z_IMAGE}" = '' -a ${BUILD_INITRAMFS} -eq 0 ] && compile_kernel
# Compile modules
if [ ${BUILD_MODULES} -eq 1 -a ${BUILD_STATIC} -eq 0 ]
fi
if [ "${KERNCACHE}" != "" ]
then
- if [ "${GENERATE_Z_IMAGE}" = '' -a "${MIPS_EMBEDDED_IMAGE}" = '' ]
+ if [ "${GENERATE_Z_IMAGE}" = '' -a ${BUILD_INITRAMFS} -eq 0 ]
then
gen_kerncache
fi
fi
# Pegasos fix
-if [ "${GENERATE_Z_IMAGE}" != '' -o "${MIPS_EMBEDDED_IMAGE}" != '' ]
+if [ "${GENERATE_Z_IMAGE}" != '' -o ${BUILD_INITRAMFS} -eq 1 ]
then
# Compile kernel, intergrating the initrd into it for Pegasos & mips
compile_kernel