diff -r 47f10d7b25b8 gen_cmdline.sh --- a/gen_cmdline.sh Thu Feb 26 01:45:04 2009 -0500 +++ b/gen_cmdline.sh Fri Feb 27 00:42:06 2009 -0500 @@ -127,6 +127,11 @@ echo " --integrated-initramfs" echo " Build the generated initramfs into the kernel instead of" echo " keeping it as a separate file" + echo " --strip=(all|kernel|modules)" + echo " Strip debug symbols from the installed kernel, modules," + echo " all (default)" + echo " --no-strip" + echo " Don't strip installed kernel or modules" } usage() { @@ -501,6 +506,14 @@ CMD_INTEGRATED_INITRAMFS=1 print_info 2 "CMD_INTEGRATED_INITRAMFS=${CMD_INTEGRATED_INITRAMFS}" ;; + --strip=*) + CMD_STRIP_TYPE=`parse_opt "$*"` + print_info 2 "CMD_STRIP_TYPE: ${CMD_STRIP_TYPE}" + ;; + --no-strip) + CMD_STRIP_TYPE=none + print_info 2 "CMD_STRIP_TYPE: ${CMD_STRIP_TYPE}" + ;; all) BUILD_KERNEL=1 BUILD_MODULES=1 diff -r 47f10d7b25b8 gen_compile.sh --- a/gen_compile.sh Thu Feb 26 01:45:04 2009 -0500 +++ b/gen_compile.sh Fri Feb 27 00:42:06 2009 -0500 @@ -309,9 +309,18 @@ MAKEOPTS="${MAKEOPTS_SAVE/-j?/-j1}" fi [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH + if [ "${CMD_STRIP_TYPE}" == "all" -o "${CMD_STRIP_TYPE}" == "modules" ] + then + print_info 1 " >> Installing ${KV} modules (and stripping)" + INSTALL_MOD_STRIP=1 + export INSTALL_MOD_STRIP + else + print_info 1 " >> Installing ${KV} modules" + fi compile_generic "modules_install" kernel [ "${VER}" -eq '2' -a "${KERN_24}" -eq '1' ] && MAKEOPTS="${MAKEOPTS_SAVE}" export MAKEOPTS + unset INSTALL_MOD_STRIP unset UNAME_MACHINE } diff -r 47f10d7b25b8 gen_determineargs.sh --- a/gen_determineargs.sh Thu Feb 26 01:45:04 2009 -0500 +++ b/gen_determineargs.sh Fri Feb 27 00:42:06 2009 -0500 @@ -120,6 +120,7 @@ set_config_with_override 1 GENZIMAGE CMD_GENZIMAGE set_config_with_override 1 KEYMAP CMD_KEYMAP "yes" set_config_with_override 1 DOKEYMAPAUTO CMD_DOKEYMAPAUTO + set_config_with_override 1 STRIP_TYPE CMD_STRIP_TYPE "all" BOOTDIR=`arch_replace "${BOOTDIR}"` BOOTDIR=${BOOTDIR%/} # Remove any trailing slash diff -r 47f10d7b25b8 gen_funcs.sh --- a/gen_funcs.sh Thu Feb 26 01:45:04 2009 -0500 +++ b/gen_funcs.sh Fri Feb 27 00:42:06 2009 -0500 @@ -409,7 +409,13 @@ print_info 5 " Copying ${symlinkName}: ${newSrceImage}" print_info 5 " to ${BOOTDIR}/${currDestImage}" cp "${newSrceImage}" "${BOOTDIR}/${currDestImage}" || - gen_die "Could not copy the ${symlinkName} image to ${BOOTDIR}!" + gen_die "Could not copy the ${symlinkName} image to ${BOOTDIR}!" + + if [ "${CMD_STRIP_TYPE}" = "all" -o "${CMD_STRIP_TYPE}" = "kernel" ] + then + print_info 5 " Stripping ${BOOTDIR}/${currDestImage}" + strip --strip-debug "${BOOTDIR}/${currDestImage}" >/dev/null 2>&1 + fi if [ "${SYMLINK}" -eq '1' ] then