This file describes how this PC is set up and how to change its configuration.
The C library used in this version of Etlinux is glibc 2.1. It is compiled as a shared library.
The ettclsh
interpreter is a version of Tcl-7.6
extended with custom commands. The most interesting commands are
uuencode
and uudecode
, that allow data
transfer to/from the disk-on-chip system even when it is not
configured on the network.
To send data to the system, call uudecode
from your
console session. The command reads everything it find on standard
input up to an "end" line (i.e., to do nothing just type "end" to stop
the command). In order to transfer data, invoke the real uuencode
command somewhere else redirecting its output to the serial port.
For example, to transfer grep, you can call this command on the
computer that is connected to the serial console:
uuencode /bin/grep /bin/grep > /dev/ttyS0
To receive data from the system, you should enable logging in your
terminal program and then use the uuencode
command in the
console. When it is done, just run the real uudecode
command on the log file.
Other interesing commands (or procedures) aviable in the console session are the following:
inp
, outp
, inw
,
outw
. These commands read/write 8 or 16-bit I/O ports.
The input commands get a number as argument while the output commands
get two numbers. The numbers can be decimal, hex, octal, according to
the C conventions (which are shared by Tcl).
free
, ps
. The procedures are subsets of
the real commands, but are useful to get a snapshot of the memory and
process status of the system.
cat
, grep
. Other subsamples of real
commands. Please remember that the arguments are passed according to
the Tcl syntax (not the shell one).
ls
. The procedure is a rudimental
ls
. Note that it doesn't expand directories by default,
so you'll need to "ls *
" in order to see all the
files. The command doesn't take any option.
netconfig
is a procedure to reconfigure the network.
It is automatically executed at the beginning of any console session
and is described below.
tail-f
is a procedure that resembles the read
tail -f
command. It spawns a process that deals with the
tailing in the background, to kill that process use sys_kill
34
(replace the "34" with the correct process-ID).
The version of init
included in this system is a Tcl
script. It has been developed as part of the
When run, /sbin/init
reads the following files and/or
directories to configure itself. The next section will describe what
services are enabled in the released configuration.
/etc/init.d/options
This text file assigns the
options
array used by init
. It is
self-documented.
/etc/fstab
This is the classic
/etc/fstab
found in Unix system. The only special
requirement is that the first line of this file should be the one
about the root filesystem. This because when only root is mounted,
init
just reads one line of the file to know what the
partition is. The file can include several lines anyway, so you can
still use the external mount
program. Note that you will
need to customize /etc/fstab
.
/etc/init.d/scripts
The init
program
executes every file in this directory whose names begins with a
capital "S". All the files are Tcl scripts. This directory is the
preferred place to host configuration and initialization commands.
The README
file in this directory expands on the topic.
By default two files are there, to configure the network (loopback
and ethernet).
/etc/init.d/respawn
All the files in this directory
are Tcl scripts, as usual. Every file whose name matches "S*" is
executed and respawned when it exits. This kind of behaviour is
useful for login sessions on text consoles (or the interactive session
on the serial console. By default only the interactive session is fired.
/etc/applications
As the last step, init
runs all the programs that live in this directory. This is where
application-specific programs should be placed.
init
deals with shutdown as well. From the interactive
ettclsh
sessions you can invoke the halt
and
reboot
commands. If you want to do it from a telnet
session, you can invoke the same two commands but you also need to
exit from the session for the action to be effective.
If you have no console access, you can count on shutdown to take 5 seconds.
A server web is running on the system. It reads data that is stored
in /html
and is able to execute CGI programs
A server SMTP is running on the system.
Save incoming mail in /var/spool/mail
and executes
programs sent to command@host.
The glib library used in this version of Etlinux is glib 1.2.6. It is compiled as a shared library.
ORBit is an Open Source CORBA implementation.
The distribution is made up of the following pieces:
/lib/libc-2.1.2.so
comes from glibc-2.1.2.
/lib/ld-linux.so
, bin/ldd
and
/sbin/ldconfig
come from ld.so-1.9.11.
/bin/tclsh
and /usr/lib/ettcl-1.0
comes
from ettcl-11.
/sbin/init
and /etc/init.d
(with all its
content) comes from ettcl-init-1.1.0.
/boot/boot.b
comes from plilo-boot.
/sbin/plilo
and /etc/lilo.conf
come
from lilo-21.
zImage
and kernel modules in /lib/modules/misc
(placed there for simplicity) come from kernel-2.0.38-486-full. The package
includes precompiled stuff, and the source is in
ftp://ftp.prosa.it/pub/etlinux
/sbin/
, depmod
, insmod
,
and modprobe
come from modules-2.0.0.
rmmod
is a symlink to insmod
.
/sbin/ifconfig
, /sbin/netstat
,
/sbin/route
, /sbin/ipfwadm
,
/sbin/inetd
and /bin/ping
come from netbase-3.16.orig.
/bin
come from mount:
mount umount
/etc/applications/telnetd
comes from ettcl-telnetd-1.0.0.
/etc/applications/httpd
is the CGI-enabled, ettcl-based
web server, distributed as ettcl-httpd-1.1.0.
/etc/applications/sendmail
is the ettcl-based
SMTP server, distributed as ettcl-smtp-1.0.0.
/sbin/mcserv
comes from mcserv-prosa-1.1.0.
/html/cgi-bin/*
and the entry point
/html/cgidemo.html
come from sample-cgi-0.1.0.
/lib/font/
defines an ascii font (taken from the
fonts for the Linux text console. It is used by the CGI demos.
/lib/libtermcap
comes from termcap-2.0.8.
/bin/bash
comes from bash-1.14.7. /bin/sh
is a symbolic links to bash
.
/bin/ps
comes from procps-2.0.3.
/bin/tar
comes from tar-1.13.11.
/bin
the following files come from fileutils-3.13:
chmod chown chgrp cp dd df du ln ls mkdir mkfifo
mknod mv rm rmdir sync touch
.
/bin
the following files come from textutils-1.19:
cat cut head md5sum od sort split tail tr uniq wc
.
/bin
the following files come from sh-utils-1.12:
basename date echo env expr false nice pwd sleep stty
true tty uname
/bin
and /sbin
come from util-linux-2.9x:
mount umount login passwd kill clear reset hwclock kbdrate rdev
fdisk fdformat fsck.* mkfs.* mkswap swapon swapoff losetup
/sbin/mingetty
and its startup scripts come from mingetty-0.9.4-prosa1.
/bin/ftp
comes from netkit-ftp-0.10.
/bin/telnet
and /sbin/telnetd
come
from netkit-telnet-0.14.
/sbin/tftpd
comes from netstd-3.07.
/etc/inetd.conf
, /etc/nsswitch.conf
and /etc/init.d/scripts/S20inetd
are copied
from netfiles-1.0.0.
/bin/elvis
comes from elvis-tiny-1.4.
/lib/libg*-1.2.so.*
come from glib-1.2.6.
/lib/libIDL*
, /lib/libIIOP*
,
/lib/libORBit*
come from ORBit-0.5.0.
/bin/md5sum
and
/sbin/softdog
come from asmutils-0.05.
/bin
:
busybox cat chgrp chmod chown cp date dd df du false
find free gunzip gzip hostname ln ls mkdir mknod mnc more mount mt mv ps
pwd rm rmdir rmdir sed sleep sync tee touch true umount uname update
zcat
and the following files in /sbin
:
chroot fsck.minix reboot swapoff swapon update
come from busybox-0.40.