Friday, 11 June 2010

How to format an SD card for the BeagleBoard

A few folks asked me about the Liquidware BeagleBoot SD Card, and if there was a tutorial somewhere showing them how to do it with an SD card they had laying around at home.
SONY DSC
So in the spirit of open source, and because it’s Friday, I present my step by step guide to making your own boot SD card for the BeagleBoard
Step 1 – What’s going on here?
First a summary of what’s about the happen. The gist of the steps that follow are this: you start with an SD card… and then you’re going to download Liquidware Beagle Angstrom Linux, format the SD card in a specific way that helps the BeagleBoard know where to find the boot image, untar the rootfs, and untar the kernel into separate partitions on the SD card.
It’s actually pretty simple once there’s a roadmap :)
Step 2 – Download the Liquidware Beagle Angstrom Linux rootfs and kernel tar images


Kernel tar - http://www.liquidware.com/code/kernel-vfat.tar.bz2
Rootfs tar - http://www.liquidware.com/code/rootfs-ext2.tar.bz2


Step 3 – Format the SD card
Run fdisk on the SD card
Delete everything off the SD card
Key in the following commands:
x
h
255
s
63
c

Take the number you got from x above, and divide it by 255 / 63 / 512. For instance:
7950303232 / 255 / 63 / 512 = 966.569, rounded down is 966
Key in that number, for instance:
966
Then do this:
r
n
p
1
1
n
p
1
+50
t
1
c
a
1
n
p
2
enter
enter

w
Then do the hokey pokey, turn yourself around, quit fdisk, and issue the commands on the command line:
sync
sync
Run fdisk on the SD card you just formatted, and then make the vfat file system with this command:
sudo mkfs.vfat /dev/vfat
On my computer, this was the command I ran:
sudo mkfs.vfat /dev/mmcblk0p1
Then eject the SD card, reinsert it, and repeat for the ext3 partition.
sudo mkfs -t ext3 /dev/ext3
On my computer, this was the command I ran:
sudo mkfs -t ext3 /dev/mmcblk0p2
Then unmount the SD card, and eject and reinsert it.
cd into the vfat partition (for me, it was /media/vfat) and run this command:
sudo tar -xvf /home/root/kernel-vfat.tar
sync
sync

Then unmount the vfat partition, and run these commands:
sync
sync

Eject the SD card, and then reinsert it. More hokey pokey. Then continue.
mount ext
sudo tar -xvf /home/root /rootfs-ext.tar
sync
sync
Then unmount the ext3 partition, and run these commands:
sync
sync

Eject the SD card. Pop it into the BeagleBoard, and it should boot up Liquidware BeagleBoard Angstrom Linux :-)
Angstrom BeagleTouch
And I’ve put the BeagleBoard, pre-formatted Beagle Boot SD card, and the BeagleTouch up over at the Liquidware shop.

0 comments:

Post a Comment