Adding a set of patches submitted by Martin "Parmus" Parm; bugs #57748,

#57749, #57751, #57752, and #57761.


git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@115 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Tim Yamin 21 years ago
parent e0af9e201d
commit 5e44b9b039

@ -21,6 +21,8 @@ longusage() {
echo " --no-menuconfig Do not run menuconfig after oldconfig"
echo " --gconfig Run gconfig after oldconfig"
echo " --xconfig Run xconfig after oldconfig"
echo " --save-config Save the configuration to /etc/kernels"
echo " --no-save-config Don't save the configuration to /etc/kernels"
echo " Kernel Compile settings"
echo " --clean Run make clean before compilation"
echo " --mrproper Run make mrproper before compilation"
@ -38,6 +40,8 @@ longusage() {
echo " Kernel settings"
echo " --kerneldir=<dir> Location of the kernel sources"
echo " --kernel-config=<file> Kernel configuration file to use for compilation"
echo " --module-prefix=<dir> Prefix to kernel module destination, modules will"
echo " be installed in <prefix>/lib/modules"
echo " Low-Level Compile settings"
echo " --kernel-cc=<compiler> Compiler to use for kernel (e.g. distcc)"
echo " --kernel-as=<assembler> Assembler to use for kernel"
@ -48,11 +52,14 @@ longusage() {
echo " --utils-ld=<linker> Linker to use for utils"
echo " --utils-make=<makeprog> GNU Make to use for utils"
echo " --makeopts=<makeopts> Make options such as -j2, etc."
echo " --mountboot Mount /boot automatically"
echo " --no-mountboot Don't mount /boot automatically"
echo " Initialization"
echo " --bootsplash=<theme> Force bootsplash using <theme>."
echo " --do-keymap-auto Forces keymap selection at boot."
echo " --no-lvm2 Don't add in LVM2 support."
echo " Internals"
echo " --tempdir=<dir> Location of Genkernel's temporary directory"
echo " --arch-override=<arch> Force to arch instead of autodetect"
echo " --busybox-config=<file> Busybox configuration file to use"
echo " --busybox-bin=<file> Don't compile busybox, use this _static_"
@ -124,6 +131,14 @@ parse_cmdline() {
CMD_MAKEOPTS=`parse_opt "$*"`
print_info 2 "CMD_MAKEOPTS: $CMD_MAKEOPTS"
;;
--mountboot)
CMD_MOUNTBOOT=1
print_info 2 "CMD_MOUNTBOOT: $CMD_MOUNTBOOT"
;;
--no-mountboot)
CMD_MOUNTBOOT=0
print_info 2 "CMD_MOUNTBOOT: $CMD_MOUNTBOOT"
;;
--do-keymap-auto)
CMD_DOKEYMAPAUTO=1
print_info 2 "CMD_DOKEYMAPAUTO: $CMD_DOKEYMAPAUTO"
@ -162,6 +177,14 @@ parse_cmdline() {
CMD_XCONFIG=1
print_info 2 "CMD_XCONFIG: $CMD_XCONFIG"
;;
--save-config)
CMD_SAVE_CONFIG=1
print_info 2 "CMD_SAVE_CONFIG: $CMD_SAVE_CONFIG"
;;
--no-save-config)
CMD_SAVE_CONFIG=0
print_info 2 "CMD_SAVE_CONFIG: $CMD_SAVE_CONFIG"
;;
--mrproper)
CMD_MRPROPER=1
print_info 2 "CMD_MRPROPER: $CMD_MRPROPER"
@ -214,6 +237,10 @@ parse_cmdline() {
CMD_CALLBACK=`parse_opt "$*"`
print_info 2 "CMD_CALLBACK: $CMD_CALLBACK/$*"
;;
--tempdir*)
TEMP=`parse_opt "$*"`
print_info 2 "TEMP: $TEMP"
;;
--arch-override*)
CMD_ARCHOVERRIDE=`parse_opt "$*"`
print_info 2 "CMD_ARCHOVERRIDE: $CMD_ARCHOVERRIDE"
@ -240,6 +267,10 @@ parse_cmdline() {
CMD_KERNEL_CONFIG=`parse_opt "$*"`
print_info 2 "CMD_KERNEL_CONFIG: $CMD_KERNEL_CONFIG"
;;
--module-prefix*)
CMD_INSTALL_MOD_PATH=`parse_opt "$*"`
print_info 2 "CMD_INSTALL_MOD_PATH: $CMD_INSTALL_MOD_PATH"
;;
--busybox-config*)
CMD_BUSYBOX_CONFIG=`parse_opt "$*"`
print_info 2 "CMD_BUSYBOX_CONFIG: $CMD_BUSYBOX_CONFIG"

