900719_FOCE : Configuring Debian Linux for FOCE PC-104 Stack (Deprecated) This page last changed on Apr 22, 2009 by kgomes. ## Which Linux? I've tried Debian 'etch' release (kernel 2.6.18) and Gentoo (kernel 2.6.24). I've encountered significant problems in getting both installed. My first few attempts at Debian came up OK, but gave me great pains in installing kernel sources and patching for the 8-port serial board. My first attempt at Gentoo worked great. But then after switching to Debian (to emulate the AUV project install) and back to Gentoo, it wouldn't boot. Currently I'm using Debian, mostly to leverage the MBARI knowledge with this release. I'm loosely following Thom Maughan's Wiki on configuring Debian for the AUV in addition to the Debian GNU/Linux Installation Guide. ## Hardware setup The initial Debian installation was just for the CPU board (Lippert CoolRunner LX-800) and power supply board (Tri-M HE104+DX), as documented on the FOCE Electronics page, plus a 2.5" 160 GB Seagate hard disk drive. Set up CPU and power supply board as above Attach stack to power supply at +24 volts. Don't turn it on yet We have a 'Flashdisk programming board' that we got with the ill-fated Diamond Poseidon development kit. While the Poseidon hardware per se was a piece of cr*p, this little programming board was worth it. Using a 44 pin EIDE cable, attach it to the EIDE port of the CoolRunner. The programming board then brings out the IDE port as both a 44 pin header @ 2mm centers (for 2.5" drive), and also a 50 pin header @ 0.1" centers (for a 3.5" drive). Attach the 160 GB drive (configured for IDE master) to the 44 pin header, and a DVD or CD drive (configured as IDE slave) to the 50 pin header. The DVD/CD drive will need its own power supply. We now have a USB DVD drive, the Sony DRX-S70U. Simply plug it in and attach to the USB port of the Lippert CoolRunner LX-800. You'll need to configure the ROM BIOS in the LX-800 to boot from USB CD/DVD drive. Attach the following to the CPU board, using their cable set: Monitor (I used an LCD monitor) Keyboard Ethernet cable attached to building network Mouse (optional) Two serial connectors, for testing serial ports when done. ## Procedure ##### Install Base Debian System Download the 'netinst' image of the Debian 'etch' release from http://www.debian.org (debian-40r3-i386-netinst.iso) and burn it to a CD. Power up the PC/104 stack (CPU + power supply) Hit F1 and configure the CPU board to boot from the USB CD/DVD drive. You may want to set time & date while in the BIOS. Save BIOS parameters and exit. Boot from the Debian CD. Follow the prompts from the installer. Hostname: foce2 (used foce1 for the previous board that had an IDE failure). The intent is that subsequent boards will be foce3... It should boot DHCP and find out that the domain is shore.mbari.org. Partition -- Guided, use entire disk. It will set up most of the disk as an ext3 partition, with a small (1.4 GB) swap area at the end. Users: root and ops. Passwords same as on SIAM/MMC installations (see Bob, Tom, or Kent). Use network mirror for complete install. You don't need a proxy. I didn't participate in installation survey. Choose Standard System. Unselect Desktop environment. Install GRUB to master boot record When installation completes and the installer ejects the CD, power down the system. Remove the CD/DVD drive 50 pin connector from the Flash Programming board, and turn off the CD/DVD power supply. The moment of truth (stolen from the Debian Installation web page). Reapply power to the PC/104 stack and let it boot. GRUB will give you a choice between booting multi-user (default) or single-user. Allow the default. It should boot into Debian Linux. Log in as root. ##### A Little Bit of Reconfiguration I edited the .bashrc for both root and ops to add my favorite aliases (e.g. ll) Edit /boot/grub/menu.lst to shorten the delay before choosing the default (shortens boot time). Weirdness -- the host name (foce2) doesn't get published on the net during DHCP, though Thom reports that his installation worked fine out of the box. To enable publishing the host name, I had to edit /etc/dhcp3/dhclient.conf to add the following line: send host-name "foce2.shore.mbari.org" 'adduser bobh --uid 348' (to match my NIS user) Edit /etc/group to add users ops and bobh to groups users, uucp, dialout Edit /etc/fstab to add the following lines tmp /tmp tmpfs defaults 0 0 tempest:/vol/vol0/users/bobh /mnt/bobh nfs rw,bg,soft,noauto,nosuid,nodev,exec 0 0 (Note - first line creates /tmp as a RAM disk, which speeds up compiles and the like. 2nd line NFS mounts my NIS directory, but is set to noauto, so I have to explicitly do a 'mount /mnt/bobh' to make it active. I do this during development only; it will not be mounted during deployment). mkdir /mnt/bobh; chown bobh /mnt/bobh; chgrp users /mnt/bobh Edit /boot/grub/menu.lst to send boot messages to both serial console and monitor, by adding the following lines (see Example 5-4 in http://www.tldp.net/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel-grub.html serial --unit=0 --speed=38400 terminal --timeout=5 serial console Add the following to the end of the first 'kernel' line console=tty0 console=ttyS0,38400n8 (Note - this sends boot messages to both the LCD screen and serial line. But I've noticed that it can't really keep up, and some lines are missing. For deployment, I'll leave out the 'console=tty0' and boot to only the serial line. In that case, I can also change the 'terminal' line to simply read 'terminal serial' Edit /etc/inittab to do a 'getty' on ttyS0. Uncomment and edit the appropriate line that was already there, so it reads: T0:23:respawn:/sbin/getty -L /dev/ttyS0 38400 vt100 Edit /etc/apt/sources.list to comment-out the reference to the cdrom. This prevents apt-get from trying to find packages on the CD drive that's no longer in the system. Reboot ##### Install Package Add-ons I installed many, but not all, of the packages documented on Thom's page. In particular, Run aptitude (as root), browse to 'Not Installed Packages->devel->main', and add: autoconf autogen automake binutils bison cccc curves cvs g++ (pulls in gcc 4.1) gdb indent libtool linux-source-2.6.18 make oprofile subversion While in aptitude, choose 'Not Installed Packages->editors, add emacs. Install (Added 23may2008, rah) 'Not Installed Packages->net->main, add ntp and ntpdate. Install. Get an appropriate /etc/ntp.conf from IS. I have one in my NIS directory, bobh Install the following with apt-get: apt-get install openssl apt-get install ssh apt-get install setserial apt-get install minicom apt-get install kernel-package libncurses5-dev fakeroot wget build-essential (kernel build and debian package create) apt-get install xutils-dev apt-get install linux-doc-2.6.18 apt-get install linux-manual-2.6.18 apt-get install manpages-dev apt-get install bin86 binutils gawk shellutils (/usr/share/doc/kernel-package/README.gz says we need these for a kernel build) apt-get install sudo (more common alternative to fakeroot above) (Added 9jun2008, rah) apt-get install ethtool net-tools ##### Rebuild Linux from Source We need to rebuild the Linux kernel from source in order to support the ConnectTech Xtreme-104 octal serial board. This board came with a CD that has patches for the 8250/16550 serial driver, and the instructions are to patch and rebuild the kernel. In preparation for this, we first just build the existing kernel from source to make sure it will build correctly. cp serial.conf /etc (this is the example serial.conf I got from Thom Maughan). cd /usr/src tar jxf linux-src-2.6.18.tar.bz2 cd linux-src-2.6.18 make clean; make mrproper cp /boot/config-2.6.18-6-486 .config make menuconfig Processor type and features -> Processor family -> Geode GX/LX (Why wasn't this already selected?) Device Drivers->Character devices deselect "Non-standard serial port support (CONFIG_SERIAL_NONSTANDARD) These should already be selected; just make sure; in Serial drivers: 8250/16550 and compatible serial support (CONFIG_SERIAL_8250) Console on 8250/16550 serial port (CONFIG_SERIAL_8250_CONSOLE) Extended 8250/16550 serial driver options (CONFIG_SERIAL_8250_EXTENDED) Support for more than 4 legacy serial ports (CONFIG_SERIAL_8250_MANY_PORTS) Support for sharing serial interrupts (CONFIG_SERIAL_8250_SHARE_IRQ) Also set "Maximum number of8250/16550 serial ports" to 16, and "Number of serial ports to register at run time" to 12 make-kpkg clean make-kpkg --revision=foce.1.0 kernel-image (NOTE - this one didn't work after installing with dpkg -i), so let's try make-kpkg clean make-kpkg --initrd --revision=foce.1.1 --append-to-version=-foce.1.1 kernel-image cd /usr/src; dpkg -i linux-image-2.6.18-foce.1.1_foce.1.1_i386.deb OK, that worked. Now there are 3 kernels supported (2 which work and can boot). They are: 2.6.18-6-486. This is the original kernel from the Debian installer. 2.6.18. This is a non-working version from the 'make-kpkg --revision=foce.1.0 kernel-image' line above. 2.6.18-foce.1.1. This is the working version from the 2nd make-kpkg line above (with --initrd, which apparently is necessary) For each of the above kernels (denoted here as $KERNEL), you will find: /boot/config-$KERNEL /boot/initrd-$KERNEL (except for foce.1.0, which is why it didn't work) /boot/System.map-$KERNEL /boot/vmlinuz-$KERNEL A directory named /lib/modules/$KERNEL /usr/src/linux-image-$KERNEL_i386.deb. This is the Debian package to install the kernel and modules. Note that the dpkg installer modifies /boot/grub/menu.lst to insert the new kernel as a boot option. But when it does so, it removes the 'console=tty0 console=ttyS0,38400n8' from all the kernel lines. These have to be manually reinserted on each kernel line if you want that kernel to send 'console' messages to the serial port as well as the LCD screen. Future kernels will be built with sequential numbering -- foce.1.2, foce.1.3, etc. ##### Add Support for ConnectTech Xtreme/104-Plus Octal UART Board mkdir /usr/src/xtreme104 Copy contents from the ConnectTech Xtreme/104-Plus CD to a NFS-mounted drive.Go to Drivers/Linux26, and copy the driver (bhtnpciu-2.6.18.tar.gz) to /usr/src/xtreme104. Untar the file there. Follow the instructions in the README file there, including the following steps: cd /usr/src/linux-source.2.6.18 Save the drivers/serial directory to drivers/serial.save (Note -- apparently the patch touches more than this. Fortunately, I also have a copy of the entire /usr/src/linux-source.2.6.18 in an NFS directory). patch -p1 < ../xtreme104/bhtnpciu-2.6.18/bhtnpciu-2.6.18.patch Per the README, 'make menuconfig' and verify the options they list are set. This was done above, and checked to be OK. make-kpkg clean make-kpkg --initrd --revision=foce.1.2 --append-to-version=-foce.1.2 kernel-image cd /usr/src; dpkg -i linux-image-2.6.18-foce.1.2_foce.1.2_i386.deb Reboot I thought this didn't work. But that's because I moronically forgot to install the board. So I went back to the README, and changed both "Maximum number of 8250/16550 serial ports" and "Number of serial ports to register at run time" to 128, per README, and rebuilt as foce.1.3 cd /usr/src; dpkg -i linux-image-2.6.18-foce.1.3_foce.1.3_i386.deb Reboot Verify that we have serial support via 'dmesg | grep tty'. It should show ttyS4 through ttyS11. Use minicom to test each serial port. They work! But you need to exit & reenter minicom when you change the serial port. ##### Force 10baseT operation on Ventana (not needed for MARS?) As root, copy my init script to /etc/init.d/force10baseT Run ' update-rc.d force10baseT defaults 18' (Note - level 18 ensures it's run early enough to take effect before other scripts that rely on networking) The network is not ready (still initializing?) by the time the NTP script executes. So you now need to: Run 'update-rc.d -f ntp remove' Add '/etc/init.d/ntp start' to /etc/rc.local This causes ntp to start later in the initialization cycle, when the network is ready.

Document generated by Confluence on Feb 03, 2026 14:29