Slax for Hope

Slax is a Live Linux distribution built around Slackware. The LiveCD takes care of hardware detection and configuration for a large class of hardware available at the time of this writing.

This page describes how to build a modified Slax CD that will run the Hope software on startup 1) Most instructions here are quite generic though, and should help you put together a modified Slax CD with custom programs.

Getting the Software

Download Slax from http://www.slax.org/download.php. For the Hope CD, the Popcorn version of Slax was used, to keep the size of the CD small. The version used was v5.1.8.

Additional Modules

Additional modules need to be installed for text-to-speech synthesis and audio playback.

NOTE: The reason for including these is that the default slax distribution does not contain the play command (it does contain mplayer), and also does not contain festival. This is actually a problem with the way the Hope distribution has been put together. The playit.sh script uses mplayer on one line, and play on another. These come from different packages, and there is no need for both, so to reduce dependencies only one should be used.

The text2wave command also needs to be included with the Hope distro. Right now only the flite command is packaged with Hope, but this is not sufficient.

Once these two corrections are made, the above two modules can be left out.

Hope software

Only the directory containing the executable and .wav files was used. The desktop shortcut and documentation were left out. They can be included if necessary.

CD Creation

The process of creating a new CD involves the following steps:

  1. Unpack an existing CD distribution
  2. Add required modules and software into appropriate places
  3. Re-create an ISO file with the new setup

Unpacking the CD

The Slax distribution is an ordinary .iso file (CD-ROM image). You could burn it directly to a CD, and then copy the entire contents of the CD out into another directory. A better way, if you are using Linux, is as follows:

NOTE: In all commands, the word sudo in front means it is to be executed as the super-user (root). If you are already logged in as root, you don't need to add the sudo prefix, but shame on you.

Mount the ISO image on Loopback

sudo mount slax-popcorn-5.1.8.iso slax -o loop=/dev/loop/0
sudo cp -av slax newslax

Here slax is a directory (empty, but already existing), onto which the image will be mounted, and newslax is a fresh directory into which the CD image contents will be copied.

The command above works with Debian Linux. On other distributions, there may be some difference in the way the loopback device is set up. It may use /dev/loop0 instead of /dev/loop/0, or maybe the loop device will be different. Consult the documentation for mount and losetup if this does not work.

The cp command above makes a complete copy of the CD image into a new directory. You will make your changes here.

Add necessary modules and software

# cd newslax
# cp ~/Festival.mo ~/sox.mo modules/   # Assumes the .mo modules downloaded earlier are in your home dir
# mkdir rootcopy/root                  # This will be copied into the main system as /root (Home-dir for root)
# cp -a ~/X86-HOPE/HOPE-X86-07-06-07 rootcopy/root/HOPE # Put the executables and sounds in the homedir
# mkdir -p rootcopy/Desktop/Autostart

Put the following code into a file called /tmp/hope.sh

#!/bin/sh
cd /root/HOPE
exec ./hopexe

Move the file into the Autostart directory, so it will be executed when X windows starts.

# chmod +x /tmp/hope.sh
# mv /tmp/hope.sh rootcopy/root/Desktop/Autostart

Modify playit.sh

The playit.sh script in the Hope distribution will not work if the modules for Festival and Sox were added as given. Find the line that says

text2wave tem.txt -o tem.wav

and give it the full path to the text2wave executable:

/usr/local/festival/bin/text2wave tem.txt -o tem.wav

Again, all this is necessary only because text2wave was not included in the the Hope package.

Create a new ISO

Change to the top-level of the newslax directory. There is a script called make_iso.sh. Run this and it will ask you for a destination filename. It will then pack the slax CD with your updated modules and files into a new CD, that can be used to boot slax.

Further Information

Nitin Chandrachoodan 2007/08/02 11:30

1) Hope is software for augmented communication developed at IIT Madras.
misc/howto/slax-hope.txt · Last modified: 2007/08/02 11:31 by nitin
© 2004-2010 Nitin Chandrachoodan