Make possible to compile XEN based kernels providing --kernel-target= and --kernel-binary= switches

cleanup-cruft
Fabio Erculiani 14 years ago
parent aea5074809
commit dfca908b6f

@ -3,8 +3,10 @@
# Arch-specific options that normally shouldn't be changed.
#
KERNEL_MAKE_DIRECTIVE="bzImage"
KERNEL_MAKE_DIRECTIVE_OVERRIDE="--INVALID--"
KERNEL_MAKE_DIRECTIVE_2=""
KERNEL_BINARY="arch/i386/boot/bzImage"
KERNEL_BINARY_OVERRIDE=""
COMPRESS_INITRD=yes

@ -189,6 +189,12 @@ LOW-LEVEL COMPILATION OPTIONS
*--kernel-make*=<makeprg>::
GNU Make to use for the kernel compilation.
*--kernel-target*=<t>::
Override default make target (bzImage)
*--kernel-binary*=<path>::
Override default kernel binary path (arch/foo/boot/bar)
*--utils-cc*=<compiler>::
Compiler to use for utilities.

@ -57,6 +57,9 @@ longusage() {
echo " --kernel-ld=<linker> Linker to use for kernel"
echo " --kernel-cross-compile=<cross var> CROSS_COMPILE kernel variable"
echo " --kernel-make=<makeprg> GNU Make to use for kernel"
echo " --kernel-target=<t> Override default make target (bzImage)"
echo " --kernel-binary=<path> Override default kernel binary path (arch/foo/boot/bar)"
echo " --utils-cc=<compiler> Compiler to use for utilities"
echo " --utils-as=<assembler> Assembler to use for utils"
echo " --utils-ld=<linker> Linker to use for utils"
@ -166,6 +169,14 @@ parse_cmdline() {
CMD_KERNEL_MAKE=`parse_opt "$*"`
print_info 2 "CMD_KERNEL_MAKE: ${CMD_KERNEL_MAKE}"
;;
--kernel-target=*)
KERNEL_MAKE_DIRECTIVE_OVERRIDE=`parse_opt "$*"`
print_info 2 "KERNEL_MAKE_DIRECTIVE_OVERRIDE: ${KERNEL_MAKE_DIRECTIVE_OVERRIDE}"
;;
--kernel-binary=*)
KERNEL_BINARY_OVERRIDE=`parse_opt "$*"`
print_info 2 "KERNEL_BINARY_OVERRIDE: ${KERNEL_BINARY_OVERRIDE}"
;;
--kernel-cross-compile=*)
CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"`
CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')

@ -296,8 +296,12 @@ compile_kernel() {
[ "${KERNEL_MAKE}" = '' ] &&
gen_die "KERNEL_MAKE undefined - I don't know how to compile a kernel for this arch!"
cd ${KERNEL_DIR}
print_info 1 " >> Compiling ${KV} ${KERNEL_MAKE_DIRECTIVE/_install/ [ install ]/}..."
compile_generic "${KERNEL_MAKE_DIRECTIVE}" kernel
local kernel_make_directive="${KERNEL_MAKE_DIRECTIVE}"
if [ "${KERNEL_MAKE_DIRECTIVE_OVERRIDE}" != "--INVALID--" ]; then
kernel_make_directive="${KERNEL_MAKE_DIRECTIVE_OVERRIDE}"
fi
print_info 1 " >> Compiling ${KV} ${kernel_make_directive/_install/ [ install ]/}..."
compile_generic "${kernel_make_directive}" kernel
if [ "${KERNEL_MAKE_DIRECTIVE_2}" != '' ]
then
print_info 1 " >> Starting supplimental compile of ${KV}: ${KERNEL_MAKE_DIRECTIVE_2}..."
@ -313,7 +317,7 @@ compile_kernel() {
print_info 1 " >> Not installing firmware as it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)..."
fi
local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY})
local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY_OVERRIDE:-${KERNEL_BINARY}})
local tmp_kernel_binary2=$(find_kernel_binary ${KERNEL_BINARY_2})
if [ -z "${tmp_kernel_binary}" ]
then

Loading…
Cancel
Save