Compaq TC1000 Restoration

I obtained the tablet from eBay in late March 2021. Came complete with keyboard, case, and a power supply. Boots into Windows XP Tablet Edition. Internet Explorer won't load most web sites and it would be a bad idea to use it anyhow. The battery does not seem to be charging.

Can I Expand the Memory?

There is one easily-accessible RAM (204 pin SO-DIMM) module that you can reach through a panel in the back. There is another 256MB module (200-pin SO-DIMM) buried under the motherboard and it is a chore to access it. Obtained three different replacements (512MB, 1GB) for the 256MB module, but the computer would not boot with them. It's possible that the maximum RAM size for this machine is 768MB.

I managed to short the board while testing different memory modules. Fortunately, it only took out a small cable connecting the power switch assembly to the motherboard, and I was able to obtain a replacement.

Power Supply Shenanigans

After a time, the power supply burned out. I pulled a Targus Universal Charger out of storage and attached a tip that supplied the same voltage (15V) as the power supply. A week later I realized that the TC1000 wants the more common 19V and switched to the correct tip. That explains why the battery hadn't been charging!

Attaching an SSD

Ordered a 128 mSATA SSD card and an IDE to mSATA adapter, and used old versions of gparted live (0.24.0-2-i586) to set up partitions and clonezilla (clonezilla-live-2.4.2-61-i586) to copy the old version of Windows to a partition on the SSD. Newer versions of these utilities required either an i686 CPU or an i586 with PAE. While the Transmeta Crusoe is roughly equivalent to an early Pentium, the the Transmeta Crusoe does not support CPU capabilities needed by modern software.

Replacing the WiFi Card

TBD

Picking a Linux Distribution - Gentoo

I had been going through a lot of trial and error to find a Linux distribution that would install well on this machine. It is a challenge to find a Linux that will run on a 586-compatible without PAE or SSE2. I was able to get a few distributions to install, but many programs (including Firefox) would fail with an "illegal instruction" error. In order to expedite testing, I started using QEMU with these flags to approximate the limitations of this computer: -cpu pentium,+cmov. But in the end, Gentoo turned out to be the best bet, because everything is built from source.

With a CPU of this vintage, it would not be practical to compile all the binaries using the laptop itself. So I set up a virtual machine on another computer using VirtualBox, booted from the Gentoo x86 boot disk, and used a USB to IDE enclosure to mount the hard drive so I could perform the installation. Then I followed the instructions in the Gentoo X86 Installation Handbook, with changes to that process noted below, so be sure to read the following sections before you start the installation.

This is not a UEFI Machine

As you go through the Gentoo X86 installation handbook, you will occasionally find instructions for both UEFI and MBR-based systems. The TC1000 is MBR, so be sure to use the MBR instructions.

Configuring Portage (make.conf)

I used the following COMMON_FLAGS in /etc/portage/make.conf:

COMMON_FLAGS="-march=i686 -Os -mmmx -pipe -fomit-frame-pointer"

If you are using a virtual machine to do the initial install, you might want to set your MAKEOPTS to -jN (replace N with the number of processor cores you want to use for parallel compilation). But when you put the hard disk back into the Compaq TC1000, be sure to comment it out or set it back to -j1 since it has only one core. If you are planning to install X11, you can add these to make.conf as well:

ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"

USE="X alsa"

INPUT_DEVICES="libinput"

VIDEO_CARDS="nouveau"

When it came time to select a profile, I went with default/linux/x86/17.0/systemd, which is a minimal, systemd-based configuration that works as a good starting point.

Mask Some Packages to Avoid SSE2 Dependency

Even with compiling everything from source, I ran into a few dead ends that prevent me from running much modern software. There is a ton of stuff that relies on the rsvg library, which itself relies on the Rust programming language. There is a hard dependency on the SSE2 instruction set extension in Gentoo's Rust package. See this post for more details. You can force Gentoo to use an older version of rsvg that does not require Rust by creating the file /etc/portage/package.mask/librsvg with the following contents, which will mask all versions greater than 2.40.21

>gnome-base/librsvg-2.40.21

You should also completely mask rust, with the file /etc/portage/package.mask/rust with the following contents:

virtual/rust

nodejs has the same problem (see this post). This will prevent you from installing most web browsers. I could not find a version that would build, so I masked it going back all the way to the oldest-available version with a /etc/portage/package.mask/nodejs containing the following:

>net-libs/nodejs-12

Systemd or OpenRC?

I also opted to use systemd init instead of the default openrc. For some reason, I ran into more SSE2 dependencies with openrc than with systemd. The Gentoo installation instructions will eventually direct you to this page for details on installing Gentoo with systemd instead of openrc. But until you reach that point (as of this writing, this is where that happens), follow the X86 Installation Handbook.

However, because you won't be booting into a systemd-based system until later, you'll need to wait until after you've installed the bootloader to follow the Configuration section of the systemd article. That's because the Live CD installation image uses openrc.

X11

The Nvidia graphics controller worked well with the nouveau driver. I followed the instructions on this page to install and configure Xorg. This is definitely a process you'll want to run with the hard drive mounted on a faster computer, so it's OK to run this before the next steps.

Networking with Wi-Fi

A lot of the instructions you'll find for Linux Wi-Fi configuration assume that you're booting into a graphical desktop and that you'll connect to Wi-Fi after you've logged into the desktop. If you use emerge to install these tools, you can use the network manager command-line interface (nmcli) to configure networking:

net-misc/networkmanager

net-misc/dhcpcd

net-wireless/iw

net-wireless/wireless-tools

net-wireless/wpa_supplicant

The rest of the Wi-Fi configuration will need to wait until the drive is back in the TC1000 so that you can be in a systemctl-based system (and not a chroot running under the Live CD's openrc configuration).

Grub

If you've been using a virtual machine or secondary computer as staging, now is the time to shut it down and return the hard drive to the TC1000.

Next, boot the TC1000 from the Gentoo Live CD installation image, follow the chroot instructions to enter the chroot, and if you have boot on a separate partition, be sure to mount that after you enter the chroot.

If you are keeping the old Windows install intact, you'll want to install os-prober so grub can find the Windows installation. You will also need to edit /etc/default/grub and set GRUB_DISABLE_OS_PROBER to false before you run grub-mkconfig.

emerge sys-boot/os-prober

At this point, you can follow the systemd instructions for installing the Grub 2 bootloader. Because this is not an EFI machine, you should add --target=i386-pc to the grub-install command, as in:

grub-install --target=i386-pc /dev/sda

Wi-Fi, Continued

Now you will need to enable (and start) the network services needed to connect to Wi-Fi:

systemctl enable NetworkManager

systemctl start NetworkManager

systemctl enable wpa_supplicant

systemctl start wpa_supplicant

After that, you can use the nmcli utility to configure the network. This will make sure that Gentoo will connect to the network after booting:

TBD insert nmcli commands here

Finishing Up systemd Configuration

Now is a good time to return to the systemd configuration instructions.

Distcc

TBD (https://wiki.gentoo.org/wiki/Distcc)


Is There a Web Browser that Works?

While there is one web browser that can be compiled under this situation, NetSurf, the package is masked on this platform, but you can download and install it manually. It's lean, fast, and works pretty well, considering.

Can't We Emulate SSE2 Somehow?

Possibly! I came across the simde-everywhere project, which is designed to implement SIMD instruction set extensions such as SSE2, but I have not tried compiled Rust or Node.js against it.