Checksum / Reproducible Build expectations

I am new to compiling and building my own images.

To test my docker build environment, I built a new image for Lede 17.01.4 using default packages only (checked using diffconfig) for a WNDR4700 target expecting to find that the image CRC (I used SHA256) would match that of the stock images, but it does not.

I updated the feeds as part of the build setup using:
./scripts/feeds update -a && ./scripts/feeds install -a
I haven't found any compile errors yet.

The docker image I used (see https://hub.docker.com/r/acrisliu/lede/~/dockerfile/) has a toolchain based on ubuntu:xenial i.e. 16.04 LTS

Is this normal behavior ?
Obviously I do not want to brick my router with a dud image.
Thanks in advance.

Yes. one unique thing is the user name used in the buildhost:
(note the perus@ub1710 below)

  \  DE    \  /    Reboot (17.01-SNAPSHOT, r3824-b1205a9211)
    \________\/    -----------------------------------------------------------

root@OpenWrt:~# dmesg | head
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.112 (perus@ub1710) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3800-55c23e44f4) ) #0 SMP Tue Feb 6 16:35:21 2018
[    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d

Your own build directory contains the checksum file for your own build.

EDIT:
I think that actually the build date should be reproducible based on the date of the last git commit, but that username will be unique for you.

Ps.
it makes no sense to build the old 17.01.4 release. If you are going to build 17.01, just build from the HEAD of that branch to get all the later fixes in that stable branch.

@hnyman, -- thanks for your quick response!

I'm also seeing some image file size differences -- around 5% smaller if I recall correctly.
Unfortunately as I am not in front of the correct computer and will not be for a few hours.
Would this be unreasonable to expect too?

Sounds dubious. Almost like some packages are missing-
Maybe you forgot to include LuCI?

But there are also some debug related options toggled for the release build, so that may explain some diffeernce.

I've added Luci into the selected packages for my WNDR4700 target per @hnyman's suggestion.
Now I get small file size minor differences except for initramfs-kernel. Should I be concerned?

The relative file sizes are: Lede Official Downloads dir vs. MyBuild (reported by 'ls -s')
initramfs-kernel.bin 3649k vs. 5128k
squashfs-factory.img 6144k vs. 6148k
kernel.dtb 128k vs. 128k
squashfs-Sysupgrade.tar 4630k vs. 4620k

Before running 'make menuconfig', my .config file looked like:
CONFIG_TARGET_apm821xx=y
CONFIG_TARGET_apm821xx_nand=y
CONFIG_TARGET_apm821xx_nand_DEVICE_WNDR4700=y
CONFIG_PACKAGE_luci=y

After running menuconfig, the extra dependencies had added the following:
CONFIG_TARGET_apm821xx=y
CONFIG_TARGET_apm821xx_nand=y
CONFIG_TARGET_apm821xx_nand_DEVICE_WNDR4700=y
CONFIG_PACKAGE_libiwinfo=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libuci-lua=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y

Again, no apparent compile errors during 'make'.
Good enough?

I see no reason to be concerned. Minor differences are quite possible

Many thanks!
Measuring 'Reproducible Build' seems elusive :slight_smile: