The 'cpio' command is used solely for copying header files to the temporary directory. However, there is no strong reason to use 'cpio' for this purpose. For example, scripts/package/install-extmod-build uses the 'tar' command to copy files. This commit replaces the use of 'cpio' with 'tar' because 'tar' is already used in this script to generate kheaders_data.tar.xz anyway. Performance-wide, there is no significant difference between 'cpio' and 'tar'. [Before] $ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | cpio --quiet -pd kheaders ' real 0m0.148s user 0m0.021s sys 0m0.140s [After] $ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | tar -c -f - -T - | tar -xf - -C kheaders ' real 0m0.098s user 0m0.024s sys 0m0.131s Revert commit 69ef0920bdd3 ("Docs: Add cpio requirement to changes.rst") because 'cpio' is not used anywhere else during the kernel build. Please note that the built-in initramfs is created by the in-tree tool, usr/gen_init_cpio, so it does not rely on the external 'cpio' command at all. Remove 'cpio' from the package build dependencies as well.
Showing the changes to scripts/package (2 of 4 files). Show all
Unified · Split
| @@ -22,7 +22,6 @@ license=(GPL-2.0-only) · 21 unmodified lines | ||
| 22 | 22 | makedepends=( |
| 23 | 23 | bc |
| 24 | 24 | bison |
| 25 | − cpio | |
| 26 | 25 | flex |
| 27 | 26 | gettext |
| 28 | 27 | kmod |
| @@ -205,7 +205,7 @@ Priority: optional · 204 unmodified lines | ||
| 205 | 205 | Maintainer: $maintainer |
| 206 | 206 | Rules-Requires-Root: no |
| 207 | 207 | Build-Depends: debhelper-compat (= 12) |
| 208 | −Build-Depends-Arch: bc, bison, cpio, flex, | |
| 208 | +Build-Depends-Arch: bc, bison, flex, | |
| 209 | 209 | gcc-${host_gnu} <!pkg.${sourcename}.nokernelheaders>, |
| 210 | 210 | kmod, libelf-dev:native, |
| 211 | 211 | libssl-dev:native, libssl-dev <!pkg.${sourcename}.nokernelheaders>, |