@@ -45,6 +45,8 @@ IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$
IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
IMG_COMBINED:=$(IMG_PREFIX)-combined
+SIGNATURE:=$(shell printf "%.8s" $(SOURCE_DATE_EPOCH))
+
MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
ifneq ($(CONFIG_BIG_ENDIAN),)
@@ -13,8 +13,6 @@ include $(INCLUDE_DIR)/image.mk
KERNEL_LOADADDR := 0x00008000
-SIGNATURE:=$(shell printf "%.8s" $(SOURCE_DATE_EPOCH))
-
define Build/boot-scr
rm -f $@-boot.scr
sed \
@@ -7,8 +7,6 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-SIGNATURE:=$(shell printf "%.8s" $(SOURCE_DATE_EPOCH))
-
define Build/tegra-sdcard
rm -fR $@.boot
mkdir -p $@.boot
@@ -40,7 +40,6 @@ ifneq ($(GRUB_TERMINALS),)
GRUB_TERMINAL_CONFIG := terminal_input $(GRUB_TERMINALS); terminal_output $(GRUB_TERMINALS)
endif
-SIGNATURE:=$(shell perl -e 'printf("%08x", rand(0xFFFFFFFF))')
ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02)
The SIGNATURE variable is a unique ID used as partition identifier for x86, tegra and mvebu. This patch unifies the generation of SIGNATURE by creating it once in include/image.mk instead differently for each target. Also make it reproducible by using SOURCE_DATE_EPOCH, resulting in equal SIGNATURE valuess over multiple build with the same commit. This is another step in the direction of reproducible OpenWrt images. Signed-off-by: Paul Spooren <mail@aparcar.org> --- I'm currently trying to step up my commit message game, please comment if the message is unclear or confusing! include/image.mk | 2 ++ target/linux/mvebu/image/Makefile | 2 -- target/linux/tegra/image/Makefile | 2 -- target/linux/x86/image/Makefile | 1 - 4 files changed, 2 insertions(+), 5 deletions(-)