Running Gentoo on the

compaq presario r3000

Note: The actual model name of my laptop is Compaq Presario R3210CA. There are several models by Compaq and HP that are similar, and are collectively called the R3000 series...

I'm an impulsive person. One day I was sitting there thinking "I need a Laptop", so I went to Staples to see what they had, and ended up looking at the Compaq Presario R3000. The fellow at Staples said they had none in stock but he could order it from Kelowna and have it there in a couple days. But I'm impulsive, so I went to Radio-Shack accross the road and bought the same model there. What is the point of this? Well none really except that sometimes I wish I had spent a bit more time looking for a laptop more compatible with Linux. Not that the Compaq is shite, it's just, well, difficult on some points.

I first tried installing Arch Linux on this thing, because although I usually use Gentoo I didn't want to be screwing around with a 15 hour install. Not surprisingly, although the install went fine, I had only a command line. X wouldn't work, and the computer would only run at 800Mhz. Let me state here that this is the first laptop I have ever owned, so I had no idea about cpufreq, touchpads and pcmia cardbus bridges. I booted up a Knoppix livecd, and it worked surprisingly well. I used this to figure out what the hell modules I needed and so forth. I also reinstalled Ubuntu Linux on the laptop, and Ubuntu nailed pretty much everything (except wireless) out of the box, so to speak. So I used Ubuntu for a couple of weeks, but gave up because of large amounts of cruft, and Ubuntu's lack of documentation aimed at power-users (rather than end-users). Anyway, I decided to use my new found knowledge of my hardware (provided by Knoppix and Ubuntu) and retry with Gentoo.

So anyway, here is my guide to installing Gentoo on the Compaq Presario R3000....

hardware specs

I/O ports:

Here is the output of lspci:

0000:00:00.0 Host bridge: nVidia Corporation nForce3 Host Bridge (rev a4)
0000:00:01.0 ISA bridge: nVidia Corporation nForce3 LPC Bridge (rev a6)
0000:00:01.1 SMBus: nVidia Corporation nForce3 SMBus (rev a4)
0000:00:02.0 USB Controller: nVidia Corporation nForce3 USB 1.1 (rev a5)
0000:00:02.1 USB Controller: nVidia Corporation nForce3 USB 1.1 (rev a5)
0000:00:02.2 USB Controller: nVidia Corporation nForce3 USB 2.0 (rev a2)
0000:00:06.0 Multimedia audio controller: nVidia Corporation nForce3 Audio (rev a2)
0000:00:06.1 Modem: nVidia Corporation: Unknown device 00d9 (rev a2)
0000:00:08.0 IDE interface: nVidia Corporation nForce3 IDE (rev a5)
0000:00:0a.0 PCI bridge: nVidia Corporation nForce3 PCI Bridge (rev a2)
0000:00:0b.0 PCI bridge: nVidia Corporation nForce3 AGP Bridge (rev a4)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] \ 
                 HyperTransport Technology Configuration
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] \
                 Address Map
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] \
                 DRAM Controller
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] \
                 Miscellaneous Control
0000:01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 420 \
                 Go 32M] (rev a3)
0000:02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. \
                 RTL-8139/8139C/8139C+ (rev 10)
0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g \
                 Wireless LAN Controller (rev 03)
0000:02:04.0 CardBus bridge: Texas Instruments PCI1620 PC Card Controller (rev 01)
0000:02:04.1 CardBus bridge: Texas Instruments PCI1620 PC Card Controller (rev 01)
0000:02:04.2 System peripheral: Texas Instruments PCI1620 Firmware Loading Function \
                 (rev 01)

installing gentoo

Being a masochist I decided to do a stage 1 install. If you have used Gentoo before then there isn't much to tell you about this, just follow the handbook, and you will do fine. The key point is where you build yourself a kernel. You can be a chicken and use genkernel to build and install a kernel with 'everything', or if you are like me you will want to build a kernel with only the drivers you need. You can have a glance at my kernel config file (and use it to run 'make oldconfig') or just follow along here. My configuration is for a 2.6 kernel (2.6.9-gentoo-r12 specifically) which you can obtain by running

# emerge gentoo-dev-sources

Note: this command will bring in a newer kernel version now.

Here is a brief tour of the drivers you will want:

frequency scaling:

Driver name: AMD Opteron/Athlon64 PowerNow! [CONFIG_X86_POWERNOW_K8]
Module name: powernow-k8
Notes: The cpufreq is a bit misleading, as you need to use the powernow-k8 driver, even though this is a 32 bit Athlon XP-M, and not an Opteron like some of the similar models. I suppose this is because of the K8 host bridge. I decided on the 'performance' governor myself, though of course you are free to use whichever you like.

