mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-01 00:45:43 +00:00
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(-)
This commit is contained in:
parent
661d2239e5
commit
ea604716d9
@ -286,20 +286,37 @@ endif
|
||||
|
||||
config KERNEL_LINUX_USE_CUSTOM_DIR
|
||||
bool
|
||||
prompt "Use custom directory"
|
||||
prompt "Use custom headers"
|
||||
help
|
||||
If you have some kernel headers lying around, you can enter the path
|
||||
below.
|
||||
|
||||
config KERNEL_LINUX_CUSTOM_DIR
|
||||
string
|
||||
prompt "Where are those custom headers?"
|
||||
depends on KERNEL_LINUX_USE_CUSTOM_DIR
|
||||
help
|
||||
Enter the base directory where the headers are to be found.
|
||||
if KERNEL_LINUX_USE_CUSTOM_DIR
|
||||
|
||||
Eg. if the headers are in /some/place/include, then enter /some/place.
|
||||
This is the same path you entered when you typed:
|
||||
make INSTALL_HDR_PATH=/some/place headers_install
|
||||
config KERNEL_LINUX_CUSTOM_IS_TARBALL
|
||||
bool
|
||||
prompt "This is a tarball"
|
||||
default n
|
||||
help
|
||||
If you say 'n' here, the path below is expected to point to a directory
|
||||
containing readily prepared headers
|
||||
|
||||
If you say 'y' here, then the path below is expected to point to a
|
||||
tarball of such a directory.
|
||||
|
||||
Eg., if your headers are available in: /foo/bar/buz/my_hdrs/include,
|
||||
say 'n' here, and enter: /foo/bar/buz/my_hdrs below.
|
||||
|
||||
Now, passing a tarball around is easier than passing a directory, so
|
||||
if you want to, you can make a tarball of /foo/bar/buz/my_hdrs/include,
|
||||
say 'y' here, and enter the path to this tarball below.
|
||||
|
||||
config KERNEL_LINUX_CUSTOM_PATH
|
||||
string
|
||||
prompt "Path to custom headers directory/tarball"
|
||||
help
|
||||
See KERNEL_LINUX_CUSTOM_IS_TARBALL, above.
|
||||
|
||||
endif # KERNEL_LINUX_USE_CUSTOM_DIR
|
||||
|
||||
endchoice
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user