Difference between revisions of "BeagleBoardAngstrom"

From eLinux.org
Jump to: navigation, search
(Created page with "==Angstrom on the BeagleBoard-xM== ===Installing=== ''(This section has not been filled out yet. Please expand it!)'' To install Angstrom for the first time on the BeagleBoard...")
Line 2: Line 2:
''(This section has not been filled out yet. Please expand it!)''
To install Angstrom for the first time on the BeagleBoard-xM, try following either one of these step by step guides:
To install Angstrom for the first time on the BeagleBoard-xM, try following either one of these step by step guides:

Revision as of 12:21, 14 August 2011

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:

Trey Weaver's Guide to Installing Angstrom on BeagleBoard-xM

How to Boot 3 Different Linux OSs on the BeagleBoard-xM: Angstrom, Android, and Ubuntu


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

Get Linux running on your host computer (ECE497 VirtualBox Notes or ECE597 Installing Ubuntu in VMware Player), then gather the hardware you'll need:

  1. BeagleBoard
  2. The course hardware kit which includes:
    1. Serial Cable Adaptor
    2. USB to Serial Adapter if your computer doesn't have a serial port. Serial cable if it does.
    3. 5V Supply
  3. Empty 4G SD card
  4. 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.

From beagleboard-validation.s3.amazonaws.com

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 username@dfs.rose-hulman.edu
Connecting to dfs.rose-hulman.edu...
username@rose-hulman.edu's password:
sftp> cd Users/Y/yoder/Shared/BeagleBoard
sftp> ls
sftp> get SPEd.img.zip
  • Run 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=8225280 if 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.

From www.angstrom-distribution.org/beagleboard-demo-image-available

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 username@dfs.rose-hulman.edu
Connecting to dfs.rose-hulman.edu...
username@rose-hulman.edu's password:
sftp> cd Users/Y/yoder/Shared/BeagleBoard
sftp> ls
sftp> get <filename>


  1. 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 sync to force all the files to be written.
  2. 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.
  3. 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.
  4. Be sure to get these following files.
  5. 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: 

Login as root (no password) and explore!

Running X-Windows

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:

  1. USB to Ethernet (in kit)
  2. USB Powered HUB (in kit)
  3. HDMI to DVI Cable (in kit)
  4. DVI monitor
  5. USB keyboard
  6. USB mouse

Wire your Beagle as shown .

Reboot your Beagle and the screen below should appear on the monitor. 300px‎

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.

First create an account. Angstrom - New user details2.png
Then do some setup. Most prompts you will be able to figure out. When I got to Menus I selected System Default. If you select Ggz let me know what happens. Angstrom - Menus.png
Under Applications I selected all three. Angstrom - Applications.png
You can select whatever you want under Quick Launch. I suggest as a minimum you select Firefox and Terminal. Angstrom - Quick Launch.pngAngstrom - Quick Launch3.png
I got this error.

Let me know if you get any errors.

Angstrom - Error.png
Finally you should see the desktop. Angstrom - Desktop.png

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 ifconfig command:

|       |                  .-.                                                                                       
|   |   |-----.-----.-----.| |   .----..-----.-----.                                                                 
|       |     | __  |  ---'| '--.|  .-'|     |     |                                                                 
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |                                                                 
'---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'                                                                 
                -'  |                                                                                                
The Angstrom Distribution beagleboard ttyS2                                                                          
Angstrom 2009.X-stable beagleboard ttyS2                                                                             
beagleboard login: root 
root@beagleboard:~# ifconfig                                                    
eth0      Link encap:Ethernet  HWaddr 00:50:B6:06:C4:57                         
          inet addr:  Bcast:  Mask:    
          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:  Mask:                                   
          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)                        

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 .profile:

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:

  1. Download a VNC client. I like realVNC. It's simple and free.
  2. If you are using Ubuntu there is a default VNC client program
~ sudo apt-get install vncviewer
  1. On your Beagle run ifconfig again to get your IP address. It's the number after inet addr. Mine is (from above)
  2. To start a VNC server on the Beagle use command
~x11vnc -display :0 & 
  1. Run your VNC client and attach to the IP address.
  2. 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?)