<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Improved OMAP3 Card Formatter</title>
	<atom:link href="http://www.xora.org.uk/2009/09/06/improved-omap3-card-formatter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xora.org.uk/2009/09/06/improved-omap3-card-formatter/</link>
	<description>Random Stuff</description>
	<lastBuildDate>Fri, 11 Mar 2011 12:50:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Jeff</title>
		<link>http://www.xora.org.uk/2009/09/06/improved-omap3-card-formatter/comment-page-1/#comment-48657</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Sat, 24 Oct 2009 06:02:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.xora.org.uk/?p=109#comment-48657</guid>
		<description>Hi Graeme, I can&#039;t tell you how much time your little script has saved me.  I have also posted a link to it in the Meld embedded Linux Texas Instruments discussion group at 

http://meld.mvista.com

We&#039;d be very happy if you joined the discussion.

thanks!

Jeff</description>
		<content:encoded><![CDATA[<p>Hi Graeme, I can&#8217;t tell you how much time your little script has saved me.  I have also posted a link to it in the Meld embedded Linux Texas Instruments discussion group at </p>
<p><a href="http://meld.mvista.com" rel="nofollow">http://meld.mvista.com</a></p>
<p>We&#8217;d be very happy if you joined the discussion.</p>
<p>thanks!</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyril</title>
		<link>http://www.xora.org.uk/2009/09/06/improved-omap3-card-formatter/comment-page-1/#comment-48651</link>
		<dc:creator>Cyril</dc:creator>
		<pubDate>Mon, 12 Oct 2009 13:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.xora.org.uk/?p=109#comment-48651</guid>
		<description>Thanks for your script. Simple but efficient... and exactly what I was searching for.

I made few customizations:
  - Detect if drive has been given on command line. If fail, then usage is displayed.

  - I had an issue with your script by having Nautilus file browser (I&#039;m using Ubuntu Gnome) starting automatically after FAT32 part.
    Don&#039;t know why! May be because of my SD card that was containing some pictures before.
    Therefore, I added some umount before each mkfs/mke2fs to solve that issue.


#! /bin/sh
# mkcard.sh v0.2
# (c) Copyright 2009 Graeme Gregory
# Licensed under terms of GPLv3

if [ -n &quot;$1&quot; ]; then
	DRIVE=$1

	dd if=/dev/zero of=$DRIVE bs=1024 count=1024

	SIZE=`fdisk -l $DRIVE &#124; grep Disk &#124; awk &#039;{print $5}&#039;`

	echo DISK SIZE - $SIZE bytes

	CYLINDERS=`echo $SIZE/255/63/512 &#124; bc`

	echo CYLINDERS - $CYLINDERS

	{
	echo ,9,0x0C,*
	echo ,,,-
	} &#124; sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE

	if [ -b ${DRIVE}1 ]; then
		umount -l ${DRIVE}1
		mkfs.vfat -F 32 -n &quot;boot&quot; ${DRIVE}1
	else
		if [ -b ${DRIVE}p1 ]; then
			umount -l ${DRIVE}p1
			mkfs.vfat -F 32 -n &quot;boot&quot; ${DRIVE}p1
		else
			echo &quot;Cant find boot partition in /dev&quot;
		fi
	fi

	if [ -b ${DRIVE}2 ]; then
		umount -l ${DRIVE}2
		mke2fs -j -L &quot;rootfs&quot; ${DRIVE}2
	else
		if [ -b ${DRIVE}p2 ]; then
			umount -l ${DRIVE}p2
			mke2fs -j -L &quot;rootfs&quot; ${DRIVE}p2
		else
			echo &quot;Cant find rootfs partition in /dev&quot;
		fi
	fi
else
	echo &quot;Usage: sudo mkcard.sh &quot;
	echo &quot;       Example: sudo mkcard.sh /dev/sdd&gt;&quot;
fi</description>
		<content:encoded><![CDATA[<p>Thanks for your script. Simple but efficient&#8230; and exactly what I was searching for.</p>
<p>I made few customizations:<br />
  &#8211; Detect if drive has been given on command line. If fail, then usage is displayed.</p>
<p>  &#8211; I had an issue with your script by having Nautilus file browser (I&#8217;m using Ubuntu Gnome) starting automatically after FAT32 part.<br />
    Don&#8217;t know why! May be because of my SD card that was containing some pictures before.<br />
    Therefore, I added some umount before each mkfs/mke2fs to solve that issue.</p>
<p>#! /bin/sh<br />
# mkcard.sh v0.2<br />
# (c) Copyright 2009 Graeme Gregory<br />
# Licensed under terms of GPLv3</p>
<p>if [ -n "$1" ]; then<br />
	DRIVE=$1</p>
<p>	dd if=/dev/zero of=$DRIVE bs=1024 count=1024</p>
<p>	SIZE=`fdisk -l $DRIVE | grep Disk | awk &#8216;{print $5}&#8217;`</p>
<p>	echo DISK SIZE &#8211; $SIZE bytes</p>
<p>	CYLINDERS=`echo $SIZE/255/63/512 | bc`</p>
<p>	echo CYLINDERS &#8211; $CYLINDERS</p>
<p>	{<br />
	echo ,9,0x0C,*<br />
	echo ,,,-<br />
	} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE</p>
<p>	if [ -b ${DRIVE}1 ]; then<br />
		umount -l ${DRIVE}1<br />
		mkfs.vfat -F 32 -n &#8220;boot&#8221; ${DRIVE}1<br />
	else<br />
		if [ -b ${DRIVE}p1 ]; then<br />
			umount -l ${DRIVE}p1<br />
			mkfs.vfat -F 32 -n &#8220;boot&#8221; ${DRIVE}p1<br />
		else<br />
			echo &#8220;Cant find boot partition in /dev&#8221;<br />
		fi<br />
	fi</p>
<p>	if [ -b ${DRIVE}2 ]; then<br />
		umount -l ${DRIVE}2<br />
		mke2fs -j -L &#8220;rootfs&#8221; ${DRIVE}2<br />
	else<br />
		if [ -b ${DRIVE}p2 ]; then<br />
			umount -l ${DRIVE}p2<br />
			mke2fs -j -L &#8220;rootfs&#8221; ${DRIVE}p2<br />
		else<br />
			echo &#8220;Cant find rootfs partition in /dev&#8221;<br />
		fi<br />
	fi<br />
else<br />
	echo &#8220;Usage: sudo mkcard.sh &#8221;<br />
	echo &#8221;       Example: sudo mkcard.sh /dev/sdd&gt;&#8221;<br />
fi</p>
]]></content:encoded>
	</item>
</channel>
</rss>

