diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2016-11-29 14:06:20 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2016-11-29 14:33:12 +0000 |
commit | 84c5d683e8764c624128908a18c89542817ce42d (patch) | |
tree | 4613428f1379d62944c26ca4c20b63f55545bc4a | |
parent | 172f21794850988c6c81683f73c641cf73ef55ca (diff) |
Use consistent timestamp in u-boot header
Change-Id: I65fb1c9ecefca621f074d838d5f0ada3fdcb4bba
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
-rwxr-xr-x | dracut/generate-initramfs | 2 | ||||
-rwxr-xr-x | qt-ostree/qt-ostree | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/dracut/generate-initramfs b/dracut/generate-initramfs index cd468ce..2e46f21 100755 --- a/dracut/generate-initramfs +++ b/dracut/generate-initramfs @@ -118,7 +118,7 @@ generate_initramfs() if [ "${BOOTLOADER}" = "u-boot" ] ; then # Add u-boot header. - mkimage -A arm -O linux -T ramdisk -a 0 -e 0 -d initramfs.img ${INITRAMFS} + SOURCE_DATE_EPOCH=1 mkimage -A arm -O linux -T ramdisk -a 0 -e 0 -d initramfs.img ${INITRAMFS} rm -f initramfs.img else mv initramfs.img ${INITRAMFS} diff --git a/qt-ostree/qt-ostree b/qt-ostree/qt-ostree index 318936a..d436277 100755 --- a/qt-ostree/qt-ostree +++ b/qt-ostree/qt-ostree @@ -634,7 +634,10 @@ organize_boot_files() if file -b $name | grep -qi "ASCII text"; then qt_ostree_info "Add u-boot header to a boot script at: ${BOOT_FILE_PATH}/${name} ..." mv ${name} ${name}-tmp - mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" -d ${name}-tmp ${name} + # The added header embedds timestamp of the time when 'mkimage' was executed. This results + # in a new checksum even if nothing has really changed in the file. Set a consistent + # timestamp as U-Boot utilizes https://reproducible-builds.org/specs/source-date-epoch/ + SOURCE_DATE_EPOCH=1 mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" -d ${name}-tmp ${name} rm ${name}-tmp fi fi |