@ -184,11 +184,9 @@ compile_modules() {
MAKEOPTS_SAVE="${MAKEOPTS}"
MAKEOPTS='-j1'
fi
[ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
compile_generic "modules_install" kernel
if [ "${VER}" -eq '2' -a "${PAT}" -le '4' ]
then
MAKEOPTS="${MAKEOPTS_SAVE}"
fi
[ "${VER}" -eq '2' -a "${PAT}" -le '4' ] && MAKEOPTS="${MAKEOPTS_SAVE}"
export MAKEOPTS
unset UNAME_MACHINE
}
@ -206,8 +204,10 @@ compile_kernel() {
if ! isTrue "${CMD_NOINSTALL}"
then
cp "${KERNEL_BINARY}" "/boot/kernel-${KV}" || gen_die 'Could not copy the kernel binary to /boot!'
cp "System.map" "/boot/System.map-${KV}" || gen_die 'Could not copy System.map to /boot!'
else
cp "${KERNEL_BINARY}" "${TEMP}/kernel-${KV}" || gen_die "Could not copy the kernel binary to ${TEMP}!"
cp "System.map" "${TEMP}/System.map-${KV}" || gen_die "Could not copy System.map to ${TEMP}!"
fi
}

@ -137,4 +137,33 @@ determine_real_args() {
then
NOINITRDMODULES="${CMD_NOINITRDMODULES}"
fi
if [ "${CMD_MOUNTBOOT}" != '' ]
then
MOUNTBOOT="${CMD_MOUNTBOOT}"
fi
if isTrue ${MOUNTBOOT}
then
MOUNTBOOT=1
else
MOUNTBOOT=0
fi
if [ "${CMD_SAVE_CONFIG}" != '' ]
then
SAVE_CONFIG="${CMD_SAVE_CONFIG}"
fi
if isTrue ${SAVE_CONFIG}
then
${SAVE_CONFIG}=1
else
${SAVE_CONFIG}=0
fi
if [ "${CMD_INSTALL_MOD_PATH}" != '' ]
then
INSTALL_MOD_PATH="${CMD_INSTALL_MOD_PATH}"
fi
}

@ -115,9 +115,15 @@ create_initrd_modules() {
fi
print_info 2 "initrd: >> Searching for modules..."
if [ "${INSTALL_MOD_PATH}" != '' ]
then
cd ${INSTALL_MOD_PATH}
else
cd /
fi
for i in `gen_dep_list`
do
mymod=`find /lib/modules/${KV} -name "${i}${MOD_EXT}" | head -n 1`
mymod=`find ./lib/modules/${KV} -name "${i}${MOD_EXT}" | head -n 1`
if [ -z "${mymod}" ]
then
print_warning 2 "Warning :: ${i}${MOD_EXT} not found; skipping..."
@ -127,7 +133,7 @@ create_initrd_modules() {
cp -ax --parents "${mymod}" "${TEMP}/initrd-temp"
done
cp -ax --parents /lib/modules/${KV}/modules* ${TEMP}/initrd-temp
cp -ax --parents ./lib/modules/${KV}/modules* ${TEMP}/initrd-temp
mkdir -p "${TEMP}/initrd-temp/etc/modules"
for group_modules in ${!MODULES_*}; do

@ -8,7 +8,7 @@ modules_dep_list()
else
KEXT=".o"
fi
cat /lib/modules/${KV}/modules.dep | grep ${1}${KEXT}\: | cut -d\: -f2
cat ${INSTALL_MOD_PATH}/lib/modules/${KV}/modules.dep | grep ${1}${KEXT}\: | cut -d\: -f2
}
# Pass module deps list

@ -146,9 +146,12 @@ then
# Compile modules
compile_modules
print_info 1 "Copying config for successful build to /etc/kernels/kernel-config-${ARCH}-${KV}"
[ ! -e "/etc/kernels" ] && mkdir -p /etc/kernels
cp "${KERNEL_DIR}/.config" "/etc/kernels/kernel-config-${ARCH}-${KV}"
if [ ${SAVE_CONFIG} -eq 1 ]
then
print_info 1 "Copying config for successful build to /etc/kernels/kernel-config-${ARCH}-${KV}"
[ ! -e '/etc/kernels' ] && mkdir -p /etc/kernels
cp "${KERNEL_DIR}/.config" "/etc/kernels/kernel-config-${ARCH}-${KV}"
fi
fi
# Run callback

@ -23,6 +23,10 @@ BOOTSPLASH="yes"
# Mount /boot automatically if it isn't mounted?
MOUNTBOOT="yes"
# Save the new configuration in /etc/kernels upon
# successfull compilation
SAVE_CONFIG="yes"
# Use Color output in Genkernel?
USECOLOR="yes"

Loading…
Cancel
Save