diff options
-rwxr-xr-x | scripts/build/binary_grub-efi | 3 | ||||
-rwxr-xr-x | scripts/build/efi-image | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/build/binary_grub-efi b/scripts/build/binary_grub-efi index 714a7dd50..bd7d75f02 100755 --- a/scripts/build/binary_grub-efi +++ b/scripts/build/binary_grub-efi @@ -258,7 +258,8 @@ size=\$((\$size + 4096 * 4)) blocks=\$(((\$size / 1024 + 55) / 32 * 32 )) rm -f ${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img -mkfs.msdos -C "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" \$blocks -i ${SOURCE_DATE_EPOCH} >/dev/null +# The VOLID must be (truncated to) a 32bit hexadecimal number +mkfs.msdos -C "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" \$blocks -i $(printf "%08x" $((${SOURCE_DATE_EPOCH}%4294967296))) >/dev/null mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::EFI mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::EFI/boot mcopy -m -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp/EFI/boot/*.efi \ diff --git a/scripts/build/efi-image b/scripts/build/efi-image index 8831bfa81..bc8ed3a93 100755 --- a/scripts/build/efi-image +++ b/scripts/build/efi-image @@ -75,9 +75,10 @@ grub-mkimage -O "$platform" \ # Stuff it into a FAT filesystem, making it as small as possible. 24KiB # headroom seems to be enough; (x+31)/32*32 rounds up to multiple of 32. +# The VOLID must be (truncated to) a 32bit hexadecimal number mkfs.msdos -C "$outdir/efi.img" \ $(( ($(stat -c %s "$workdir/boot$efi_name.efi") / 1024 + 55) \ - / 32 * 32 )) -i ${SOURCE_DATE_EPOCH} + / 32 * 32 )) -i $(printf "%08x" $((${SOURCE_DATE_EPOCH}%4294967296))) mmd -i "$outdir/efi.img" ::efi mmd -i "$outdir/efi.img" ::efi/boot # Set the timestamp of the .efi file |