Hunter’s vision system is powered by the amazing Pandaboard. If you own one and are unimpressed by the speed at which this little devil can perform, this tutorial may help you get the most out of your board using just the SD card. This is just the first step to getting optimal performance. You will see the best performance once you move your OS to an external (preferably SSD) drive. This tutorial will prepare you for that.
Here’s what we’ve got to work with. In my case, I’m using the Pandaboard Rev A3. (looking forward to getting my hands on an ES).
As you can see this development board is loaded with all sorts of ports and thing-a-ma-jigs. We’ll get into those in later tutorials, right now we’re going to focus on installing a bare-bones Ubuntu 11.10 server with the minimum required software (and hardware) to make developing for this platform enjoyable (meaning not SLOW).
There are a few key hardware components you’ll need to get started:
- USB Keyboard / Mouse
- A DVI or HDMI compatible monitor (I’m using a 19″ LG Flattron W1953T with a HDMI-to-DVI adapter)
- A FAST SD CARD! – I use a SanDisk Ultra 32GB (20mb/s)
- A backup SD card – Trust me, you’ll want to have your card backed up if something goes wrong
- A good (5+Amp) power supply – I made mine using an ATX power supply and this kit from SparkFun. I’ve successfully used a 3000mA “wall wart” but have noticed the system runs slower.
- Some form of network/internet connection (ethernet or wifi)
- A host computer (you’re probably reading this on it) with an SD card slot or adapter (I’m using a macbook pro with an Ubuntu VM as the host)
- A serial-to-USB adapter cable to connect the host computer with the Pandaboard (I got mine at BestBuy)
- An ethernet cable connected to the internet
Download Ubuntu Preinstalled Image
Let’s get started. I really like the tutorial at OMAPpedia but have found there are a couple of new steps required to get Ubuntu running. Go to this page and download the Ubuntu 11.10 Oneiric Ocelot server image. I highly recommend staying clear of the 12.04beta image, the OMAP4 drivers aren’t complete yet and we want a stable environment, right?
Copy image to your SD card
As I said, I’m working on a mac (OS X Lion) that has an SD slot, if you don’t have one you’ll need a USB/SD card adapter. BestBuy or RadioShack can help you out. Insert the SD card into your computer and open up terminal and issue these commands:
cd ~/Downloads
(or the folder where your newly downloaded image resides)
gunzip ubuntu-11.10-preinstalled-server-armel+omap4.img.gz
(double check the filename matches the one you downloaded)
ls /dev/disk*
Note the results that may be something like this:
/dev/disk0 /dev/disk0s3 /dev/disk1s3 /dev/disk2s0s1 /dev/disk3s1 /dev/disk4s1 /dev/disk0s1 /dev/disk1 /dev/disk2 /dev/disk2s0s2 /dev/disk3s2 /dev/disk4s2 /dev/disk0s2 /dev/disk1s1 /dev/disk2s0 /dev/disk3 /dev/disk4
Now eject your SD card and type the same command.
ls /dev/disk*
Note the results which may be something like this:
/dev/disk0 /dev/disk0s2 /dev/disk1 /dev/disk1s3 /dev/disk2s0 /dev/disk2s0s2 /dev/disk3s1 /dev/disk0s1 /dev/disk0s3 /dev/disk1s1 /dev/disk2 /dev/disk2s0s1 /dev/disk3 /dev/disk3s2
Note that disk4 is now missing. We have just identified our SD card according to the OS. Use the number (none with s’s in them) to replace “X” in the following commands.
Re-insert your SD card into your computer and type the following terminal command.
diskutil unmountDisk /dev/diskX
You should get a message similar to this “Unmount of all volumes on disk4 was successful”
This next step takes a good while, so start it and go get some food or coffee (or both) while it does it’s work. Remember to swap the “X” for your particular drive number. Bad things can happen if you get it wrong.
sudo dd bs=4m if=ubuntu-11.10-preinstalled-server-armel+omap4.img of=/dev/diskX ; sync
You’ll be asked for your administrator password (you know it right?) and then the wait begins. Note: If you get this message “dd: /dev/diskX: Operation not supported” You forgot to change X to the number of the correct disk we discovered above.
Once the process is complete you should get a message like this:
69+1 records in
369+1 records out
1548746752 bytes transferred in 1317.272468 secs (1175722 bytes/sec)
Eject your SD card using the diskutil command above or eject from your computer’s OS and insert it into your Pandaboard’s SD slot. Be careful to gently insert the card, the SD slot is fragile (I’ve broken one).
It’s now time to boot your Pandaboard.
Booting for the first time
Make sure you’ve got your keyboard, mouse, and monitor connected (powered on) before you begin. The following steps need to be completed using a serial-to-USB adapter and Minicom.
Attach your serial cable to the serial port on the Pandaboard. (note: The board is already wired for a straight serial cable – no null modem needed). Attach the other end to your host machine.
Install Minicom on the host system.
sudo apt-get install minicom
To set up minicom, I’m going to send you here. It might help you to know that my adapter shows up as /dev/ttyUSB0 (that’s a zero on the end).
Start up minicom on your host computer.
minicom
Power up your Pandaboard and you should see two green LEDs light next to the SD card. They’ll begin to flicker as the drive configures itself. That’s a good thing. If you’ve configured minicom correctly, you’ll see all sorts of text flying by on the display. Don’t worry about any “fail” or error messages. We’re making sausage here.
Soon enough the minicom display will begin showing you configuration option windows.
It can be hard to read the minicom output much less select an option. For the language and Country screens, just hit enter. For time zone, I live in central so I press the down key once and hit enter. Hit enter for “Is the system clock set to UTC”, Keyboard, and Keyboard layout. Choose a user name, I use Administrator. Set the password (x2). (Write the username and password down JIK)
For Primary network interface hit enter (defaults to eth0). You can select wlan0 but unless your wifi setup uses WEP encryption (mine does not) you won’t get very far. So let’s stick with a hard line for now. It takes a moment to detect the network and then asks you for a hostname. Name her whatever you like and hit enter.
On the choose software to install list select nothing and just hit enter.
Wait a bit and you should be presented with a login prompt. Go ahead and log in. Once you are logged in (via minicom) type: sudo reboot
Quit minicom and unplug the serial cable. When the Pandaboard comes back up it will show a command prompt on your monitor. I recommend using the attached monitor/keyboard/mouse from now on because some of the TI license screens are impossible to navigate via minicom. Plus, it’s pretty.
Setting up the desktop environment
This is where we start to make things happen. Begin by logging in and typing the following commands from the command line:
sudo apt-get update
sudo apt-get upgrade
(note: this is very important right at the start as many packages have been updated since the image was created and upgrading later will hose the OMAP4 extras we will be installing.)
sudo apt-get install lightdm
sudo apt-get install --no-install-recommends ubuntu-desktop
(note: I prefer ubuntu-desktop to the lighter/faster alternatives so the rest of this tutorial will focus on getting unity/ubuntu-desktop to behave nicely)
Reboot here to bring up Ubuntu Desktop and begin tweaking it.
sudo reboot
Once booted and logged into ubuntu desktop click on your home folder icon and search for gnome-terminal. Double click it and the right click on its icon in the unity bar and choose “keep in launcher.” You have to do this for now because the Unity Dash system is not fully installed yet.
The font’s for terminal will be not-so-nice on first launch. To fix this, select Edit > Profiles from the top-bar menu and edit the default profile. Uncheck “use the system fixed width font,” close and close the windows and you’ll be up and good to go.
In terminal we’re going to do a little “house-cleaning.” Since we didn’t allow Ubuntu Desktop to install all of its favorite add-ins we need to patch a few holes.
Type this command to fix an error message you’ll get compiling most any package moving forward.
sudo apt-get install gtk2-engines-pixbuf
Next let’s kill dash (not Unity Dash (very confusing)). You can learn more about dash here.
sudo dpkg-reconfigure dash
(choose NO when asked to use dash as the default system shell)
Now let’s fix unity so apps show up correctly when you click the unity button.
sudo apt-get install unity-place-applications unity-place-files
Note: If upgrade manager pops up and recommends updating to the linux omap4 kernel images, close the window and hold your horses. We’ll get that done the right way shortly.
Installing Omap4 extras
While the system as it stands is probably “usable” we aren’t going to see any real performance until we install the TI libraries for OMAP4 and SGX (kinda like GPU) acceleration.
sudo apt-add-repository ppa:tiomap-dev/release
(hit enter when prompted)
sudo apt-get update
sudo apt-get upgrade
And finally the big whopper…
sudo apt-get install ubuntu-omap4-extras
(note: this is a meta-package that will install MOST of the omap4 drivers. Grab a coffee, it takes a while)
While you are sipping your coffee be on the lookout for two sets of TI License agreements. The TI kernel and SGX acceleration software is proprietary and you MUST agree to these licenses to get any kind of graphics performance out of your Pandaboard.
After the install completes go ahead and reboot your system and be prepared for less-than-ideal performance.
sudo reboot
Tweaking your SD card performance
I’ve read on a number of forums that SD card read/write is sub-optimal regardless of the transfer speed / class of the card. As documented here, there are a few key things you can do to get the SD card to perform better.
Disable your swap file
Edit your /etc/fstab file like this:
sudo nano /etc/fstab
The last line of the file should look like this:
/SWAP.swap none swap sw 0 0
Change it to this:
#/SWAP.swap none swap sw 0 0
(note the added hash symbol, that comments it out and disables it)
Before you save and close the file I recommend using tmpfs, which will eat at your RAM to speed up your Pandaboard a little more.
Add these lines at the bottom of your /etc/fstab file.
tmpfs /tmp tmpfs nodev,nosuid 0 0
tmpfs /var/log tmpfs nodev,nosuid 0 0
CTRL-X will close and save (choose Y) the file.
Reboot your Pandaboard
sudo reboot
Ok, before you get all disappointed because your eyes lack blisters. Install Chromium (or use the default firefox install) and go to http://www.apple.com/trailers and stream in some HD goodness. Not bad, eh?
You’re ready for the big time!
Here’s the good news, you are now completely set up and ready to transfer your OS to an external drive. This will make a huge difference in your OS performance. To do it, use this tutorial. I recommend using a SSD drive that supports TRIM as referenced here. I use an intel drive I bought at BestBuy and it works great.
If you do opt to use an external drive, I’ve found that re-enabling swap and removing the tmpfs entries in /etc/fstab does no harm.
Please let me know if you find any errors in this tutorial or have questions. My goal is to keep it current and useful.


