<< Back to main page

WISP-Dist Development Notes / Sources



WISP-Dist development tree is centered around a build system which allows an image to be built from scratch from source files. The tree is stored inside an Arch (tla) repositry, tla being a very powerful revision control system (similar to CVS).

Checking out latest version of the tree:

1) Install GNU Arch / tla (RPMs can be found on rpmfind.net).
2) tla register-archive hazard@francoudi.com--wisp-dist-2003 http://svc2.thunderworx.net/wisp-dist-2003
3) tla get hazard@francoudi.com--wisp-dist-2003/wisp-dist--1.3 wdist
4) As a result you will get latest version of the tree in "wdist/" subdirectory.

To update existing tree:

1) cd wdist/
2) tla update hazard@francoudi.com--wisp-dist-2003/wisp-dist--1.3
Building an image
1) Go into "build/" subdirectory. Take a look at README file.
2) Run "./build.sh -f". This will fetch necessary files, compile components, generate packages and finally build the image and place it into /usr/src/wisp-dist/wdist.img. That's it. :)

Boot process (initrd)

The initrd script design is quite similar to the one used by LEAF Bering (however there are some serious changes to accomodate CramFS and non-RAM root filesystem).

During boot, system walks over all specified packages (LRP= parameter to kernel) one by one. First, it tries to uncompress .lrp file into r/w partition (/dev/hda2 or tmpfs); then it mounts the .cfs file (if it exists) into /[filename] and makes symlinks from well-known directories into the r/w partition.

The r/w partition is formatted during start-up, hence the need to save your settings before reboot.

Initrd uses statically compiled binaries (busybox, sed) which are removed from memory once the bootup process is complete.

Upgrade process

The upgrade-wdist script creates a temporary username (upgXXXXX) using md5sum from /dev/urandom. The upload-wdist script logs in to the remote system as root, gets the name of the user to use from /tmp/_upgradewdist-auto-v03 and uses that user afterwards to do file copying. This way the user is not asked for password each time scp is run, however authentication is still required at the beginning stage.

Packages

WISP-Dist's packages consist of read-only part (.cfs, a CramFS image) and read-write part (.lrp file, which is a .tar.gz). This way, RAM is not used for storing read-only binaries. For each LRP file, an .md5 file exists which holds MD5 sums of all files inside the .lrp. This way, the upgrade script knows if the file was changed and will not touch it during upgrade process. For details on how the system works with the packages, read the "Initrd" section of this page.

In the downloads area you can find "build-scripts" archive, which includes the script used for building packages (prepare-img).