miniPCI card hacking
or, why HP sucks
introduction
In 2004, I became the proud owner of a brand new HP laptop. Naturally I immediately installed Linux on it, only to discover that the wireless card (based on a Broadcom chipset) wasn't natively supported. I decided to replace it with an Atheros-based miniPCI card. I booted up the machine and was greeted with an 'unauthorized device' message.
On the internet I found that other people had this problem as well. It turns out that certain HP laptops check the PCI ID of the miniPCI card against a table of 'valid' ones in the BIOS, refusing to boot if the ID isn't found. The lockout isn't for any real reason - HP themselves would like to sell you a 'valid' wireless card at an exorbitant price. We're not going to stand for this crap here.
Various websites describe ways to modify the BIOS image to contain the desired ID and flashing the BIOS. Unfortunately, when I tried this, the computer refused to boot; after it was repaired under warranty and returned, I decided a hardware hack might be safer.
As a side note, this modification is largely unnecessary these days as Linux now natively supports most common wireless chipsets. The Broadcom chipset in this laptop's original wireless card may be used with the b43 driver, included with the Linux kernel.
wireless card? what wireless card?
The hack used first tricks the BIOS into believing that there is no wireless card inserted. The PCI specification describes a pin called IDSEL that can be used for this. Disconnecting IDSEL will safely make it appear as though no card is inserted.
IDSEL is pin 48 of the card. This pin was located and covered with a tiny strip of tape, and neither the BIOS nor Linux recognized the existence of the card on boot. Then the trace to the IDSEL pin was cut, yielding the same result. This is promising.
Of course, it's no good if the wireless card isn't recognized by Linux, so a normally closed pushbutton switch was soldered between the pin and the disconnected trace. Holding down the switch on boot hid the card from the BIOS; releasing it as GRUB loaded revealed it to Linux. Success.
don't actually do it
Let's be honest here, this is an ugly and potentially risky hack. The switch would have to stick out of the laptop case were it to be used in actuality. One alternative is to use a 555 timer as a delay to reconnect IDSEL after the BIOS is done probing the PCI bus. We did not implement this, but Joshua's writeup has some photos of the 555 timer hack as implemented by another enterprising individual.
But it worked, and that's what matters, right?