0806 02 Los5 - Ug
0806 02 Los5 - Ug
0806 02 Los5 - Ug
DOC-0806-02
Product names mentioned in LynxOS User’s Guide are trademarks of their respective manufacturers and are used here
for identification purposes only.
All rights reserved. No part of LynxOS User’s Guide may be reproduced, stored in a retrieval system, or transmitted, in
any form or by any means, electronic, mechanical, photographic, magnetic, or otherwise, without the prior written
permission of LynuxWorks, Inc.
LynuxWorks, Inc. makes no representations, express or implied, with respect to this documentation or the software it
describes, including (with no limitation) any implied warranties of utility or fitness for any particular purpose; all such
warranties are expressly disclaimed. Neither LynuxWorks, Inc., nor its distributors, nor its dealers shall be liable for any
indirect, incidental, or consequential damages under any circumstances.
(The exclusion of implied warranties may not apply in all cases under some statutes, and thus the above exclusion may
not apply. This warranty provides the purchaser with specific legal rights. There may be other purchaser rights which
vary from state to state within the United States of America.)
Contents
PREFACE ............................................................................................................... IX
For More Information ..................................................................................... ix
Typographical Conventions ............................................................................. x
Special Notes .................................................................................................. xi
Technical Support .......................................................................................... xii
How to Submit a Support Request ......................................................... xii
Where to Submit a Support Request .....................................................xiii
This LynxOS User’s Guide provides information about basic system administration
and kernel configuration for the LynxOS real-time operating system from
LynuxWorks, Inc.
This document assumes that its audience has a basic understanding of the UNIX
environment.
While this document provides information for a variety of readers—system
administrators, network administrators, developers, and end-users of
LynxOS —many of the tasks described in it require root privilege or access to
other information typically given only to system administrators.
Typographical Conventions
The typefaces used in this manual, summarized below, emphasize important
concepts. All references to filenames and commands are case-sensitive and should
be typed accurately.
Body text; italicized for emphasis, new Refer to the LynxOS User’s Guide.
terms, and book titles
Special Notes
The following notations highlight any key points and cautionary notes that may
appear in this manual.
CAUTION! Used for situations that present minor hazards that may interfere with
or threaten equipment/performance.
Technical Support
LynuxWorks Support handles support requests from current support subscribers.
For questions regarding LynuxWorks products or evaluation CDs, or to become a
support subscriber, our knowledgeable sales staff will be pleased to help you
(http://www.lynuxworks.com/corporate/contact/sales.php3).
By E-mail:
By Phone:
By Fax:
This user's guide for LynxOS is intended for use by system integrators and
software engineers.
• Chapter 1 provides the overview of the individual chapters.
• Chapter 2 provides a brief description of LynxOS, including its key
features.
• Chapter 3 describes the LynxOS architecture.
• Chapter 4 describes the Symmetric Multiprocessing feature supported in
LynxOS 5.0.
• Chapter 5 describes LynxOS conformance to the POSIX.13 PSE53
system profile.
• Chapter 6 describes shared libraries.
• Chapter 7 explains how to customize the default LynxOS kernel
configuration after initial installation.
• Chapter 8 provides information about creating Kernel Downloadable
Images (KDIs).
• Chapter 9 explains the Linux Application Binary Interface (ABI)
compatibility feature of LynxOS that allows Linux binary applications to
run under LynxOS.
• Chapter 10 describes XFree86 and LessTif.
What LynxOS Is
LynuxWorks, Inc. has been the premier developer of POSIX-conformant real-time
operating systems for over 18 years. The company’s flagship product, called
LynxOS, is in use in hundreds of thousands of installations where high reliability
and hard real-time determinism are essential.
LynxOS Environment
The LynxOS product uses the following environment:
• Host platform for cross-development:
- Windows XP Professional
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5.1
- Red Hat Enterprise Linux 5.2
• Target system—Usually purpose-built computers running a custom-
configured BSP for that board. When the actual target systems are not yet
available, development can be done using “reference platforms” (that is,
commercially available computers for which a BSP already exists).
Advantages of LynxOS
This release of LynxOS continues to offer the following advantages:
• UNIX-like environment— The LynxOS operating system is similar to
UNIX. Applications use processes and threads, make system calls, and
use device drivers. The product can run a shell on a serial port for a
developer to interact directly with the target machine. It also has device
drivers to permit mounting an external disk drive to facilitate testing and
data capture.
• POSIX-conformant interfaces—LynxOS provides conformance with
IEEE 1003.1-2004 (POSIX.1) interfaces and services specified by the
POSIX 1003.13 PSE53 profile (Dedicated Realtime System). A number
of services from the PSE54 profile (Multi-Purpose Realtime System) are
also supported.
The supported POSIX extensions include threads, priority scheduling,
real-time signals, clocks and timers, semaphores, message passing,
shared memory, asynch and synch I/O, memory locking, and others.
• Maturity and stability— LynxOS is an embedded real-time operating
system that has been rigorously exercised through millions of
deployments and is the foundation of multiple safety-critical systems.
• Networking support—LynxOS includes a full-featured networking stack
to enable communication via the standard Internet protocols. The
networking features are accessible via the standard socket API. Utilities
are provided for network configuration, troubleshooting, and
management.
New Features
The following new features are included in LynxOS 5.0:
• Toolchain GCC/G++ 3.4.3
• GNAT 3.4.3 support
• GDB 6.5
• POSIX 1003.13-2003 PSE53 support
The software that runs on the target system is generally classified as either System
Software (that is, the LynxOS operating system) or Application Software.
System Software includes parts of the operating system, such as device drivers,
which execute in processor supervisor mode. It also includes System Applications,
such as init and the various networking daemons and tools, which execute in
operating system root privileges.
NOTE: LynxOS comprises all the components that appear in the region labeled
System Software in this diagram.
The CSP, device drivers, BSP, and configuration tables may be different on
different boards or microprocessors.
The Application Software is usually supplied by the system integrator.
System Services
The system services are linked with the application code (C or C++) and run in
processor user mode.
Application Programming Interfaces (API) include:
Kernel
The LynxOS Kernel is statically linked with the CSP, BSP, and Static Device
Drivers to create the LynxOS operating system. During initialization, Dynamic
Device Drivers are dynamically linked with LynxOS and effectively become part
of the operating system.
Boot Code
The Boot Code boots the host processor and performs the appropriate level of
power on self test (POST) to assure correct operating conditions of a limited set of
hardware devices. The Boot Code is not part of LynxOS. Instead, it is usually
provided as a special set of firmware on the target board.
CSP
The CSP contains all the processor family-specific routines, including the MMU,
Floating Point, and processor exception handlers. The CSP routines are linked with
the LynxOS Kernel.
The PCI Device Resource Manager (DRM), shown with the BSP above, is
platform-independent.
The primary responsibilities of the PCI DRM are:
• Locate the PCI devices
• Manage ownership of PCI devices
• Map devices into virtual address space
• Provide access to the PCI configuration space
The BSP and the DRM are linked with the LynxOS Kernel.
LynxOS 5.0 can run on boards that have more than one CPU core. The LynxOS 5.0
introduces support of the Symmetric Multiprocessing (SMP) feature.
To provide SMP support in LynxOS, some changes are made to the LynxOS kernel
and user-level libraries. It has some impact on the custom kernel and user-level
development process.
This chapter briefly describes these areas of changes and provides impact details.
Scheduling
There are two approaches to organize thread run queues in the SMP environment:
• One run queue per CPU
• One run queue for all CPUs
This section describes both approaches, their advantages and disadvantages, and
gives explanation for the approach used in LynxOS.
one CPU for a relatively long period of time. Once in a while, the scheduler
balances the CPU load, moving threads from heavily loaded CPUs to lightly
loaded ones. This approach is called many run queues.
The many run queues approach is good for performance. However, it is lacking
from the real-time response perspective: once a thread becomes ready to run, it has
to wait for its CPU to finish running higher priority threads, if any, even if another
CPU in the system is idle or running lower priority threads. The load balancing
occurs too infrequently and may be no help at all (for example, in case other CPUs
are busy with a lot of lower priority threads).
As an additional feature, the scheduler may allow the user to bind a thread to one
CPU or a set of CPUs. Such threads may not be moved to other CPUs even by load
balancing. This feature is called CPU affinity. CPU affinity's effect on both
performance and real-time response is even more pronounced than that of many
run queues, however, unlike the run queues, CPU affinity is voluntary and optional.
The user may choose whether to employ it or not after careful consideration and
testing.
Scheduling in LynxOS
Being a hard real-time operating system with a strict priority preemptive scheduler,
LynxOS values real-time response higher than performance. Therefore, the one run
queue approach was chosen. There is only one thread run queue per system (or per
partition, if LynxOS version provides partitioning). When a thread becomes ready
to run, the scheduler immediately runs it on one of the lowest priority CPUs (that
is, CPUs running threads of the lowest priority among all threads in the
system/partition). Only if the CPU that the thread ran on last is one of the lowest
priority CPUs, the scheduler will keep the thread running on that CPU.
This approach guarantees that in a system with N CPUs, the N highest priority
threads are running at any given moment. On the other hand, threads move
between CPUs more frequently than in the many run queues approach, thus
reducing the overall system performance.
LynxOS release 5.0 does not support CPU affinity. However, this feature could be
added later by patches or subsequent OS releases.
Custom Applications
Most of the custom applications work fine in the SMP environment without any
modifications. In the SMP environment, processes and threads are safely
synchronized by primitives (such as POSIX mutexes, semaphores, etc.) the same
way as it is done in the case of uniprocessing.
Additionally, atomic operations and memory barriers can be used to perform
various types of synchronization. This section briefly describes these techniques.
Refer to LynxOS 4.x to LynxOS 5.0 Migration Kit Guide for details.
For general information about programming in the multiprocessing environment,
refer to the following Internet address:
http://docs.sun.com/app/docs/doc/816-5137/6mba5vpl5?a=view.
Memory Barriers
In a multi-processor environment, the order of CPU memory accesses (loads and
stores) should be enforced in some situations (for example, before a lock release).
LynxOS provides a number of calls to enforce the CPU memory access order,
called memory barriers.
Utilities
The ps utility displays which CPU the thread is running on (for currently running
threads), or which CPU the thread ran on last (for other threads). Because of the
priority preemptive scheduling in LynxOS, threads move from CPU to CPU
frequently. The CPU information displayed by the utilities is a snapshot of the state
of the system, and does not reflect all the system state changes during the execution
of the utility program.
What is POSIX.13?
The IEEE 1003.13-2003 standard, also known as POSIX.13, focuses on defining
real-time and embedded application environments.
The POSIX.13 standard captures existing commercial practice to introduce system
profiles, each such profile comprising a set of services and application
programming interfaces that an operating system supports.
The intent of this chapter is to offer just a general idea about the POSIX standards
themselves and to give an outline of LynxOS support for those. No attempt is made
here to replace the IEEE documents, which are the ultimate source of information
about the POSIX standards and the behavior of the facilities an operating system
provides. Therefore, to acquaint themselves with such details, readers are urged to
consult the IEEE publications.
Nowadays, all these parts are rolled into a single set of documents that consists of
four parts:
• Part 1: Base Definitions
• Part 2: System Interfaces
• Part 3: Shell and Utilities
• Part 4: Rationale (informative)
These IEEE publications are available for purchase in electronic form from the
IEEE Web site (http://www.ieee.org) or in printed form from the Open Group
bookstore (http://www.opengroup.org).
Briefly speaking, the set of facilities that the POSIX.1 standard defines are those
ones that are assumed as existing and supported in the context of the POSIX-
conformant operating system. It is this assumption that makes the source code
application portability across different platforms possible.
The kernel services and library calls provided by this release of the LynxOS
operating system are implemented in accordance with the requirements and
specifications of the POSIX.1 standard.
Profile Description
It is important to understand that the POSIX.13 standard itself does not define any
operating system interfaces or APIs. Instead, this standard specifies which
interfaces need to be supported by an operating system that claims conformity to
one of the system profiles. Specification of these interfaces is provided by another
document, the POSIX.1 standard. Please see the previous section in this chapter for
more details about the POSIX.1 standard.
LynxOS conforms to the PSE53 system profile.
The subsets of interfaces that need to be supported by a conforming
implementation are defined either in terms of POSIX.1 options or as the so-called
POSIX.13 Units of Functionality. Details on the POSIX.1 options and the Units of
Functionality are provided later in this chapter.
• _POSIX_REALTIME_SIGNALS
• _POSIX_SEMAPHORES
• _POSIX_SHARED_MEMORY_OBJECTS
• _POSIX_SPAWN
• _POSIX_SPORADIC_SERVER
• _POSIX_SYNCHRONIZED_IO
• _POSIX_THREAD_ATTR_STACKADDR
• _POSIX_THREAD_ATTR_STACKSIZE
• _POSIX_THREAD_CPUTIME
• _POSIX_THREAD_PRIO_INHERIT
• _POSIX_THREAD_PRIO_PROTECT
• _POSIX_THREAD_PRIORITY_SCHEDULING
• _POSIX_THREAD_PROCESS_SHARED
• _POSIX_THREAD_SPORADIC_SERVER
• _POSIX_TIMEOUTS
• _POSIX_TIMERS
• _POSIX_TRACE
• _POSIX_TRACE_EVENT_FILTER
• _POSIX_TRACE_LOG
For definition of each POSIX.1 option in terms of POSIX.1 interfaces, refer to the
document 1003.13 IEEE Standard for Information Technology— Standardized
Application Environment Profile (AEP)—POSIX® Realtime and Embedded
Application Support.
The following list itemizes the Units of Functionality required in the PSE53 system
profile:
• POSIX_C_LANG_JUMP
• POSIX_C_LANG_MATH
• POSIX_C_LANG_SUPPORT
• POSIX_DEVICE_IO
• POSIX_EVENT_MGMT
• POSIX_FD_MGMT
• POSIX_FILE_LOCKING
• POSIX_FILE_SYSTEM
• POSIX_MULTI_PROCESS
• POSIX_NETWORKING
• POSIX_PIPE
• POSIX_SIGNALS
• POSIX_SIGNAL_JUMP
• POSIX_SINGLE_PROCESS
• POSIX_THREADS_BASE
• XSI_THREAD_MUTEX_EXT
• XSI_THREADS_EXT
For definition of each PSE53 Unit of Functionality in terms of POSIX.1 interfaces,
refer to the document 1003.13 IEEE Standard for Information Technology—
Standardized Application Environment Profile (AEP)—POSIX® Realtime and
Embedded Application Support.
Implementation-Defined Functionality
For some interfaces, the POSIX.1 standard leaves some uncertainty as to how the
facility needs to behave within a particular implementation. In such cases, it is said
that the behavior is implementation-defined.
Refer to “Example: Application-Managed Thread Stacks” below for the example
of implementation-defined functionality.
For the LynxOS operating system, a detailed description of the implementation-
defined features can be found in the POSIX 1003.13-2003 PSE53 Conformance
Document.
The standard does not dictate any particular relationship between the address
passed to the thread attribute and the actual place where the thread stack area
would reside in the process virtual address space. The LynxOS implementation is
based on an additional assumption that the address passed by an application is the
low (base) address of the thread stack.
• STREAM_MAX
• SYMLOOP_MAX
• MQ_OPEN_MAX
• SEM_NSEMS_MAX
• TIMER_MAX
For obtaining the values of these variables specific to an instance of the
LynxOS kernel, use the sysconf() interface. Please see the online manual page
for the sysconf() routine for more information about this interface.
Some of the values mentioned above can be configured by setting appropriate
constants in the BSP-specific uparam.h file. During the kernel build, these
values are checked to comply with POSIX requirements and a warning is issued if
an incorrectly set parameter may result in a non-POSIX system.
For example, when the NTIMERS value in uparam.h is set incorrectly, the
following warning is issued:
#warning "NTIMERS value is less than minimum value required by POSIX"
Table 5-2 summarizes the runtime invariant values, the limitations imposed by the
standard, and the names of preprocessor constants in the uparam.h header.
POSIX
Runtime Invariant
Constant in uparam.h Minimum
Value
Value
CHILD_MAX LIM_NPROC 25
MQ_OPEN_MAX LIM_MSGQS 8
OPEN_MAX USR_NFDS 8
SEM_NSEMS_MAX LIM_SEMAPHORES 256
STREAM_MAX USR_NFDS 8
SYMLOOP_MAX MAXSYMLINKS 8
TIMER_MAX LIM_NTIMERS 32
Users may have an application that relies on shared libraries. Or perhaps users are
considering using shared libraries for an embedded application.
This chapter describes shared libraries and explains whether they should be used,
how they are used, and how they are built.
Overview
A shared library is a collection of routines, organized so that code can be shared
among processes; its primary goal is to reduce system and disk memory usage.
LynxOS supports tools to create and use C and C++ dynamic ELF shared libraries
on all of its supported platforms.
Shared library development is supported by cross development tools.
The term shared library is not entirely accurate when used with the ELF/SVR4
implementation. The correct term is shared object, because shared libraries are not
archive (ar) libraries. They have more in common with partially linked (ld -r)
object files. Shared objects can be identified by the .so suffix. This document,
however, uses the term shared library when referring to shared objects.
Compatibility between different revisions of a library is easy to maintain, as long
as the libraries are functionally compatible; applications linked with the library do
not need to be relinked in order to use the newer version.
No source code changes are necessary when making a shared library. Object files
that are to be part of the shared library must be compiled as Position Independent
Code (PIC) using the -fPIC -mshared -shared compiler flags.
The LynxOS implementation also includes dlopen()/libdl.so support. This
library provides functions that allow users to open, close, and find symbols in an
arbitrary shared library, even if the application in use has not been linked with the
library. For more details, see the dlopen() man page.
Lazy Linking
By default, the dynamic linker defers function call resolution to the point when
they are first referenced. The LD_BIND_NOW environment variable can be set to a
nonempty string to cause the dynamic linker to resolve all symbols at the program
startup time.
Multiple concurrent executions of the same program use the same amount
of text memory as does a single execution. The operating system ensures
that the executing text segments of the same program are shared.
Code Maintenance
Maintaining programs that use a shared library is somewhat easier than
maintaining programs that use an archive library because if an error in the library is
fixed, only the shared library needs to be remade. The programs do not need to be
re-linked with the library because the operating system maps the shared library
code into their address spaces at run time. In effect, modifying the contents of a
shared library modifies all of the programs that use it.
NOTE: The above statements hold true only when the change to the shared library
is backward compatible. Compatibility problems can be avoided as long as the
shared library can be built using the guidelines described later in this chapter. For
bug-fixes, compatibility is often automatic. For changes that are broader in scope,
adherence to the guidelines may become challenging or impractical.
Example 1
Each of the applications shown in the next two tables uses half of a 1 MB library,
but uses a different mixture of the library’s routines. Where these applications do
not use a shared library, they require 3 MB of RAM and disk space. When they
employ a shared library, they require only 1 MB of RAM and disk space.
Static Library X 0 0
Application A • • • • • .5 MB .5 MB
Application B • • • • • .5 MB .5 MB
Application C • • • • • .5 MB .5 MB
Application D • • • • • .5 MB .5 MB
Application E • • • • • .5 MB .5 MB
Application F • • • • • .5 MB .5 MB
TOTALS 3 MB 3 MB
Library X Usage
Space Requirements for
• library X deploys element
Library X on Target
+ library text used by application
Shared Library X • • • • • • • • • • 1 MB 1 MB
Application A + + + + + 0 0
Application B + + + + + 0 0
Application C + + + + + 0 0
Application D + + + + + 0 0
Application E + + + + + 0 0
Application F + + + + + 0 0
TOTALS 1 MB 1 MB
Example 2
Each application shown in the next two tables uses 10% of a 1 MB shared library.
Each application uses a different portion of the library, all mutually disjoint. Where
these applications do not use a shared library, they require 0.6 MB of RAM and
disk space (with all six applications running). When using a shared library, they
require 1 MB of RAM and disk space.
This is a worst-case scenario; it is not possible to save any space by using a shared
library for this mix of applications. This example is for illustration purposes only. It
is unlikely that a group of applications would use completely disjoint sets of library
routines.
NOTE: If the unused routines were removed from the shared library, the memory
usage for both shared and non-shared libraries would be the same.
Static Library Y 0 0
Application A • .1 MB .1 MB
Application B • .1 MB .1 MB
Application C • .1 MB .1 MB
Application D • .1 MB .1 MB
Application E • .1 MB .1 MB
Application F • .1 MB .1 MB
TOTALS .6 MB .6 MB
Library Y Usage
Space Requirements for
• library X deploys element
Library Y on Target
+ library text used by application
Shared Library Y • • • • • • • • • • 1 MB 1 MB
Application A + 0 0
Application B + 0 0
Application C + 0 0
Application D + 0 0
Application E + 0 0
Application F + 0 0
TOTALS 1 MB 1 MB
The preceding examples assume that the library contains no data or bss
sections. While this is the best way to build a shared library, it is not always
possible to do so.
Due to the inability of applications to share data, the data and bss sections of a
shared library are not treated the same way as the text section: Every process
gets a full copy of the data and bss sections whether it uses all of it or not.
Example 3
In the applications shown in the next two tables, the issues surrounding bss and
data section utilization in a shared library are illustrated. Both shared and non-
shared versions of the same library contain 0.5 MB of text, 0.3 MB of data,
and 0.2 MB of bss. Each application uses forty percent of the text and forty
percent of the data and bss sections.
In the case of the non-shared library (the table below), memory usage is 2.4 MB
and disk usage is 1.9 MB. In the case of the shared library (the second table), the
memory usage has increased to 3.5 MB, while the disk usage has dropped to
0.8 MB.
Table 6-5: Space Requirements with a 1 MB Library (Z) that Includes Data
Library Z Usage
Space Requirements for
• library text/data/bss used by
Library Z on Target
Type application
Static Library Z 0 0
Application A • • • • .4 MB .4 MB
Application B • • • • .4 MB .4 MB
Application C • • • • .4 MB .3 MB
Application D • • • • .4 MB .2 MB
Application E • • • • .4 MB .3 MB
Application F • • • • .4 MB .3 MB
TOTALS 2.4 MB 1.9 MB
Table 6-6: Space Requirements with a 1 MB Library (Z) that Includes Data
Library Z Usage
• library text/data/bss
Space
+ library data/bss used by application
Requirements for
- library data/bss allocated but not used by
Type Library Z on Target
application
* library text used by application
Shared Library Z • • • • • •1 •1 •1 •2 •2 .5 MB .8 MB
Application A * * + + - - - .5 MB 0
Application B * * - + + - - .5 MB 0
Application C * * - - + + - .5 MB 0
Application D * * - - - + + .5 MB 0
Application E * * + - - - + .5 MB 0
Application F * * - + - + - .5 MB 0
TOTALS 3.5 MB .8 MB
In the preceding examples, a well designed shared library may provide significant
savings in memory needed. Savings in an embedded system could mean:
• A given application now fits in the space allowed on board.
• RAM can be decreased (cost savings).
• More space for new features
The preceding examples also show that a well designed shared library may provide
a significant savings in the disk, flash, or ROM space needed. In an embedded
system with tight memory constraints, these savings could mean the following:
• A given application now fits in the space allowed.
• The flash/ROM chip count can be decreased (cost savings).
• The flash/ROM chip size can be decreased (cost savings).
• A disk may not be needed (cost savings).
require extra work on the part of the library designer to ensure that a new library is
compatible with previous versions.
To support compatibility between newer and older versions of the library, shared
libraries use a global offset table to access function calls. This adds one or more
additional instructions to the normal function call process. These extra instructions
produce slightly longer execution times for library calls. In general, the
performance decrease is not measurable.
Libraries Provided
LynxOS provides the following system shared libraries.
Library Description
This chapter explains how to customize the default LynxOS kernel configuration
after initial installation.
CAUTION! Read this section before modifying any LynxOS kernel. It contains
important information about the /sys directory file system that is needed to
prevent kernel data corruption and/or loss.
The LynxOS /sys directory contains all the scripts, library archives, and
platform-specific files that users need to customize and rebuild a LynxOS kernel.
The /sys directory has the following file structure:
File/Directory Description
File/Directory Description
family.<family_name> Contains the CPU family specific files for CPU families
currently supported by LynxOS.
include Contains the kernel header files.
kernel Contains the architecture independent part of the kernel.
lib Contains the kernel and driver library archives (see the following
table, “sys/lib Kernel Library Files”).
misc Contains miscelaneous source files used by the kernel and other
subsystems.
networking Contains source files for the TCP/IP subsystem and NFS driver.
syscalls Contains the table of system calls.
Of all the directories in the /sys directory, users are most likely to modify files in
the /bsp.<bsp_name> directory. Users can, however, also modify files in the
following /sys directories:
• cfg
• devices
• dheaders
• drivers
These files, however, should be modified only when adding new drivers or when
the functionality of a specific driver needs to be changed.
Overview of /sys/bsp.<bsp_name>
The $ENV_PREFIX/sys/bsp.<bsp_name> directory contains the following
files:
File Description
Rule Description
ignorant of its location on the disk. The shell script SETUP.<shell> defines
$ENV_PREFIX when executed:
$ cp -r $ENV_PREFIX/sys/bsp.x86_pc /tmp/my_bsp
$ cd /tmp/my_bsp
$ touch config.tbl
$ make all
In this way, multiple developers can have multiple kernel build directories on a
given system, each with its own unique config.tbl, nodetab, and uparam.h
files.
Configurable Parameters in
/sys/bsp.<bsp_name>/uparam.h
Table 7-5 lists some of the more important configurable parameters in the binary
code written for a standard development LynxOS system installation in the
$ENV_PREFIX/sys/bsp.<bsp_name>/uparam.h file. Other configurable
parameters are also contained in this file, and can be found by searching for the
character string #define.
The $ENV_PREFIX/sys/bsp.<bsp_name>/uparam.h file can be viewed
using the more command or in a text editor such as vi.
Default
Parameter Name What the Parameter Defines
Value
Default
Parameter Name What the Parameter Defines
Value
To activate the changes, rebuild the kernel, create a new KDI, and boot the target
system with the new KDI.
NUM_CPUS
Description
Value
If the NUM_CPUS parameter is set to 0 (the default value), LynxOS will try to
determine the number of CPUs automatically and utilize all CPUs. This usually
works well enough for most configurations, but it may be undesired if the user
wants to do the following:
• Reduce boot time. Automatic CPU detection adds about a quarter of a
second to the boot time on the x86 platform. The user may prefer to
hardcode the number of CPUs in uparam.h to make the system boot
faster. Alternatively, setting NUM_CPUS to -1 will make LynxOS use
CPU configuration information provided by the BIOS. The BIOS passes
that information to the operating system via memory tables conforming
to either the MP Specification or the ACPI standard (in the latter case,
The size command allows users to look closely at the sizes of the text, data,
and bss segments of the kernel, as illustrated by the command and output below:
$ size a.out
text data bss dec hex filename
1068263 182700 255616 1506579 16fd13 a.out
This utility reports the size (in bytes) of each segment and the sum of the segments.
The total size of the file a.out, in this example, is 1506579 bytes (or
0x16fd13).
In addition to the text and data segments, the kernel contains header and
symbol table information that take up additional space.
1. Add the amount of free physical memory (110492 KB) to the amount
used (1296 KB): 110492 + 1296 = 111788 KB.
2. Subtract this number from the total amount of memory (RAM) on the
LynxOS system.
The machine in this example has 128 MB of memory, which translates to
131072 KB: 131072 – 111788 = 19284 KB.
Change the values 4096 and 1024 to lower values (for example, 1024 and
256).
3. Rebuild the device info files:
$ make install
4. Rebuild the kernel:
$ cd $ENV_PREFIX/sys/bsp.<bsp_name>
$ make all
5. Create a KDI with the new kernel and boot the system with the new KDI.
Before Beginning
1. Back up the /sys/bsp.x86_pc files and directories to /tmp/test
by entering the following commands:
$ cp -r $ENV_PREFIX/sys/bsp.x86_pc /tmp/test
2. Change to the /tmp/test directory.
$ cd /tmp/test
Modifying config.tbl
Use a text editor (such as vi) to modify /tmp/test/config.tbl as shown
below to comment out unnecessary drivers by adding a pound character (#) to the
beginning of the line:
#
# TCP/IP Support
#
#I:hbtcpip.cfg
I:nullnux.cfg
#***********************************************************************
3. Verify that the new kernel has been created by entering the following
command:
$ ls -l a.out
-rwxr-xr-x 1 root 828495 Oct 29 12:01 a.out
In this example, the size of the new kernel is smaller than the previous
kernel by about 360 KB, verifying that the new kernel has accepted the
configuration changes made earlier.
These lines instruct the Makefile to compile file*.c files, and to insert
the compiled .o files in $ENV_PREFIX/sys/lib/libmydrivers.a.
Users can look at the OBJ_RULES file in the /sys directory to
determine the substitutions that are appropriate for their compilation of
the .c files. For example, .x compiles an optimized ANSI .c file,
while .u.x does not optimize the .c file.
4. Build the driver library:
$ cd $ENV_PREFIX/sys/drivers/my_driver
$ make install
5. Modify the Makefile in /sys/bsp.<bsp_name> so that the archive for
the device driver is linked to the kernel.
OTHER=-lmydrivers
NOTE: New drivers should always be added to the end of config.tbl so that the
major and minor numbers for existing device drivers remain the same:
8. Build the LynxOS kernel with the new device driver by entering the
following commands:
$ cd $ENV_PREFIX/sys/bsp.<bsp_name>
$ make all
NOTE: The underlying hardware performance may impose a limitation on the clock
rate. The slower the system is, the larger percentage of CPU time it will spend
processing clock interrupts. For some slow systems, high clock rates may not be
achievable.
Overview
Users can create application-ready embedded systems that include the
LynxOS kernel and customized application into bootable images, which can then
be implemented in one of the following ways:
• Burned into Flash
• Put onto distribution media (CD-ROM)
• Booted over a network
• Maintained on hard drives
A LynxOS kernel image is a special boot file that always contains a
LynxOS kernel binary and usually also contains a RAM-based root file system
(called a RAM disk) with minimal files for operating system functions and
applications.
NOTE: See the mkimage.spec man page for an explanation of specification files.
The mkimage utility lets users create bootable kernel downloadable images in
any directory, with any number of contained files.
LynxOS Kernel
Users must specify what kernel binary to use when building the KDI. Users are
most likely to create a custom kernel for use in their specific image. For example,
users may choose to remove any unused device drivers from the kernel to reduce
the size of the kernel and, as a result, of the final image.
(See Chapter 7, “Customizing the Default LynxOS Kernel Configuration” for more
information on creating custom kernels.)
To save space, mkimage does not expand the bss section of the kernel in the
image. The bss section is expanded and initialized to zeros by kernel code.
Typically, the starting execution address is 32 (0x20) bytes after the start of the
image in memory. The exact format of the image depends on the BSP.
• No File System
For kernels appropriately generated, the image does not contain or
reference a file system.
NOTE: Be aware that specifying text=ram for a root file system image that
normally resides in some type of ROM copies all of the application’s resident text
in the image to RAM during kernel initialization.
When the execution speed of the application is most important, the text of the
image should reside in RAM because, in general, any type of ROM is slower than
RAM. There are several ways to accomplish this, depending on how the KDI or
File System Image (FSI) is specified and on the type of memory the image resides
in.
When the application is in the root FSI and the KDI is in RAM, resident text
should be used to ensure optimal execution speed and RAM conservation.
When the application is in the root FSI and the KDI is in some sort of ROM, the
text may or may not need to be resident. When the text is specified as resident and
text=ram is also specified, the resident text of the application (and all other
resident text applications) is copied to RAM by the kernel during kernel
initialization. When the text is not specified resident, the kernel loads the
applications text to RAM from the file system at execution, identically to the
application text residing on a disk drive. Since there is no provision to move
resident text segments to RAM in a standalone FSI, a nonresident text segment is
the only way to have the application run out of RAM from a standalone FSI
residing in some sort of ROM.
When the root or standalone FSI resides in ROM and execution speed is a
priority, leaving the application text segments in the nonresident files system
conserves the greatest amount of memory. This causes the kernel to load the text
segments on demand into RAM from the FSI. Alternatively, when the root FSI
resides in RAM, using resident text for applications conserves the greatest amount
of memory.
Procedure Overview
The same basic steps are used to create images for the entire range of boot
applications, from network booting to ROM booting:
• Configure a LynxOS kernel with the desired functionality.
• Create a specification file for mkimage that defines the LynxOS kernel
to use and any applications to include.
• Run mkimage.
• Test the image.
• Put the image into the target environment.
For information on network booting the image, please refer to your LynxOS Board
Support Guide.
The following steps detail creating a KDI. These steps are also explained in the
subsections that follow:
1. If you want to avoid changing the original files, create a copy of
/sys/bsp.<bsp_name> by entering the following commands:
$ cp -r $ENV_PREFIX/sys/bsp.<bsp_name> \
<new_BSP_dir>
where <bsp_name> is the name of the target BSP and
<new_BSP_dir> is the name of a new directory to create a customized
kernel in.
2. Change to the (new) BSP directory.
3. Make sure the RAM disk driver is enabled in config.tbl. It is enabled
by default.
4. Make any other modifications to files such as uparam.h and
Makefile.
Attribute Description
Attribute Description
Booting KDIs
In the remote boot configuration, the RAM memory map is sequential, as shown in
the figure below:
OS TEXT Segment
OS DATA Segment
OS bss Segment
OS Symbols
Sample KDIs
Each LynxOS BSP provides a sample net-bootable KDI containing a RAM-disk
root file system with a small set of utilities. When started, the sample KDI
displays a shell prompt on the default console (what device is used for the default
console is specific to the particular BSP). To create a sample KDI, enter the
following commands:
$ cd $ENV_PREFIX/sys/bsp.<bsp_name>
$ make netkdi
This creates a sample KDI named net.img.
NOTE: The KDI build templates are automatically installed as a part of the default
installation.
The sections that follow demonstrate how to set up a KDI project area, build a
KDI, and download and execute it on a target. Because the project scripts are
written in Bourne Shell, these build steps can be followed on any cross-
development system.
developer Contains development and networking utilities that provide a minimal configuration
for development. Includes the following utilities:
•mkpart and mkfs—Disk formatting utilities
•gnutar—gnutar and gnuzip utilities
•shell—Minimal shell configuration
•rcp—RCP (remote copy) utility
•ftp—FTP (file transfer protocol) utility
•mount— mount utility
hello Simple hello world demo
linuxabi This KDI demonstrates ABI compatibility in LynxOS. The Linux ABI compatibility
(x86 only) layer allows application programs that are created under other environment (Red
Hat Linux in this demo) to run unchanged in the LynxOS environment. The demo
provides two KDIs:
•A service KDI to help preparing the file system on target’s hard disk
•A linuxabi KDI to provide Linux ABI support
xfree86 This KDI demonstrates an X window environment with basic X functionalities on
(x86 only) LynxOS. The demo provides the following:
•XFree86 X server
•XFree86 twm or LessTif mwm window manager
•Some simple XFree86 X applications, such as xterm, xcalc, xclock,
oclock, and xeyes
Restrictions
This demonstration harness assumes that a single user is building the KDI. It also
assumes that the building of demo KDIs is done one at a time, since all demo KDIs
share the same BSP directory where kernels are built; therefore, two KDI
directories cannot be built in parallel.
Getting Started
A shell script, PROJECT.sh, is provided to automate the setup process. Before
running this script, users must have already installed LynxOS from the distribution
CD-ROMs onto the system’s hard disk and have sourced the SETUP.bash or
SETUP.csh scripts provided.
These scripts set up the PATH environment variable and also set ENV_PREFIX to
point to the distribution directory. ENV_PREFIX must be set correctly for
PROJECT.sh to work.
Enter a location on disk where the user has write permission (/tmp/newproj is
the default) with at least 10 MB of free space available (30 MB is recommended).
The following output is displayed:
The following BSPs are supported:
PPC [radppc7d, cwdy4_183]
x86 [x86_pc]
Which BSP should we use? [x86_pc]
Enter network name/IP address for target now? [n]
If a machine name and an IP address for the target board has been selected, enter y.
The PROJECT.sh script goes through the process of modifying the rc.network
file for the specified target. If n is entered, then the rc.network file that gets
configured into the system’s KDIs interactively prompts the user for the machine
name and IP address at boot-time as follows:
What is the network interface of the target board? [em0]
What is IP address of the target board? [1.1.1.1]
Once all questions have been answered, PROJECT.sh proceeds to set up the
customized KDI build environment, copying the appropriate files.
Building KDIs
To begin building KDI demos, change the working directory to
/tmp/newproj/hello, and issue a make all command; the following steps
are executed:
#########
# Step 1a. Modify config.tbl
#########
This step creates a local copy of config.tbl, which is used by the kernel
Makefile to configure device drivers as either in or out. This config.tbl file is
copied to the local Board Support Package (BSP) directory (where the kernel is
linked) each time the user issues a make command in this
/tmp/newproj/hello directory.
#########
# Step 1b. Modify uparam.h
#########
This step creates a local copy of the uparam.h header file. This file is used to
specify the size of user-modifiable kernel data structures and resources.
Like config.tbl, the uparam.h file is copied to the local BSP build directory
each time a make command is issued in /tmp/newproj/hello.
#########
# Step 2: Perform any local build actions defined in desc.<bsp_name>.sh
#########
This is a hook that allows a KDI build directory to do any special local processing.
Look at the desc.* file for details.
#########
# Step 3: Make kernel
#########
This step changes directory to the ./bsp.* directory, and makes the kernel,
using the config.tbl and uparam.h files from the KDI build directory.
#########
# Step 4: Build KDI
#########
This step is run from within the KDI build directory. The mkimage tool is
invoked using the KDI mkimage specification file to pull together the appropriate
kernel components and applications.
#########
# Step 5: Build Complete
#########
The KDI can now be downloaded and executed on the target. For more information
on demo KDIs and loading KDI images onto the target, see the appropriate
LynxOS Board Support Guide.
to create, boot, and use the developer KDI. This example uses the following
configurations:
Overview
LynxOS supports executing dynamically-linked Linux binary applications on
LynxOS systems as if they were native LynxOS applications. There is no need to
rebuild Linux applications with LynxOS tools, or even access the source code.
Linux application binaries can be installed and executed on a LynxOS machine in
the same manner as they are installed and executed on a Linux system. The Linux
ABI feature adds a new level of flexibility by allowing users to use both Linux and
LynxOS binaries in parallel on a single LynxOS system.
Linux ABI compatibility is made possible by adding a Linux ABI Layer that
includes Linux libraries. “Native” LynxOS applications (applications built for
LynxOS) are unaffected by the addition of the Linux ABI Layer.
LynuxWorks provides a more comprehensive set of standard Linux shared libraries
(<media_num>.linuxabi.tar.gz). See later sections in this chapter for more
details on installing these libraries.
NOTE: Because the Linux ABI X11 libraries and the XFree86 and LessTif shared
libraries have the same names and are installed in the same directory,
/usr/X11R6/lib, care should be taken not to overwrite any libraries
inadvertently. For more details, please see Chapter 10, “XFree86 and LessTif.”
Linux LynxOS
dynamically-linked dynamically-linked
applications applications
link and
execute dynamic dynamic
links links
ld.so
dynamic Linux ABI LynxOS “native”
linker library libraries
# ls -l /lib/libacl.so.1 /lib/libtermcap.so.2
lrwxrwxrwx 1 root root 15 Feb 27 2006 /lib/libacl.so.1 -
> libacl.so.1.0.3
NOTE: Some applications open shared objects using the dlopen() interface. Such
shared objects will not be listed by ldd. There is no means to determine such
hidden requirements; fortunately, most applications will fail in this case with some
meaningful diagnostic messages.
• /lib/libSegFault.so
• /lib/ld*
These are Linux ABI-specific shared libraries that have the same names as Linux
shared libraries. These Linux ABI files are vital for the Linux ABI feature to
function. If these Linux ABI files are accidentally replaced by the Linux-based
shared libraries, the Linux ABI environment will not function.
NOTE: By default, ld.so.1 searches the Linux paths to shared libraries included
in Linux ABI. LD_LIBRARY_PATH should be set only if the libraries are put in a
nondefault location.
Exception Comments
Exception Comments
Applications that make Linux ABI Layer relies on the ABI libraries to
direct calls into the kernel translate calls between Linux applications and the
LynxOS kernel.
Applications that uses a An example of this type of an exception is an
feature of the Linux kernel application that uses the /proc file system
not available in the entries not supported by LynxOS.
LynxOS kernel
3. Rebuild the LynxOS kernel on the LynxOS cross development host and
reboot the target using a KDI with the new kernel and the root file system
located on the target's hard disk.
4. Unpack the Linux ABI tarball (<media_num>.linuxabi.tar.gz)
from the root directory / on the target.
5. Log in to the target as root and enter the following command on the
target console:
target# export LD_LIBRARY_PATH=/usr/lib:/lib
NOTE: The value of LD_LIBRARY_PATH can be determined from the output of the
ldd command on the Linux applications intended to be run (as described in an
earlier section of this chapter).
• Apache Tomcat 5.5.12—the servlet container used for Java Servlet and
Java Server Pages technologies.
• Apache Axis 1.1 with Tomcat 5.5.12— an implementation of Simple
Object Access Protocol (SOAP), a lightweight XML-based protocol for
exchanging structured information in a decentralized, distributed
environment, and the servlet container used for Java Servlet and Java
Server Pages technologies.
• Apache Portable Runtime 1.2.2—a library of routines that provide a
predictable and consistent interface to underlying platform-specific
implementations. allowing software developers to write a program once
and be able to compile it anywhere.
• gSOAP 2.7.6c—Generator Tools for Coding SOAP/XML Web Services
in C and C++.
• jUDDI 0.9 rc3—an open source Java implementation of the Universal
Description, Discovery, and Integration (UDDI), which provides a
standard interoperable platform to quickly, easily, and dynamically find
and use Web services over the Internet.
• JXTA-C v2.3—a C-bind reference implementation of the JXTA peer-to-
peer network protocol on top of TCP/IP, HTTP, and other network
transports.
• OpenSSL 0.9.7d—an open source implementation of the Secure Sockets
Layer (SSL) and Transport Layer Security (TLS) protocols.
• Oracle9i Release 2—a database that provides high performance and
scalable manageability of data.
• PostgreSQL 8.0.1—an open source Java implementation of the Universal
Description, Discovery, and Integration (UDDI), which provides a
standard interoperable platform to quickly, easily, and dynamically find
and use Web services over the Internet.
• Qt 3.3.5—a C++ application development framework that provides
cross-platform development tools for GUI layout and forms design,
internationalization, and documentation. It provides an extensive C++
class library. With Qt, you can create native applications for all major
operating systems.
• UDDi4j 2.0.2—a Java class library that provides an API to interact with a
UDDI (Universal Description, Discovery and Integration) registry. UDDI
enables businesses to quickly and dynamically find and transact with one
another by way of their preferred applications.
Append the following lines at the end of this file to include the
application and its shared libraries into the KDI:
# LinuxABI
Note that the xev executable and the libdl.so.2 shared library are
not contained in the Linux ABI distribution and should be copied from
the Red Hat Linux environment.
3. To enable TCP/IP and the Intel PRO/100 Ethernet driver in the kernel,
edit the sys/bsp.x86_pc/config.tbl file. Comment out the
I:nullnux.cfg line and uncomment the I:hbtcpip.cfg and
I:fxp.cfg lines.
1. For the PowerPC platform, support for the Expat v1.95.2, FontConfig v1.0.1, and
FreeType v.2.1.1 is integrated into XFree86 package.
2. The Mesa 3D graphics library is integrated into the XFree86 package.
Libraries Linkage
All libraries are present in the static and shared (dynamic) forms.
Utilities Linkage
All utilities are dynamically linked.
Multithreads Support
All libraries are present in the multithreaded form.
Platform BSP
x86 x86_pc
PowerPC radppc7d
PowerPC cwdy4_183
NOTE: Since there is no video output on the supported PowerPC boards, these
boards have only partial XFree86 and Lesstif support. In particular, the DRI mode
is not supported and only the remote XFree86 server is supported. The information
given below in this Chapter uses the x86_pc as a reference.
Supported Hardware
Supported Targets
The target supported by LynxOS 5.0 X11 Product is listed in Table 10-4.
BSP Target
x86_pc x86 PC
1. The video adapter is supported via the i810_drv.o driver. Refer to “Using the
i810_drv.o and i810_xorg_7.2.0_drv.o X Server Video Drivers” on page 96.
2. The video adapter is supported via the i810_xorg_7.2.0_drv.o driver. Refer to
“Using the i810_drv.o and i810_xorg_7.2.0_drv.o X Server Video Drivers” on page 96.
3. The video adapter is supported in the non-DRI mode only.
Mouse Support
The mouse supported by the X11 Product is listed in Table 10-6.
BSP Mouse
Keyboard Support
The keyboards supported by the X11 Product are listed in Table 10-7.
BSP Keyboard
Monitor Support
The monitor supported by the X11 Product is listed in Table 10-8.
BSP Monitor
directory=/usr/X11R6/lib/modules/drivers
file=i810_drv.o source=$(ENV_PREFIX)/usr/X11R6/lib/modules/drivers/i810_drv.o
directory=/usr/X11R6/lib/modules/drivers
file=i810_drv.o source=$(ENV_PREFIX)/usr/X11R6/lib/modules/drivers/i810_xorg_7.2.0_drv.o
X Server Configuration
This section explains how to edit the XF86Config configuration file to configure
the X server.
The XFree86 binary distribution provides the XF86Config X server configuration
file located in the $ENV_PREFIX/usr/X11R6/lib/X11 directory. This
configuration file is suitable for all hardware supported by this X11 Product
release. By default, the provided XF86Config file allows the X server to configure
the video adapter to use the 1024x768 monitor resolution and 24 bit per pixel (bpp)
color depth.
This section describes how to edit the XF86Config file to set custom color depth
and monitor resolution.
Section "Screen"
. . .
DefaultDepth 16
. . .
SubSection "Display"
Depth 16
Modes "1600x1200"
EndSubSection
. . .
EndSection
To configure the xfree86 demo to support the i855 video adapter, to support the
Mesa demos, to operate in context of the mwm window manager or use the
statically linked X applications, the
$ENV_PREFIX/usr/demo/xfree86/xfree86.spec file should be updated
manually before LynxOS demo systems are installed.
Specifically:
• To configure the xfree86 demo to support the i855 video adapter, the
strings that follow the “# Comment for i855” messages shall be
commented out, while the strings that follow the “# Uncomment for
i855” messages on the contrary shall be uncommented
Starting an X Session
To start an X session on the target board, the following command must be
executed:
# startx
After an X session is started, the twm or mwm window manager as well as a couple
of the xterm windows and the xclock application are run automatically. To start
another X applications, an appropriate command must be executed from the xterm
command line, or an appropriate entry from the mwm menu (initiated by clicking in
the free space of the root window in context of the mwm window manager) must be
used.
Stopping an X Session
To stop an X session, use the Ctrl-Alt-Backspace key combination.
NOTE: The i945/i965 video adapters are supported in the indirect rendering mode
only.
The X server can run in the both direct and indirect rendering modes. In the
indirect rendering mode the 2D and 3D acceleration is performed by the X
software. In the direct rendering mode the acceleration is performed by graphics
hardware.
The X server runs in the direct rendering mode in case the following conditions are
fulfilled:
• The video chip DRI driver is configured into the LynxOS kernel
These strings allow the X server to load the modules that handle direct
rendering.
• The “DRI” section:
Section “DRI”
Group 0
Mode 0666
End Section
boot code 9
bootable images, creating 59
Symbols booting LynxOS
booting KDIs 66
/sys directory 39, 41
BSP 7, 9
/devices directory 44
/lib kernel library files 42
modifiable directories 42
overview 41
symbolic link to BSP directory 43
C
/sys/bsp./uparam.h file 47
CONFIG.TBL, adding/removing drivers 45
/sys/bsp//uparam.h file contacting LynuxWorks xii
configurable parameters for dynamic
CPU Support Package. See CSP.
memory 47
creating KDIs with mkimage 59–??
/sys/bsp<bsp_name>/uparam.h file 48 cross-development environment
/sys/lbsp//uparam.h file
setup scripts 46
configurable parameters for dynamic
CSP 7, 9
memory 48 customizing
/sys/lynx.os directory 43
/sys directory 41
overview 43
kernel 39, 43
customizing the default LynxOS kernel
configuration 39–57
A
a.out file 44, 45
adding
D
device drivers with CONFIG.TBL 45
demos, KDI 71
functionality to a kernel 56
device drivers
adding 56
adding or removing 45
CONFIG.TBL file 43, 45
B modifying 55
dynamic 10
Board Support Package (BSP)
removing unused 55
location 41, 45
static 10
symbolic link to 43
device info files
Board Support Package. See BSP.
dynamic 10
static 10
Device Resource Manager. See DRM.
directories K
kdi 69
KDI
personal kernel build 45
booting 66
disk space
over network 66
determining usage 52
RAM memory map 67
dlopen() 26
build templates 67
documents
getting started 70
Writing Device Drivers for LynxOS 40, 57
building demos 71
DRM 9
components 59
dynamic device drivers 10
creating a sample KDI 67
dynamic device info files 10
creating an image 63
dynamic kernel size, modifying 48, 52
creating spec file 64
dynamic memory, modifying 47
enabling RAM disk driver 64
modifying kernel parameters 64
testing 66
creation procedure overview 63
E file system component 61
embedded root file system, KDIs 61 embedded rfs 61
embedded standalone file system
embedded standalone file system image,
image 61
KDIs 61
environment 3 kernel component 60
mkimage utility 59
environment variables
overview 59
$ENV_PREFIX 45, 46
LD_LIBRARY_PATH 81 text segment component 62
kernel 9
Makefile 56
adding functionality 56
PATH 46
changes made to /sys/devices 44
changing static size 52
customization, main directory 43
customizing for functionality 40
F customizing for maximum processes 49
file system customizing for performance 39, 47
for KDIs 61 customizing for size 40, 52
files components 52
target support 41, 45 symbol table information 52
customizing from a cross-development
host 46
determining disk space usage 52
G determining memory usage 53
determining size 52
Glossary 103 library files, location 42
loading 56
modifying dynamic size 48, 52
personal build directory 45
H reasons to customize 39
rebuilding with make utility 44
host, customizing kernel from 46 kernel build directories, creating individual 45
Kernel Downloadable Images (KDIs) 59
L
ld.so.1 76, 77, 81
Linux ABI compatibility 75–90
M
Linux ABI compatibility Layer
make utility 44
Linux Reference Distribution 82 Makefile
Linux ABI compatibility layer 76
environment variables 56
adding Linux libraries to LynxOS 79
rules 44
dynamically linked applications 82 target-specific 43
extracting RPMs 86
memory usage, kernel 53
installing and running Opera 89
mkimage utility 59
ld.so.1 dynamic linker 76 disk-based file system 61
libraries included 77
kernel image components 60
limitations 85
RAM-based file system 61
versioned symbols 82 specification file 60, 64
Linux ABI libraries
specifying embedded file system 61
adding to LynxOS 79
specifying kernel image 60
specifying paths 81
specifying resident text segments 62
updating 80 syntax and features 60
Linux binary applications 75
testing images made 66
determining Linux libraries needed 79
-mshared option 26, 37
running on LynxOS 76 multiple kernel build directories 46
shared object interface calls 76
location
BSP 41, 45
kernel library files 42
LynxOS kernel files 39, 41
O
setup scripts 46 online information x
LynuxWorks, contacting xii Opera 89
LynxOS Overview
architecture 7 shared libraries 25
background 3 overview 1
customizing default kernel 39, 43 of /sys 41
environment 3 of /sys/lynx.os 43
features 4
kernel image components 60
kernel images 59, 63
loading kernel images over a network 66 P
mkimage utility 59
shared libraries provided 36 PIC 25
shared libraries supported 25 preboot utility 66
specifying the embedded file system 61 processes, increasing on LynxOS 49
specifying the kernel image 60 PROJECT.sh, for demo KDIs 70
specifying the resident text segments 62
steps for building kernel images 63
testing kernel images 66
understanding 3
LynxOS applications, native 75, 77
R
RAM disk driver, enabling 64
RAM memory map, netbooting KDIs 67
U
resident text segments, for KDIs 62
understanding LynxOS 3
resident text, use of 62
RPMs, extracting with rpm2cpio 86
W
S Writing Device Drivers for LynxOS 40, 57
setup scripts, location 46
SETUP.bash 46
SETUP.csh 46
Shared Libraries 25–??
X
and single/multithreaded applications 26 XIP text segments 62
Choosing Contents 35
Code Maintenance 28
Creating 37
Determining use of 29
Disk Space Usage 28, 35
effects 27
factors in memory usage 27
kinds supported 25
linking to 37
object files included 25
overview 25
program maintenance 36
provided in LynxOS 36
System Memory Usage 27
Updating 35
shared Libraries
Linux ABI Libraries 77
size, kernel 52
SKDB 40
static device drivers 10
static device info files 10
static kernel size, changing 52
system services 8
T
targets
files, location 41, 45
target-specific Makefile 43
Technical Support xii