This is an offshoot of https://bugzilla.yoctoproject.org/show_bug.cgi?id=5866 providing a better specified deliverable. The goal of this enhancement is to build reproducible images for: $ MACHINE=qemux86 bitbake core-image-minimal The resulting images of this build are placed in the folder <builddir>/tmp/deploy/images/qemux86 Repeating the build in a different folder will place the images in: <builddir-different>/tmp/deploy/images/qemux86 The build is deemed reproducible if the following files in both build folders are binary identical: bzImage-qemux86.bin core-image-minimal-qemux86.tar.bz2 modules-qemux86.tgz
I built two different core-image-minimal images in two different folders and at two different times. local conf: INHERIT+="reproducible_build" PACKAGE_CLASSES="package_deb package_rpm package_ipk" MACHINE="qemux86-64" Build Configuration: BB_VERSION = "1.37.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "ubuntu-16.04" TARGET_SYS = "x86_64-poky-linux" MACHINE = "qemux86-64" DISTRO = "poky" DISTRO_VERSION = "2.5" TUNE_FEATURES = "m64 core2" TARGET_FPU = "" meta meta-poky meta-yocto-bsp = "HEAD:b6bc5b2840246ac0f0e5d8cebcdffc1a0ca2518f" $ bitbake core-image-minimal Then I ran binary comparisons: SAME: /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27-again/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193430.rootfs.manifest /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193330.rootfs.manifest SAME: /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27-again/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193430.rootfs.tar.bz2 /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20180427193330.rootfs.tar.bz2 SAME: /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27-again/tmp/deploy/images/qemux86-64/bzImage--4.14.30+git0+ea9330894e_74f6cd2b69-r0-qemux86-64-20180427193430.bin /data/master1/poky/build2-minimal-qemux86-64-repro-2018-04-27/tmp/deploy/images/qemux86-64/bzImage--4.14.30+git0+ea9330894e_74f6cd2b69-r0-qemux86-64-20180427193330.bin Note modules-qemux86.tgz differed. This is rather easy to fix, providing the build host has "tar" that supports "--sort=name" and "--clamp-mtime" support. Unfortunately, at this time it is not guaranteed. Nevertheless, I will close this as resolve, as the both images and kernel are binary reproducible. (I will open a new bug dealing with modules.tgz)