* [tisdk-setup-scripts][PATCH] create-sdcard: use parted instead of sfdisk
@ 2016-05-05 18:09 Jacob Stiffler
2016-05-05 18:42 ` Denys Dmytriyenko
0 siblings, 1 reply; 3+ messages in thread
From: Jacob Stiffler @ 2016-05-05 18:09 UTC (permalink / raw)
To: meta-arago
* The options for sfdisk since version 2.26
* Ubuntu 16.04 contains sfdisk version 2.27.1
* In order to retain compatibility from Ubuntu 12.04 through 16.04,i
use parted instead.
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
create-sdcard.sh | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/create-sdcard.sh b/create-sdcard.sh
index 46ed5ae..edf57b0 100644
--- a/create-sdcard.sh
+++ b/create-sdcard.sh
@@ -501,13 +501,12 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
echo DISK SIZE - $SIZE bytes
-CYLINDERS=`echo $SIZE/255/63/512 | bc`
+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
-sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE << EOF
-,9,0x0C,*
-10,300,,-
-310,,,-
-EOF
cat << EOM
@@ -560,12 +559,10 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
echo DISK SIZE - $SIZE bytes
-CYLINDERS=`echo $SIZE/255/63/512 | bc`
-
-sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE << EOF
-,9,0x0C,*
-10,,,-
-EOF
+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 << EOM
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [tisdk-setup-scripts][PATCH] create-sdcard: use parted instead of sfdisk
2016-05-05 18:09 [tisdk-setup-scripts][PATCH] create-sdcard: use parted instead of sfdisk Jacob Stiffler
@ 2016-05-05 18:42 ` Denys Dmytriyenko
2016-05-05 20:49 ` Stiffler, Jacob
0 siblings, 1 reply; 3+ messages in thread
From: Denys Dmytriyenko @ 2016-05-05 18:42 UTC (permalink / raw)
To: Jacob Stiffler; +Cc: meta-arago
On Thu, May 05, 2016 at 02:09:08PM -0400, Jacob Stiffler wrote:
> * The options for sfdisk since version 2.26
Truncated sentence?
> * Ubuntu 16.04 contains sfdisk version 2.27.1
> * In order to retain compatibility from Ubuntu 12.04 through 16.04,i
> use parted instead.
>
> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> ---
> create-sdcard.sh | 21 +++++++++------------
> 1 file changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/create-sdcard.sh b/create-sdcard.sh
> index 46ed5ae..edf57b0 100644
> --- a/create-sdcard.sh
> +++ b/create-sdcard.sh
> @@ -501,13 +501,12 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
>
> echo DISK SIZE - $SIZE bytes
>
> -CYLINDERS=`echo $SIZE/255/63/512 | bc`
> +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
>
> -sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE << EOF
> -,9,0x0C,*
> -10,300,,-
> -310,,,-
> -EOF
>
> cat << EOM
>
> @@ -560,12 +559,10 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
>
> echo DISK SIZE - $SIZE bytes
>
> -CYLINDERS=`echo $SIZE/255/63/512 | bc`
> -
> -sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE << EOF
> -,9,0x0C,*
> -10,,,-
> -EOF
> +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 << EOM
>
> --
> 1.9.1
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tisdk-setup-scripts][PATCH] create-sdcard: use parted instead of sfdisk
2016-05-05 18:42 ` Denys Dmytriyenko
@ 2016-05-05 20:49 ` Stiffler, Jacob
0 siblings, 0 replies; 3+ messages in thread
From: Stiffler, Jacob @ 2016-05-05 20:49 UTC (permalink / raw)
To: Dmytriyenko, Denys; +Cc: meta-arago@arago-project.org
> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Thursday, May 05, 2016 2:43 PM
> To: Stiffler, Jacob
> Cc: meta-arago@arago-project.org
> Subject: Re: [meta-arago] [tisdk-setup-scripts][PATCH] create-sdcard: use
> parted instead of sfdisk
>
> On Thu, May 05, 2016 at 02:09:08PM -0400, Jacob Stiffler wrote:
> > * The options for sfdisk since version 2.26
>
> Truncated sentence?
>
Yeah, I'll send out a v2.
>
> > * Ubuntu 16.04 contains sfdisk version 2.27.1
> > * In order to retain compatibility from Ubuntu 12.04 through 16.04,i
> > use parted instead.
> >
> > Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> > ---
> > create-sdcard.sh | 21 +++++++++------------
> > 1 file changed, 9 insertions(+), 12 deletions(-)
> >
> > diff --git a/create-sdcard.sh b/create-sdcard.sh index
> > 46ed5ae..edf57b0 100644
> > --- a/create-sdcard.sh
> > +++ b/create-sdcard.sh
> > @@ -501,13 +501,12 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print
> > $5}'`
> >
> > echo DISK SIZE - $SIZE bytes
> >
> > -CYLINDERS=`echo $SIZE/255/63/512 | bc`
> > +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
> >
> > -sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE << EOF
> > -,9,0x0C,*
> > -10,300,,-
> > -310,,,-
> > -EOF
> >
> > cat << EOM
> >
> > @@ -560,12 +559,10 @@ SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print
> > $5}'`
> >
> > echo DISK SIZE - $SIZE bytes
> >
> > -CYLINDERS=`echo $SIZE/255/63/512 | bc`
> > -
> > -sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE << EOF
> > -,9,0x0C,*
> > -10,,,-
> > -EOF
> > +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 << EOM
> >
> > --
> > 1.9.1
> >
> > _______________________________________________
> > meta-arago mailing list
> > meta-arago@arago-project.org
> > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-05 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-05 18:09 [tisdk-setup-scripts][PATCH] create-sdcard: use parted instead of sfdisk Jacob Stiffler
2016-05-05 18:42 ` Denys Dmytriyenko
2016-05-05 20:49 ` Stiffler, Jacob
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.