Next Previous Contents

5. Installing TinyLogin & login dependencies

TinyLogin is available at http://tinylogin.lineo.com.

It will give us the following tools in less than 35Ko :

/bin/addgroup, /bin/adduser, /bin/delgroup, /bin/deluser, /bin/login, /bin/su, /sbin/getty, /sbin/sulogin, /usr/bin/passwd

Please refers to your main distribution doc or man pages to have a full description of those commands.

5.1 Configuring TinyLogin

[... part of TinyLogin README ...] TinyLogin is modularized to easily allow you to build only the components you need, thereby reducing binary size. To turn off unwanted TinyLogin components, simply edit the file tinylogin.def.h and comment out the parts you do not want using C++ style (//) comments.

5.2 Installing TinyLogin

After the build is complete a tinylogin.links file is generated which is then used by 'make install' to create symlinks to the tinylogin binary for all compiled in functions. By default, 'make install' will place a symlink forest into `pwd`/_install unless you have defined the PREFIX environment variable.

5.3 Installing Sysvinit & start-stop-daemon

After the kernel is done loading it attempts to run the init program to finalize the boot process.

The Sysvinit package also offers a C version of the start-stop-deamon in the contrib directory.

5.4 Configuring Sysvinit

Sysvinit needs a configuration file named inittab and placed in $EMBPART/etc. The following is the one used in the LEM distro:

# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.6 1997/01/30 15:03:55 miquels Exp $
# Modified for LEM 2/99 by Sebastien HUET <>

# default rl.
id:2:initdefault:

# first except in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# 0:halt 1:single-user 2-5:multi-user (5 may be X with xdm or other) 6:reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6

# CTRL-ALT-DEL pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now

# Action on special keypress (ALT-UpArrow).
kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

# /sbin/mingetty invocations for runlevels.
1:2345:respawn:/sbin/getty 9600 tty1
2:23:respawn:/sbin/getty 9600 tty2
#3:23:respawn:/sbin/getty tty3 #you may add console there
#4:23:respawn:/sbin/getty tty4

5.5 Creating initial boot scripts

As seen in the inittab file, Sysvinit needs additional scripts in their own directories.

Creating the necessary directories and base files

                cd $EMBPART/etc
                mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d init.d rcS.d rc.boot
                

Adding base scripts

<!-reboot---------------------------------------------->

#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
echo -n "Rebooting... "
reboot -d -f -i

<!-halt---------------------------------------------->

#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
halt -d -f -i -p

<!-mountfs---------------------------------------------->


  

Creating initial scripts

5.6 Copying passwd & group files


Next Previous Contents