Skip to content

Commit 6120c0d

Browse files
committed
flashfiles.mk: Use du -b to get apparent size
On disks using ZFS, `du` can't get correct size of efi_images_tmp, which caused "Disk full" error. Using apparent size can fix it. Signed-off-by: Hao Yao <hao.yao@intel.com>
1 parent 4e8e827 commit 6120c0d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tasks/flashfiles.mk

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,9 @@ endif
417417
done;
418418

419419
$(hide)rm -rf $(ISO_EFI); \
420-
flashfile_size=`du -s ${PRODUCT_OUT}/efi_images_tmp/ | awk '{print $$1}'`; \
421-
flashfile_size=`expr $${flashfile_size} + 102400`; \
422-
flashfile_size=`expr $${flashfile_size} / 63 + 1 `; \
423-
flashfile_size=`expr $${flashfile_size} \* 63 `; \
424-
dd if=/dev/zero of=$(ISO_EFI) bs=1024 count=$${flashfile_size};
420+
flashfile_size=`du -b -s ${PRODUCT_OUT}/efi_images_tmp/ | awk '{print $$1}'`; \
421+
flashfile_size=`expr $${flashfile_size} / 1048576 + 11`; \
422+
dd if=/dev/zero of=$(ISO_EFI) bs=1M count=$${flashfile_size};
425423

426424
$(hide)mkdosfs -F32 -n EFI $(ISO_EFI);
427425
$(hide)mmd -i $(ISO_EFI) ::EFI;

0 commit comments

Comments
 (0)