scripts/gen_image_generic.sh: fix order of files in EFI bootfs
authorDaniel Golle <daniel@makrotopia.org>
Thu, 14 Apr 2022 23:46:28 +0000 (00:46 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 15 Apr 2022 00:17:04 +0000 (01:17 +0100)
commit4d289ae7e63893f90957b77962c6b60574d35441
treeac835eff818bd03235223fcc9cba02b63c579d1a
parent81da8a295bad2d7ea29bb19493a75b42e5d9ad63
scripts/gen_image_generic.sh: fix order of files in EFI bootfs

mtools recursive copy (mcopy -s ...) is using READDIR(3) to iterate
over the directory entries, hence they end up in the FAT filesystem in
traversal order which breaks reproducibility (rather than being added
to the FAT filesystem in a reproducible order). Implement recursive
copy in gen_image_generic.sh in Shell code instead, as in that way we
can force files to be copied in reproducible order.

Fixes: aece8f5ae8 ("scripts/gen_image_generic.sh: generate reproducible EFI filesystem")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
scripts/gen_image_generic.sh