diff --git a/defaults/config.sh b/defaults/config.sh index 6d26757..d135e0e 100755 --- a/defaults/config.sh +++ b/defaults/config.sh @@ -3,7 +3,11 @@ # Arch-specific options that normally shouldn't be changed. # KERNEL_MAKE_DIRECTIVE="bzImage" -KERNEL_MAKE_DIRECTIVE_OVERRIDE="--INVALID--" +# since "" is allowed (this will translate in `make `, which is nice +# for xen-based kernels, the default value of +# KERNEL_MAKE_DIRECTIVE_OVERRIDE cannot be "" +DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE="--INVALID--" +KERNEL_MAKE_DIRECTIVE_OVERRIDE="${DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE}" KERNEL_MAKE_DIRECTIVE_2="" KERNEL_BINARY="arch/i386/boot/bzImage" KERNEL_BINARY_OVERRIDE="" diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index fc00834..caee447 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -190,7 +190,9 @@ LOW-LEVEL COMPILATION OPTIONS GNU Make to use for the kernel compilation. *--kernel-target*=:: - Override default make target (bzImage) + Override default make target (bzImage), note that values + like --kernel-target= are also valid (useful for Xen + based kernel sources) *--kernel-binary*=:: Override default kernel binary path (arch/foo/boot/bar) diff --git a/gen_compile.sh b/gen_compile.sh index 9fc35af..0758c3a 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -297,7 +297,7 @@ compile_kernel() { gen_die "KERNEL_MAKE undefined - I don't know how to compile a kernel for this arch!" cd ${KERNEL_DIR} local kernel_make_directive="${KERNEL_MAKE_DIRECTIVE}" - if [ "${KERNEL_MAKE_DIRECTIVE_OVERRIDE}" != "--INVALID--" ]; then + if [ "${KERNEL_MAKE_DIRECTIVE_OVERRIDE}" != "${DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE}" ]; then kernel_make_directive="${KERNEL_MAKE_DIRECTIVE_OVERRIDE}" fi print_info 1 " >> Compiling ${KV} ${kernel_make_directive/_install/ [ install ]/}..."