wiki/ FlightComputerSoftware2002

Details of Flight Computer Software for 2002 Launches

The FlightComputer is running Debian GNU/Linux's 'sarge' distribution. This was done to limit differences in shared library support between the development hosts and flight computers, so that testing on the development host would have more validity.


First install (from floppy) the net installer version of Debian Woody (3.0), using a spare 486 PC and the 386-compiled version of the Linux kernel. Once the basic installation is done, change the /etc/apt/sources.list to get the Sarge sources instead, and do an 'apt-get update && apt-get dist-upgrade' to upgrade to Sarge. Keep adding in packages a bit at a time and removing unwanted files (mostly /usr/share/doc/*) since the disk space on the compact flash is small. Compile a new kernel on a development PC and package it using Debian's make-kpkg tools -- strip out most of the unneeded drivers and modules, and enable the serial port console -- compile for 386 throughout. When this is running correctly on the spare PC, disconnect the compact flash and reconnect it to the MOPS board. Reconfigure for the MOPS onboard ethernet device and get that running. A copy of the flash image is available on the PSAS CVS (see; once you gunzip it, you can mount it on your development workstation as a loopback filesystem for examination and tweaking, or use dump and restore to put it onto any other disk device.

Bootstrapping the flight computer

I used an old 486 computer with a floppy disk attached, an ISA VGA card, a NE2000 ISA network card, and ISA 16550A serial port card. The Flight computer's ?SanDISK CompactFLASH card is plugged into its TAPR board, connected to the 486 with an IDE cable, and jumpered to serve as the master harddisk for the 486. You'll also need a fast net connection (DSL is fine).

Installation on foreign hardware

Download the Debian install floppy images. Use them to do as minimal an install of Debian as possible via the network. The attached output of 'dpkg --get-selections' is a useful guide for the eventual goal -- you can use that as input to 'dpkg --set-selections' prior to an 'apt-get dselect-upgrade'

Trimming it down

deborphan and debfoster are very helpful for trimming down the list of installed packages. Also, periodically try to run 'apt-get clean' to clear the local package cache and also 'rm -rf /usr/share/doc/*'. If there isn't enough space available on the compact flash card to do everything you need, then work with a few packages at a time with 'apt-get install ....'.

Configure a kernel

Use another Debian computer, configured to be able to build kernels from source using the debian make-kpkg utility. Download the 2.4.18 debian kernel source and compile the kernel. See kernel configuration below. Note that it includes support for a serial console, and both the NE2000 network adapter as well as the Davicom network device on the flight computer board. See the attached kernel .config (note it is set up for just the FC hardware itself, and not for the NE2k card, floppy, etc).

Configure lilo

Lilo must be configured to boot using a serial console. See attached /etc/lilo.conf (note it is set up just for the FC hardware itself, and not for booting on different hardware).

Recent change to lilo.conf: delay=30 (three seconds instead of ten, speeds development)

Booting test and real hardware

Test the installed kernel on the 486 hardware using a serial port console. Tweak and trim where possible. Then get it running on the flight computer. Minicom with a serial crossover cable is helpful for talking to the system booting on the serial port. Bring up the network adapter (dmfe), then ssh, then you can continue tweaking the installed packages and disk space.


Set up a ram-based /tmp using tmpfs. See attached /etc/fstab.

Set up can driver to start on boot

Make a /lib/modules/2.4.18/misc directory and add the can driver (can.o) to it. Place "can" in the /etc/modules and create a /etc/modutils/local file, and place the following lines in it to support the can driver's loading: --lines go here--

Run update-modules to add the /etc/modutils/local file into /etc/modules.conf, then run /etc/init.d/modutils to cause the drivers kernel modules to load up.

Set up wireless to come up on boot

Add the following to /etc/modules: --lines go here--

Then, edit /etc/pcmcia/wireless.opts to identify and configure the card for channel 1, Ad-Hoc demo mode operation. The hex bytes at the start of these blocks must match the first three bytes of the wireless card's MAC address.

# Setup for rocket network, ad-hoc mode
    INFO="Lucent Orinoco for Rocket"
    IWCONFIG="mode ad-hoc channel 1"
    IWPRIV="set_port3 1"

Lastly, edit /etc/pcmcia/network.opts to configure the IP address and network for the wireless link (FC is address and LTC is address, network, broadcast, netmask

    INFO="Orinoco network setup fort"
    # the following is useful for accessing the net via the laptop during development
    start_fn () { return; }
    stop_fn () { return; }

Remove and reinstall the card using "cardctl eject 0; sleep 10; cardctl insert 0". It should come up fine.

Other wireless helpful hints

It may be useful to set up the laptop ( that is talking to the flight computer similarly. Also, set up the debian packages iptables and ipmasq so that the flight computer can NAT through the laptop to the rest of the world. This makes it possible for the flight computer to do ntpdate to set the system time, run apt-get and the like.

-- ?JamesPerkins - 14 Aug 2002

The preceding setup is also valid (replacing the IPADDR with for the launch tower computer.

Eventually, you will also want to add the primary software for FC/LTC to run on startup. Add a script named S99[name] to /etc/init.d/rc99.d/ to launch the main program.