Add support to genkernel to build a monolithic kernel by skipping module building sections when


			
			
				cleanup-cruft
			
			
		
Joshua Kinard 19 years ago
parent 9663fd195c
commit 7b40ee36b6

@ -41,6 +41,7 @@ longusage() {
echo " --no-devfs Disable devfs support"
echo " --callback=<...> Run the specified arguments after the"
echo " kernel and modules have been compiled"
echo " --static Build a static (monolithic kernel)."
echo " Kernel settings"
echo " --kerneldir=<dir> Location of the kernel sources"
echo " --kernel-config=<file> Kernel configuration file to use for compilation"
@ -354,6 +355,10 @@ parse_cmdline() {
CMD_CALLBACK=`parse_opt "$*"`
print_info 2 "CMD_CALLBACK: $CMD_CALLBACK/$*"
;;
--static)
CMD_STATIC=1
print_info 2 "CMD_STATIC: $CMD_STATIC"
;;
--tempdir=*)
TEMP=`parse_opt "$*"`
print_info 2 "TEMP: $TEMP"

@ -298,6 +298,18 @@ determine_real_args() {
MOUNTBOOT=0
fi
if [ "${CMD_STATIC}" != '' ]
then
BUILD_STATIC=${CMD_STATIC}
fi
if isTrue ${BUILD_STATIC}
then
BUILD_STATIC=1
else
BUILD_STATIC=0
fi
if [ "${CMD_SAVE_CONFIG}" != '' ]
then
SAVE_CONFIG="${CMD_SAVE_CONFIG}"

@ -217,7 +217,7 @@ then
[ "${GENERATE_Z_IMAGE}" = '' -a "${MIPS_EMBEDDED_IMAGE}" = '' ] && compile_kernel
# Compile modules
if [ ${BUILD_MODULES} -eq 1 ]
if [ ${BUILD_MODULES} -eq 1 -a ${BUILD_STATIC} -eq 0 ]
then
compile_modules
fi
@ -247,7 +247,7 @@ fi
if [ "${KERNCACHE}" != "" -a "${KERNCACHE_IS_VALID}" != "0" ]
then
gen_kerncache_extract_modules
[ ${BUILD_STATIC} -eq 0 ] && gen_kerncache_extract_modules
gen_kerncache_extract_config
fi
@ -293,9 +293,9 @@ then
if [ "${KERN_24}" != '1' ]
then
# Compile module-init-tools
compile_module_init_tools
[ ${BUILD_STATIC} -eq 0 ] && compile_module_init_tools
else
compile_modutils
[ ${BUILD_STATIC} -eq 0 ] && compile_modutils
fi
fi

Loading…
Cancel
Save