Friday, April 10, 2009

Installing Ubuntu on the Gumstix Overo

Installing Ubuntu on the Gumstix Overo


To get your own Overobuntu card pre-installed, without the headache or hassle of making your own, buy one from my website: www.radsoftwaresys.com/content/products. You'll be getting a well-tested card, and the proceeds will be used to develop awesome new products for the Gumstix Overo. Thanks! Please note: this card will NOT work with the Chestnut43 board.

This tutorial will walk you through the steps of installing Ubuntu on a Bootable SD card, and booting to Ubuntu on the Gumstix Overo. These instructions assume that you are running from Ubuntu Linux, although any similar Linux distro will suffice.

This tutorial references the following websites. Portion of this tutorial have been assembled from them, sometimes paraphrased and sometimes copied verbatim. Please visit the respective sites for more information:
http://elinux.org/BeagleBoardUbuntu
http://www.gumstix.net/Software/view/Software-Overo/Creating-a-bootable-microSD-card/111.html

Required Materials:

The following materials are required to complete this tutorial:
  • Gumstix Overo
  • Summit Board
  • Power Supply
  • USB Mini-B to Standard-A (computer host to overo device) cable
  • 2GB (or larger) microSD Card (and standard card adapter to plug it into your development PC).
Ensure you have the correct packages installed:

sudo apt-get install ckermit qemu
...installs software...
wget http://ports.ubuntu.com/pool/main/d/debootstrap/debootstrap_1.0.12_all.deb
sudo dpkg -i debootstrap_1.0.12_all.deb
wget http://people.ubuntu.com/~ogra/arm/build-arm-rootfs
sudo chmod u+x build-arm-rootfs

Building the root file system

Next, we'll need to build the Ubuntu arm root file system. This command will place the compressed image in your current working directory, so make sure you cd to the directory in which you want your image.

You can use any one of the following commands to build a root file system, depending on your desired seed (NOTE: I highly recommend you use the LXDE image. The standard Ubuntu GNOME desktop is unbearably slow on the Overo):

General: sudo ./build-arm-rootfs --fqdn --login --password --imagesize --seed

lxde Desktop: sudo ./build-arm-rootfs --fqdn overo --login ubuntu --password temppwd --imagesize 2G --seed lxde,gdm

Xubuntu Desktop sudo ./build-arm-rootfs --fqdn overo --login ubuntu --password temppwd --imagesize 2G --seed xubuntu-desktop

Ubuntu Desktop sudo ./build-arm-rootfs --fqdn overo --login ubuntu --password temppwd --imagesize 3G --seed ubuntu-desktop

Set the computer aside, as it will take a long time to build the entire root filesystem.

Once it's done, you'll see two files: build-arm-rootfs-YYYYMMDDhhmm.log and armel-rootfs-YYYYMMDDhhmm.tgz.

The first file contains the build log (if you have have any errors, this is the best place to start). The second contains your compressed root file system.

Formatting and Creating a Bootable SD Card

These instructions were copied from the following documentation on the gumstix.net website with some minor modifications.

Reference: http://www.gumstix.net/Software/view/Software-Overo/Creating-a-bootable-microSD-card/111.html

Print
The Overo will boot directly from a properly prepared microSD card. This section will outline how to partition and format a bootable microSD card.

In order to create a bootable microSD compatible with the OMAP3 boot ROM you must set a special geometry using the fdisk "Expert mode".

This example will show the steps for setting up a brand new 2Gb microSD card.

First insert your card into your development machine's flash card slot. You may need to use a microSD to SD card adaptor to fit your slot.

On my Ubuntu 8.10 machine, the newly inserted card shows up as /dev/mmcblk0 and that is the device name that will be used through this example. You should substitute the proper device name for your machine. You can use 'mount' or 'df' to see where the card mounts on your machine.

Let's unmount the device's existing file system before we get started with fdisk:

$ sudo umount /dev/mmcblk0

Partitioning the card

Now launch fdisk and create an empty partition table. Note that the argument for fdisk is the entire device (/dev/mmcblk0) not just a single partition (i.e. /dev/mmcblk0p1):

# sudo fdisk /dev/mmcblk0


Command (m for help):
o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Let's first look at the current card information. Note: Your information may be slightly different:

Command (m for help): p


