Sunday, April 15, 2012

PandaBoard ES: Getting Started with Ubuntu 12.04 LTS Desktop

The following is a basic starter guide in getting Ubuntu 12.04 LTS Desktop running on the recently released PandaBoard ES:

1. Download the Ubuntu 12.04 LTS pre-installed desktop image for OMAP4 here (direct download link: ubuntu-12.04-preinstalled-desktop-armhf+omap4.img.gz).

2. The downloaded file from Step 1 will be a GZIP archive containing a RAW file - use ImageWriter for Windows to write this RAW image file to an SD card [I used a Sandisk Extreme Class 10 16GB 30MB/s SDHC].

Note: It also good practise to check the MD5 hash of the downloaded GZIP archive before doing this. This can be done by loading the archive in ImageWriter and ticking the MD5 check-box. The program will then calculate and display the hash (takes a few minutes). Compare this value with value contained in the "MD5SUMS" file on the download page in Step 1.

3. Setup the PandaBoard ES hardware:
  • Insert the SD card prepared in Step 2.
  • Use the HDMI connector adjacent to the USB/Ethernet sockets to connect the PandaBoard to a suitable display. I used a Dell U2412M UltraSharp 24” monitor with a DVI-HDMI adapter.
  • Connect a USB keyboard and mouse. I connected these via a powered USB hub.
  • Finally, connect a 5V DC power supply to the board (ensure that it is centre-pin positive). I used a 3A rated supply.

4. The PandaBoard should now begin booting from the SD card after the power supply is connected (Note: Both STATUS and STATUS2 LEDs should become momentarily lit after power is connected).

If the SD card was prepared correctly, Ubuntu will first resize the image to fill the SD card and then reboot and start oem-config to prompt for localization and user info.

5. After Ubuntu has successfully booted, you may be prompted to install the PowerVR SGX propreitary graphics driver for OMAP 4. From my initial tests however, I found that this driver did not render the desktop widgets correctly. After installation of this driver, I also discovered that I couldn't bring up an instance of Terminal with the Control-Alt-T shortcut. So for the time being, I recommend using the stock graphics driver supplied with Ubuntu 12.04 LTS.

6. Finally, connect to the internet either via the on-board WiFi or Ethernet and update your Ubuntu installation by typing the following in Terminal (use Control-Alt-T to open an instance of Terminal):
$ sudo apt-get install
$ sudo apt-get upgrade
All in all, the installation procedure was extremely straight-forward with no major issues. Time-to-boot from plugging in the power supply to fully loading the Ubuntu desktop was approximately 45 seconds. One strange thing I found however is that Ubuntu (with the stock graphics drivers) does not always boot in the higher resolution of 1680x1050 - it may also sometimes boot in 1024x768. Also, choosing Restart again in Ubuntu to reboot the device does not always work - the power supply must be physically removed and re-inserted to re-boot the PandaBoard if this occurs.

UPDATE (13th May 2012):

There currently exists a yet-to-be-fixed bug in the 12.04 OMAP4 release which causes the PandaBoard to eventually freeze after certain amount of time (usually an hour or so). The following is a workaround which fixes the issue:
$ update-rc.d ondemand disable
$ apt-get -y install cpufrequtils
$ echo 'ENABLE="true" GOVERNOR="performance" MAX_SPEED="0" MIN_SPEED="0"' > /etc/default/cpufrequtils
$ cpufreq-set -r -g performance
UPDATE #2 (14th August 2012): The above mentioned bug has been patched into the mainline kernel (tested and OK with 3.2.0-1416-omap4). Run sudo apt-get upgrade after a clean install as described above.