I finally broke down and bought a Libretto 110CT.  This machine was pretty incredible for it’s day.  It’s a Pentium 233MHz with MMX and has 64mb of ram.  It had a 4.3gb hard drive in it.  That needed to go so I snagged another CF to IDE adapter off Amazon and put a 16gb Kingston CF card in it.

I didn’t bother trying to install Gentoo on the local machine.  That would be ridiculously slow and probably impossible because of the PCMCIA cdrom drivers.  I opted to use my much faster Celeron 466MHz.  I decided to dedicate that machine to building system disks for my 3 Librettos. I decided it would make life easier to grab a CF Adapter on a Bracket and stick that into the Celeron.

I’m glad I did this since this build-out required a LOT of experimentation.  I built up the system mostly as normal but the first deviation from the path was in the partitioning.  I made explicitly sure to make the first partition the /boot partition.  That had to stay under 1gb I believe but I kept it at 100mb since I figured that was all I needed.

Next, I used lilo.  In lilo, I did a couple of tricky things.  One of which was to use “linear” mode.  All these years I wondered what exactly that meant but now I know.  It’s a mode used for bioses that don’t support aalternate geometries such as LBA mode.  To be honest, I don’t think I really needed that setting on the Libretto 110ct but I’m positive that it’s necessary for a Libretto 50ct to boot a “disk” larger than a gig or so.  Also in lilo.conf, I specified some undocumented kernel features.  Let me print it here and then I’ll explain:

#lba32
# If lba32 do not work, use linear:
linear

# MBR to install LILO to:
boot = /dev/sda
install = /boot/boot-menu.b   # Note that for lilo-22.5.5 or later you
# do not need boot-{text,menu,bmp}.b in
# /boot, as they are linked into the lilo
# binary.

menu-scheme=Wb
prompt
# If you always want to see the prompt with a 15 second timeout:
timeout=150
delay = 50
# Normal VGA console
# vga = normal
# VESA console with size 800x480x24 (this warrants additional experimentation)
#vga = 0x808

image = /boot/bzImage-stable
root = /dev/sda5
label = Gentoo
append=”video=neofb:libretto”
image = /boot/bzImage
root = /dev/sda5
label = Test
append=”video=neofb:libretto”

So there it is, “video=neofb:libretto”.  That is one of the keys to making the framebuffer work on this system.  Someone already did the hard work for me of putting the necessary 110ct setting straight into the linux kernel for me.  I just wish they had documented it somewhere so I didn’t have to go digging through kernel code to find that.

Beyond lilo, the kernel config is also somewhat notable.  I’m running the 3.0.6-gentoo kernel on here which is the newest currently available.  My .config is definitely not optimized to the point it needs to be but it’s certainly a good starting point.  I would only suggest using it with the identical kernel version.  If not, I would only use it as a guide.  Mainly there is the Yenta PCMCIA, Neomagic Framebuffer, Generic PATA and some other tweaks.  Just read the config.

Next bit of secret sauce is in the xorg.conf.  That drove me (and some friends) completely nuts.  Partially because I tried to get too clever and compile dwm without xinerama.  That used to work, now it doesn’t.  Here is the xorg.conf I’m using:

Section “ServerLayout”
Identifier     “X.org Configured”
Screen      0  “Screen0” 0 0
InputDevice    “Mouse0” “CorePointer”
InputDevice    “Keyboard0” “CoreKeyboard”
EndSection

Section “Files”
ModulePath   “/usr/lib/xorg/modules”
FontPath     “/usr/share/fonts/misc/”
FontPath     “/usr/share/fonts/TTF/”
FontPath     “/usr/share/fonts/OTF/”
FontPath     “/usr/share/fonts/Type1/”
FontPath     “/usr/share/fonts/100dpi/”
FontPath     “/usr/share/fonts/75dpi/”
EndSection

Section “Module”
Load  “extmod”
Load  “dbe”
EndSection

Section “InputDevice”
Identifier  “Keyboard0”
Driver      “kbd”
EndSection

Section “InputDevice”
Identifier  “Mouse0”
Driver      “mouse”
Option        “Protocol” “auto”
Option        “Device” “/dev/input/mice”
Option        “ZAxisMapping” “4 5 6 7”
EndSection

Section “Monitor”
Identifier   “Monitor0”
VendorName   “Monitor Vendor”
ModelName    “Monitor Model”
HorizSync    31.5-48.5
VertRefresh  56-72
#    ModeLine     “800×480” 40 800 864 928 1088 480 481 484 509 -hsync -vsync
#       ModeLine     “800×480” 31.5 800 860 940 1000 480 508 511 525 -hsync -vsync
#    ModeLine     “800×480” 36.769 800 848 896 1120 480 508 511 525
#    HorizSync    25-75
#    VertRefresh    50-75
DisplaySize 160 100
EndSection

Section “Device”
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: “True”/”False”,
### <string>: “String”, <freq>: “<f> Hz/kHz/MHz”,
### <percent>: “<f>%”
### [arg]: arg optional
Option      “ShadowFB”    “off”           # [<bool>]
Option      “PCIBurst”    “off”
#Option     “Rotate”                 # <str>
#Option     “fbdev”                  # <str>
#Option     “debug”                  # [<bool>]
Identifier  “Card0”
Driver        “neomagic”
Option “DisplayHeight480”
#    Driver      “vesa”
BusID       “PCI:0:4:0”
Option “override_validate_mode”
Option “XaaNoScanLineImageWriteRect”
Option “XaaNoScanLineCPUToScreenColorExpandFill”
EndSection

Section “Screen”
Identifier “Screen0”
Device     “Card0”
Monitor    “Monitor0”
DefaultDepth 16
SubSection “Display”
Depth     16
Modes “800×480”
EndSubSection
SubSection “Display”
Viewport   0 0
Depth     24
EndSubSection
EndSection

Fair warning, I’m not sure if this is totally optimal but it seems to do the trick for me.  Here is the make.conf I’m using now which also may not be optimal:

# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS=”-O2 -march=i486 -pipe”
CXXFLAGS=”${CFLAGS}”
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST=”i486-pc-linux-gnu”

USE=”X mmx png python fbcon jpeg tiff xorg dri -minimal udev hal -evdev -alsa -pppd
-introspection -cairo ssl gtk ncurses -ipv6 -kde -gnome xinerama -test -savedconfig
-selinux -doc -static-libs crypt -pm-utils”
VIDEO_CARDS=”neomagic fbdev vesa”

At this point, I see no reason to leave the fbdev and vesa in the video cards section.  Some of the other flags are a bit random as well but at the moment, they are getting the job done.  Here is my current world file (for the curious):

app-admin/eselect
app-admin/syslog-ng
app-editors/vim
dev-lang/perl
dev-libs/glib
dev-vcs/subversion
net-analyzer/dsniff
net-analyzer/netcat
net-analyzer/nmap
net-analyzer/tcpdump
net-analyzer/traceroute
net-irc/ircii
net-irc/irssi
net-misc/dhcpcd
net-misc/ntp
net-misc/socat
net-wireless/wireless-tools
net-wireless/wpa_supplicant
sys-apps/pciutils
sys-apps/pcmciautils
sys-boot/grub
sys-boot/lilo
sys-devel/distcc
sys-devel/libperl
sys-kernel/gentoo-sources
sys-power/acpi
sys-process/vixie-cron
www-client/dillo
www-client/links
www-client/lynx
x11-base/xorg-server
x11-base/xorg-x11
x11-misc/dmenu
x11-terms/eterm
x11-terms/rxvt
x11-terms/st
x11-terms/xterm
x11-wm/dwm
x11-wm/fluxbox
x11-wm/twm

Some of the tools are for experimentation, others are requirements.  Another notable thing is my default runlevels:

