Installing OpenBSD 5.7 on a Toshiba Satellite 4060XCDT laptop

I had been running Debian on this aged laptop for a while now, but two things happened which made me replace Debian with OpenBSD. The first was the upgrade from wheezy to jessie. While the upgrade worked fine, X would no longer function; just a garbled screen. The second problem was that I ran out of disk space to back up the music files from amber, so I would need to repartition. Well, if I was going to do that, I might as well see if OpenBSD would work on such an old platform.

I tested the latest OpenBSD version, 5.7. While it booted OK, the ethernet card, a Xircom Realport R-100, was not detected. Hmmm. I tried much older version of OpenBSD, 4.3, for which I had a live boot CD hanging around. That did detect the card. Maybe ACPI was the problem (my usual first suspicion in cases like this). I rebooted from the 5.7 CD, this time, entering

  boot -c

at the boot> prompt. This drops into the kernel editor, which prompts with ukc>. Turning off acpi is performed by:

  disable acpi
  quit

Ah, very good, The Xircom card was now recognised, so I went ahead and installed OpenBSD on the laptop. However, the card didn't work. As usual, someone smarter than me had encountered and fixed the problem. In this case, the fix was described at monkey.org. The problem is that the card is seen twice, once at phy 0 and again at phy 16.

  xe0 at pcmcia1 function 0 "Xircom, CreditCard 10/100, CE3-10/100"
      port 0xa000/16: address 00:10:a4:c4:7a:c9
  ukphy0 at xe0 phy 0: Generic IEEE 802.3u media interface
  ukphy0: OUI 0x00057d, model 0x0000, rev. 0
  ukphy1 at xe0 phy 16: Generic IEEE 802.3u media interface

The fix in the post is to change to kernel configuration to force the kernel to use phy 16. Wonderfully, it is possible to edit the kernel to make this change without having to recompile the kernel. This uses the config facility:

  $ config -e -o bsd.new /bsd
  ukc> disable acpi
  ukc> change ukphy
  change [n] y
  phy [-1] 16
  flags [0] <take default>
  ukc> quit

Then moved the original /bsd kernel to bsd.old and renamed bsd.new to bsd and rebooted. Now we see:

  xe0 at pcmcia1 function 0 "Xircom, CreditCard 10/100, CE3-10/100"
      port 0xa000/16: address 00:10:a4:c4:7a:c9
  OUI 0x00057d model 0x0000 rev 0 at xe0 phy 0 not configured
  ukphy0 at xe0 phy 16: Generic IEEE 802.3u media interface
  ukphy0: OUI 0x00057d, model 0x0000, rev. 0

And the card now works.