Configuring
the Software Environment for an embedded Linux
The development environment is used for the
following tasks:
Booting the
board: An
embedded development board needs some special services
in order to get started. When it’s up and running,
if the board contains an Ethernet
port (most do), you can telnet or ssh to the board.
During the development cycle,
it’s recommended that the serial console be active
as a backup communication
method in case the board can’t be reached over the
network.
Configuring and building the Linux kernel:
Most boards,
although powerful, can’t
be used to compile the kernel. The memory and/or
processing power isn’t
adequate. The development host is used to configure
and compile the kernel and
get it ready for use by the board.
Configuring and building the root file system: The root file system
contains the
user programs that the kernel needs to work as well
the application for the device.
Without a root file system, the kernel would panic
and stop running. In some
cases, the root file system resides on the
development host and is accessed over
the network by the target board, which means the
development host must be
properly configured this to work.
Compiling and debugging your application:
Because most boards
can’t be used to
compile the kernel and applications, the development
host is used to compile the
programs.
That requires additional configuration steps.
Tools
Typically Used in Embedded Development
Automake
A tool for creating make files that can be run
on a variety of systems.
Autoconf
A tool for building the configure
scripts that scan the system to figure out the system’s
state.
M4
A macro processing tool much like the
pre-processor in C.
GCC
The GNU Compiler Collection. Many
installations don’t include GCC because of its
size. When you install GCC, the
system also installs some of the tools that GCC uses,
such as the assembler (as) and
linker (ld). If you type gcc on the command line, the C
compiler provided by the GNU
Compiler Collection will be invoked.
G++
The GNU C++ compiler command.
Whenever you type g++ on the command line, the
GNU C++ compiler will be invoked.
This is required when you’re using tools that use
C++. Like
GCC, G++ requires a lot of disk space; consequently, it doesn’t make the cut
for many CD-ROM based
installations.
GDB
The GNU Debugger.
dhcp3-server
Dynamic Host Configuration Protocol—the
software that’s used to automatically
assign IP addresses on a network.
nfs-user-server
Network File System—a tool from
Sun that allows a remote computer to access storage on a remote computer.
Debian (Ubuntu) Systems:
Debian systems use the dpkg
system to manage the software installed on the host. Wrapped around dpkg is
another suite of tools called the Advanced Packing Tool (APT) that you can use
to download packages from a central repository.
You can install packages with one command and test
to see (using the -s switch) what happens by doing the following:
$ sudo apt-get -s install automake autoconf m4 gcc
gdb dhcp3-server nfs-userserver
tftpd minicom
This produces output like the
following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version.
m4 is already the newest version.
gcc is already the newest version.
gdb is already the newest version.
The following extra packages will be
installed:
autotools-dev openbsd-inetd portmap
Recommended packages:
lrzsz
The following NEW packages will be installed:
automake autotools-dev dhcp3-server
minicom nfs-user-server openbsd-inetd
portmap
tftpd
0 upgraded, 8 newly installed, 0 to
remove and 233 not upgraded.
Inst autotools-dev (20070725.1
Ubuntu:8.04/hardy)
Inst automake (1:1.10.1-2
Ubuntu:8.04/hardy)
Inst dhcp3-server (3.0.6.dfsg-1ubuntu9
Ubuntu:8.04/hardy)
Inst minicom (2.3~rc1-2
Ubuntu:8.04/hardy)
Inst portmap (6.0-4 Ubuntu:8.04/hardy)
Inst openbsd-inetd (0.20050402-6
Ubuntu:8.04/hardy)
Inst tftpd (0.17-15ubuntu1
Ubuntu:8.04/hardy)
Inst nfs-user-server (2.2beta47-23
Ubuntu:8.04/hardy)
Conf autotools-dev (20070725.1
Ubuntu:8.04/hardy)
Conf automake (1:1.10.1-2
Ubuntu:8.04/hardy)
Conf dhcp3-server (3.0.6.dfsg-1ubuntu9
Ubuntu:8.04/hardy)
Conf minicom (2.3~rc1-2
Ubuntu:8.04/hardy)
Conf portmap (6.0-4 Ubuntu:8.04/hardy)
Conf openbsd-inetd (0.20050402-6
Ubuntu:8.04/hardy)
Conf tftpd (0.17-15ubuntu1
Ubuntu:8.04/hardy)
Conf nfs-user-server (2.2beta47-23
Ubuntu:8.04/hardy)
Some of these packages may
already be installed on your system, and others may be out of date.
Running the
command without –s produces output like the following:
$ sudo apt-get install automake
autoconf m4 gcc gdb dhcp3-server nfs-user-server
tftpd minicom
autoconf is already the newest
version.
m4 is already the newest version.
gcc is already the newest
version.
gdb is already the newest
version.
The following extra packages will
be installed:
autotools-dev openbsd-inetd
portmap
Recommended packages:
lrzsz
The following NEW packages will
be installed:
automake autotools-dev
dhcp3-server minicom nfs-user-server openbsd-inetd portmap
tftpd
0 upgraded, 8 newly installed, 0
to remove and 233 not upgraded.
Need to get 1261kB of archives.
After this operation, 4432kB of
additional disk space will be used.
Do you want to continue [Y/n]?
Respond with Y, and press Enter. The packages are
downloaded and installed on the system.
No comments:
Post a Comment