[openwrt/openwrt] scripts/gen_image_generic.sh: make ext4 bootfs reproducible

LEDE Commits lede-commits at lists.infradead.org
Mon Mar 28 12:55:21 PDT 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/068ea2cde04e2666fb05731cea941bccfaeddc25

commit 068ea2cde04e2666fb05731cea941bccfaeddc25
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Mar 28 18:13:45 2022 +0100

    scripts/gen_image_generic.sh: make ext4 bootfs reproducible
    
    Set fixed timestamp for kernel other files in /boot filesystem.
    This should help making x86 *combined* images reproducible.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 17888eac60..6a01c813d7 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -34,7 +34,7 @@ if [ -n "$GUID" ]; then
     mkfs.fat -n kernel -C "$OUTPUT.kernel" -S 512 "$((KERNELSIZE / 1024))"
     mcopy -s -i "$OUTPUT.kernel" "$KERNELDIR"/* ::/
 else
-    make_ext4fs -J -L kernel -l "$KERNELSIZE" "$OUTPUT.kernel" "$KERNELDIR"
+    make_ext4fs -J -L kernel -l "$KERNELSIZE" ${SOURCE_DATE_EPOCH:+-T ${SOURCE_DATE_EPOCH}} "$OUTPUT.kernel" "$KERNELDIR"
 fi
 dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc
 rm -f "$OUTPUT.kernel"




More information about the lede-commits mailing list