This tutorial will show you how to set up Angstrom Embedded Linux on the BeagleBoard-xM. Thanks to the works of others this is a much easier process that it use to be.
I am using Ubuntu 10.4 as my development machine and I am using the BeagleBoard-xM as the target. Most of this should apply to other Linux Distributions and the original BeagleBoard.
First, we need to find out where your sd-card is mounted. Plug in a sd-card into your computer wait for it to mount. Then run the following command.
You will see something like this:
Look for a line that starts with /dev/sdXX in it; generally it will be mounted to the /media directory (on Ubuntu anyway). Make sure the size of the sd-card is right to verify. My sd-card is /dev/sdb. [/dev/sdb1 is the first partition of the /dev/sdb drive]. You will need this device directory further in this exercise.
Setting up the sd-card.
For Angstrom to run you will need to have a sd-card with two partitions; one fat partition to hold the boot files and then a ext3 partition with the root file system on it. Thanks to Graeme Gregory there is a nice script to set up you sd-card. Execute the following commands which will make a working directory, download Graeme's script and execute it. Be sure to substitue your sd-card device directory (from above) for /dev/sdX below.
First, we need to find out where your sd-card is mounted. Plug in a sd-card into your computer wait for it to mount. Then run the following command.
df -h
You will see something like this:
/dev/sda5 98G 56G 38G 61% / none 1.5G 316K 1.5G 1% /dev none 1.5G 724K 1.5G 1% /dev/shm none 1.5G 336K 1.5G 1% /var/run none 1.5G 0 1.5G 0% /var/lock none 1.5G 0 1.5G 0% /lib/init/rw none 98G 56G 38G 61% /var/lib/ureadahead/debugfs /dev/sdb1 15G 8.0K 15G 1% /media/FAE3-DCE5
Look for a line that starts with /dev/sdXX in it; generally it will be mounted to the /media directory (on Ubuntu anyway). Make sure the size of the sd-card is right to verify. My sd-card is /dev/sdb. [/dev/sdb1 is the first partition of the /dev/sdb drive]. You will need this device directory further in this exercise.
Setting up the sd-card.
For Angstrom to run you will need to have a sd-card with two partitions; one fat partition to hold the boot files and then a ext3 partition with the root file system on it. Thanks to Graeme Gregory there is a nice script to set up you sd-card. Execute the following commands which will make a working directory, download Graeme's script and execute it. Be sure to substitue your sd-card device directory (from above) for /dev/sdX below.
mkdir ~/angstrom-wrk cd ~/angstrom-wrk wget http://cgit.openembedded.org/cgit.cgi/openembedded/plain/contrib/angstrom/omap3-mkcard.sh chmod +x omap3-mkcard.sh sudo ./omap3-mkcard.sh /dev/sdX sync
Remove the card, wait two/three seconds, plug it back in. Wait a few seconds and verify the sd-card is mounted by executing:
You should have two new mounted partitions:
The card is now ready. You only need to do this process once for the life of the card.
Generating a build:
Go to the Narcissus website and generate a build. A good place to start is to select: BeagleBoard (the original BeagleBoard and BeagleBoard-xM both use the same build); simple; and console only. In the “Platform Specific Packages” check “Texas Instruments OMAP3x/AM3x family:-->Bootloader Files (x-load/u-boot/scripts)”. Now click the “build me!” button on the bottom of the page and wait for the “builder” to generate the “*.tar.gz” file. Download the “*.tar.gz” file into your working directory. Don't worry about the second file.
Setup the boot partition:
There are only three files that are mandatory for boot partition. The following lines will extract the files from the download build and copy those to the boot partition on the sd-card.
Last thing to do is to copy the root filesystem over.
df -h
You should have two new mounted partitions:
/media/boot /media/Angstrom
The card is now ready. You only need to do this process once for the life of the card.
Generating a build:
Go to the Narcissus website and generate a build. A good place to start is to select: BeagleBoard (the original BeagleBoard and BeagleBoard-xM both use the same build); simple; and console only. In the “Platform Specific Packages” check “Texas Instruments OMAP3x/AM3x family:-->Bootloader Files (x-load/u-boot/scripts)”. Now click the “build me!” button on the bottom of the page and wait for the “builder” to generate the “*.tar.gz” file. Download the “*.tar.gz” file into your working directory. Don't worry about the second file.
Setup the boot partition:
There are only three files that are mandatory for boot partition. The following lines will extract the files from the download build and copy those to the boot partition on the sd-card.
# extract the files to the ./boot directory tar --wildcards -xjvf [YOUR-DOWNLOAD-FILE].tar.bz2 ./boot/* # copy the files to sc-card boot partition. cp boot/MLO-* /media/boot/MLO cp boot/uImage-* /media/boot/uImage cp boot/u-boot-*.bin /media/boot/u-boot.bin sync
Last thing to do is to copy the root filesystem over.
sudo tar -xvj -C /media/Angstrom -f [YOUR-DOWNLOAD-FILE].tar.bz2 sync
Now make it safe to remove your sd-card.
Your done; remove the sd-card and plug it into your BeagleBoard-xM and apply power to the board.
sync umount /media/boot umount /media/Angstrom
Your done; remove the sd-card and plug it into your BeagleBoard-xM and apply power to the board.