Howto compile the 2.6.23 kernel for the Mac Pro

This is based on a post on ubuntuforums.org, extended with Mac Pro specific points for version 2.6.23 of the kernel. Tested under Ubuntu Gutsy.

  1. Start by becoming root, let's avoid sudo'ing all the time
    sudo bash
  2. Get all libraries and dependencies
    apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev libncurses5 libncurses5-dev subversion
  3. Change to /usr/src
    cd /usr/src
  4. Download the 2.6.23 kernel source
    wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2
  5. Unpack the kernel source
    tar -xf linux-2.6.23.tar.bz2
  6. If this is not the first time you're compiling a kernel, remove the old symlink
    rm -rf linux
  7. Set the new symlink to version 2.6.23
    ln -s linux-2.6.23 linux
  8. Get the mactel-linux kernel patches
    svn co https://mactel-linux.svn.sourceforge.net/svnroot/mactel-linux/trunk/kernel/mactel-patches-2.6.23
  9. Go into the patch directory
    cd mactel-patches-2.6.23
  10. Apply the patch
    ./apply /usr/src/linux
  11. Change to the kernel source directory
    cd ../linux
  12. Download my custom .config file from the attachment of my post or from here and unzip it and drop it into /usr/src/linux
    unzip config.zip
    rm config.zip
  13. If this is not the first time you're compiling the kernel, make sure everything is nice and clean
    make-kpkg clean
  14. Do the compiling and packaging
    make-kpkg -initrd kernel_image kernel_headers modules_image
  15. Change to /usr/src
    cd ..
  16. Install the generated packages
    dpkg -i linux-image-*.Custom_i386.deb

    dpkg -i linux-headers-*.Custom_i386.deb
  17. Edit /boot/grub/menu.lst and make sure, that 2.6.23 are the two first entries and remove the "splash" boot option.
  18. Get and install the latest release of "Envy" an excellent script to set up proprietary graphics card drivers.

    wget http://albertomilone.com/ubuntu/nvidia/scripts/ubuntu/envy_0.9.8-0ubuntu8_all.deb
    dpkg -i envy_0.9.8-0ubuntu8_all.deb

  19. Reboot
  20. Select the 2.6.23 rescue image to boot. We have to do this because the "envy" is only going to work when we have booted with the right kernel. If you'd choose the regular 2.6.23 image than it would have problems getting X up and running. So don't do it.
  21. When in the prompt, start the envy text interface.
    envy -t
  22. Select "Install Nvidia driver" for Nvidia or "Install ATI driver" for ATI. Wait a couple of minutes until it finishes.
  23. Reboot.
Done!

The following should work at this point:
  • fully accelerated graphics card drivers
  • sound (when plugged into the rear connector)

Known Issues (maybe someone has a good idea how to solve these?)
  • sound doesn't work when loudspeaker is plugged into the front connector
  • cpu frequency scaling (this is probably a kernel bug - very annoying as the CPU core temperatures are much higher this way)
  • cpu fan control (they are set to 500RPM, doesn't matter how hot the CPU gets - this is very dangerous for CPU-intensive tasks!)

Posted byvfxdude at 4:46 PM  

4 comments:

Anonymous said... October 26, 2007 at 9:31 AM  

I registered to ubuntuforums but I cannot get the file to download. Could you make it available somewhere else?

Thank you.

vfxdude said... October 26, 2007 at 10:54 AM  

Thanks for letting me know. I've added another alternative to download the .config file.

http://files-upload.com/files/581996/config.zip

Please let me know how it goes.

santi said... November 22, 2007 at 9:51 AM  

Hi, I'm curious, how did you know data about cpu frequency scaling and cpu fan control? You comment that an invariant 500 rpm for the fan is observed, do you think that's insufficient? Lastly, may I know your opinion about emulate Ubuntu, through e.g. Parallels, instead of implementing it on a dual boot base? Thank you very much for your posts. Best regards.

psycheye said... June 6, 2008 at 7:22 PM  

>http://files-upload.com/files/581996/config.zip
bad link :-/

If U want I can host your file on my server web :-)

Tell me.

I need your file so I can try if all is it ok :-)

Thanks :-)

Pol

polhallen@fuckaround.org

Post a Comment

FeedBurner FeedCount

Subscribe to RSS feed