take slow cards and adapters into account, by waiting 5 seconds between partition creations

This commit is contained in:
Dan Johansen 2020-08-18 19:29:59 +02:00
parent d8c56988ab
commit 1e6956a866
No known key found for this signature in database
GPG Key ID: 084A7FC0035B1D49
1 changed files with 1 additions and 0 deletions

View File

@ -237,6 +237,7 @@ prepare_card () {
#partition with boot and root
parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1
parted -s $SDCARD mkpart primary fat32 32M 256M 1> /dev/null 2>&1
sleep 5
START=`cat /sys/block/$DEV_NAME/${DEV_NAME}${SDDEV}1/start`
SIZE=`cat /sys/block/$DEV_NAME/${DEV_NAME}${SDDEV}1/size`
END_SECTOR=$(expr $START + $SIZE)