Saturday, March 26, 2005

Open Source Hardware

Neuros Audio is a geekware (mp3 players, mpeg recorders) company which opens up specs of all of its products.

How on Earth isn’t this more common? The same guys that hack open source are prone to hacking hardware. From that fact to finding that opening up specs may provide you with a market advantage is a very straight very short line.

Naturally, if you’re Sony or Apple, opening up specs to the DSC-T33 or the iPod will just mean endless copies of those will now popup from China. On the other hand, if you’re starting off a basement with half a dozen friends, OSS and OSHardware will mean a much better engineered product and a legion of supporters.

Posted by K at 13:04:44 | Permalink | Comments (1) »

Saturday, May 1, 2004

Gentoo Linux on the IBM Thinkpad R40

Yes, yes. I got myself a new toy … er … a new Laptop. It’s an IBM Thinkpad R40. I’m pleasantly surprised that most of the hardware runs perfectly on Linux, something unimaginable just a couple years ago. Anyway, getting all of it to work with the geek-oriented Gentoo distro is a saga worth of reference. If you have a Thinkpad, it’s probably interesting to review my steps.

Before you start

Don’t boot the computer into windows. The Thinkpad comes preinstalled with Windows XP. The XP partition uses all of the available disk, which is incompatible with running Linux on dual boot. It’s necessary to resize it. Before the first boot, the partition is a FAT32 partition, and will be converted to NTFS on the first windows boot. FAT is a much more documented filesystem than NTFS, so resizing tools are much more stable.

In case you did boot the first time, press the “Access IBM” button on startup, and select “Recover to factory contents”. When the recovery software asks for a reboot, do a hard reboot (power-off and then power-on), so the “Access IBM” button gets re-enabled, and then proceed to the next step.

If you already have windows installed, and don’t want to bork the install, have a look at NTFS resizing tools, like ntfsresize or QTParted. Most of these tools are less than perfect, so backup backup backup. You have been warned!

Boot into the Gentoo LiveCD

Get and burn the Gentoo install CD you wish to use. Follow the Gentoo Installation Handbook for choosing one. To boot from the CD, press the “Access IBM” blue button when the IBM logo appears. Select “Startup” and then the CD-ROM as your boot device.

Install Gentoo as usual

Follow the Gentoo install procedure. When it comes to defining your partitions, use parted to reduce the FAT32 partition. Then proceed as the manual tells you to.

Before running parted, run fdisk on /dev/hda and print out the partition table. Take note of the last cylinder of the FAT32 partition. This is the last usable cylinder. From here on is an undeclared partition containing service data for the “Recover to factory contents” procedure. Afterwards, when setting up partitions, don’t use cylinders over the previous FAT32 last cylinder.

If the FAT32 partition is too small, the “Recover to factory contents” procedure won’t work in the future. I set mine to 12GB. It should work with a 10GB partition [1]. The “Recover to factory contents” won’t touch your Gentoo install, except for overwriting the Master Boot Record. If you do run the procedure, you’ll need to reinstall the Linux bootloader (usually grub).

The command to resize the partition with parted is:

parted /dev/hda resize 1 0.031 12000

Note that this may change with laptop model versions, so I don’t guarantee it works on every R40. Check current table with parted, and read parted help on the GNU site.

Gentoo fails detection of the eepro100 ethernet card. It finds the firewire interface and assumes one interface is all you need. Just run:

modprobe eepro100
net-setup eth1

When compiling the kernel, grab my .config. This is from a 2.6.6. Just place it into /usr/src/linux and run ‘make oldconfig’. It’ll be configured with all the necessary drivers. Proceed with compilation as usual.

When setting up grub, remember centrinos don’t have floppies. It’s quicker to pass –no-floppy to grub, to avoid waiting for auto-detection to fail. From then on, follow the handbook’s instructions

Major compilation step ahead

After finishing the handbook, you should have a basic console based linux system. This is a desktop machine, so we’re far from done with. Go for a full emerge (overnight ;-):

