diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-08-09 10:48:32 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-16 00:03:15 +0100 |
commit | 55e9485735ae8393b410f30973c785236dc402d2 (patch) | |
tree | 9d87c88f5d25599c3cb9a06312cb3c74ed6c92d2 /meta/classes/image.bbclass | |
parent | f3da1613c4d19f599ecea34fc9ea7b9935a8a26a (diff) | |
download | poky-55e9485735ae8393b410f30973c785236dc402d2.tar.gz |
kernel.bbclass: improve reproducibility
Several tweaks to improve reproducibility:
1. If BUILD_REPRODUCIBLE_BINARIES == 1, set KBUILD_BUILD_TIMESTAMP
to a reproducible value. This is either a non-zero SOURCE_DATE_EPOCH, or the
value obtained from top entry of GIT repo, or (if there is no GIT repo)
fallback to REPRODUCIBLE_TIMESTAMP_ROOTFS as the last resort.
Also export KCONFIG_NOTIMESTAMP=1.
2. When compressing vmlinux.gz, use gzip "-n" option
3. Kernel and kernel modules contain hard coded paths referencing the host
build system. This is usually because the source code contains __FILE__
at some place. This prevents binary reproducibility. However, some compilers
allow remapping of the __FILE__ value. If we detect the compiler is capable
of doing this, we replace the source path $(S) part of __FILE__ by a string "/kernel-source".
For example:
/data/master/build/tmp/work-shared/qemux86/kernel-source/drivers/media/v4l2-core/videobuf2-core.c
will be replaced by a reproducible value:
/kernel-source/drivers/media/v4l2-core/videobuf2-core.c.
(From OE-Core rev: 012a70da7ae0617740cd0cf807d01c3cd912c823)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
0 files changed, 0 insertions, 0 deletions