World of XorA

August 14, 2009

OMAP3 SD Booting

Filed under: Geek, Work — XorA @ 12:18 pm

There is an updated and bugfixed version of this script now added to the OE git repository where all updates from now will be done.
Latest Version

Since the instructions to format an SD card for booting with beagle/zoom2/other omap boards seems to be so complex I decided to write a script that was nice and simple to accomplish the same task.

Here is my tested and working script.

Download
#! /bin/sh

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

mkfs.vfat -F 32 -n "boot" ${DRIVE}1
mke2fs -j -L "rootfs" ${DRIVE}2

To run this script you will require to run it as root. On Ubuntu or other linux with sudo setup run the script as

sudo sh mkcard.sh /dev/sdX

replacing sdX with the base device name of your SD card device.

If your running a distribution without sudo setup then become root then run the script as

su -
sh mkcard.sh /dev/sdX

August 3, 2009

Cave Hunting in Roslin

Filed under: Friends, Fun — XorA @ 10:44 am

Has been a fun weekend with a bit of excercise thrown in for good measure. A trip out to the Roslin Annual Jamboree with Jen and Kirsten. The Jamboree itself was basically a village fete so we had tea and cakes. Kirsten found herself a mini steam train to ride on.

One of the guys/rangers at the even told us that there was an interesting cave called Wallace’s Cave down the river from where we were and that you could actually get along the path that was marked as closed so we decided to hunt that.

Much climbing of hills, walking along walls bridging deep crevasses and head height nettles we found a variety of cave like places but not the right cave. But we did find a cool little mini waterfall.

We kind of decided that we should do it again, but next time in suitable clothes for getting wet and actually walk the river bed. In prep I also have the Ordinace Survey maps for mobile devices borrowed from a countryside ranger. I guess I better find waterproof PDA housing.

Powered by WordPress