emerge vim xfree windowmaker   \\
 gnome kde openoffice-bin   \\
 mozilla-firefox mozilla-thunderbird   \\
 eterm gaim tuxracer freeciv grip   \\
 xmms xine gimp

plug the power cord in, and go to sleep.

Major compilation step ahead

Wake up. Refreshed, go on configuring your fresh new Gentoo system.

Grab my /etc/X11/XF86Config-4. You may need to fiddle with the resolution (there are 1024×768 and 1400×1050 R40 variants). Use xf86cfg to edit the config.

Set DISPLAYMANAGER to gdm in /etc/rc.conf

Add xdm to the default runlevel:

    rc-update add xfs default
    rc-update add xdm default
    /etc/init.d/xdm start

Login as root, naturally select Windowmaker as the window manager. You should have a really usable linux system by now. Office tools, multimedia tools and internet access. Now, for the specific laptop hardware.

Centrino Wireless Drivers

To get the Centrino Wireless card working, I used the Intel drivers[6]. These are still under development, but I preferred this solution to using windows drivers over an adaptation layer (ndiswrapper). They work flawlessly. I was unable to install using the ebuilds in portage. However, it’s rather easy building from source. The only obstacle I found is that with newer 2.6 series kernels, you have to configure at least one module, so that /usr/src/linux/Module.symvers gets built (if you used my .config above, don’t worry about it).

After getting the drivers built, just insert the ipw2100 kernel module. You now have a second ethernet card (eth1). Configure it as indicated in the Gentoo Installation Handbook.

APM hibernation

I opted for APM instead of ACPI, since I’ve found lots of reports of flakiness of ACPI on Thinkpads. APM seems to work rather well. APM hibernation to RAM works out of the box (Fn-F4). There are a couple of driver issues:

The X server will sometimes hang after resume. Turning the LCD off and on again does the trick (Fn+F7 twice)

The USB mouse is unresponsive after resume. This is an X problem, since the /dev/input/mouse3 produces output when moving the mouse. Two workarounds: either unplug the mouse before suspending, or switch between virtual terminals after resuming. One more automatic solution could be installing apmd, have USB compiled as a module, and forcefully remove the module and reinsert it on resume. I may look into this option.

I haven’t even tried to get hibernation to disk, but it’s reported as feasible [4].

IrDA communication with my Nokia 6100

Winmodem

I don’t have a need for the modem, so I haven’t set it up. Instructions are here:
http://www-306.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-52698

References

References:
[1] Redhat 9 on an IBM Thinkpad G40, http://www.haviker.co.uk/tp/ , Dec 2003, Kieran
[2] http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml
[3] Linux on the IBM ThinkPad R40 laptop, http://www.luth.obspm.fr/~luthier/gourgoulhon/ThinkPad/ , Eric Gourgoulhon
[4] Linux on the IBM R40 2722-GDG, http://www.enseeiht.fr/~queinnec/ibm-r40.html , Philippe Queinnec
[5] Software and Device Drivers - ThinkPad R40, R40e, http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-46024#INF
[6] Intel PRO/Wireless 2100 Driver for Linux, http://ipw2100.sourceforge.net/
[7] http://bugzilla.kernel.org/show_bug.cgi?id=1415

Links

http://tpctl.sourceforge.net/tpctlhome.htm#description

Posted by K at 00:41:52 | Permalink | Comments (12)

Tuesday, April 6, 2004

The iPod is (almost) Penguin-friendly

penquinWithIPod
Now that it is hackable, I might just have to get me one of these. Linux on the iPod seems have reached the stage where it practically replicates the functions of the original firmware:
Posted by K at 14:05:41 | Permalink | Comments (2)

Thursday, March 18, 2004

Dating Services, Social Networks and Bluetooth

Really, this is just a cross of the trend that Manuel spotted on social networking services turning into dating services, with the social effect André already noted about bluetooth-enabled phones in bars:

in New Scientist via Eurekalert
YOU might pass the love of your life in the street and never know. But what if your cellphones had exchanged photographs and a few crucial details that suggested you were a match as soon as you were within a few metres of each other?

Posted by K at 12:56:35 | Permalink | No Comments »