Disk /dev/sde: 2032 MB, 2032664576 bytes
64 heads, 63 sectors/track, 984 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes
Disk identifier: 0x00aa8e5c

Device Boot Start End Blocks Id System

Note the card size in bytes. We will needed it later in the process.

Now go into "Expert" mode:

Command (m for help): x

Next we will set the geometry to 255 heads, 63 sectors and a calculated value for the number of cylinders required for the particular microSD card.

To calculate the number of cylinders, we take the 2032664576 bytes reported above by fdisk (use the number you saw from above) divided by 255 heads, 63 sectors and 512 bytes per sector:

2032664576 / 255 / 63 / 512 = 247.12 which we round down to 247 cylinders.

Expert command (m for help): h

Number of heads (1-256, default 4): 255

Expert command (m for help): s
Number of sectors (1-63, default 62): 63
Warning: setting sector offset for DOS compatiblity

Expert command (m for help): c
Number of cylinders (1-1048576, default 984): 247

Return to fdisk's main mode and create a new partition 32 MB FAT partition:

Expert command (m for help): r


Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-247, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-247, default 15): +32M

Change the partition type to FAT32:

Command (m for help): t

Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

And mark it bootable:

Command (m for help): a

Partition number (1-4): 1

Next we create an ext3 partition for the rootfs:

Command (m for help): n

Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (6-247, default 6): 6
Last cylinder or +size or +sizeM or +sizeK (6-247, default 247): 247

To verify our work, lets print the partition info:

Command (m for help): p


Disk /dev/sde: 2032 MB, 2032664576 bytes
255 heads, 63 sectors/track, 247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00aa8e5c

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 1 5 40131 c W95 FAT32 (LBA)
/dev/mmcblk0p2 6 247 1943865 83 Linux

Up to this point no changes have been made to the card itself, so our final step is to write the new partition table to the card and then exit:

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

Formatting the new partitions

We format the first partition as a FAT file system (the -n parameter gives it a label of FAT, you can change or omit this if you like):

#  sudo mkfs.vfat -F 32 /dev/mmcblk0p1 -n FAT

mkfs.vfat 2.11 (12 Mar 2005)

We format the second partition as an ext3 file system:

$ sudo mkfs.ext3 /dev/mmcblk0p2

mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
121920 inodes, 485966 blocks
24298 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=499122176
15 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: ^[done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

Installing the boot files

There are three files required on the first (FAT) partition to boot your Overo:

  1. MLO: the boot-loader loader - this small program is loaded into the OMAP3 processor's static RAM. It does some minimal configuration of system memory and io pins and then loads the second file.
  2. u-boot.bin: the boot loader
  3. uImage: the linux kernel

You can build these yourself or download pre-built images. It is important that these three files have precisely these names on the card.

For build instructions, check out http://www.gumstix.net/Software/cat/Software-Overo/111.html, particularly the section on Setting up a build environment. You can download pre-built images from the following places:

  1. MLO: http://www.gumstix.net/overo-gm-images/v0.91/MLO-overo-v0.91
  2. u-boot.bin: http://www.gumstix.net/overo-gm-images/v0.91/u-boot-overo-v0.91.bin
  3. uImage.bin: http://www.gumstix.net/overo-gm-images/v0.91/uImage-overo-v0.91.bin

Once you have completed building or downloading these files, mount the FAT partition of your microSD card. This example will assume that you have mounted it at /media/card:

sudo mount /dev/mmcblk0p1 /media/card

Due to constraints of the mask boot ROM in the OMAP processor, MLO should be written first:

$ sudo cp MLO-overo-v0.91 /media/card/MLO

Then copy u-boot and the linux kernel to the card:

$ sudo cp u-boot-overo-v0.91.bin /media/card/u-boot.bin

$ sudo cp uImage-overo-v0.91.bin /media/card/uImage

You can now unmount the FAT partition:

$ sudo umount /dev/mmcblk0p1

At this point you have a bootable FAT partition.

The final step is to untar your desired rootfs onto the ext3 partition that you created above.

Note that this step can be dangerous. You do not want to untar your Overo rootfs onto your development machine - be careful!

This example will assume that you have mounted it at /media/card:

$ sudo mount /dev/mmcblk0p2 /media/card

Now untar your desired rootfs (note: The first step is important!):

$ cd /media/card

$ sudo tar -zxvf armel-rootfs-YYYYMMDDhhmm.tgz

You can now unmount the ext3 partition:

$ sudo umount /dev/mmcblk0p2

Finishing Up


The last step is to remove your bootable SD card, and insert it into the MMC slot on the Overo. Before you insert the card, make sure the Overo is off.

Once you've inserted the card, boot the Overo. It should boot into your new Ubuntu environment.


UPDATE Nov. 27, 2009:

HOW TO INSTALL MODULES:
This section will detail how to install the kernel modules from the Angstrom distribution into
the Overobuntu image. Also, please note the lack of tutorial style. I will be updating this section to be more of a tutorial shortly, but I figured it is useful enough to put this version up now.

First, bitbake the U-boot, x-load, and kernel. See http://www.gumstix.net/Software/view/Software-Overo/Setting-up-a-build-environment/111.html if you're unsure what this means, or don't have your build environment set up.


bitbake u-boot x-load linux-omap3


In gumstix/gumstix-oe/tmp/deploy/glibc/images, you will find
files like:
MLO-*
u-boot-*
uImage-*
modules-*-.tar.gz

The first three are used in building the bootable SD card. See
http://www.gumstix.net/Software/view/Software-Overo/Creating-a-bootable-microSD-card/111.html

Once you have the FAT partition set up with MLO, u-boot.bin and uImage,
untar the ubuntu arm-rootfs to the ext3 partition.

Next, untar the modules-*-.tar.gz from the build to the ext3 boot partition.
This will "install" the modules and firmware.

One last step, boot from the SD card. There will be some errors regarding
a missing modules.dep file. NOTE the path in the error. Sign in as the
user specified when you built the ubuntu arm-rootfs. CD to the location
noted in the error and type the following command:
sudo depmod
and enter the password.

Finally, reboot:
sudo shutdown -r now

Hopefully, this will get Ubuntu running for you with the required drivers.

UPDATE: November 28, 2009 -- from "http://www.gumstix.net/wiki/index.php?title=Installing_Ubuntu_9.04_on_Gumstix_Overo"

If you're interfacing with your Overo with the USB serial terminal, keep in mind that you won't see the 'login:' prompt after booting Ubuntu unless you configure getty to listen on /dev/ttyS2. You'll need to do this while your MicroSD card is still mounted on another host.

# cd /path/to/rootfs
# cat > etc/event.d/ttyS2 <start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

stop on runlevel 0

respawn
exec /sbin/getty 115200 ttyS2
EOF


You will also need to add ttyS2 to /etc/securetty to allow root logins there:

# echo "ttyS2" >> etc/securetty

"

Cards purchased from me will now have this capability.

61 comments:

sevensevens said...

Having trouble compiling Xubuntu with these steps (xlde works great tho). I'm still using Ubuntu 8.10 as on the build machine tho. Has anyone else had this issue.

John said...

What kind of problems are you having Seven? Does it give you any error messages?

Post your problem, as well as the output of any error messages, to the gumstix users list (gumstix-users@lists.sourceforge.net). I, as well as many other gumstix enthusiasts, read this list regularly, and should be able to help you with the compilation problem.

This will also give us multiple eyes on the problem. If we get a solution, you'll get credit when I post it here.

sevensevens said...

Figured out the problem. If you try to dload other package it will fail. I realized my weekly system update had run during compile.

sevensevens said...

I'm using a Gumstix Air (with wireless Bluetooth + 802.11g), how do I enable these in ubuntu? I've looked at ipkg, but I believe I need an ubuntu driver for this to work.

John said...

Hey Seven, glad to see that you were able to get your problem solved.

As for the modules, there's a little more to it than meets the eye. You have to have built the overo-oe distribution.

if $OVEROHOME is the directory where you built the overo image, go to the following area:

$OVEROHOME/tmp/rootfs/lib/modules

Then, copy the 2.6.28-omap1 folder to your the overo Ubuntu root filesystem:

$UBUNTUHOME/lib/modules/2.6.28-omap1

You would do this right before the last step in the tutorial (unmounting the card), so you would copy these modules directly to your SD card.

I'll update the instructions here, but I'm working on a program that will automate the creation of bootable Ubuntu SD cards for the Gumstix Overo's. I'll post it here when it's done.

John said...

So, just to clarify something, the above comment requires one to build the overo-oe images and root file system -- that's where the /lib/modules/2.6.28-omap1 file is located.

Follow the instructions at http://www.gumstix.net/Software/cat/Software-Overo/111.html to do this.

Would it be easier for you folks if I just posted a link to a working SD card image -- that way, you could just create the card using my already working image? Let me know, and I'll do that (along with posting some instructions on creating your own card).

sevensevens said...

A working SD image would be nice. The instructions seem pretty stright forward tho. I've also got the compiled images from this tutorial (in .tgz format). Should I upload them as well?

John said...

Sure. I'm creating a sourceforge project for it as we speak (called overobuntu). Once it's approved, I'll post some links to it here.

sevensevens said...

Tried to build the overo-oe image and got an error saying it failed to fetch omap3. As I only need the one package, is there a way of building it without needed the rest of the distro? BTW, I also found precompiled images at http://www.gumstix.net/overo-gm-images/v0.92/, but they have 2.6.29-omap1, which did nothing when I dropped it into /lib/modules on my SD card.

John said...

Hey Everyone,

I've finally gotten the overobuntu project up in sourceforge. You can download it via SVN at the following:
http://overobuntu.svn.sourceforge.net/viewvc/overobuntu/

Make sure you click on the "Download GNU Tarball" link at the bottom in order to get everything -- in particular, the BIN area is a requirement.

Right now it only formats the SD card for you and builds the root file system, and there's no documentation.

I'll continue working on it, and add some documentation soon.

Joe said...

I'm excited! I downloaded the tarball and it is very small, not a full image on it's own I don't believe.I don't know how to turn it into a image, I'm patiently awaiting instructions. Can I request both the lxde and the Gnome versions be posted. I'm sure you are working hard, it is much appreciated.

John said...

From an Email:
Hey Martin,

So, the build-arm-root program unfortunately does not compile the kernel modules. They will need to be copied separately.

I have a copy of them at the following:
http://overobuntu.svn.sourceforge.net/viewvc/overobuntu/bin/2.6.28-lib/modules.tar.gz?view=tar

If you untar this archive to /lib/modules on your SD card, it should recognize your hardware.

tar -C <SDCardRoot>/lib/modules/2.6.28 -zxvf modules.tar.gz

I haven't tested this yet, but it should work. I'm developing overobuntu right now to automatically create working SD cards. Check out

overobuntu.sourceforge.net.

I should have the final version of 0.91 done today.

Anchora said...

Hi John. Just wanted to say thanks for the great article. I installed Ubuntu 9.04 on my micro sd according to your article, and my Overo Air is running it fine. I even added the kernel modules you suggested previously in the comments.
My problem is is that Ubuntu does not recognize the Air's wireless. At all. Lspi, dmesg, nothing points to the wireless even existing. Do you have any thoughts?

tenghui said...

Hi John,

I'm using a GUMSTIX verdex PRO XL6P.
I am very new to gumstix as well as linux and i would like my GUMSTIX to boot to Ubuntu. Hope you can help me with it.

John said...

Hey Tenghui,
Unfortunately, I don't have any experience with the Verdex line. I've not heard of anyone porting Ubuntu to the verdex, but it's based on the Intel PXA chipset. I would suggest checking out the moblin project. They may have more information about what you need.

tenghui said...

Thx John.. Will go check it out. too bad i am not using Overo.

John said...

For those that are interested in purchasing an SD Card with Ubuntu for the Overo pre-installed, check out my most recent post: http://johnwoconnor.blogspot.com/2009/06/overobuntu-sd-card-for-sale.html. Right now, I'm selling a 2GB, 4GB, and 8GB SDHC version of the cards.

The cards are pre-formatted, pre-installed, and ready for business.

John said...

From the gumstix mailing list:
Amanda,

This worked well for me but your mileage may vary.

After building the Ubuntu rootfs, I build the kernel, x-load and u-boot from
OE using bitbake. This is nice since you get up-to-date versions of the
stuff for the bootable SD card, kernel and drivers. The kernel build will
get you the modules that match the kernel as well as the firmware.

Follow the instructions at the following link but when you get down to the
"Your first build" section type:
bitbake u-boot x-load linux-omap3

http://www.gumstix.net/Software/view/Getting-started/Setting-up-a-build-environment/111.html

In ~/gumstix/gumstix-oe/tmp/deploy/glibc/images (I believe), you will find
files like:
MLO-*
u-boot-*
uImage-*
modules-*-.tar.gz

The first three are used in building the bootable SD card. See
http://www.gumstix.net/Software/view/Software-Overo/Creating-a-bootable-microSD-card/111.html

Once you have the FAT partition set up with MLO, u-boot.bin and uImage,
untar the ubuntu arm-rootfs to the ext3 partition.

Next, untar the modules-*-.tar.gz from the build to the ext3 boot partition.
This will "install" the modules and firmware.

One last step, boot from the SD card. There will be some errors regarding
a missing modules.dep file. NOTE the path in the error. Sign in as the
user specified when you built the ubuntu arm-rootfs. CD to the location
noted in the error and type the following command:
sudo depmod
and enter the password.

Finally, reboot:
sudo shutdown -r now

Hopefully, this will get Ubuntu running for you with the required drivers.

Shane said...

I think the first link above is ment to be http://www.gumstix.net/Software/view/Software-Overo/Setting-up-a-build-environment/111.html (the overo build enviroment) Because the above link is for the verdex, spent an hour trying to get it to build before realising.

Shane said...

anyone any idea on how to get the built in wireless in the earth to work? I've followed all of the above instructions but nothing

Brendan said...

Hey John, everything was fine until the very last step. I was attempting to untar the rootfs onto the ext3 partition, but I get this: mortrin@mortrin-laptop ~ $ cd /media/disk
mortrin@mortrin-laptop /media/disk $ sudo tar -zxvf armel-rootfs-200907041239.tgz
[sudo] password for mortrin:
tar: armel-rootfs-200907041239.tgz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors

What does this mean? The file is clearly located on my Home folder. Also, it seems that when I try to unpack it using a GUI interface to the same place it claims I "do not have the proper permissions".

John said...

Hey Brendan,
Is your .tgz file located in your home directory? It looks to me like you're changing to /media/disk, and then attempting to untar the file. However, since the .tgz file is in your home directory, not your /media/disk directory, it can't find the file.

Try these commands on and see how they treat you:

cd ~
sudo tar -C /media/disk -zxvf armel-rootfs-200907041239.tgz

The Tilde (~) means your home directory.

In order for tar to work, you have to be in the same directory as the tgz file you created (or specify the absolute path to the tgz archive). Using the -C option lets you untar the
archive into a directory other than your current working directory.

amenon said...

Thanks for the tutorial. I used this to install Debian on the Overo.

@Shane: I had trouble with the wireless too. The kernel module that is being loaded for the wireless is the libertas_sdio. This requires two firmware files. Take a look at your dmesg output to confirm. I downloaded the firmware files from Marvell (http://elinux.org/Libertas_SDIO). Save the two .bin files to /lib/firmware. You will also have to rename the helper_sd.bin to sd8686_helper.bin

Good luck.

Rick said...

lxde Desktop: sudo ./build-arm-rootfs --fqdn overo --login ubuntu --password temppwd --imagesize 2G --seed lxde,gdm

If you have a 8GB SDcard would it be 8G instead of 2G in the above command?

Thanks,
Rick

John said...

I'm not sure what the implications are of using a smaller size than the card you have available.

I would assume that it should still work fine, and that it will just allow you to use extra space. The image size itself just refers to the size of the initial image that you're creating. Once you're installed, you should be able to use a package manager to install more software.

Rick said...

I am trying to build the overo-oe
( http://www.gumstix.net/Software/view/Software-Overo/Setting-up-a-build-environment/111.html ) and I got the errors

NOTE: Task failed: /overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/gnome-keyring-2.26.0-r0/temp/log.do_configure.28945
ERROR: TaskFailed event exception, aborting
ERROR: Build of /overo-oe/org.openembedded.dev/recipes/gnome/gnome-keyring_2.26.0.bb do_configure failed
ERROR: Task 2578 (/overo-oe/org.openembedded.dev/recipes/gnome/gnome-keyring_2.26.0.bb, do_configure) failed
NOTE: Tasks Summary: Attempted 1537 tasks of which 1537 didn't need to be rerun and 1 failed.
ERROR: '/overo-oe/org.openembedded.dev/recipes/gnome/gnome-keyring_2.26.0.bb' failed


Any thoughts ?

Thanks,
Rick

hank said...

I am on the build step:

sudo ./build-arm-rootfs --fqdn overo --login gf --password pw --imagesize 2G --seed xubuntu-desktop

It ran for over an hour and then bailed. The log shows this error:

Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/a/app-install-data-partner/app-install-data-commercial_11.9.04_all.deb 403 Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Kernel panic - not syncing: Attempted to kill init!
I: Killed ...

I verified that package is available with wget and it's not 403 Forbidden. Now I have to start the entire process over. Any suggestions?

hank said...

PS. I would love a prebuilt Ubuntu 9.04 with modules and development libs ready to go.

hank said...

Overo Earth + Tobi up and running with Xubuntu 9.04. HDMI display is great. The recommended Trendnet USB wireless adapter works out of the box. The built-in ethernet adapter is not recognized whatsoever. It is an SMSC LAN 9221.

hank said...

Upgraded to version 0.92 corresponds to kernel 2.6.30 and includes the driver smsc911x.ko and now the ethernet port works fine.

New problem, with LXDE - it does not include "iwconfig" and various other necessary commands. Where to find the .arm.deb packages?

m@nu said...

hi john

i already managed to run my own built of the ubuntu-lxde-package. unfortunatly, wifi and bluetooth are not working. extracting the modules.tar.gz into the firmware directory did also not work yet. (i do not get any error during booting linux; also the blue LED is not blinking during running the overo)

have you already continued with your overobuntu-project? would really appriciate your help :)

John said...

Hey M@nu,

Don't forget to run the following command after copying over the modules:

sudo modprobe

Also, the modules need to be in the correct directory. You can find what that directory should be by running the following command:

echo "/lib/modules/`uname -r`"

The modules should be copied into that directory (or symlink the directory that contains your modules to that area). The following command may be helpful:

sudo ln -s path_to_downloaded_modules /lib/modules/`uname -r`

Above, replace the "path_to..." above with the location of the downloaded modules.

So, still tinkering around with overobuntu -- mostly having trouble getting the distribution in a format you can read on the card.

Sounds like there's still some interest in this. I'll put it back up toward the front of my queue and try to get a downloadable distro soon.

m@nu said...

hi john

thanks for your very fast reply :)

i didn't enter the "modprobe" command (i'm a linux newbie, so who wonders ;) )
i'll try that this evening, thanks!

