Step 1: Creating the Angstrom image
Angstrom provides a web interface for generating sdcard images.
http://narcissus.angstrom-distribution.org/
Base Settings:
- In the drop down for what machine we are building for, pick beagleboard.
- You can chose whatever you want for the image name but for the purposes of this tutorial I picked angstrom.
- Keep the complexity drop down at simple.
User environment selection:
To make things simple later on I selected X11, but if your only going to be interfacing with this through the serial cable then console will work fine.
X11 Desktop Environments:
- If you selected console in the option above this menu will not appear.
- For my project I selected GNOME, you can chose another flavor if you like but I will not cover the other environments.
Additional packages selection:
- Additional X11 packages
- Firefox
- GNOME Applications
- GNOME Display Manger
- GNOME gedit
- X11 Control Tool(xdotool)
- Toolchain
- Native SDK
- OpenCV headers and libs
- Additional console packages
- All kernel modules
- OpenCV
- VIM
- Network related packages
- Dropbear SSH server
- Wireless-tools
- Java packages
- None
- Platform specific packages
- Bootloader Files (x-load/u-boot/scripts)
- OMAP Display Sub System (DSS) Documentation
After all that is selected click Build me! And download the generated image to your ~/angstrom directory.
Step 2: Formatting the SDCard
Finding the location of the SDCard
First, we need to find out where your SDCard is mounted. Plug in a SDCard into your computer wait for it to mount. Then run the following command:
df -h
You will see something like this:
/dev/sda5 45G 3.0G 39G 8% / 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 /dev/sdb1 7.4G 17M 7.0G 1% /media/f91d45eb-67b2-4eeec-85fa-425299b232a1
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 SDCard is /dev/sdb. [/dev/sdb1 is the first partition of the /dev/sdb drive]. You will need that device directory later on.
Setting up the SDCard
Angstrom requires two partitions on the SDCard, a small boot partition, and the main ext3 partition to hold Angstrom. Thanks to Graeme Gregory there is a nice script to setup the SDCard. Remember that we made a folder in your home directory called angstrom. Execute the following commands, they will go to the angstrom directory, download Graeme's script and execute it. Make sure to substitue your SDCard device directory (from above) for /dev/sdX below.
cd ~/angstrom 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 SDCard, wait two/three seconds, then plug it back in. Wait a few seconds for the SDCard to mount. To make sure it is properly formatted rerun the command:
df -h
Now you should have two new partitions:
/dev/sda5 45G 3.0G 39G 8% / 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 /dev/sdb1 70M 512 70M 1% /media/boot /dev/sdb2 7.3G 145M 6.8G 3% /media/Angstrom
Loading files onto the partitions
There are only three files that are manditory for the boot partition. The following list of commands will extract the files from the download build and copy those to the boot partition on the SDCard.
tar --wildcards -zxvf angstrom-image-beagleboard.tar.gz ./boot/* sudo cp boot/MLO-* /media/boot/MLO sudo cp boot/uImage-* /media/boot/uImage sudo cp boot/u-boot-beagleboard-* /media/boot/u-boot.bin
Load the root filesystem onto the Angstrom partition.
sudo tar -zxv -C /media/Angstrom -f angstrom-image-beagleboard.tar.gz sync
Safely remove the SDCard by running these commands.
sync umount /media/boot umount /media/Angstrom
Step 3: Testing the SDCard
Insert the SDCard you just made into the Beagleboard and hookup the serial to usb adapter between the Beagleboard and the computer. Then apply power using the AC adaptor. From there we connect to the serial port using the following command.
screen /dev/ttyUSB0 115200
Then reset the board and if you get alot of output and then prompted with a login then Angstrom is up and running.