mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 03:43:29 +00:00
x86 EFI image: fix EFI image file size (#2783)
Fix EFI image file size is not a multiple of 8k block size. It cause a problem when import image disk in pve with zfs file system.
This commit is contained in:
parent
a08774c525
commit
5537db1a88
@ -140,7 +140,7 @@ ifneq ($(CONFIG_GRUB_IMAGES)$(CONFIG_EFI_IMAGES),)
|
||||
"$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img"
|
||||
|
||||
# Convert the MBR partition to GPT and set EFI ROOTFS signature
|
||||
dd if=/dev/zero of="$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" bs=512 count=33 conv=notrunc oflag=append
|
||||
dd if=/dev/zero of="$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" bs=512 count=34 conv=notrunc oflag=append
|
||||
sgdisk -g "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img"
|
||||
sgdisk -t 2:EF00 "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img"
|
||||
sgdisk -t 3:EF02 "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img"
|
||||
@ -276,13 +276,13 @@ endif
|
||||
ifneq ($(CONFIG_QCOW2_IMAGES),)
|
||||
define Image/Build/qcow2
|
||||
rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).qcow2 || true
|
||||
/usr/bin/qemu-img convert -O qcow2 \
|
||||
/usr/bin/qemu-img convert -f raw -O qcow2 \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).qcow2
|
||||
endef
|
||||
define Image/Build/qcow2_efi
|
||||
rm $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).qcow2 || true
|
||||
/usr/bin/qemu-img convert -O qcow2 \
|
||||
/usr/bin/qemu-img convert -f raw -O qcow2 \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).qcow2
|
||||
endef
|
||||
|
Loading…
Reference in New Issue
Block a user