Welcome to the 10LE website, the home of
the embedded linux project.
Tutorial
Setting up the OMAP1710 H3
Contents
1. Overview
2. Required components
2.1 HW components
2.2 SW components
3. HW Setup
4. SW Setup
4.1 Scratchbox
4.2 Crosstool
4.3 U-Boot
4.4 Configuration of a TFTP Server
4.5 Bitkeeper client
4.6 Kernel
4.6.1 Get the kernel sources
4.6.2 Configure and build the kernel
4.7 Lauterbach Trace32
4.8 Update the U-Boot bootloader to the target
4.9 Set up the NFS root for the target
4.9.1 Create the root filesystem
5. Further Reading
1. OVERVIEW
-----------
This document provides the steps to setup the development
environment
on Linux for the TI OMAP1710 based on H3 Sample development
board (target).
It covers the hardware setup for OMAP1710 H3 (target
machine) as well
as the software required to install and configure on
your host machine.
The method presented in this document uses the tftp
and nfs services to load
the kernel and the filesystem on the target machine,
because this approach
is fast and more feasible for the development environment.
2. REQUIRED COMPONENTS
----------------------
2.1 HW components
H3 Sample development kit:
- H3 sample main board
- User interface module
- Multiport II debug board
- JTAG adapter board
- Power supply for the kit
- Cross-link Ethernet cable
- RS232 null-modem cable
2.2 SW components
On the Linux host:
- Linux (2.6)
- Lauterbach Trace32 debugger (for JTAG)
- BitKeeper client
- Gtkterm (or Minicom or Kermit)
For the target:
- Linux-OMAP (2.6.9-rc2 http://linux-omap.bkbits.com
)
- Scratchbox (0.9.8.2-1 http://www.scratchbox.org )
- Crosstool (0.27 http://www.kegel.com )
3. HW SETUP
-----------
We'll give the configuration you have to set your board
to.
Switch Settings
- Main Board
SW101-1 ON
SW101-2 ON
SW101-3 ON
SW101-4 OFF
SW401-1 ON
SW401-2 OFF
SW401-3 ON
SW401-4 ON
- Multiport debug board
SW2-1 OFF
SW2-2 OFF
SW2-3 OFF
SW2-4 OFF
SW3-1 ON
SW3-2 ON
SW3-3 ON
SW3-4 ON
SW3-5 ON
SW3-6 ON
SW3-7 OFF
SW3-8 OFF
4. SW SETUP
-----------
4.1 Scratchbox 0.9.8.2
Download the following RPM's packages from http://www.scratchbox.org/download/
U-Boot requires a software float point compiler to
be built. So, download crosstool at
http://www.kegel.com/crosstool/crosstool-0.27.tar.gz.
Now unpack and build the compiler:
$ gunzip crosstool-0.27.tar.gz
$ tar -xvf crosstool-0.27.tar
$ cd crosstool-0.27
$ chmod 755 demo-arm-softfloat.sh
$ ./demo-arm-softfloat.sh
$ export PATH=$PATH:/opt/crosstool/arm-softfloat-linux-gnu/gcc-3.3.2-glibc-2.3.2/bin
The commands above will build the compiler and install
it to /opt/crosstool
4.3 U-Boot
Download U-Boot at http://sourceforge.net/projects/u-boot
and proceed as follows:
$ bunzip2 u-boot-1.1.1.tar.bz2
$ tar -xvf u-boot-1.1.1.tar
$ cd u-boot-1.1.1
$ export CROSS_COMPILE=arm-softfloat-linux-gnu-
$ make omap1610inn_config
$ make all
You can also download the file h3-u-boot.bin, a binary
image, from
http://linux.omap.com/pub/bootloader/h3. After downloading,
you should install
tftp server service and copy the u-boot binary image
to /tftpboot and start the
tftp server.
4.4 Configuration of a TFTP Server
The fastest way to use U-Boot to load a Linux kernel
or an application image
is file transfer over ethernet. For this purpose, U-Boot
implements the TFTP
protocol (see the tftpboot command in U-Boot). To enable
TFTP support on your
host system, you must make sure that the TFTP daemon
program /usr/sbin/in.tftpd
is installed.
4.5 Bitkeeper client
BitKeeper is needed to download linux-omap kernel
in the next step.
From http://www.bitmover.com/download/bk-3.2.3/ you
can download the
client. Install the package by running the provided
install program.
4.6 Kernel
4.6.1 Get the kernel sources
If you are behind a firewall you may have to specify
your http proxy. For
example:
Create a directory, named linux-omap wherever you
want (it will be used like
a bk tree repository)
Clone the linux-omap tree (it'll download all sourcecode
from bk server):
$ bk clone http://linux-omap.bkbits.net:8080/main
linux-omap
Obs: Consistency check could be take some minutes.
To update the repository from its parent
$ bk parent http://linux-omap.bkbits.net:8080/main
$ bk pull
To make a check out files:
$ bk -r -U get -S
To see the graphical Bitkeeper help system, type the
following command:
$ bk helptool
4.6.2 Configure and build the kernel
$ cd linux-omap
$ make h3_omap_1710_defconfig
$ make menuconfig
$ make uImage
Note that 'dep' and 'clean' are no longer needed with
2.6 series. You can also omit the
ARCH=arm CROSS_COMPILE=arm-linux- parameters to make
since in this version
it's default in the Makefile.
4.7 Lauterbach Trace32
We will use Trace32 for downloading the images to
the target and it\x{FFFD}s
also a great tool for debugging the kernel. Install
Trace32 on Windows.
For parallel port mode edit the corresponding part
in config.t32:
PBI=
PARPORT=1
EPP
ADDRESS=632
This will set EPP mode on address 632 (0x278), for
which you may also have
to adjust the host's BIOS settings.
Windows is needed actually only because currently
there is no parallel mode
support in the Linux version of Trace32. If you have
an LB Ethernet module
or are willing to install WINE to your Linux box, then
you can have a pure
Linux environment.
4.8 Update the U-Boot bootloader to the target
To access the U-Boot console and later to have a Linux
login session on the
serial line we need a terminal program. We can use
GtkTerm, Minicom or Kermit.
Use these programs with the following init configurations
used to connect to
the serial port:
- Port: /dev/ttyS0
- Speed: 115200
From terminal program type the following commands on the U-Boot prompt:
OMAP1710 H3 # dhcp
OMAP1710 H3 # setenv serverip HOST_IP
The HOST_IP is the ip address of your host machine,
like 172.18.126.74
OMAP1710 H3 # saveenv
OMAP1710 H3 # tftp 10000000 h3-u-boot.bin
This command copy the h3-u-boot.bin file image to
RAM memory address (10000000)
Let's do now the flashing:
OMAP1710 H3 # protect off 00000000 0001ffff
OMAP1710 H3 # era 00000000 0001ffff
OMAP1710 H3 # cp.b 10000000 00000000 1ffff
OMAP1710 H3 # protect on 00000000 0001ffff
Check if flashing was successfull:
OMAP1710 H3 # crc32 10000000 1ffff
OMAP1710 H3 # crc32 00000000 1ffff
We are ready now to boot from target. Turn off the
H3 board, then turn the board on
again. You should see U-Boot welcome message and prompt
coming up again in the
terminal window. We'll set up now the boot loader to
boot the kernel from flash and
pass the proper kernel parameters.
You needs regarding the structure of the root may
very a lot, so we won't go here
into details. In any case you may find the uClibc project
useful, take a look at
http://www.uclibc.org.
You can also download a prebuilt root fs from http://www.uclibc.org/downloads
Mount the root filesystem to an appropriate place
and copy the filesystem to
a place from where you will export via NFS.
$ mkdir armfs-nfs
$ cp -a mnt/* $TARGET_DIR/armfs-nfs
At the end of the boot you should see a login prompt
both in your terminal window
and on the board's LCD screen.
------------------------------------------------
Last modified 04. Oct 2004
Carlos Aguiar <carlos.aguiar@indt.org.br>
Anderson Briglia <anderson.briglia@indt.org.br>
David Cohen <david.cohen@indt.org.br>
Mauricio Lin <mauricio.lin@indt.org.br>
Bruna Moreira <bruna.moreira@indt.org.br>
Claudia Roessing <claudia.roessing@indt.org.br>