Upgrading to linux-2.6.27-rc1

I recently upgraded my kernel to linux-2.6.27-rc1.

This was the first time I compiled a kernel on this distro (but not the first time I have compiled one).  Thankfully, the compilation had no problematic errors.  This write up is more for my benefit than for yours; nevertheless, I hope it will help you out.

What works

ipw3945->iwl3945, catalyst, usb, sound, cpufreq (with new cpufreq stats output)

Extra features (that I choose to compile in)

watchdog, 9p filesystem support




00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X1400
03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller
03:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
03:01.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)
03:01.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)
0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)


(If you haven’t) Clone the current stable git repository.

proj %   git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2-6

Initialise git variables / configuration (set username, email, enable colour, and improve performance for multicore systems)

proj %   git config --global user.name "Antony Jepson"
proj %   git git config --global user.email "email@gmail.com"
proj %   git config --global color.ui "auto"
proj %   git config --global pack.threads "0"
proj %   cd linux-2-6

Update local tree and make note of which changeset you are using.

linux-2-6 %   git pull
Already up-to-date.
linux-2-6 %  git whatchanged

I’m using commit 9cb7117fa4858468014f76bd996076985111e955.

Clean the tree.

linux-2-6 %   make mrproper && make clean

If you make a mistake it’s best to start fresh:

linux-2-6 %   git reset --hard origin/master

HEAD is now at 8f616cd Merge branch ‘for_linus’ of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Configure compilation options.

linux-2-6 %   vim Makefile
 223 HOSTCXX      = g++
 224 HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -march=prescott -mtune=generic -pipe

Configure the kernel

linux-2-6 %   zcat /proc/config.gz > .config
linux-2-6 %   make menuconfig

Apply patches and add them to git.

<apply patches, change files, etc.>

linux-2-6 %   git add <changed file(s)>
linux-2-6 %   git commit -a

Compile the kernel, install modules, build ramdisk, copy the new Systemmap, kernel, and .config, and rebuild module dependencies.

linux-2-6 %  make | tee 27rc1.log
linux-2-6 %  su
pts/4:root@GENTOO /home/antony/proj/linux-2-6 # make modules_install | tee 27rc1mod.log

Compilations within a git checkout will generate a long kernel versionstring, use `make kernelrelease` to make it easier.

mkinitcpio is distro specific (for Arch Linux).  Substitute your distro’s program here.

pts/4:root@GENTOO /home/antony/proj/linux-2-6 # mkinitcpio -k `make kernelrelease` -g /boot/kernel-2.6.27-rc1.img

See http://dirac.org/linux/system.map/ for more info.

pts/4:root@GENTOO /home/antony/proj/linux-2-6 # cp System.map /boot/System.map-2.6.27-rc1
pts/4:root@GENTOO /home/antony/proj/linux-2-6 # cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.27-rc1

The next step (copying the config) is optional as you should enable the option to create a copy at /proc/config.gz (IKCONFIG=y and IKCONFIG_PROC=y).

pts/4:root@GENTOO /home/antony/proj/linux-2-6 # install -D -m644 .config /boot/kconfig-2.6.27-rc1
pts/4:root@GENTOO /home/antony/proj/linux-2-6 # /sbin/depmod -A -v `make kernelrelease`

Configuring X.org.

Although Catalyst (8.5) worked out of the box, you may need to adjust your /etc/X11/xorg.conf.  I recommend using Xorg -configure and working from there.

pts/4:root@GENTOO /home/antony # mv /etc/X11/xorg.conf /etc/X11/xorg.conf_bak
pts/4:root@GENTOO /home/antony # Xorg -configure > /etc/X11/xorg.conf

Configuring Grub.

pts/4:root@GENTOO /home/antony/proj/linux-2-6 # vim /boot/grub/menu.lst
 36 title Arch Linux (2.6.27-rc1)
 37 root   (hd0,4)
 38 kernel /vmlinuz-2.6.27-rc1 root=/dev/sda7 ro vga=771
 39 initrd /kernel-2.6.27-rc1.img

Testing the kernel.

After you have copied the kernel to /boot, reboot and test it.  If it does not work, just boot your fallback kernel (you have one, right?) and try to identify the cause of the problem.

If the kernel works (well, might I add), clean the tree then commit your changes to the git repository.

linux-2-6 %   make clean
linux-2-6 %   git add .
linux-2-6 %   git commit -a


After a while, the flashing LED indicator for the iwlwifi driver becomes annoying.  Stop the blinking with:

pts/1:root@GENTOO /sys/class/leds 17:09 # echo 0 > iwl-phy0:{RX,TX,assoc}/brightness

One Trackback

  1. By Upgrading to linux-2.6.27-rc2 « AJ Online on 8 August, 2008 at 16:43

    […] through the usual compilation steps. See my post on upgrading to 2.6.27-rc1 for more […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: