summaryrefslogtreecommitdiff
path: root/kernel/gen_kheaders.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gen_kheaders.sh')
-rwxr-xr-xkernel/gen_kheaders.sh13
1 files changed, 2 insertions, 11 deletions
diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index ddfd1177567f..55f493d83b8f 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -14,13 +14,6 @@ include/
arch/$SRCARCH/include/
"
-if ! command -v cpio >/dev/null; then
- echo >&2 "***"
- echo >&2 "*** 'cpio' could not be found."
- echo >&2 "***"
- exit 1
-fi
-
# Support incremental builds by skipping archive generation
# if timestamps of files being archived are not changed.
@@ -73,15 +66,13 @@ if [ "$building_out_of_srctree" ]; then
cd $srctree
for f in $dir_list
do find "$f" -name "*.h";
- done | cpio --quiet -pd "${tmpdir}"
+ done | tar -c -f - -T - | tar -xf - -C "${tmpdir}"
)
fi
-# The second CPIO can complain if files already exist which can happen with out
-# of tree builds having stale headers in srctree. Just silence CPIO for now.
for f in $dir_list;
do find "$f" -name "*.h";
-done | cpio --quiet -pdu "${tmpdir}" >/dev/null 2>&1
+done | tar -c -f - -T - | tar -xf - -C "${tmpdir}"
# Always exclude include/generated/utsversion.h
# Otherwise, the contents of the tarball may vary depending on the build steps.