Commit c624c994 authored by Strit's avatar Strit

fix detection of partition sizes in on2 and vim3

parent a6aa7dee
......@@ -293,8 +293,8 @@ prepare_card () {
#partition with 2 partitions
parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1
parted -s $SDCARD mkpart primary fat32 0% 256M 1> /dev/null 2>&1
START=`cat /sys/block/$DEV_NAME/${DEV_NAME}p1/start`
SIZE=`cat /sys/block/$DEV_NAME/${DEV_NAME}p1/size`
START=`cat /sys/block/$DEV_NAME/${DEV_NAME}1/start`
SIZE=`cat /sys/block/$DEV_NAME/${DEV_NAME}1/size`
END_SECTOR=$(expr $START + $SIZE)
parted -s $SDCARD mkpart primary ext4 "${END_SECTOR}s" 100% 1> /dev/null 2>&1
partprobe $SDCARD 1> /dev/null 2>&1
......@@ -319,8 +319,8 @@ prepare_card () {
#partition with 2 partitions
parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1
parted -s $SDCARD mkpart primary fat32 32M 256M 1> /dev/null 2>&1
START=`cat /sys/block/$DEV_NAME/${DEV_NAME}p1/start`
SIZE=`cat /sys/block/$DEV_NAME/${DEV_NAME}p1/size`
START=`cat /sys/block/$DEV_NAME/${DEV_NAME}1/start`
SIZE=`cat /sys/block/$DEV_NAME/${DEV_NAME}1/size`
END_SECTOR=$(expr $START + $SIZE)
parted -s $SDCARD mkpart primary ext4 "${END_SECTOR}s" 100% 1> /dev/null 2>&1
partprobe $SDCARD 1> /dev/null 2>&1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment