aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorKlaus Kurzmann <mok@fluxnetz.de>2009-12-08 22:14:07 +0100
committerKlaus Kurzmann <mok@fluxnetz.de>2009-12-08 22:14:07 +0100
commit4cc74a4b556e37bdb4a7be2890061b906d81eb8e (patch)
tree3ddc3e04ee3bf20c8d0ed7d2b2ca2ff030e190b0 /contrib
parentfd2ab2b08cb8607cdb7a0688c36b3e2e3b5cbe54 (diff)
parentd3dd1db4be32365adc5e5da8881b8b2a595a595e (diff)
downloadopenembedded-4cc74a4b556e37bdb4a7be2890061b906d81eb8e.tar.gz
Merge branch 'org.openembedded.dev' into shr/merge
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/angstrom/omap3-mkcard.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/contrib/angstrom/omap3-mkcard.sh b/contrib/angstrom/omap3-mkcard.sh
new file mode 100755
index 0000000000..f64f8e0305
--- /dev/null
+++ b/contrib/angstrom/omap3-mkcard.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+# mkcard.sh v0.4
+# (c) Copyright 2009 Graeme Gregory <dp@xora.org.uk>
+# Licensed under terms of GPLv2
+
+LC_ALL=C
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <drive>"
+ exit 1;
+fi
+
+DRIVE=$1
+
+dd if=/dev/zero of=$DRIVE bs=1024 count=1024
+
+SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
+
+echo DISK SIZE - $SIZE bytes
+
+CYLINDERS=`echo $SIZE/255/63/512 | bc`
+
+echo CYLINDERS - $CYLINDERS
+
+{
+echo ,9,0x0C,*
+echo ,,,-
+} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
+
+if [ -b ${DRIVE}1 ]; then
+ mkfs.vfat -F 32 -n "boot" ${DRIVE}1
+else
+ if [ -b ${DRIVE}p1 ]; then
+ mkfs.vfat -F 32 -n "boot" ${DRIVE}p1
+ else
+ echo "Cant find boot partition in /dev"
+ fi
+fi
+
+if [ -b ${DRIVE}2 ]; then
+ mke2fs -j -L "rootfs" ${DRIVE}2
+else
+ if [ -b ${DRIVE}p2 ]; then
+ mke2fs -j -L "rootfs" ${DRIVE}p2
+ else
+ echo "Cant find rootfs partition in /dev"
+ fi
+fi
+