Download Embedded Linux

Transcript
Embedded Linux
initrd.gz
image becomes the root RAM disk.
2. After the kernel readies itself and loads all the built-in device drivers, it runs the /linuxrc script
from within the initrd.gz RAM disk.
3. The /linuxrc script loads and uncompresses other packages from the boot media. These packages
are stored as a compressed tar.
4. The ldconfig command runs to rebuild the shared library cache (etc/ld.so.cache). This is done
because some of the optional packages require a shared library or two that are not normally needed.
The ldconfig command must run so those shared libraries can be found by the loader.
5. Package-specific startup scripts run next. This is how most of the services start, such as identd,
named, dhcpd (server), and dhcpcd (client).
As shown in Chapter 3,"Software Configuration," each script is responsible for taking parameters
out of the /mnt/envi file and building any and all configuration files necessary. Usually this can be
done with a few shell-script commands, but sometimes a whole C program must be written to build
the configurations. This is the case for named—its configuration files are complicated enough that a
shell script was too difficult to write.
6. The startup script is built and executed. ShareTheNet users are able to administer the software by
using a Web-based configuration program. However, some things are just not configurable enough,
so users can also add their own startup commands by using the browser. These commands can do
anything, but are usually used to enable traffic back into the local network that would be blocked
(such as ICQ traffic). These commands execute at the final phase of the ShareTheNet boot process.
Requirements
The years I've spent making ShareTheNet work have taught me many lessons in how to make Linux
perform in a very limited environment. After looking at the many "embedded Linux" products available
for free or fee today, I felt that a simple, well explained, nuts-and-bolts example of an extremely small
Linux toolkit would serve the developer community well. Therefore, I decided to risk even more hours
of staring blankly at messages like the following while building the Embedded Linux Workshop:
Kernel panic: No init found. Try passing init= option to kernel.
The workshop doesn't try to be all things to all people. As I mentioned earlier, I put it together primarily
as a teaching aid, but I've been using it as the basis of all of my embedded Linux projects. Let's look in a
bit more detail at the requirements for the Embedded Linux Workshop:
•
It must run on a very common hardware platform, so anyone can use it.
Page 95