regarding the image: why don't you just create the image and use a small shell script with dd to write the whole thing to the card?
or is the process more complex as i might think at the moment?


btw. maybe you'll be interested in the project i'd like to run "overobuntu" on:
http://shared.msites.net/lrc/

John said...

Hey M@nu,

Cool project! Looks like a lot of fun.

Unfortunately, imaging an SD card and copying it over doesn't work -- you need to format the card exactly to make it bootable.

There is a way to use the overobuntu builder to copy over an image. I'll work on a procedure and post it here.

John said...

@hank,
I'm not sure where to find the deb arm packages. You could try to use apt-get to install iwconfig...see where that takes you.

m@nu said...

hi john

i recognized that i copied the modules into a wrong directory. after copying them into /lib/moduls/2.6.0-omap3/ and running the depmod (and getting a bigger microSD card ;) ), the boot up asked correctly for the wlan firmware.
downloaded and copied to the /lib/firmware directory, the interface was detected correctly. it is now available as eth0.

thank you very much for your advices here in your blog!

with you permission, i'll adapt all your described steps (even the ones in the comments) together with my expiriences into a new guide on my project wiki.

next step will be the setup of the network interface; still learning new things these days ;)

thanks again & best regards,
manuel

belendax said...

I did this instructions on tobi with xlde but when I want to boot it witch ckermit it locks on * Starting GNOME Display Manager...

