kernel/linux: reorder upstream/custom-tree handling

This commit is contained in:
Yann E. MORIN" 2010-06-15 20:04:01 +02:00
parent 979c2abb86
commit f99f3208af
2 changed files with 16 additions and 18 deletions

View File

@ -20,14 +20,6 @@ config KERNEL_LINUX_INSTALL
if KERNEL_LINUX_INSTALL
config KERNEL_LINUX_INSTALL_CHECK
bool
prompt "Check installed headers"
default y
help
If you are in doubt that installed headers are buggy, say 'Y'
here to have an extra check passed onto the headers.
choice
bool
prompt "Linux kernel version"
@ -140,11 +132,19 @@ config KERNEL_LINUX_VERBOSE_LEVEL
default 1 if KERNEL_LINUX_VERBOSITY_1
default 2 if KERNEL_LINUX_VERBOSITY_2
endif
config KERNEL_LINUX_INSTALL_CHECK
bool
prompt "Check installed headers"
default y
help
If you are in doubt that installed headers are buggy, say 'Y'
here to have an extra check passed onto the headers.
endif # KERNEL_LINUX_INSTALL
config KERNEL_LINUX_USE_CUSTOM_HEADERS
bool
prompt "Use custom headers"
prompt "custom, and/or pre-installed, headers tree"
help
If you have some kernel headers lying around, you can enter the path
below.
@ -175,6 +175,6 @@ config KERNEL_LINUX_CUSTOM_PATH
help
See KERNEL_LINUX_CUSTOM_IS_TARBALL, above.
endif # KERNEL_LINUX_USE_CUSTOM_DIR
endif # KERNEL_LINUX_USE_CUSTOM_HEADERS
endchoice

View File

@ -17,30 +17,28 @@ CT_DoKernelTupleValues() {
# Download the kernel
do_kernel_get() {
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" != "y" ]; then
if [ "${CT_KERNEL_LINUX_INSTALL}" = "y" ]; then
CT_GetFile "linux-${CT_KERNEL_VERSION}" \
{ftp,http}://ftp.{de.,eu.,}kernel.org/pub/linux/kernel/v2.{6{,/testing},4,2}
fi
return 0
}
# Extract kernel
do_kernel_extract() {
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" != "y" ]; then
if [ "${CT_KERNEL_LINUX_INSTALL}" = "y" ]; then
CT_Extract "linux-${CT_KERNEL_VERSION}"
CT_Patch "linux" "${CT_KERNEL_VERSION}"
fi
return 0
}
# Wrapper to the actual headers install method
do_kernel_headers() {
CT_DoStep INFO "Installing kernel headers"
if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then
do_kernel_custom
else
if [ "${CT_KERNEL_LINUX_INSTALL}" = "y" ]; then
do_kernel_install
else
do_kernel_custom
fi
CT_EndStep