Marko Mäkelä’s software projects: A Linux-based Web Camera Server on a Floppy Disk: Build instructions

This brief document tells how the software on the web camera server floppy disk can be compiled.

First, the file system on the floppy disk is FAT. The directory listing should look as follows. You may follow the hyperlinks in order to download the files or to obtain the build instructions.

ldlinux  sys      8204 2004-08-08  16:23  ldlinux.sys
	SYSLINUX 2.10 loader
syslinux cfg        91 2004-08-08  16:23  syslinux.cfg
	SYSLINUX configuration file
linux           532570 2004-08-08  16:23  linux
	Linux 2.4.26 kernel image (installation)
ssh          <DIR>     2004-08-08  23:07  ssh
	OpenSSH private and public keys and database of known host keys
	(installation)
initrd   gz     830946 2004-08-08  16:23  initrd.gz
	Initial RAM disk image (installation)
init     txt       678 2004-08-08  16:29  init.txt
	Initialization commands (Bourne shell script)

Assuming that the files listed above are available at files/, the boot disk can be prepared with the following commands:

mformat -r 1 a:
syslinux /dev/fd0
mcopy -b files/* a:

On Debian GNU/Linux, this requires that the packages mtools and syslinux have been installed.

Compilation

The executable files can be compiled on a Debian GNU/Linux i386 system with uclibc-toolchain 0.9.26-4 (gcc 3.3.4) as described below.

Please note that in the instructions below, the path name files/ refers to the FAT file system of the floppy disk.

Linux kernel 2.4.26

cp kernel-source-2.4.26.config /path/to/linux/.config
make -C /path/to/linux bzImage
cp /path/to/linux/arch/i386/boot/bzImage files/linux

Initial RAM disk image: initrd.gz

The RAM disk image contains the initial root file system. It can be generated in ext2 format as follows.

dd if=/dev/zero ibs=1024 count=2048 of=files/initrd
/sbin/mke2fs files/initrd
/sbin/tune2fs -c 0 -i 0 files/initrd
# mount && copy the libraries and files && umount
gzip -9 files/initrd

The build instructions for the libraries and files on initrd.gz are given below. Please note below that file names starting with /initrd/ should be copied to the RAM disk image.

BusyBox 1.00-pre10

cp busybox-1.00-pre10.config /path/to/busybox-1.00-pre10/.config
make -C /path/to/busybox-1.00-pre10 CC=i386-uclibc-linux-gcc
cp busybox-1.00-pre10/busybox /initrd/sbin/busybox

OpenSSL 0.9.7d

CC=i386-uclibc-linux-gcc perl ./config --prefix=/usr/i386-uclibc-linux
make CC=i386-uclibc-linux-gcc install INSTALL_PREFIX=/var/tmp
# copy {/var/tmp,}/usr/i386-uclibc-linux/{lib,include}
# (no need to copy shared files or binaries)

OpenSSH 3.8.1p1

# apt-get source openssh
CC=i386-uclibc-linux-gcc ./configure --prefix=/usr/i386-uclibc-linux \
 --without-tcp-wrappers --without-skey --without-pam --without-rand-helper \
 --without-kerberos --without-xauth
make
# cp ssh /initrd/usr/bin
# cp /usr/i386-uclibc-linux/lib/lib{crypt,util}*so* \
#   /initrd/usr/i386-uclibc-linux/lib

Image capturer

make CC=i386-uclibc-linux-gcc CFLAGS='-O3 -fomit-frame-pointer -ffast-math'
# cp sender /initrd/usr/bin

OpenSSH configuration files

mkdir files/ssh
cp $HOME/.ssh/known_hosts files/ssh/known_ho.sts
cp $HOME/.ssh/id_dsa $HOME/.ssh/id_dsa.pub files/ssh/

Status

I do not plan to maintain this document or the software. Feel free to do anything with this, as long as you comply with the copyright licenses of the software packages.

Contact me if you would like to have paid consulting services.