]> git.baikalelectronics.ru Git - kernel.git/commit
kheaders: make headers archive reproducible
authorDmitry Goldin <dgoldin+lkml@protonmail.ch>
Fri, 4 Oct 2019 10:40:07 +0000 (10:40 +0000)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 5 Oct 2019 06:29:49 +0000 (15:29 +0900)
commitb7dfc9ff7a470fec67846a036284167ac5f1c339
treec79544ad48bd9dedb9893a7c2d5c388a9ed5dfba
parent04fd048f154a38c4904c4c6e7c61d8418ee92f51
kheaders: make headers archive reproducible

In commit eaae2b3dc54b ("Provide in-kernel headers to make
extending kernel easier") a new mechanism was introduced, for kernels
>=5.2, which embeds the kernel headers in the kernel image or a module
and exposes them in procfs for use by userland tools.

The archive containing the header files has nondeterminism caused by
header files metadata. This patch normalizes the metadata and utilizes
KBUILD_BUILD_TIMESTAMP if provided and otherwise falls back to the
default behaviour.

In commit e113b0ab8986 ("kheaders: Move from proc to sysfs") it was
modified to use sysfs and the script for generation of the archive was
renamed to what is being patched.

Signed-off-by: Dmitry Goldin <dgoldin+lkml@protonmail.ch>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Documentation/kbuild/reproducible-builds.rst
kernel/gen_kheaders.sh