mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 17:11:34 +02:00
build_library: avoid a SIGPIPE while building arm64 UEFI firmware
This just sets the code file size to the var file size, so it gets zero-padding without having to pipe commands together. From: David Michael <david.michael@coreos.com> [Rebased] Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
parent
1761d9d071
commit
71ebc66065
@ -721,11 +721,13 @@ _write_qemu_uefi_conf() {
|
||||
info "Updating edk2 in /build/${BOARD}"
|
||||
emerge-${BOARD} --nodeps --select -qugKN sys-firmware/edk2
|
||||
# Create 64MiB flash device image files.
|
||||
cat "/build/${BOARD}/usr/share/edk2/QEMU_EFI.fd" /dev/zero | \
|
||||
dd iflag=fullblock bs=1M count=64 of="$(_dst_dir)/${flash_ro}" \
|
||||
status=none
|
||||
dd if=/dev/zero bs=1M count=64 of="$(_dst_dir)/${flash_rw}" \
|
||||
status=none
|
||||
cp "/build/${BOARD}/usr/share/edk2/QEMU_EFI.fd" \
|
||||
"$(_dst_dir)/${flash_ro}.work"
|
||||
truncate --reference="$(_dst_dir)/${flash_rw}" \
|
||||
"$(_dst_dir)/${flash_ro}.work"
|
||||
mv "$(_dst_dir)/${flash_ro}.work" "$(_dst_dir)/${flash_ro}"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user