x86,tegra,mvebu: image: use common reproducible IMG_PART_SIGNATURE

These targets are currently using more or less same SIGNATURE variable
which provides unique partition ID/signature, so it makes sense to
refactor it out into common IMG_PART_SIGNATURE variable which could be
reused by all targets.

This is another step in the direction of reproducible OpenWrt images.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[split into separate commit, renamed to IMG_PART_SIGNATURE]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
Paul Spooren
2019-11-04 10:55:23 -10:00
committed by Petr Štetiar
parent 98d1c7d834
commit e97113d5e1
3 changed files with 7 additions and 12 deletions

View File

@@ -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
@@ -17,7 +15,7 @@ define Build/tegra-sdcard
$(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb $@.boot), \
$(CP) $(DTS_DIR)/*.dtb $@.boot)
sed \
-e 's#@ROOT@#$(SIGNATURE)#g' \
-e 's#@ROOT@#$(IMG_PART_SIGNATURE)#g' \
-e 's#@KERNEL@#$(KERNEL_NAME)#g' \
$(BOOT_SCRIPT) > $@-boot.scr
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
@@ -25,7 +23,7 @@ define Build/tegra-sdcard
-d $@-boot.scr \
$@.boot/boot.scr
SIGNATURE="$(SIGNATURE)" \
SIGNATURE="$(IMG_PART_SIGNATURE)" \
$(SCRIPT_DIR)/gen_image_generic.sh \
$@ \
$(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \