summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-19 01:04:16 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-19 01:04:16 +0000
commit15571bfa416c8fa8685a2f915edc544e71c87051 (patch)
treebcf3aac02c41f7861a41b4057984019da525dc8f
parentd3f5b32ae4287a59114e252637c7a3310488de05 (diff)
downloaduClibc-alpine-15571bfa416c8fa8685a2f915edc544e71c87051.tar.bz2
uClibc-alpine-15571bfa416c8fa8685a2f915edc544e71c87051.tar.xz
Install other linux kernel header subdirectories too
-rwxr-xr-xextra/scripts/install_kernel_headers.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/extra/scripts/install_kernel_headers.sh b/extra/scripts/install_kernel_headers.sh
index 7e86eb850..e49403a96 100755
--- a/extra/scripts/install_kernel_headers.sh
+++ b/extra/scripts/install_kernel_headers.sh
@@ -6,6 +6,7 @@
die_if_not_dir()
{
+ local dir
for dir in "$@"; do
test -d "$dir" && continue
echo "Error: '$dir' is not a directory"
@@ -29,7 +30,6 @@ die_if_not_dir "$top_builddir"
eval `grep ^KERNEL_HEADERS "$top_builddir/.config"`
if ! test "$KERNEL_HEADERS" \
|| ! test -d "$KERNEL_HEADERS/asm" \
-|| ! test -d "$KERNEL_HEADERS/asm-generic" \
|| ! test -d "$KERNEL_HEADERS/linux" \
; then
echo "Error: '$KERNEL_HEADERS' is not a directory containing kernel headers."
@@ -60,6 +60,15 @@ if test "`(cd "$KERNEL_HEADERS"; env pwd)`" != "`(cd "$2"; env pwd)`"; then
die_if_not_dir "$2/asm-generic"
cp -RHL "$KERNEL_HEADERS/asm-generic"/* "$2/asm-generic" || exit 1
fi
+ # For paranoid reasons, we use explicit list of directories
+ # which may be here. List last updated for linux-2.6.27:
+ for dir in drm mtd rdma sound video; do
+ if test -d "$KERNEL_HEADERS/$dir"; then
+ mkdir -p "$2/$dir" 2>/dev/null
+ die_if_not_dir "$2/$dir"
+ cp -RHL "$KERNEL_HEADERS/$dir"/* "$2/$dir" || exit 1
+ fi
+ done
if ! test -f "$2/linux/version.h"; then
echo "Warning: '$KERNEL_HEADERS/linux/version.h' is not found"
echo "in kernel headers directory specified in .config."