- 1 Angstrom on the BeagleBoard-xM
- 2 Angstrom on the original BeagleBoard
- 3 Before you start
- 4 Finding a precompiled image
- 5 From beagleboard-validation.s3.amazonaws.com
- 6 From www.angstrom-distribution.org/beagleboard-demo-image-available
Angstrom on the BeagleBoard-xM
To install Angstrom for the first time on the BeagleBoard-xM, try following either one of these step by step guides:
If you want to change certain things about the way your board works, you will be asked to "configure the bootargs". On the BeagleBoard-xM this is done a little bit differently than on the original BeagleBoard. (I think- but I don't know about the original BeagleBoard. Correct this/add to this section if you know about the original version) In order to "configure the bootargs" on current versions of the BeagleBoard-xM, you simply have to make edits to the uEnv.txt file in the boot partition of your SD card (the partition that contains MLO, u-boot.bin, and uImage). If uEnv.txt is not there already, simply create a new .txt and name it uEnv.txt. Current versions of the BB-xM no longer require the files cmd.boot and cmd.boot.scr. They use uEnv.txt to do what cmd.boot.scr used to do. The uEnv.txt file contains a series of parameters and then the command
boot on the last line, or alternately,
uenvcmd= run loaduimage; run mmcboot
Angstrom on the original BeagleBoard
These are instructions on how to get your Beagle up and running. This will lead you to getting a Linux prompt on the console on the serial port. The next instructions will show how to set up a monitor, keyboard and mouse.
Before you start
- The course hardware kit which includes:
- Serial Cable Adaptor
- USB to Serial Adapter if your computer doesn't have a serial port. Serial cable if it does.
- 5V Supply
- Empty 4G SD card
- SD card reader
Finding a precompiled image
There are a few places where one can get a precompiled Angstrom image for the Beagle. I show three here. This is how they differ.
- From beagleboard-validation.s3.amazonaws.com
- This site has a complete SD card image you can download and copy to your SD card. Just plug the card into your Beagle and boot.
- From www.angstrom-distribution.org/beagleboard-demo-image-available
- This site has the files you need to put on your Beagle. You'll have to format your SD card and place the files in the correct place. It's a bit more work, but you get to see how the SD card is laid out.
- From Narcissus
- This site is a difference approach. It will compile an SD image for you. All you do is download it and boot. The difference is, you can specify what does on the image. The download can be large. See details here ECE497_Lab01_Installing_Angstrom_via_Narcissus.
If you aren't sure what to do, just do the first one.
This method downloads an entire SD disk image and copies it to the SD card. No need to partition or format. There are several images here. I'd pick one that has demo and configured. demo means it has lots of interesting apps in it and configured means it has already been booted up and many of the time consuming things that happen during the first boot have already been run.
- Get the image here. Of if you are on campus:
$ sftp email@example.com Connecting to dfs.rose-hulman.edu... firstname.lastname@example.org's password: sftp> cd Users/Y/yoder/Shared/BeagleBoard sftp> ls sftp> get SPEd.img.zip
sudo zcat SPEd.img.zip | sudo dd of=/dev/of/your/sd bs=8225280
- or Run
sudo tar xjOf SPEd.img.tar.bz2 | sudo dd of=/dev/of/your/sd bs=8225280if it's a bz2 file.
- dd gives no progress information, but you can get information by sending the USR1 signal to dd. This site has more details. In a nutshell, open a new terminal, and type the following command:
$ sudo pkill -USR1 dd
The output will show up in the terminal where dd is running.
- Plug the SD card in your Beagle and power up.
Here are instructions that will show you how to partition and format your SD card and what to load in each of the partitions. After going through the process you should have a foundation for understanding the Linux boot processing.
Getting a console prompt
Follow these instructions. This will tell you how to talk to the Beagle via the serial port, format the card, copy Linux to it, and boot. There are a couple of images to choose from. I picked the ones with multi-config-cpuidle in the name.
The link is taking a long time, so I've posted the root file system image on DFS. Here's how to get to it.
$ sftp email@example.com Connecting to dfs.rose-hulman.edu... firstname.lastname@example.org's password: sftp> cd Users/Y/yoder/Shared/BeagleBoard sftp> ls sftp> get <filename>
- Untarring the Angstrom file took me 17 minutes before I got a prompt back. Even then there were still several files in the write buffer. Run
syncto force all the files to be written.
- There seems to be an issue with the SD Card Reader in the Class of 2011 Laptop. The device will spontaneously unmount in the process of Untarring the Angstrom file. To solve this try using a USB Card Reader.
- The serial port ribbon cable is connected just below the 5V power connector. The black colored wire is pin 1. Be sure it is connected on the side opposite the 5V connector.
- Be sure to get these following files.
- Here's what you'll be running.
Here's a quick description of each file. We'll go into more details on these later.
- is a collection of all the files needed for the distribution. They will be 'unzipped' onto the SD card.
- is just a signed version of x-loader. That last sentence will make more sense later. When the Beagle is first powered up it has just enough smarts to read the SD and look for a file called MLO. MLO is small enough that it fits entirely in on-chip memory. It configure the off-chip memory so u-boot can run. u-boot is too large to fit in on-chip memory. Google Understanding MLO and X-loader for more details.
- are the modules the kernel dynamically loads in when it needs them.
- is a boot loader. It's what prints the prompt and runs your commands before the kernel starts.
- is the Linux kernel. It has some special things added to it so u-boot knows how to run it.
- is the same as MLO.
After following the instructions above you should see:
.-------. | | .-. | | |-----.-----.-----.| | .----..-----.-----. | | | __ | ---'| '--.| .-'| | | | | | | | |--- || --'| | | ' | | | | '---'---'--'--'--. |-----''----''--' '-----'-'-'-' -' | '---' The Angstrom Distribution beagleboard ttyS2 Angstrom 2009.X-stable beagleboard ttyS2 beagleboard login:
root (no password) and explore!
The Beagle is fun to explore through the serial port; however it's better when viewed on a monitor with the network working. Here's how to set up a monitor, keyboard, mouse etc. Before you start gather the additional hardware you'll need:
- USB to Ethernet (in kit)
- USB Powered HUB (in kit)
- HDMI to DVI Cable (in kit)
- DVI monitor
- USB keyboard
- USB mouse
Wire your Beagle as shown .
Setting up an Account
Once you have the Angstrom demo image running there are a few thing you can do that will make life easier.
Getting the network running
Often the network isn't ready when Angstrom first boots up.
First you have to register your ethernet adapters MAC address. To do this, go back to the minicom window and login as root and run the
.-------. | | .-. | | |-----.-----.-----.| | .----..-----.-----. | | | __ | ---'| '--.| .-'| | | | | | | | |--- || --'| | | ' | | | | '---'---'--'--'--. |-----''----''--' '-----'-'-'-' -' | '---' The Angstrom Distribution beagleboard ttyS2 Angstrom 2009.X-stable beagleboard ttyS2 beagleboard login: root root@beagleboard:~# root@beagleboard:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:50:B6:06:C4:57 inet addr:22.214.171.124 Bcast:126.96.36.199 Mask:255.255.255.0 inet6 addr: fe80::250:b6ff:fe06:c457/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15354 errors:0 dropped:0 overruns:0 frame:0 TX packets:17551 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1701782 (1.6 MiB) TX bytes:13514892 (12.8 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:12 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:600 (600.0 b) TX bytes:600 (600.0 b) root@beagleboard:~#
The digits following
HWaddr are the MAC address (00:50:B6:06:C4:57). Your address will be different.
Instructions on registering your MAC address at Rose-Hulman.
After your MAC address is registered do the following.
$ ping -c3 google.com
You should see google answering back. If not, get help.
Fixing the Serial Port
The current precompiled download seems to have a problem with the serial port timing out and getting set in the wrong mode. Try running to following to fix it.
Serial port garbage
This appears to be (for me anyway) a problem with the serial port going to sleep. Most of the time it just generates some junk which can be cleared with CTRL-U or backspace. However, if it happens at the login prompt then getty thinks the terminal is 7-bit with parity (rather than 8-bit raw). If this happens and you continue to login the whole session appears to be scrambled - if you press CTRL-D you can login again provided you don't stop typing... :]
I have simply added the following two lines to root's
stty -parenb -parodd cs8 -inpck -istrip echo 0 > /sys/class/tty/ttyS2/device/sleep_timeout
A better fix would probably be to just add the second line to a rc.d startup script somewhere.
This suggestion came from this posting.
Running a VNC Server
The last line you put in the
go.txt file starts a VNC server. This allows you to see and interact with the Beagle's display via the internet. To do this:
- Download a VNC client. I like realVNC. It's simple and free.
- If you are using Ubuntu there is a default VNC client program
~ sudo apt-get install vncviewer
- On your Beagle run
ifconfigagain to get your IP address. It's the number after
inet addr. Mine is (from above) 188.8.131.52.
- To start a VNC server on the Beagle use command
~x11vnc -display :0 &
- Run your VNC client and attach to the IP address.
- You should now see the Beagle display on your host computer.
If you are having trouble with uppercase characters not working, this post suggests In addition, you may want to add -nomodtweak to the file in /etc/X11/Xinit.d/02vnc. Otherwise, the server does not handle shift keys properly on US keyboards.
This is how we will run many of our labs. Rather than attaching displays to the Beagles, we'll just go through the network. (Can your PIC do this?)