Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-07 Thread Paul Spooren
Hi, > On 5. Apr 2022, at 21:33, Bjørn Mork wrote: > > Daniel Golle writes: > >> You probably meant LDFLAGS_vmlinux because from what I understand >> KBUILD_LDFLAGS_MODULE only applies when building modules but not when >> linking vmlinux. >> As ld only cares about the last mentioned --build-id

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-05 Thread Bjørn Mork
Daniel Golle writes: > You probably meant LDFLAGS_vmlinux because from what I understand > KBUILD_LDFLAGS_MODULE only applies when building modules but not when > linking vmlinux. > As ld only cares about the last mentioned --build-id= parameter > supplied, we can override it using KBUILD_LDFLAGS

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-05 Thread Felix Fietkau
On 05.04.22 20:51, Daniel Golle wrote: On Tue, Apr 05, 2022 at 05:05:43PM +0200, Felix Fietkau wrote: On 05.04.22 03:14, Daniel Golle wrote: > When building the Linux kernel, the linker generates a hash of all > versions of tools involved in a build called BuildID in ELF header. > This breaks

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-05 Thread Daniel Golle
On Tue, Apr 05, 2022 at 05:05:43PM +0200, Felix Fietkau wrote: > On 05.04.22 03:14, Daniel Golle wrote: > > When building the Linux kernel, the linker generates a hash of all > > versions of tools involved in a build called BuildID in ELF header. > > This breaks reproducibility accross different bu

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-05 Thread Michael Richardson
please forgive me stupidity, I couldn't understand the last part of your recommendation: Daniel Golle wrote: > Hence, to achieve reproducible builds we will either have to resort to > identical containers/VMs for building or get rid of the BuildID hash > alltogether (or use a differ

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-05 Thread Felix Fietkau
On 05.04.22 03:14, Daniel Golle wrote: When building the Linux kernel, the linker generates a hash of all versions of tools involved in a build called BuildID in ELF header. This breaks reproducibility accross different buildhosts eventhough OpenWrt builds the toolchain from source -- the build-i

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-05 Thread Paul Spooren
Hi, >> +$(SED) -i $(LINUX_DIR)/Makefile -e >> 's/--build-id=.*/--build-id=0x$(LINUX_VERMAGIC)/g’ This doesn’t fly since LINUX_VERMAGIC (based on .vermagic) is based on the Kernel configuration and only available after the Configuration step. I moved it from the Prepare to the end of Config

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-05 Thread Paul Spooren
Hi, > To investigate the issue of non-reproducible kernel images accross > buildhosts I compated the files build by OpenWrt's buildbots with > Paul's rebuilder script running on his (Aarch64) Mac. Sorry there was a misunderstanding. I’m building on macOS to find extra issues but the “rebuild” fi

Re: [PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-04 Thread Petr Štetiar
Daniel Golle [2022-04-05 02:14:09]: Hi, thanks a lot for your and Paul's reproducible efforts! > diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk > index 1e82f7d739..9c8d5fbe97 100644 > --- a/include/kernel-defaults.mk > +++ b/include/kernel-defaults.mk > @@ -46,6 +46,7 @@ e

[PATCH/RFC] kernel-defaults.mk: get rid of BuildID

2022-04-04 Thread Daniel Golle
When building the Linux kernel, the linker generates a hash of all versions of tools involved in a build called BuildID in ELF header. This breaks reproducibility accross different buildhosts eventhough OpenWrt builds the toolchain from source -- the build-id hash ends up to be the only thing which