Embedded Linux Systems

Busy Box init

Among the commands it supports by default, BusyBox provides init-like capabilities. As with the original mainstream init, BusyBox can handle the system's startup. BusyBox init is particularly well adapted to embedded systems, because it provides most of the init functionality an embedded system typically needs without dragging the weight of the extra features found in System V init. Also, because BusyBox is a single package, there is no need to keep track of an additional software package when...

Kernel Profiling

Sometimes the applications are not the root of performance degradation, but are rather suffering from the kernel's own performance problems. In that case, it is necessary to use the right tools to identify the reasons for the kernel's behavior. There are quite a few tools for measuring the kernel's performance. The most famous is probably LMbench (http www.bitmover.com lmbench ). LMbench, however, requires a C compiler and the Perl interpreter. It is therefore not well adapted for use in...

The rsync Utility

Rsync is a remote updating utility that allows you to synchronize a local directory tree with a remote server. It relies on the rsync algorithm to transfer only the differences between the local and remote files. It can preserve file permissions, file ownership, symbolic links, access times, and device entries. rsync can use either rsh or ssh to communicate with the remote server. Given its features, rsync is a good candidate for updating network-enabled embedded systems. rsync is available...

Kernel Headers Setup

As I said earlier, the setup of the kernel headers is the first step in building the toolchain. In this case, we kernel Version 2.4.18, but we could have used any other version appropriate for our target. We will discus selection further in Chapter 5. Having selected a kernel, the first thing you need to do is download a copy of that kernel into the directory you have chosen to store kernels. In the case of the workspace hierarchy I suggested earlier, this would b PRJROOT kernel. You can obtain...

Memory Technology Devices

In Linux terminology, memory technology devices (MTDs) include all memory devices, such as conventional ROM, RAM, flash, and M-Systems' DiskOnChip (DOC). As explained by Michael Barr in Programming Embedded Systems in C and C++ (O'Reilly), such devices have their own capabilities, particularities, and limitations. Hence, to program and use an MTD device in their systems, embedded system developers traditionally use tools and methods specific to that type of device. To avoid, as much as...

Finalizing the Toolchain Setup

The full cross-platform development toolchain is now set up and almost ready to be used. I have only a co final observations left. First, let's take a look at what has been installed in the tools directory and how we will be using it in the ful 4-5 provides the list of first-level subdirectories found in the tools directory. Table 4-5. Contents of the PRJROOT tools directory Table 4-5. Contents of the PRJROOT tools directory Headers for cross-development tools. Libraries for cross-development...

Accessing the Serial Port

Before you can use any terminal emulator, you must ensure that you have the appropriate access rights to use the serial port on your host. In particular, you need read and write access to the serial port device, which is dev ttyS0 in most cases, and read and write access to the var lock directory. Access to dev ttyS0 is required to be able to talk to the serial port. Access to var lock is required to be able to lock access to the serial port. If you do not have these rights, any terminal...