aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gen_image_generic.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen_image_generic.sh')
-rwxr-xr-xscripts/gen_image_generic.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 6a01c813d7..5e37224736 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -31,8 +31,9 @@ dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc
if [ -n "$GUID" ]; then
[ -n "$PADDING" ] && dd if=/dev/zero of="$OUTPUT" bs=512 seek="$((ROOTFSOFFSET + ROOTFSSIZE))" conv=notrunc count="$sect"
- mkfs.fat -n kernel -C "$OUTPUT.kernel" -S 512 "$((KERNELSIZE / 1024))"
- mcopy -s -i "$OUTPUT.kernel" "$KERNELDIR"/* ::/
+ mkfs.fat --invariant -n kernel -C "$OUTPUT.kernel" -S 512 "$((KERNELSIZE / 1024))"
+ [ "$SOURCE_DATE_EPOCH" ] && find "$KERNELDIR"/ -mindepth 1 -execdir touch -hcd "@${SOURCE_DATE_EPOCH}" "{}" +
+ LC_ALL=C mcopy -m -s -i "$OUTPUT.kernel" "$KERNELDIR"/* ::/
else
make_ext4fs -J -L kernel -l "$KERNELSIZE" ${SOURCE_DATE_EPOCH:+-T ${SOURCE_DATE_EPOCH}} "$OUTPUT.kernel" "$KERNELDIR"
fi