aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-08-09 10:48:32 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-16 00:01:44 +0100
commit012a70da7ae0617740cd0cf807d01c3cd912c823 (patch)
tree3d88a8a3d8461a6a7d6e093d22b246b2dbb808db /meta/classes/image.bbclass
parent40ce3db222f8557a01d041f8115d531cc90a54e8 (diff)
downloadopenembedded-core-contrib-012a70da7ae0617740cd0cf807d01c3cd912c823.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. 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