John said...

@belendax
Hey,

So, this version of overobuntu uses runlevel 5, and Ubuntu does not have a simultaneous terminal running during runlevel 5 by default.

Basically, Ubuntu is waiting for you to log into the GUI. If you were to plug in the overo to a monitor, you would be able to log in via the login screen.

I've not yet created a version that logs in using runlevel 3 or a simultaneous terminal in runlevel 5. That will definitely go into the next version.

Thomas said...
This comment has been removed by the author.
Thomas said...

Hy everybody!

First of all thank you very much for this blog entry - it was very usefull for me.

I'm using an overo gumstix tobi with ethernet port and had some serious issues getting up the ethernet and wireless interface simultaneously but now it works perfectly. Maybe I can help somebody else with my comment.

I'm using the 2.6.31-omap1 MLO, u-boot.bin and uImage files from http://www.sakoman.com/feeds/omap3/glibc/images/overo/200910121635/ and also downloaded the pre-built console-image from there where i took the kernel modules (/lib/modules/2.6.31-omap1) and the wifi firmware (/lib/firmware/sd8686.bin and /lib/firmware/sd8686_helper.bin) from.

using these things I could get up the ethernet and wireless devices but only on the first boot. It took a long time to figure out, that there is a bug in the current voltage regulator framework in combination with the marvell wifi driver (should be fixed in 2.6.32). The wifi doesn't function after a reboot. The solution for now is to cut off power supply for about 1-2 minutes and boot again.

