PandaBoard Ubuntu How-tos

= How to: set up a console =

Create the file /etc/init/ttyO2.conf, with the following content: #
 * 1) ttyO2 - getty
 * 1) This service maintains a getty on ttyO2 from the point the system is
 * 2) started until it is shut down again.

start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345]

respawn exec /sbin/getty -8 115200 ttyO2

= How To: Increase Performance under Ubuntu=

Disable swap
Edit out the swap file line found in /etc/fstab

i.e. put a '#' infront of the line which creates a swapfile

Use tmpfs
This is another speed enhancement that is achieved by editing /etc/fstab, this time by adding the lines:

tmpfs /tmp         tmpfs nodev,nosuid                  0 0 tmpfs /var/log     tmpfs nodev,nosuid                  0 0

Richard Watts posted the following on the Pandaboard google mailing list:

Nigel H-S wrote: > I'm focussing on using Ubuntu with my Pandaboard and am wondering if > anyone has had success in speeding up Ubuntu by using a Ramdisk? > Reports around the Internet appear to point to Ubuntu not using the SD > card as fast as it could. > Any hints or tips on setting up a Ramdisk? I shall write this up properly in a bit, but I found that: * Disable swap (really!) - edit it out of /etc/fstab and reboot. * tmpfs /tmp         tmpfs nodev,nosuid                  0 0 tmpfs /var/log     tmpfs nodev,nosuid                  0 0 in /etc/fstab Helped greatly - in particular the periodic pauses which seemed to be the result of swapping went away. Of course, you do lose some RAM to tmpfs, which isn't ideal. The underlying problem remains - SD access is just too slow - and I still get quite long hangs when I try to shell autocomplete at the wrong moment - but those two measures made life much more pleasant for me. Sadly, in my case I can't blame the card (much) - the same card in my USB card reader or a ZMS-08 dev board works fine. Time to get an SD protocol analyser, I suspect, Good luck! Richard.

Use noatime and discard (aka TRIM)
You can further improve disk performance by using the noatime fstab mount option to stop Linux writing to the disk every time a file is read no matter what type of drive you have and SSD users who use ext4 partitions will benefit from using the discard option if their drive supports TRIM. Hence, an fstab entry for an ext4 root partition on an SSD that supports TRIM would look something like:

UUID=LONG-EXAMPLE-UUID-STRING / ext4 discard,noatime,errors=remount-ro 0 1

Install Xubuntu Desktop
Xubuntu replaces the normal Gnome Desktop with xfce and using applications which are lighter on resources. To install the complete xubuntu-desktop with all applications open a terminal and type:

sudo apt-get install xubuntu-desktop

If you only want a minimal xubuntu based on xfce (other packages can be added later if required) open a terminal and type:

sudo apt-get install xfce4 gdm xubuntu-gdm-theme xubuntu-artwork

It will take a while to install this replacement desktop. Once installed you will be able to select the xubuntu-desktop from the login screen once you've click a user but before you've typed a password.

A video walkthrough of Xubuntu running on the PandaBoard can be found here:

= How To: Start Programming with Hardware Accelerated 3D Graphics =

Pandaboard implements OpenGL ES 2.0 in hardware.

If you register at the Imagination Technologies website, you can download the SDK from here:

http://www.imgtec.com/powervr/insider/sdkdownloads/index.asp

Included in the SDK are a series of well commented Tutorial programs as well as fully fledge demonstrations.

For a step by step guide on how to build the SDK examples programs on a PandaBoard running Ubuntu, see this post

= How To: Run Irrlicht 3D engine =

To compile the Irrlicht engine you need the "build-essential" package. Also required are "libxxf86vm-dev" and "libxext-dev".

All needed dependencies can be installed with the following command: sudo apt-get install build-essential libxxf86vm-dev libxext-dev

Go to: Irrlicht 3D Engine

Download the latest version (1.7.2 at time of writing this) and extract the ZIP archive.

Open a terminal and chdir into "irrlicht-/source/Irrlicht" and run:

make

Irrlicht will then be built for the OMAP4.

You can then go into /examples/ and start making each example.

You can make them all in one step by chdir'ing into the examples directory and running:

make

= How to: read output from PandaBoard over a serial port =

= How to: build a custom rootfs = http://people.canonical.com/~rsalveti/lamont/panda/cookbook.txt

= How to: install a kernel =

To find kernel images run/type:

apt-cache search linux-image

prior to that you can add a ppa-repository to your server-list

e.g. adding linaro kernels:

add-apt-repository ppa:linaro-maintainers/kernel

and run/type:

apt-get update

choose the kernel-image of your desire. e.g.:

linux-image-2.6.38-1003-linaro-omap

run/type: apt-get install linux-image-2.6.38-1003-linaro-omap

to activate the kernel do a:

flash-kernel linux-image-2.6.38-1003-linaro-omap

If you run into problems with flash-kernel, check out this link