OMAP fiddling

I have two OMAP3 based boards: a Gumstix Overo Earth and an OMAP3EVM.

Debian on the OMAP3 EVM

The TI OMAP3 EVM is a nice little board. Mine has an OMAP3530 processor (ARM Cortex-A8 @500 MHz) and 128 MB RAM.

One nice thing with the EVM is that it has an ethernet plug, so it is fairly feasible to install a Debian Lenny on an OMAP3 EVM from the network.

Boot files

For convenience, here are the boot files I used:

Preparing the SD card

You need to create a boot partition on your SD card (you can create the root partition and more from the installer).

You can use mkcard.sh.

Copy all boot files after.

Booting the installer

All the boot and installation is done on serial port.

At u-boot prompt, enter:

 OMAP3_EVM # setenv bootargs console=ttyS0,115200
 OMAP3_EVM # mmc init; fatload mmc 0 0x80300000 uImage; fatload mmc 0 0x81600000 uInitrd; bootm 0x80300000 0x81600000
Then proceed with Debian installer.

A typical installation will take ~465M.

Finishing installation

It seems Debian installer resets the bootable flag. You will need to set it again. For example, with fdisk:
 # fdisk /dev/xxx
 Command (m for help): a
 Command (m for help): 1
 Command (m for help): w
You can reboot on your installed system:
 OMAP3_EVM # setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
 OMAP3_EVM # mmc init; fatload mmc 0 0x80300000 uImage; bootm 0x80300000
(Note that you may need to adapt mmcblk0p2 to your partition layout.)

I captured those commands into a boot.scr that you can now add to your boot partition to avoid typing those each time.

You now have a freshly installed Debian system on your OMAP3 EVM.

Just in case, here is the tarball of the installed root filesystem. The root password is root. There is a user with login user and password user.

What next? I recommend you install openssh-server and connect to the board through the network rather than serial port, as the terminal is more comfortable.

Rebuilding everything

Debian installer ramdisk

I took Debian Lenny installer ramdisk and transformed it to u-boot loadable file with:
 $ mkimage -A arm -O linux -T ramdisk -C gzip -d ./initrd.gz ./uInitrd

Compiling the boot files

I crossed-compiled everything on my PC. To do so, install a cross-compiler (e.g. emdebian) and set some environment variables:
 $ export ARCH=arm
 $ export CROSS_COMPILE=arm-linux-gnueabi-

MLO (x-loader) can be recompiled from git://gitorious.org/x-load-omap3/mainline.git:

 $ make omap3evm_config
 $ make
You need to "sign" it for the OMAP3 romcode to load it properly. (In fact, you only need to prepend load address + size.) This can be done with signGP.c
 $ gcc -o signGP signGP.c
 $ ./signGP x-load.bin
You will obtain a signed x-load.bin.ift file, to be copied as MLO on the SD card.

u-boot can be recompiled from git://gitorious.org/u-boot-omap3/mainline.git:

 $ make omap3_evm_config
 $ make

The kernel above has been compiled from commit 3e6dce76d99b328716b43929b9195adfee1de00c:

 $ make omap3_defconfig
 $ make uImage
Preparing some boot.scr is done with:
 $ mkimage -A arm -O linux -T script -C none -d boot boot.scr

Debian on the Overo

The Gumstix Overo Earth is also a nice OMAP3 based board. It is much smaller than the EVM and has an OMAP3503 processor and 256 MB RAM.

I am too lazy to do a network installation over USB, so for now the filesystem obtained on the EVM and the OMAP Linux kernel can be used on the Overo.

The boot files are specific to the Overo:

Also, note that the serial port is ttyS2:
 Overo # setenv bootargs console=ttyS2,115200 root=/dev/mmcblk0p2 rw rootwait
 Overo # mmc init; fatload mmc 0 0x80300000 uImage; bootm 0x80300000
This is captured in this boot.scr.

Rebuilding Overo bootloaders

X-loader is configured for Overo with:
 $ make overo_config
(Signing is necessary. See above.)

U-Boot is configured with:

 $ make omap3_overo_config

Ubuntu Maverick on the OMAP3 EVM

An OMAP3 EVM board

You can easily boot an Ubuntu Maverick preinstalled image on the OMAP3 EVM. It even supports the LCD now :)

Download an omap preinstalled image on the Ubuntu website. (The OMAP3 image is maverick-preinstalled-netbook-armel+omap.img.gz) If you intend to download frequently, zsync is a good tool.

Uncompress and flash violently to your SD card, overwriting the partition table and everything:

 $ zcat maverick-preinstalled-netbook-armel+omap.img.gz >/dev/sdX
(Where X better be the correct letter :)

Replace mlo on the boot partition with an MLO for OMAP3 EVM, and do the same with this u-boot.bin. (There are two partitions in the image.) And voilà !

At first boot the root partition is resized to fit in your SD card completely (and the first partition becomes hidden). The image then reboots and goes to the "usual" Ubuntu installer.

If you want a serial console from there, you can drop the following into /etc/init/ttyS0.conf on the SD card:

 start on stopped rc RUNLEVEL=[2345]
 stop on runlevel [!2345]
 exec /sbin/getty -L 115200 ttyS0 vt102
(See Ubuntu help for details.)

You may also need to enable root login by removing the '*' from /etc/shadow on the SD card:

From there, you can login and install synergy to continue with the installer for example, or install ssh and log in remotely.



Copyright © 2010 Vincent Stehlé ( vincent.stehle@free.fr).
GNU Free Documentation License 1.2