hacker emblem

Kernel Configuration

Submitted by admin on Fri, 2005-08-05 14:07.
Warning: This kernel configuration on this page is by no means meant to be a universal one, but has only all the Thinkpad-specific options selected plus the ones that I deem necessary. So please check at least that the filesystem types that you are using are included, and of course also select all drivers for things like USB peripherals, etc.

First I installed the necessary packages to build the kernel from source with

apt-get install gcc make ncurses-dev

Then I downloaded the source code from the Linux Kernel Archives.

Used Patches

After extracting the compressed tar archive and studying the ThinkWiki a bit, I also applied some patches:

Kernel 2.6.12.x:

Kernel 2.6.14:

The trackpoint patch has been merged into the official kernel source code, so a patch is no longer needed.

Note: I tried suspend2-rc9 for kernel 2.6.14, but it gave me rather unplesant kernel oopses, which might be related to using the patches described on the Harddisk page. So better not try to run those alongside with suspend2 for now.

Kernel 2.6.15:

Configurating, Compiling and Installing the Kernel:

I used the menu configuration of the kernel via
make menuconfig
in the kernel source tree. Important settings to change are:
  • in "Processor type and features" select "Pentium M" for the processor familiy to optimize for the Pentium-M
  • in "Power management options (ACPI, APM)" enable ACPI (I don't use APM) and Software Suspend 2. Note: to use a newer version of the "IBM ThinkPad Laptop Extras" you have to compile it as module so it can be easily replaced later on.
  • enable CPU frequency scaling, select scaling governors ("ondemand" and "conservative" are the ones I use, but be sure to also select "userspace" if you want some external program like cpufreqd to do the frequency scaling) and enabe the processor driver for Centrino ("Intel Enhanced SpeedStep")
  • for the harddisk SCSI has to be enabled and in the low-level SCSI drivers section Serial ATA and "Intel PIIX/ICH SATA support" need to be selected
  • to get the kernel to recognize the CD-RW/DVD-RW I also needed to enable ACPI Plug'n'Play support (and of course the ATAPI/IDE CD-ROM driver)
My currently used kernel configuration (for each version of the kernel) is attached at the bottom of this page. Afterwards I compilied the kernel by issuing
make
and after switching to the root account I installed the kernel modules, the System.map file and the kernel image with
make modules_install
cp System.map /boot/System.map-2.6.12.3
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.12.3
Then I added a new entry in the GRUB menu file in /boot/grub/menu.lst:
title           Debian GNU/Linux, kernel 2.6.12.3
root (hd0,5)
kernel /boot/vmlinuz-2.6.12.3 root=/dev/sda6 ro video=vesafb,nomtrr,ywrap vga=836 acpi_sleep=s3_bios resume2=swap:/dev/sda5 processor.max_cstate=2 elevator=cfq

Note: not all of the kernel parameters are necessary, video and vga give a higher resolution in the text consoles (if the vesa framebuffer driver is compiled into the kernel), resume2 is for Software Resume 2, elevator=cfq selects a different scheduling mechanism more suitable for desktop use, acpi_sleep is needed to circumvent a problem with suspend-to-ram.

Since switching to SCSI-SATA also meant that the harddisk would be called /dev/sda after the reboot, I also changed all occurences of "/dev/hda" to "/dev/sda" in /etc/fstab.

One
init 6

later and I was running the shiny new kernel.

AttachmentSize
config-2.6.12.338.95 KB
config-2.6.1441.76 KB
printer-friendly version | add new comment

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by ZolnOtt on Wed, 2005-11-09 00:10.

Hello!

I tested suspend-to-ram and suspend2 and after suspend-to-ram with my hibernate.conf i got a oops too. Your config do not work with my box.

I have a T43.

CU
Michael

Submitted by admin on Wed, 2005-11-09 21:45.

seems not possibly atm, at least not at the same time, I ponder doing one kernel patched with suspend2 and one with the suspend-to-ram patches applied, since I need both occasionally, although the later is more important to me.

But I'm sure that once the suspend-to-ram stuff enters the vanilla kernels (and that's just a matter of time) both will work happily in combination.

BTW, can you give me any hints what exactly doesn't work with the config? (you mean the hibernate.conf, right?)

Submitted by b225ccc (not verified) on Wed, 2005-11-09 05:23.

thanks for posting your config file(s)!

Submitted by Esox (not verified) on Sat, 2005-11-19 13:19.

Hello,

thanks for you configs file. Just a note : You should say that they are written for ext3 FS, because I spent about 1 hour trying to understand why my system keeped on crashing, and it was because of my FS (Reiser) isn't included in the kernel in your conf file.

Submitted by admin on Sat, 2005-11-19 21:05.

if I caused you troubles... it's just that my configs are just meant to be a help for getting the Thinkpad-specific stuff up and runniing, and things like filesystems and of course also all used peripherals etc. are different for everyone. But I'll put a note of warning above the text. Smiling

Submitted by Michael Ott (not verified) on Sat, 2005-12-10 23:55.

Hello!

Can you write the grub config for kernel 2.6.14. I want to know, which is different to my config, Maybe i find the reason why suspend-to-ram crashs.

Submitted by admin on Sun, 2005-12-11 00:00.

the kernel line (which is probably the only interesting one) looks like:

kernel          /boot/vmlinuz-2.6.14.3 root=/dev/sda6 ro video=vesafb,nomtrr,ywrap vga=836 acpi_sleep=s3_bios resume2=swap:/dev/sda5 elevator=cfq ide1=noprobe libata.atapi_enabled=1

Submitted by Riccardo (not verified) on Mon, 2006-03-20 17:31.

Can you post a kernel config for 2.6.15?

Thanks

Submitted by admin on Tue, 2006-03-21 10:17.

just updated with "make oldconfig".

Submitted by Marco (not verified) on Fri, 2006-08-25 11:19.

Which patches are necessary for kernel 2.6.16?

Can you write your grub config for this kernel version?

Submitted by Marco (not verified) on Wed, 2006-08-30 15:51.

Any idea?

Thanks
Marco