last thing - the name of my wifi interface was eth1_rename. I renamed it on boot with an entry in /etc/udev/rules.d/70-persistent-net.rules. the entry looks like this:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC-address of interface e.g. of the wifi", ATTR{type}=="1", KERNEL=="eth*", NAME="your preferred name e.g. wlan0"

hope this is usefull for somebody out there!

belendax said...

tnx John for your answer, I can solve that problem but I have another problem with network, when kernel boots I see this error: "net.ipv4.tcp_syncookies" is an unknown key
& after boot when I run ifconfig I don't see eth0 interface! I have overo tobi & tested various kernel images, but it didn't work!

Thomas said...

@belendax

i had the same error message and i commented out the following line in
/etc/sysctl.d/10-network-security.conf:

# net.ipv4.tcp_syncookies=1

hth,
Thomas

Joe said...

Hello, I was just wondering what changes would one make to build a 9.10 or 10.4 release vs the 9.04? So far I have compiled a few builds, mainly the Gnome, xlde, and xfce, but I am looking at building a netbook remix just to see how it goes.
So far I've had no problems compiling but I have not had a chance to test the images (too busy compiling!).
Thank you for the blog, I wouldn't know where to start without it!
~Joe

John said...

Hey joe,

So, the build-arm-rootfs program is used to build the actual image. To update it to use the new packages, cd to the directory that contains the build-arm-rootfs software, then run the following from the command line:

