summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-03-03 18:43:38 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-03-03 18:43:38 (GMT)
commitea604716d9852e5b5fe0e158b822ea0878f3925f (patch)
tree72b71ccf90c1b8709ab8eb1bf43c3727e23cf63d /scripts
parent661d2239e586e475fbdb26b31270456d6a5fff1a (diff)
When using custom Linux kernel headers, allow using a tarball.
/trunk/scripts/build/kernel/linux.sh | 19 16 3 0 ++++++++++++++++--- /trunk/config/kernel/linux.in | 35 26 9 0 ++++++++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 12 deletions(-)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/kernel/linux.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh
index c8dbead..6563260 100644
--- a/scripts/build/kernel/linux.sh
+++ b/scripts/build/kernel/linux.sh
@@ -78,9 +78,22 @@ do_kernel_install() {
# modified (read: customised) kernel tree, or using pre-2.6.18 headers, such
# as 2.4). In this case, simply copy the headers in place
do_kernel_preinstalled() {
- CT_DoLog EXTRA "Copying preinstalled kernel headers"
+ local tar_opt
+
+ CT_DoLog EXTRA "Installing custom kernel headers"
mkdir -p "${CT_SYSROOT_DIR}/usr"
- cd "${CT_KERNEL_LINUX_CUSTOM_DIR}"
- CT_DoExecLog ALL cp -rv include "${CT_SYSROOT_DIR}/usr"
+ cd "${CT_SYSROOT_DIR}/usr"
+ if [ "${CT_KERNEL_LINUX_CUSTOM_IS_TARBALL}" = "y" ]; then
+ case "${CT_KERNEL_LINUX_CUSTOM_PATH}" in
+ *.tar) ;;
+ *.tgz) tar_opt=--gzip;;
+ *.tar.gz) tar_opt=--gzip;;
+ *.tar.bz2) tar_opt=--bzip2;;
+ *.tar.lzma) tar_opt=--lzma;;
+ esac
+ CT_DoExecLog ALL tar x ${tar_opt} -vf ${CT_KERNEL_LINUX_CUSTOM_PATH}
+ else
+ CT_DoExecLog ALL cp -rv "${CT_KERNEL_LINUX_CUSTOM_PATH}/include" .
+ fi
}