From: Priya N S <priya...@ti.com> From: Priya N S <priya...@ti.com>
* Cylinder size of sdcard is manufacturer dependent. To standardize sdcard partitioning remove the use of cylinder (cyl) unit. * While at it shift to using fdisk for the partitioning the sdcard. fdisk is already used in the script and this reduces the dependencies of this script on available installed applications. * This fixes cases where already partitioned cards were being detected as not partitioned because of size check elsewhere in the script failing. Signed-off-by: Priya N S <priya...@ti.com> Signed-off-by: Sekhar Nori <nsek...@ti.com> --- create-sdcard.sh | 50 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/create-sdcard.sh b/create-sdcard.sh index 8f99687..1114f70 100644 --- a/create-sdcard.sh +++ b/create-sdcard.sh @@ -501,11 +501,29 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'` echo DISK SIZE - $SIZE bytes -parted -s $DRIVE mklabel msdos -parted -s $DRIVE unit cyl mkpart primary fat32 -- 0 9 -parted -s $DRIVE set 1 boot on -parted -s $DRIVE unit cyl mkpart primary ext2 -- 9 310 -parted -s $DRIVE unit cyl mkpart primary ext2 -- 310 -2 +cat << END | fdisk $DRIVE +n +p +1 + ++75M +n +p +2 + ++2.4G +n +p +3 + + +t +1 +c +a +1 +w +END cat << EOM @@ -559,10 +577,24 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'` echo DISK SIZE - $SIZE bytes -parted -s $DRIVE mklabel msdos -parted -s $DRIVE unit cyl mkpart primary fat32 -- 0 9 -parted -s $DRIVE set 1 boot on -parted -s $DRIVE unit cyl mkpart primary ext2 -- 9 -2 +cat << END | fdisk $DRIVE +n +p +1 + ++75M +n +p +2 + + +t +1 +c +a +1 +w +END cat << EOM -- 2.19.1.windows.1 _______________________________________________ meta-arago mailing list meta-arago@arago-project.org http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago