imx: fix the boot file system of the Gateworks Ventana

Build/boot-overlay copies the device trees and builds the boot script in
$@.boot, so every file carries the build time. mkfs.ubifs writes st_mtime
straight into the inode and has no SOURCE_DATE_EPOCH support, and the two
tar calls pass neither --sort=name nor the options that pin the owner and
the mode, so both nand.ubi and bootfs.tar.gz differ between builds.

The diffoscope of the published bootfs.tar.gz shows both: wall clock
mtimes on the device tree files, and a member order that follows readdir.

Set the times in $@.boot once, before the UBIFS image and the tar are
made. Sort the members of both archives and give them a fixed owner and
mode, as the other archive recipes do.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin committed 2026-09-22 18:46:30 +02:00
1 parent f73a0d39e1
commit fc166c4869
1 file changed
+6 -2
+6 -2
View File
@@ -22,12 +22,15 @@ define Build/boot-overlay
-d ./bootscript-$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)) \
$@.boot/6x_bootscript-$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME))
$(if $(SOURCE_DATE_EPOCH),find $@.boot -exec touch -hcd "@$(SOURCE_DATE_EPOCH)" {} +)
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
--space-fixup --compr=zlib --squash-uids \
$(MKUBIFS_OPTS) -c 16248 \
-o $@.boot.ubifs -d $@.boot
$(TAR) -C $@.boot -cf $@.boot.tar .
$(TAR) -C $@.boot -cf $@.boot.tar \
--sort=name --numeric-owner --owner=0 --group=0 --mode=go-w .
endef
define Build/bootfs.tar.gz
@@ -36,7 +39,8 @@ define Build/bootfs.tar.gz
$(TAR) -C $@.boot -xf $(IMAGE_KERNEL).boot.tar
$(TAR) -C $@.boot \
--numeric-owner --owner=0 --group=0 --transform "s,./,./boot/," \
--sort=name --numeric-owner --owner=0 --group=0 --mode=go-w \
--transform "s,./,./boot/," \
-czvf $@ .
endef