diff options
| author | Robert Marko | 2026-10-03 10:09:00 +0000 |
|---|---|---|
| committer | Robert Marko | 2026-10-03 10:15:18 +0000 |
| commit | dfb281ad5e39a6320899dad6b6a7686f1bd79dae (patch) | |
| tree | 10d2776e4867c204271d8fdf6ba7fe27903208cd | |
| parent | fcc5cb880e042b275b2d4f9d9a7287079126f414 (diff) | |
apboot-aruba-ipq806x: make timestamps reproducible
APBoot embeds the current time in both its version banner and generated
U-Boot timestamp header. This makes the AP-32x bootloader artifact
differ between otherwise identical builds.
Use SOURCE_DATE_EPOCH for these timestamps when it is set, while
retaining the wall-clock fallback for other builds.
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | package/boot/apboot-aruba-ipq806x/patches/100-reproducible-timestamps.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/boot/apboot-aruba-ipq806x/patches/100-reproducible-timestamps.patch b/package/boot/apboot-aruba-ipq806x/patches/100-reproducible-timestamps.patch new file mode 100644 index 0000000000..0bad313ea4 --- /dev/null +++ b/package/boot/apboot-aruba-ipq806x/patches/100-reproducible-timestamps.patch @@ -0,0 +1,38 @@ +From: Robert Marko <robimarko@gmail.com> +Subject: [PATCH] Make build timestamps reproducible + +Use SOURCE_DATE_EPOCH to generate the build banner and U-Boot timestamps +when it is set. + +Signed-off-by: Robert Marko <robimarko@gmail.com> +--- + Makefile | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -25,7 +25,12 @@ ifndef ARUBA_MAKE_VERBOSE + MAKEFLAGS += --no-print-directory -s + endif + +-TSTAMP:=$(shell date +'%Y-%m-%d at %H:%M:%S') ++APBOOT_DATE:=date ++ifneq ($(SOURCE_DATE_EPOCH),) ++APBOOT_DATE:=date --utc --date="@$(SOURCE_DATE_EPOCH)" ++endif ++ ++TSTAMP:=$(shell $(APBOOT_DATE) +'%Y-%m-%d at %H:%M:%S') + + # NOTE + # NOTE THIS VERSION INFORMATION IS ONLY USED BY DEFAULT; SEE include/[ac]pboot_ver.mk +@@ -383,8 +388,8 @@ $(SUBDIRS): + $(MAKE) -C $@ all + + timestamp_h: +- @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > include/timestamp.h +- @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> include/timestamp.h ++ @LC_ALL=C $(APBOOT_DATE) +'#define U_BOOT_DATE "%b %d %C%y"' > include/timestamp.h ++ @LC_ALL=C $(APBOOT_DATE) +'#define U_BOOT_TIME "%T"' >> include/timestamp.h + + $(obj)lib/asm-offsets.s: \ + $(src)lib/asm-offsets.c include/configs/${CONFIG_FILE}.h \ |