Difference between revisions of "Installing Ubuntu 10.04 on Gumstix Overo"
(updated kernel/module versions, updated install procedure for newest version of rootstock, added wifi instructions) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Ubuntu on Overo COM == | == Ubuntu on Overo COM == | ||
− | Constructing an Ubuntu root file system for the Gumstix Overo COM is surprisingly easy with the rootstock utility. Since Ubuntu (particularly a version including a graphical desktop) likes lots of RAM, Gumstix recommends using an Overo COM with at least 512MB RAM | + | Constructing an Ubuntu root file system for the Gumstix Overo COM is surprisingly easy with the rootstock utility. Since Ubuntu (particularly a version including a graphical desktop) likes lots of RAM, Gumstix recommends using an Overo COM with at least 512MB RAM. You can install Ubuntu on an Overo COM with 256MB RAM and the familiarity of Ubuntu for some users may outweigh occasional sluggishness. |
+ | |||
+ | These instructions were tested on an Ubuntu 10.04 desktop machine; they should work for any recent Debian-based flavour of Linux. These instructions also work for Ubuntu 11.04 Natty Narwhal with a few things to keep in mind. | ||
== Make a MicroSD card == | == Make a MicroSD card == | ||
Line 11: | Line 13: | ||
Next, use a command like the one shown below to make a root file system; check out 'man rootstock' for some extra options. Note: this will take an hour or two. | Next, use a command like the one shown below to make a root file system; check out 'man rootstock' for some extra options. Note: this will take an hour or two. | ||
<code> | <code> | ||
− | $ sudo rootstock --serial ttyS2 -d lucid -f "gumstix" --seed lxde,gdm,openssh-server,x11vnc | + | $ sudo rootstock --serial ttyS2 -d lucid -f "gumstix" --seed lxde,gdm,openssh-server,x11vnc,wireless-tools,wpasupplicant,nano |
</code> | </code> | ||
− | * the '-d' option specifies the distribution release: in this case, Ubuntu Lucid (10.04). | + | * the '-d' option specifies the distribution release: in this case, Ubuntu Lucid (10.04). In the case of Ubuntu Natty (11.04) use "natty". |
* the '--seed' option specifies the list of packages to install: in this case, we install a lightweight desktop and a standard login manager as well as ssh & VNC servers so we can connect remotely. | * the '--seed' option specifies the list of packages to install: in this case, we install a lightweight desktop and a standard login manager as well as ssh & VNC servers so we can connect remotely. | ||
* the user name ('-l') and password ('-p') options don't seem to work at the moment; see [Configuring Ubuntu] for more information. | * the user name ('-l') and password ('-p') options don't seem to work at the moment; see [Configuring Ubuntu] for more information. | ||
Line 19: | Line 21: | ||
To create a rootFS image for a headless server you can use the following: | To create a rootFS image for a headless server you can use the following: | ||
<code> | <code> | ||
− | $ sudo rootstock --serial ttyS2 -d lucid -f "gumstix" --seed build- | + | $ sudo rootstock --serial ttyS2 -d lucid -f "gumstix" --seed build-essential,openssh-server |
</code> | </code> | ||
You should now have a spiffy root file system tarball so now we just need to create a bootable microSD with a standard bootloader and kernel. | You should now have a spiffy root file system tarball so now we just need to create a bootable microSD with a standard bootloader and kernel. | ||
− | Format a microSD card as per [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/109.html usual]; you should copy a [http:// | + | Format a microSD card as per [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/109.html usual]; you should copy a [http://cumulus.gumstix.org/images/angstrom/developer/2012-01-22-1750/ recent] MLO, u-boot, and uImage to the boot partition. Extract the generated root file system to the second partition of the microSD card. |
− | + | Next we'll need to add the loadable modules and firmware. If you don't want to build the kernel: Download and extract a wifi enabled image using the same kernel as the uImage you're using (In this case we're using Kernel 3.0.0 so we want the 2012-01-22 developer image): | |
− | + | ||
− | sudo | + | wget http://cumulus.gumstix.org/images/angstrom/developer/2012-01-22-1750/omap3-console-image-overo.tar.bz2 |
− | + | tar xvjf ./omap3-console-image-overo.tar.bz2 | |
+ | |||
+ | Copy the <code>/lib/firmware</code> and <code>/lib/modules</code> directories to the same location on your SD card: | ||
+ | |||
+ | sudo cp -rf ./lib/firmware /media/rootfs/lib/ | ||
+ | sudo cp -rf ./lib/modules /media/rootfs/lib/ | ||
== Configuring Ubuntu == | == Configuring Ubuntu == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
For Overo expansion boards with an Ethernet interface, it is nice to have Ethernet working right off the bat without having to have Network Manager installed. Open the ''/etc/network/interfaces'' file on the second partition. | For Overo expansion boards with an Ethernet interface, it is nice to have Ethernet working right off the bat without having to have Network Manager installed. Open the ''/etc/network/interfaces'' file on the second partition. | ||
<code> | <code> | ||
Line 49: | Line 50: | ||
You can now unmount the microSD card, place it in the Gumstix and boot to it. | You can now unmount the microSD card, place it in the Gumstix and boot to it. | ||
− | Login using serial console using these [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Getting-started/109.html instructions] or you can | + | Login using serial console using these [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Getting-started/109.html instructions] or you can jump in via ssh. |
+ | |||
+ | |||
+ | First we need to load the firmware modules: | ||
+ | |||
+ | cd /lib/modules/3.0.0/ | ||
+ | depmod | ||
+ | |||
+ | Next, if you're using a wireless COM, you'll need to configure the wireless settings. First, create the file wpa.conf in your /etc/ directory. | ||
+ | |||
+ | cd /etc/ | ||
+ | wpa_passphrase <your wireless ssid> <your password> > wpa.conf | ||
+ | |||
+ | If you're using a hidden wireless network you'll need to append the line <code>scan_ssid=1</code> to <code>wpa.conf</code>. Your <code>wpa.conf</code> should look like this: | ||
+ | |||
+ | network={ | ||
+ | ssid= "YourNetworkName" | ||
+ | #psk="YourNetworkPass" | ||
+ | psk=some-long-generated-value | ||
+ | # add the following line if you're using a hidden wireless network | ||
+ | scan_ssid=1 | ||
+ | } | ||
+ | |||
+ | Next, edit your <code>/etc/network/interfaces</code> and append the following lines: | ||
+ | |||
+ | auto wlan0 | ||
+ | iface wlan0 inet dhcp | ||
+ | wireless_mode managed | ||
+ | wireless_essid any | ||
+ | pre-up wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa.conf | ||
+ | post-down killall -q wpa_supplicant | ||
+ | |||
+ | Restart your Overo and wireless should be working. | ||
Once you are logged in, you might make some other tweaks: | Once you are logged in, you might make some other tweaks: | ||
Line 56: | Line 89: | ||
$ sudo adduser youruser | $ sudo adduser youruser | ||
$ sudo adduser youruser sudo | $ sudo adduser youruser sudo | ||
− | |||
− | |||
− | |||
− | |||
</code> | </code> | ||
Line 71: | Line 100: | ||
$ sudo apt-get update && sudo apt-get upgrade | $ sudo apt-get update && sudo apt-get upgrade | ||
</code> | </code> | ||
− | + | ====Install a window manager==== | |
+ | |||
+ | If you require a graphical user interface you may install a window manager of your choice. These window managers have not been tested so proceed at your own risk: | ||
+ | |||
+ | =====Xfce===== | ||
+ | |||
+ | sudo apt-get install xfwm4 | ||
+ | |||
+ | =====Matchbox===== | ||
+ | |||
+ | sudo apt-get install matchbox-window-manager | ||
== Related Links == | == Related Links == |
Latest revision as of 09:02, 9 July 2012
Contents
Ubuntu on Overo COM
Constructing an Ubuntu root file system for the Gumstix Overo COM is surprisingly easy with the rootstock utility. Since Ubuntu (particularly a version including a graphical desktop) likes lots of RAM, Gumstix recommends using an Overo COM with at least 512MB RAM. You can install Ubuntu on an Overo COM with 256MB RAM and the familiarity of Ubuntu for some users may outweigh occasional sluggishness.
These instructions were tested on an Ubuntu 10.04 desktop machine; they should work for any recent Debian-based flavour of Linux. These instructions also work for Ubuntu 11.04 Natty Narwhal with a few things to keep in mind.
Make a MicroSD card
The rootstock utility builds a root file system inside a virtual arm machine supplied by qemu. First, install the required packages.
$ sudo apt-get install rootstock qemu
note: To create a rootFS image for Ubuntu 11.04 you need to make sure that the machine creating the image has qemu-arm-static version 14.x or better. Ubuntu 11.04 has this but 10.04 for instance does not and segfaults during rootFS image creation.
Next, use a command like the one shown below to make a root file system; check out 'man rootstock' for some extra options. Note: this will take an hour or two.
$ sudo rootstock --serial ttyS2 -d lucid -f "gumstix" --seed lxde,gdm,openssh-server,x11vnc,wireless-tools,wpasupplicant,nano
- the '-d' option specifies the distribution release: in this case, Ubuntu Lucid (10.04). In the case of Ubuntu Natty (11.04) use "natty".
- the '--seed' option specifies the list of packages to install: in this case, we install a lightweight desktop and a standard login manager as well as ssh & VNC servers so we can connect remotely.
- the user name ('-l') and password ('-p') options don't seem to work at the moment; see [Configuring Ubuntu] for more information.
To create a rootFS image for a headless server you can use the following:
$ sudo rootstock --serial ttyS2 -d lucid -f "gumstix" --seed build-essential,openssh-server
You should now have a spiffy root file system tarball so now we just need to create a bootable microSD with a standard bootloader and kernel.
Format a microSD card as per usual; you should copy a recent MLO, u-boot, and uImage to the boot partition. Extract the generated root file system to the second partition of the microSD card.
Next we'll need to add the loadable modules and firmware. If you don't want to build the kernel: Download and extract a wifi enabled image using the same kernel as the uImage you're using (In this case we're using Kernel 3.0.0 so we want the 2012-01-22 developer image):
wget http://cumulus.gumstix.org/images/angstrom/developer/2012-01-22-1750/omap3-console-image-overo.tar.bz2 tar xvjf ./omap3-console-image-overo.tar.bz2
Copy the /lib/firmware
and /lib/modules
directories to the same location on your SD card:
sudo cp -rf ./lib/firmware /media/rootfs/lib/ sudo cp -rf ./lib/modules /media/rootfs/lib/
Configuring Ubuntu
For Overo expansion boards with an Ethernet interface, it is nice to have Ethernet working right off the bat without having to have Network Manager installed. Open the /etc/network/interfaces file on the second partition.
$ sudo gedit /path/to/second/partition/etc/network/interfaces
Add the following code to the bottom:
auto eth0 iface eth0 inet dhcp
You can now unmount the microSD card, place it in the Gumstix and boot to it.
Login using serial console using these instructions or you can jump in via ssh.
First we need to load the firmware modules:
cd /lib/modules/3.0.0/ depmod
Next, if you're using a wireless COM, you'll need to configure the wireless settings. First, create the file wpa.conf in your /etc/ directory.
cd /etc/ wpa_passphrase <your wireless ssid> <your password> > wpa.conf
If you're using a hidden wireless network you'll need to append the line scan_ssid=1
to wpa.conf
. Your wpa.conf
should look like this:
network={ ssid= "YourNetworkName" #psk="YourNetworkPass" psk=some-long-generated-value # add the following line if you're using a hidden wireless network scan_ssid=1 }
Next, edit your /etc/network/interfaces
and append the following lines:
auto wlan0 iface wlan0 inet dhcp wireless_mode managed wireless_essid any pre-up wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa.conf post-down killall -q wpa_supplicant
Restart your Overo and wireless should be working.
Once you are logged in, you might make some other tweaks:
- login as root and then create a user for yourself and give yourself sudo
$ sudo adduser youruser $ sudo adduser youruser sudo
- add some useful package repositories if they're not already present. Edit /etc/apt/sources.list and add these lines:
$ deb http://ports.ubuntu.com/ubuntu-ports lucid-updates main $ deb http://ports.ubuntu.com/ubuntu-ports lucid-security main
- get up-to-date:
$ sudo apt-get update && sudo apt-get upgrade
Install a window manager
If you require a graphical user interface you may install a window manager of your choice. These window managers have not been tested so proceed at your own risk:
Xfce
sudo apt-get install xfwm4
Matchbox
sudo apt-get install matchbox-window-manager
Related Links
Here are some links I found useful when putting this post together: