From: Marek Szyprowski Date: Fri, 13 Nov 2020 10:17:44 +0000 (+0100) Subject: tizen: sd_fusing_amlogic: wait a bit before creating filesystems X-Git-Tag: submit/tizen/20201208.071016~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F247688%2F4;p=platform%2Fkernel%2Fu-boot.git tizen: sd_fusing_amlogic: wait a bit before creating filesystems With Ubuntu 18.04 and slow SD card I've observed that partition scan takes too much time, so the calls to create filesystems on the created partitions fail. Partition rescan is done asynchronously so there is no easy way to check it. Force a 2 seconds delay before creating filesystems to avoid this issue. This fixes the following issue: --->8--- The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. mkfs.fat 4.1 (2017-01-24) mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows mkfs.vfat: unable to open /dev/sdb1: No such file or directory mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. End /dev/sdb format --->8--- Signed-off-by: Marek Szyprowski Change-Id: I9bcfa9724ae64bff0725000600c579fa9bc33932 --- diff --git a/scripts/tizen/sd_fusing_amlogic.sh b/scripts/tizen/sd_fusing_amlogic.sh index 1ec2909ea9..aab4aeeab2 100755 --- a/scripts/tizen/sd_fusing_amlogic.sh +++ b/scripts/tizen/sd_fusing_amlogic.sh @@ -258,6 +258,9 @@ function mkpart_3 () { __EOF__ fi + # wait a bit for async partition scan after re-partitioning + sleep 2 + local -r PART1=/dev/`lsblk ${DISK} -o KNAME | grep -G "[a-z]1\$"` mkfs.vfat -F 16 ${PART1} -n $BOOT