summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2016-11-29 14:06:20 +0100
committerGatis Paeglis <gatis.paeglis@qt.io>2016-11-29 14:33:12 +0000
commit84c5d683e8764c624128908a18c89542817ce42d (patch)
tree4613428f1379d62944c26ca4c20b63f55545bc4a
parent172f21794850988c6c81683f73c641cf73ef55ca (diff)
Use consistent timestamp in u-boot header
Change-Id: I65fb1c9ecefca621f074d838d5f0ada3fdcb4bba Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
-rwxr-xr-xdracut/generate-initramfs2
-rwxr-xr-xqt-ostree/qt-ostree5
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