Thanks for the good post. I own a Panda ES and am running 11.10 on it. What I’m working on these days is compilation of omap4-extras from the scratch, (I need to tweak some codes in gst-ducati) and it’s not as easy as I thought it would be. Tips on this, if you have any, would be great! Cheers, Steve
Hi Steve,
Is Ducati running on the ES now? Have you checked out this wiki? It’s called “Ducati for Dummies” which is a non sequitur. There is a link or two that will take you further down the rabbit hole, including this one.
Does that help? What kind of tweaks are you making?
K. So my panda es is running fine with DSP decoding x264. One thing I noticed is that when I play a local file, panda seems capable of decoding 1080p. However when streamed, it barely passes with 720p. I’ve looked into decoder code and played a bit with buffers and delays, but not much improved. Any suggestion? Many thanks.
Cheers,
Steve
p.s. sorry for a ‘late’ reply
Hello,
I had to change the output video cable from DVI to HDMI after having installed the OMAP4 extras and rebooted the board.
But I’m stuck at the point were I reboot the board after having disabled the swap file. The system doesn’t start and I get “gatehwspinlock_enter failed! status = 0xffffffed” twice on the serial output.
Do you have an idea of what I need to do then? is there a way to change back the fstab file without having to reinstall everything from scratch?
Make sure that you change:
/SWAP.swap none swap sw 0 0
to
#/SWAP.swap none swap sw 0 0
Skip the tmpfs stuff for now. It just sucks up RAM.
Yes, The boot files are all backed up on the first partition of the SD card. I get to it via OS X (won’t mount on Linux) I think it will mount on windows too. Sorry for the late reply. Let me know if you need more help with this.