lrwxrwxrwx 1 root root   18 Jan 15  1990 dhcpcd -> /etc/init.d/dhcpcd
lrwxrwxrwx 1 root root   15 Nov  6 14:39 gpm -> /etc/init.d/gpm
lrwxrwxrwx 1 root root   17 Oct  8 08:50 local -> /etc/init.d/local
lrwxrwxrwx 1 root root   16 Nov 13 12:37 ntpd -> /etc/init.d/ntpd
lrwxrwxrwx 1 root root   21 Oct  8 17:11 syslog-ng -> /etc/init.d/syslog-ng
lrwxrwxrwx 1 root root   22 Oct  8 17:11 vixie-cron -> /etc/init.d/vixie-cron
lrwxrwxrwx 1 root root   26 Nov  6 14:21 wpa_supplicant -> /etc/init.d/wpa_supplicant

Notice ntpd, dhcpcd and wpa_supplicant.  I’m using wpa_supplicant to do all wifi configuration.  It seems to work very slick and for any type of network I want now that I figured it out.  Here is a sanitized version of what I put in the /etc/wpa_supplicant/wpa_supplicant.conf file:

#WPA1/2 with passphrase
network={
ssid=”anotherlinksys”
psk=”password”
}

#WPA1/2 with passphrase
network={
ssid=”myrouter”
psk=”password”
}
#WEP with passphrase
network={
ssid=”TheAirlock”
key_mgmt=NONE
wep_key0=”the airlock rules!”
wep_tx_keyidx=0
}
#WEP hex key
network={
ssid=”linksys”
key_mgmt=NONE
wep_key0=0123456789
wep_tx_keyidx=0
}

You can have as many networks as you want in there and it seems to automatically jump to the best one.  Now, I wouldn’t actually need the wireless-tools package at all except for what I’m doing next.  In order to put proper status in the bar on dwm, I did a little .xinitrc scripting:

#!/bin/sh

ntpdate pool.ntp.org &

while true
do
LOCALTIME=$(date +%A” “%D” “%I:%M%p)
RAM=$(free -m | awk ‘/cache:/ { print $4″M Free” }’)
BAT=”Bat. $(acpi -b | awk ‘{print $4 ” ” $5 }’ | tr -d ‘,’)”

xsetroot -name “$BAT | $LOCALTIME | $RAM”

sleep 15s

ROUTER=$(iwconfig wlan0 | awk ‘/ESSID:/ { print $4″ ” }’ | tr -d ‘ESSID:”‘)
SIGNAL=$(iwconfig | awk ‘/Quality=/ { print $2 }’ | tr -d “Quality=”)

xsetroot -name “Access point: $ROUTER | Strength: $SIGNAL”

sleep 10s
done &

#startfluxbox
dwm

This flashes between two status displays.  The first stays on the screen for 15 seconds.  It looks like this:

Bat. 100% | Thursday 11/17/11 12:56AM | 15M Free

The second stays up for 5 seconds and looks like:

Access Point: linksys | Strength: 29/70

None of it is rocket science but I was rather pleased with myself.  It also makes dwm WAY more friendly.  I’m convinced that dwm is the best window manager for the Libretto 110ct because it’s the lightest I know of and makes the absolute best use of the screen real estate.  I would urge you to give it a try.  If you don’t like it, fluxbox is another great choice.

All in all, I’m certain there is more experimentation to be made.  BTW, udev is required to recognize pcmcia cards so don’t get the stupid idea I had to pull it out.  Speaking of which, I’m using a D-Link DWL-G650 wifi card which is atheros 5k-based.  It seems pretty stable overall.  One thing that does not seem 100% is the power management.  I think it has led to a couple of lockups for me.  Mainly when plugging and removing AC power but certainly not always.

Bottom line…  How many other modern, fully patched and up-to-date operating systems do you think would run on an ancient laptop like this?  Not many.  Next task is to get X forwarding and distcc working.  Then I’ll be off to hack the gibson…



If you like the content on this site, please support it by using this link to order from Amazon. You know you were going to go there and buy stuff anyhow so why not help me pay the hosting bill.