Digi International Inc. 2005. All Rights Reserved.
The Digi logo is a registered trademarks of Digi International, Inc.
All other trademarks mentioned in this document are the property of their respective owners.
Information in this document is subject to change without notice and does not represent a commitment on the part of Digi
International.
Digi provides this document “as is,” without warranty of any kind, either expressed or implied, including, but not limited to, the
implied warranties of fitness or merchantability for a particular purpose. Digi may make improvements and/or changes in this
manual or in the product(s) and/or the program(s) described in this manual at any time.
This product could include technical inaccuracies or typographical errors. Changes are periodically made to the information
herein; these changes may be incorporated in new editions of the publication.
User keys ...............................................................................................................75
8
LxNETES User’s Guide
Overview
Introduction
Introduction
CHAPTER 1
The LxNETES package enables you to easily develop software under Linux 2.6 for Digi
International and FS Forth-Systeme embedded modules supported in this release of
LxNETES.
This document assumes that you have basic knowledge of Linux. In addition, it is
recommended that you have experience with compiling a standard Linux kernel on your
host PC. If you are new to Linux, the following books are recommended for resources:
1.) Linux Device Drivers, 3rd Edition, by J. Corbet, A. Rubini, and G. Kroah-Hartman,
ISBN 0-596-00590-3
The following sections explain the several parts that compose the LxNETES package.
Cross-development environment
Whenever you need to generate code for an embedded target on a development system
with a different microprocessor architecture, you need a cross-development environment.
That is, you need a compiler that executes in y our development system (for exampl e a x86
PC) but generates code that executes in a different processor (for example your target is
NET+ARM).
LxNETES provides the GNU cross-development tool chain for NET+ARM, ARM, and
X-Scale, which contains the compiler, linker, assembler, and shared libraries needed to
generate software for the supported platforms.
9
Overview
Linux kernel sources
The LxNETES package contains the complete source code of the Linux kernel. This
allows you to configure, modify, and create a custom kernel to your specific embedded
system’s needs. Although the kernel sources are the official distribution, some
modifications have been made to adapt the sources to the supported platforms.
Template project
The philosophy of work in LxNETES environment is linked to the idea of ‘projects’. A
project is actually a folder which contains the custom system for a specific target. This
folder will contain:
The specific kernel configuration
The root file system, directory structure, and files
The applications compiled
With one simple command, the compilation process takes care of compiling the kernel,
the applications, generating the target’s file system, and compressing into the final binary
images. The compilation process take place within the project folder with normal user
permissions.
10
Example applications
As part of the project template, several example applications are included with complete
source code. These examples can be used as templates for your future software
applications. They are distributed in an environment that allows you to compile them for
either of the following systems:
The target development system (default)
The target development system with debug information
LxNETES User’s Guide
Features
What’s new in LxNETES 3.2?
Linux Kernel
Linux Kernel 2.6.12.5
Added touch screen driver for the ConnectCore 9P family
Added RTC driver for the ConnectCore 9P family
Build process based on autoconf
Bootloader
New U-Boot boot loader, based on version 1.1.3
Tool chain
gcc-3.4.4 cross compiler for NET+ARM, ARM, and XScale processors
Introduction
For existing LxNETES customers: LxNETES 3. 2 uses a different uClibc tha n
previous versions of LxNETES which is not backwards compatible.
Applications built with old uClibc cannot be used in the new environment;
they have to be rebuilt.
General features
With LxNETES you receive a Development Kit and BSP with the following features:
Support for Linux kernel 2.6
Support for the following NET+ARM, ARM, and Intel X-Scale processors:
U-Boot universal bootloader, capable of booting Linux and other operating
systems from Ethernet, Flash memory and USB.
C and C++ support for application development
gcc-3.4.4 cross compiler for Net+ARM, ARM, and XScale processors
uClibc 0.9.27 for user applications
Pre-built Busybox and other applications
Telnet daemon utelnetd
Web server BOA
Nano-X and QT embedded sample projects
Shared library support
Project-oriented workflow – kernel configuration and rootfs setup are separated
from kernel sources, tool chain sources, thus making it possible to maintai n the
project in a revision control system.
LxNETES User’s Guide
Autoconf driven build process
All building can be done without root access
This LxNETES version can coexist with older installations of LxNETES
Conventions used in this manual
The following is a list of the typographical conventions used in this manual:
Introduction
Style
Used for file and directory names, programs and command names,
command-line options, URL, and new terms.
Style
Used in examples to show the conte nts of files, the output from
commands or in the text the C code.
Style
Used in examples to show the text that should be typed litera lly by the
user.
#
This prompt indicates that the listed commands have to be executed as
a root.
$
This prompt indicates that listed commands have to be executed as a
normal user.
[1]
Used to indicate an item of the reference section.
This manual also uses these frames and symbols:
This is a warning. It helps you to solve or to avoid common mistakes or
problems.
This is a tip. It contains useful information about a topic.
$This is a host computer session
$And this is what you must input (in bold)
13
Features
#This is a target session
#And this is what you must input (in bold)
JTAGJoint Test Action Group (IEEE 1149.1)
MMUMemory Management Unit
NFSNetwork File System
ROMFSROM File Sy stem
ROOTFSRoot File System
RTCReal Time Clock
TFTPTrivial File Transfer Protocol
USBUniversal Serial Bus
LxNETES User’s Guide
Requirements
CHAPTER 2
System Requirements/Prerequisites
System requirements
Your development system should be a reasonably fast x 86-ba sed host PC wi th an E thernet
interface, a serial port, and a parallel port.
Different Linux distributions such as SuSE, Debian, or RedHat can be used for the
development. This documentation is based on the Debian Linux distribution; however,
other distributions with minor changes in the settings can also be used. Please refer to the
manuals of your Linux distribution if settings are not working as described in this
document.
Requirements
The following software is required on your development system:
GNU C library glibc 2.3
GNU C compiler gcc >= 2.95.3 (3.3 or higher recommended)
GNU make version >= 3.80
awk
perl >= 5.6.0
autoconf >= 2.59
Terminal client software (such as Minicom or Seyon)
TFTP daemon
NFS daemon
rsync
15
System Requirements/Prerequisites
DOS or DO S-emulat or (such as dosemu)
Optional but recommended components:
Qt3 development tools
For using LxNETES, a recent Linux d istributio n b ased on GNU C Library gl ibc versi on
2.3 (a free implementation of the Standard C Library) is needed. To find out which glibc
version is installed on your system use the following commands:
$ldd --version
$ls -l /lib/libc*so
Please make sure that you use GNU Make version 3.80 or later. Check yours with the
following command:
$make –v
Check the versions of required applications with these commands:
Disk space
16
$gcc --version
$perl -v
$autoconf --version
The LxNETES installation needs 400 MB of free disk space. Every project you create
needs another 100 MB free disk space. Th e L xNETES insta llat ion an d t he p roje cts can b e
located on different hard disks.
Check if there is enough space available on your drive by executing the following
command:
$df -h
The “df” command displays the amount of disk space availabl e. The option h displays the
space. For detailed information read the man page of “df”.
LxNETES User’s Guide
Applications & Services
To use this software, your system has to be configured to build a standard Linux 2.6. If
you can build a kernel for your development platform, you can be sure that all the
necessary software is installed.
Depending on the network services used dur ing the development , additional daemons may
have to be installed.
TFTP daemon
U-Boot is able to write files to the Flash memory of the mo dule. A TFTP server is
required to transport these files from your host computer to the target. Debian users can
execute the following command to install a TFTP server:
#apt-get install tftpd
After completing installation, create a directory using the path “/tftboot” where exported
files are located. Your images can be placed in the directory automatically by the
LxNETES build environment. You must be root to create this directory.
Requirements
#mkdir /tftpboot
#chmod 1777 /tftpboot
To make sure that your TFTP server is using the “/tftpboot” directory, check the Internet
daemons configuration file "/etc/inetd.conf". It should contain an entry similar to the
following:
If the entry is not there, use an editor and change the file accordingly.
17
System Requirements/Prerequisites
NFS server
Use the network file syst em (NFS) to simplify application debugging on the target. NFS
allows your target to mount its root file system with read/write permissions from the host
computer over Ethernet. NFS also allows you to access the file system fro m the tar get and
from the host computer the same time.
The NFS server configuration details are beyond the scope of this User's Manual and are
very specific to the various distributions. This manual only describes the modifications
necessary on hosts running a Debian distribution. Please refer to your Linux distribution
manual to setup a NFS server if you are using a different distribution.
When the NFS server package (Debian package nfs-kernel-server) is installed on Debian,
there is a file "/etc/exports" that contains information on exported directories and its
access rights. Add the following line to this file to provide read/write access for your
target:
BOOTDIR IP_ADDRESS(rw,all_squash,async)
18
BOOTDIR needs to be replaced with the path to the NFS root directory which is exported
to the target. The IP_ADDRESS needs to be replaced with the IP address of your target.
Please refer to the Linux man pages for detailed in formation about the /etc/exports file.
The build process copies the NFS root to /export/nfsroot-<platformname>; e.g. to export
the rootfs for cc9p9750, write the following to /etc/exports:
For simplicity’s sake you can export the whole /exports dir for a complete subnet, e.g.:
/exports 192.168.42.0/24(rw,all_squash,async)
LxNETES User’s Guide
#/etc/init.d/nfs-kernel-server restart
JTAG-Booster
$_ports = "fast range 0x378 0x37a fast range 0x3f8 0x3ff range 0x778 0x77a”
Requirements
After modifying the exports file, the NFS server has to be restarted with the following
command:
The JTAG-Booster software for hardware Flash updates is a DOS application. It must be
installed on a native DOS / Windows host or a virtual machine like "dosemu" under
Linux.
Execute "dosemu" as root to gain full hardware access. The configuration file of dosemu
needs the entry:
To install the JTAG-Booster software, copy the directory "hardware" from the CD to any
directory on the hard disk. This directory may also contain a file "Readme.txt" with the
latest instructions. Ensure th at t he para ll el port i s accessi bl e for the ap pli cat ion. I f you are
using Microsoft W indows NT, 2000, or XP , you have to install the "Kitha ra DOS Enabler"
which is shipped on the LxNETES CD. A detailed manual can be found on the CD in the
folder "hardware".
19
System Requirements/Prerequisites
20
LxNETES User’s Guide
Getting Started
CHAPTER 3
Introduction
This chapter describes how to configure and test your host PC and development board
(target) and how to start up the device for the very first time.
Connecting host PC with development board
Step 1: Connect serial port
Getting Started
Connect the host PC to the development board (target) using a serial null-modem cable.
The serial connection is used to interact with the target device.
Step 2: Connect Ethernet interface
The Ethernet connection can be establ ished by connect ing a crossover cable d irectly to the
development board’s Ethernet port and your host PC. Alternatively, if you already have a
running network configuration, you can connect the development board to your hub or
switch.
Step 3: Configure terminal client
Configure a terminal client to view the serial console output the target prints on the serial
interface. Minicom or Seyon are the most usual applications. Configure the serial
parameters for 38400 baud, no parity, 8 data bits, and 1 stop bit.
21
Introduction
Unless otherwise stated, it is assumed your target is connected to the first serial
port (COM 1, ttyS0) of your host.
to the appropriate number .
Minicom
#minicom –s
To use a terminal client as non-root user, either you need read/write access to
/dev/ttyS<n> or the client has to be setuid root.
If you use anoth er po rt , ch ange t he “t tyS <n>”
To configure minicom, start it as root by entering:
Go to “Serial port setup” and change the values to your environment.
Seyon
22
Figure 3-4: Minicom settings
Next time start minicom as a standard user with:
$minicom
Start Seyon as a standard user by entering:
$seyon -modems /dev/ttyS0
Go to “Seyon Command” window and press “Set”. In the “Settings” window you can
adjust the settings.
LxNETES User’s Guide
Getting Started
Figure 3-2: Seyon Settings
Step 4: Connect power
Connect the included power supply to the development board. After power-on, the LEDs
on the board will light up and 2-4 seconds later the system will print boot messages on the
console. After 20-25 seconds, the boot load er has unpacked and launc hed the pre-i nstalled
Linux kernel from the built-in Flash memory.
You will see output on the terminal client similar to the output below.
23
Loading...
+ 52 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.