Ethernet:

Driver name: RealTek RTL-8139 PCI Fast Ethernet Adapter support [CONFIG_8139TOO]
Module name: 8139too
Notes: This is a pretty standard chip on ethernet cards. Works fine.

Audio:

Driver name: Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111 [CONFIG_SND_INTEL8X0]
Module name: i810_audio
Notes: I decided to use ALSA. Don't forget to build 'soundcore' as a module or ALSA will complain/be confused.

USB 1.1:

Driver name: OHCI HCD support [CONFIG_USB_OHCI_HCD]
Module name: ohci_hcd
Notes: Nothing special here.

USB 2:

Driver name: EHCI HCD (USB 2.0) support [CONFIG_USB_EHCI_HCD]
Module name: ehci_hcd
Notes: Nothing special here. Don't forget 'usbcore' or drivers for any external drives you may have.

That is certainly not the definitive list, just the modules that drive my laptop specific hardware. You will also want to support the following, either as modules or built in:

I made the AGP drivers as modules because when you have the binary nVidia driver installed it prefers to use its own AGP interface. Also, make sure to _unselect_ 4kb stack size in the "kernel hacking" section. If you don't use an 8kb stack then the aforementioned video driver won't work. The parallel port support is a module because I don't expect I will use it all that much if at all. I haven't used it yet, but of course your uses may be different. CONFIG_NET_RADIO is needed for wireless support. Please do accept all the other default options unless you know what you are doing ;) and don't forget to add support for the various other filesystems et al that you require according to your own setup. And if you are using gentoo, don't forget to add the Gentoo specific kernel options (read the guide).

Now build your kernel and finish with the install guide. Hopefully it works! At this point I played around a bit on the command line, and made sure the cpu frquency scaling would work.

# grep MHz /proc/cpuinfo
cpu MHz         : 798.316
# modprobe powernow-k8
# grep MHz /proc/cpuinfo
cpu MHz         : 1595.810

Good stuff! The interface to configure cpufreq is in /sys/devices/system/cpu/cpu0/cpufreq. Here you will find some psuedofiles, the values will depend on which default governor you chose. You can 'edit' these files by echoing values into them:

# cd /sys/devices/system/cpu/cpu0/cpufreq
# ls -1 
cpuinfo_cur_freq  
cpuinfo_max_freq  
cpuinfo_min_freq
scaling_available_frequencies
scaling_available_governors
scaling_cur_freq
scaling_driver
scaling_governor
scaling_max_freq
scaling_min_freq
# cat scaling_max_freq
800000
# echo "1600000" > scaling_max_freq
# cat scaling_max_freq
1600000

It is pretty simple to get the hang of. There are also some cyptic docs available in the directory /usr/src/linux/Documentation/cpu-freq/.

So at this point I have my processor running at full speed, which means it's time to install some apps. I prefer to emerge a whole whack of apps in one shot then just go to bed, as you wake up to a nice useable X desktop. In this case I ran:

# emerge -pv xorg-x11 fluxbox xmms mplayer gftp cdparanoia coldplug hotplug eterm ethereal gimp libdvdcss libdvdread oggenc lame nmap win32codecs xpdf mozilla-firefox bind-tools

You can emerge whatever you want here, the point is just to drag in as many dependencies as possible to keep portage busy. When I woke up in the morning I went to work on my Xorg config.

xorg configuration

Typically I like to just run xorgconfig to build a skeleton xorg.conf file, and go from there, so that's what I did. You can download my xorg.conf if you want. I have to warn you though ... this probably isn't the best xorg.conf in the world.

stats

It is Friday May 09, 2008 8:28 am
This page served 11323 times
This page last modified: April 14, 2008 11:28 am
Your IP address is: 38.103.63.18
You are browsing using: CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
You are browsing from: United States.
badcomputer.org's uptime: 08:28:45 up 15 days, 09:10, 1 user, load average: 0.01, 0.02, 0.00

local

home | unix stuff | dir2ogg | sneetchalizer | wmainfo | q&d guide to permissions | q&d guide to tar and gzip | code | MS rant | browser shootout | linux & iAudio X5 | photos | music | programming poetry | sieve of Eratosthenes | plea | rain | suffer | archive | about | recipes | compaqr3000 | sitemap

credits

hacker emblem

This page, and all pages on this site were created and are maintained by Darren Kirby using valid XHTML 1.0 and CSS, and are ©copyright 2002 - 2008. The Penguin image was created by Tukka, and is used by permission. Inspiration for the look of this site was provided by Eric A. Meyer's CSS gallery. This website runs on Gentoo Linux. It is served by Apache. PHP and MySQL hold together the backend.

advertisement