Commit 8664ab7d authored by Vagrant Cascadian's avatar Vagrant Cascadian Committed by Tom Rini
Browse files

Set time and umask on multi-dtb fit images to ensure reproducibile builds.

When building compressed (lzop, gzip) multi-dtb fit images, the
compression tool may embed the time or umask in the image.

Work around this by manually setting the time of the source file using
SOURCE_DATE_EPOCH and a hard-coded 0600 umask.

With gzip, this could be accomplished by using -n/--no-name, but lzop
has no current workaround:

Signed-off-by: default avatarVagrant Cascadian <>
parent dcd8a102
......@@ -391,6 +391,10 @@ MKIMAGEFLAGS_$(SPL_BIN) = -f auto -A $(ARCH) -T firmware -C none -O
$(obj)/$(SPL_BIN) /dev/null $(SHRUNK_ARCH_DTB) FORCE
$(call if_changed,mkimage)
touch -d @$(SOURCE_DATE_EPOCH) $(obj)/$(SPL_BIN)
chmod 0600 $(obj)/$(SPL_BIN)
$(obj)/$(SPL_BIN) $(obj)/$(SPL_BIN)
@gzip -kf9 $< > $@
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment