Etlinux logo
*Download it! *Documents *Support

Linux vs Unix

By Prosa Labs
home -> Documents Prosa

ETlinux papers

Etlinux documentation

Here there are the first two chapter of the future full documentation:

Etlinux architecture

Etlinux is a minimal linux system, so it's not too different from a standard unix machine, apart from few significant differences. We'll concentrate on the description of those areas where etlinux peculiarities are more relevant.


Some key aspects of etlinux architecture are its modified linux kernel and its booting process .

The kernel, compared to a standard linux one, has some modifications, made to lower its memory requirements. For example, the VGA console support has been made optional, and the size of some internal structures have been reduced, taking into account the typical needs of an embedded platform. However we retained all its functionality.

As anticipated before, another key point in reducing the footprint of the system, has been the customization of the booting process. To accomplish this task, we rewrote init and the other parts involved using the popular interpreted language Tcl . The approach of using a scripting interpreted language has the advantage of eliminating the need for a full featured init, which for an embedded system is unnecessarily complex and big, and it makes possible to avoid the inclusion of a classical shell, otherwise necessary to execute initialization scripts and as command line interface.

The Tcl language engine

Tcl has many desirable characteristics for an embedded system. It is lightweight, has a very simple syntax and it is possible to add new commands in C with little effort. And it is usable in an interactive manner, thus acting as a command line interface.

Tcl is very easy to learn, for more information please refer to its documentation.

Tcl version included in etlinux has been extended with some internal commands useful in an embedded environment. For example we added Tcl equivalents for some common syscalls and services: sys_dup , sys_exec , sys_fork , sys_kill , sys_nice , sys_pipe , sys_reboot , sys_sync , sys_wait , sys_chmod , sys_umask , sys_mknod , inp , inw , outp , outw , setleds , mount , umount , uudecode , uuencode , time , ifconfig , route , udp . The introduction of these commands allowed the rewrite of the initialization scripts in pure Tcl, avoiding the inclusion of large binary programs.

The boot process

The first steps of the booting process of etlinux are exactly the same as in a classical linux machine. The BIOS provides a first stage boot loader, loading and executing lilo boot code, which resides at the beginning of the boot device. Then lilo takes care of loading the kernel in memory and passes control to it. The kernel initializes the hardware and its internal structures, the executes the init process.


init is a process running in user space. It is the first user process executed and it's responsible for the creation and execution of all other processes. Normally it runs a series of procedures necessary to complete the setup of the system, like starting requested services.

As we noted before, etlinux init is written in Tcl , so it is easy to study or modify. We'll describe here the essential steps performed by init on etlinux:

  1. A file containing general options is read.
  2. The root filesystem is checked for errors.
  3. The root filesystem is remounted read/write.
  4. The /proc filesystem is mounted.
  5. An eventual swap partition is activated.
  6. All remaining filesystems are checked and mounted.
  7. Some kernel parameters are tuned to lower memory usage.
  8. Temporary directories are cleaned.
  9. Kernel modules are loaded in memory.
  10. User initialization scripts in /etc/init.d/scripts are executed. These scripts must have a filename prefixed with S nn , where nn is a number between 00 and 99 indicating the order of execution.
  11. The system perform an interactive configuration.
  12. User applications, residing in /etc/applications are finally started. All tcl scripts residing in this directory are launched by init. Included here are a small webserver and a telnet daemon.

Installing etlinux


Etlinux is both an Operating System distribution and a development environment. Typically, the Operating System will run on an embedded platform, while the development environment will be used on a workstation. We'll call the former platform the target system, and the latter the host system.

Preparing the host system

The host system has to be a linux machine, with glibc 2.x . The development environment requires the following tools to work properly:

Please, make sure you have all of the above tools before starting the installation of the kit. At this point, installing the development environment is simply a matter of decompressing two archives and setting up the proper environment variables. This is accomplished by the following procedure:

  1. Choose a suitable directory dir
  2. Change directory, jumping into dir
  3. Extract the etlinux development kit file etlinux-1.2-src.tar.gz or etlinux-1.2-pkg.tar.gz
  4. Extract the etlinux-ide archive file: etlinux-ide.tar.gz
  5. Modify the startup script that set the environment variables on your machine (if using Bash, /etc/profile for a system wide installation, or $HOME/.bash_profile for a single user installation), adding the etlinux-ide directory to the PATH

Actual steps will resemble:

     cd dir
     tar xvfz etlinux-1.2-src.tar.gz
     tar xvfz etlinux-ide.tar.gz
     ... edit your startup script ...

Regarding this last point, if you are using the bash shell, you'll need to add at the end of the script a fragment like this:

      export PATH

Installing on the target system

Etlinux target system can be based on a classical storage device, like an HD, or on M-Systems DiskOnChip.

It is possible to create a root filesystem for the target either by using a prepackaged one, such as etlinux-root-1.x.y.tar.gz , available on or , or by creating a custom one by means of etlinux package system. Here we'll examine only the first option.

Installing on an HD-based target system

It is necessary to have access to the target HD from a linux system.

To create the root filesystem from the file etlinux-root-1.x.y.tar.gz on the , follow the steps:

  1. Mount the target HD on the host workstation.
  2. Boot the workstation.
  3. Format the target HD as minix and mount it. Supposing the target HD an IDE disk as slave on the first IDE channel ( /dev/hdb1 ):
    • mkfs.minix -c /dev/hdb1
    • mount /dev/hdb1 /mnt
  4. Decompress etlinux-root-1.x.y.tar.gz on the target partition. Supposing you have etlinux-root-1.x.y.tar.gz in your home directory, do:
    • cd /mnt
    • tar xvfz ~/etlinux-root-1.x.y.tar.gz
  5. Run lilo in order to allow the target system to boot off HD:
    • rdev zImage /dev/hdb1
    • /sbin/lilo -C /etc/lilo-hd.conf -r /mnt
  6. Then halt the workstation, power it off, and remove the hard disk. Plug the hard disk in the target system and boot it.

Installing on a DiskOnChip-based target system

The root filesystem for the target must be created from a linux workstation with a DiskOnChip socket and DiskOnChip kernel support. A kernel with DiskOnChip support can be downloaded from .

To create the root filesystem from the file etlinux-root-1.x.y.tar.gz on the DiskOnChip, follow the steps:

  1. Install the kernel with DiskOnChip support on the workstation.
  2. Create the nodes in /dev for the DiskOnChip:
    • mknod /dev/fla b 62 0
    • mknod /dev/fla1 b 62 1
    • mknod /dev/fla2 b 62 2
    • mknod /dev/fla3 b 62 3
    • mknod /dev/fla4 b 62 4
  3. Power off the workstation.
  4. Put the DiskOnChip for the target system into the socket.
  5. Boot the workstation.
  6. Format the DiskOnChip as minix and mount it:
    • mkfs.minix -c /dev/fla1
    • mount /dev/fla1 /mnt
  7. Decompress etlinux-root-1.x.y.tar.gz on the DiskOnChip. Supposing you have etlinux-root-1.x.y.tar.gz in your home directory, do:
    • cd /mnt
    • tar xvfz ~/etlinux-root-1.x.y.tar.gz
  8. Run plilo in order to allow the target system to boot off DiskOnChip\:
    • rdev zImage /dev/fla1
    • sbin/plilo -C lilo-doc.conf -r /mnt
  9. Then halt the workstation, power it off, and remove the DiskOnChip. Plug the DiskOnChip in the target system and boot it.

[ Home . Download it! . Docs . Support ]

[email protected]
Last modified: Wed Feb 15 17:48:36 CET 2000