sed -i s/jaunty/nameofdistro/g build-arm-rootfs

ie: for karmic (9.10),

sed -i s/jaunty/karmic/g build-arm-rootfs

Also, to use Ubuntu-netbook-remix, you can change the seed name that you use to ubuntu-netbook-remix.

The command to do this would look like the following:

sudo ./build-arm-rootfs --fqdn overo --login ubuntu --password temppwd --imagesize 3G --seed ubuntu-netbook-remix,ubuntu-netbook-remix-default-settings

Make sure you run it after you change the build-arm-rootfs to use the new repository (namely, karmic for 9.10).

modifiedbessel said...

An amateur problem....
Ubuntu 9.10

All overo-oe folder is correctly built, qemu installed.

Upon entering, from overo-oe where the packages to build are installed:

sudo ./build-arm-rootfs --fqdn overo --login yyy --password xxx --imagesize 2G --seed lxde,gdm

I get the message
qemu not installed, please use:
sudo apt-get install qemu
to install the qemu package !

I have tried re-installing qemu, etc., but the problem remains. Would certainly appreciate any advice. Thanks.

Doug said...

I'm having the exact same issue as modifiedbessel on Ubuntu 9.10 :/

Thomas said...

@ doub, modifiedbessel:

rootstock is worth a try. (https://launchpad.net/project-rootstock)

hth,
thomas

Doug said...

@Thomas:

Thanks for the link - I've already switched to 9.04 and that seems to work.

Has anyone else received the NOTE: Task failed: Error: ~/overo-oe/org.openembedded.dev/recipes/u-boot/u-boot-git/./fw-env.patch not found. error? Any idea what is needed to fix this?

Rat 9 said...

I cant build the lxde Desktop either! Help!

qemu not installed, please use:
sudo apt-get install qemu
to install the qemu package !

I have reinstalled it a few times!

Rat 9 said...

ok i got rootstock to work only after i installed it from the ubuntu package manager instead of downloading it from the website.

Rat 9 said...

So i formatted my card, built my rootfs with rootstock and have LDXE running and now i am now trying to get the wifi working just like everyone else. I have put the two firmware files from marvell on my sd card, and all the modules john posted. I ran depmod and modprobe. (not sure if modprobe did anything) When i run LSMOD it lists: libertas_sdio, libertas, ipv6.

So do i have wifi? there is no manager in this LDXE business that i can find so far. What about bluetooth?

Scott said...

Wow come to find out wifi worked for me with the basic instructions above.
I had been trying to all of the above listed module related commands, but I just had to configure the settings in Applications > Settings > Connection Management. It had some strange access point settings in there.

Scott said...

Or maybe that wasn't the case because that wasn't the ubuntu image :S Sorry

Rat 9 said...

Well i built a new ubuntu image with xfce, lxde, and gnome, Pre-installed all the firmware and drivers from the overo, and tested. Wifi works great. After some testing i have decided: ubuntu gnome is too slow. Dont try it. xfce is awesome, lxde is ok. Unfortunately some of the other hardware does not work. My comparison is now between Sakoman and Overo for what will power my project.

m@nu said...

@Rat9: is there any chance to get your xfce image somewhere?
would be great if you'd share it with us :-D

Olufemi said...

Hi joe. I'm having issues with downloading the lxde desktop image. When I execute this command

sudo ./build-arm-rootfs --fqdn overo --login me --password temppswd --imagesize 2G --seed lxde,gdm I get the following error message:

./build-arm-rootfs: line 434: /tmp/tmp.COwzMluRKM/tmpmount/etc/network/interfaces: No such file or directory

all I did earlier was use the command to upgrade from jaunty to karmic:
sed -i s/jaunty/karmic/g build-arm-rootfs

It seems it's having an issue appending arguments to the etc/network/interfaces file (from looking into the line specified in build-arm-rootfs. Any ideas?

Olufemi said...

Even better, would there be a way to upgrade it to karmic or lucid from within LXDE itself? Has anyone tried this? I did once but it was too memory intensive (I think) so I got an error. The reason for the upgrade is that I was trying to install mplayer and run it but there seems to be a dependency conflict bug in jaunty left unresolved (libavcodec52 and libavformat), that caused the mplayer installation to fail.The original overo OS (enlightenment) runs mplayer really well (tested with a mp4 file)so I am curious as to why it's such a problem on LXDE. Is there any adverse effect to installing the lucid version of the mplayer deb directly on LXDE jaunty? I know it's a lot of questions but thanks for responding anyway!

Adam said...

Thanks for the great tutorial everything worked great.

One question though, is there a way to just compile a console image? I do not want any gui and im not experienced enough in ubuntu to disable everything my self.

David said...

Hi, I just read your article about installing Ubuntu on the Gumstix Overo and just now ordered an SD card. Noticed that you use QEMU for your environment.

I am interested in getting QEMU to run on the Overo emulating an x86 so I can run an x86 app. Have had problems getting QEMU built on the Overo since it seems to require gcc 3.x and I have only been able to install gcc 4.x. Any help would be greatly appreciated.

John said...

@Adam,
Try the following in the --seed argument of ./buildrootfs:

--seed=linux-firmware,wireless-tools,ntpupdate

@David, that's a very interesting use of QEMU -- I've not yet seen anyone do that.

I'll see what I can dig up for you on compiling using QEMU. I haven't had much experience compiling it for a new platform.

aspnair said...

I could create ubuntu rootfs using ubuntu 10.04 host machine. Actually qemu-system-arm is broken there, but build-arm-rootfs requires that.
So I compiled qemu from source

wget -c http://download.savannah.gnu.org/releases/qemu/qemu-0.12.3.tar.gz
tar xfz qemu-0.12.3.tar.gz
cd qemu-0.12.3
./configure --target-list=arm-softmmu
make
make install
This by default installs to /usr/local/bin
Execute build-arm-rotfs after that.