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 13:12:13 +0000 (14:12 +0100)
commit3e16ed30638762cbffc2bb94514a62239ce2a66b
tree3244f8cbf66bee6f00dda5f67282a32c68863909
parent7ea412ef5a2871bb42136f914206e15b8cae04e1
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>
(cherry picked from commit 4d289ae7e63893f90957b77962c6b60574d35441)
scripts/gen_image_generic.sh