Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kevin
bionic
Commits
507f95e2
Commit
507f95e2
authored
11 years ago
by
Christopher Ferris
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Update script to copy in extra generated files."
parents
26f0e54a
b4091e69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
libc/kernel/tools/generate_uapi_headers.sh
libc/kernel/tools/generate_uapi_headers.sh
+29
-2
No files found.
libc/kernel/tools/generate_uapi_headers.sh
View file @
507f95e2
...
...
@@ -80,6 +80,25 @@ function copy_hdrs () {
fi
}
function
copy_if_exists
()
{
local
check_dir
=
$1
local
src_dir
=
$2
local
tgt_dir
=
$3
mkdir
-p
${
tgt_dir
}
# This only works if none of the filenames have spaces.
for
file
in
$(
ls
-d
${
src_dir
}
/
*
2> /dev/null
)
;
do
if
[[
-f
"
${
file
}
"
]]
&&
[[
"
${
file
}
"
=
~ .h
$
]]
;
then
# Check that this file exists in check_dir.
header
=
$(
basename
${
file
}
)
if
[[
-f
"
${
check_dir
}
/
${
header
}
"
]]
;
then
cp
${
file
}
${
tgt_dir
}
fi
fi
done
}
trap
cleanup EXIT
# This automatically triggers a call to cleanup.
trap
"exit 1"
HUP INT TERM TSTP
...
...
@@ -158,9 +177,11 @@ fi
# Copy all of the include/uapi files to the kernel headers uapi directory.
copy_hdrs
"
${
KERNEL_DIR
}
/common/include/uapi"
"
${
ANDROID_KERNEL_DIR
}
/uapi"
# Copy the staging files to uapi/linux.
copy_hdrs
"
${
KERNEL_DIR
}
/common/drivers/staging/android/uapi"
\
"
${
ANDROID_KERNEL_DIR
}
/uapi/linux"
"no-copy-dirs"
# Copy the generated headers.
copy_hdrs
"
${
KERNEL_DIR
}
/common/include/generated/uapi"
\
"
${
ANDROID_KERNEL_DIR
}
/uapi"
...
...
@@ -171,10 +192,16 @@ for arch in "${ARCH_LIST[@]}"; do
else
tgt_arch
=
"asm-
${
arch
}
"
fi
# Copy arch headers
first
.
# Copy arch headers.
copy_hdrs
"
${
KERNEL_DIR
}
/common/arch/
${
arch
}
/include/uapi"
\
"
${
ANDROID_KERNEL_DIR
}
/uapi/
${
tgt_arch
}
"
# Copy the generated arch header
file
s.
# Copy the generated arch headers.
copy_hdrs
"
${
KERNEL_DIR
}
/common/arch/
${
arch
}
/include/generated/uapi"
\
"
${
ANDROID_KERNEL_DIR
}
/uapi/
${
tgt_arch
}
"
# Special copy of generated header files from arch/<ARCH>/generated/asm that
# also exist in uapi/asm-generic.
copy_if_exists
"
${
KERNEL_DIR
}
/common/include/uapi/asm-generic"
\
"
${
KERNEL_DIR
}
/common/arch/
${
arch
}
/include/generated/asm"
\
"
${
ANDROID_KERNEL_DIR
}
/uapi/
${
tgt_arch
}
/asm"
done
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment