Builds not reproducible with custom kernel config

I have not found a way to create reproducible builds using a custom kernel config, with or without docker runtime.

My builds are not reproducible with these options:

  • --kconfig ../config
  • --kconfig defconfig --kconfig-add ../config

I can create reproducible builds with these options, but it's not using my custom config:

  • --kconfig tinyconfig
  • --kconfig defconfig

I've tried several variations; different kernels, different toolchains, using the resulting config from the output-dir, etc -- without success.

Example:

wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.3.tar.xz 
tar xf linux-*.tar.xz
cd linux-*

tuxmake \
  --target-arch=x86_64 \
  --toolchain=gcc \
  --runtime=docker \
  --kconfig ../config \
  --wrapper=none \
  --environment=KBUILD_BUILD_TIMESTAMP=@1723000000 \
  --environment=KBUILD_BUILD_USER=tuxmake \
  --environment=KBUILD_BUILD_HOST=tuxmake \
  --build-dir ../build-dir.1 \
  --output-dir ../output-dir.1 \
  config \
  default \
  kernel

tuxmake \
  --target-arch=x86_64 \
  --toolchain=gcc \
  --runtime=docker \
  --kconfig ../config \
  --wrapper=none \
  --environment=KBUILD_BUILD_TIMESTAMP=@1723000000 \
  --environment=KBUILD_BUILD_USER=tuxmake \
  --environment=KBUILD_BUILD_HOST=tuxmake \
  --build-dir ../build-dir.2 \
  --output-dir ../output-dir.2 \
  config \
  default \
  kernel
$ tuxmake --version
tuxmake 1.26.1

$ diff output-dir.1/bzImage output-dir.2/bzImage 
Binary files output-dir.1/bzImage and output-dir.2/bzImage differ
Edited by Xen