Difference between revisions of "MAS kernel patch compilation"
(→Configure and compile) |
(→Ubuntu 8.04) |
||
Line 65: | Line 65: | ||
= Ubuntu 8.04 = | = Ubuntu 8.04 = | ||
− | + | Bigphys kernel was successfully created for 8.04 x64. I don't know how to package it properly yet, so you just have to do it on each machine. | |
− | + | From fresh 8.04 install: | |
+ | sudo apt-get update | ||
+ | sudo apt-get install build-essential subversion kernel-package linux-kernel-source | ||
+ | |||
+ | The linux-kernel-source package should put an archive in /usr/src, e.g. linux-source-2.6.24.tar.bz2. Extract it: | ||
+ | cd /usr/src | ||
+ | sudo tar -xjf linux-source-2.6.24.tar.bz2 | ||
+ | |||
+ | Get the bigphys patch for 2.6.24: |
Revision as of 17:13, 23 July 2008
This procedure is based on
http://www.howtoforge.com/kernel_compilation_ubuntu
Contents
Get linux sources
We use vanilla 2.6.15.7, vanilla, from kernel.org.
Get bigphys patch
Patch is available here:
http://e-mode.phas.ubc.ca/~mhasse/mce/bigphysarea-2.6.15.7.patch
Get kernel compilation packages
apt-get update apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
Make sure bash is your default shell
sudo rm /bin/sh sudo ln -s /bin/bash /bin/sh
Uncompress and patch
tar xjf linux-2.6.18.1.tar.bz2 ln -s linux-2.6.18.1 linux cd /usr/src/linux
For uncompressed patches (like the bigphysarea patch), just redirect the file to the patch program:
patch -p1 --dry-run < bigphysarea-2.6.22-server.patch patch -p1 < bigphysarea-2.6.22-server.patch
The first line (dry-run) will not make any changes to your source tree. If it says "fuzz" and "offset", that's fine. If you get errors, you have to go in by hand and figure out what's up. It's probably the line in the makefile that specifies the minor version of the kernel release.
Configure and compile
cp /boot/config-`uname -r` ./.config make menuconfig
In the kernel configuration menu, go to "Processor type and features" and make sure that "Big Physical Area" is on.
make-kpkg clean sudo make-kpkg --initrd kernel_image kernel_headers
(At one point there was a "--append-to-version=-bigphys" line, but we don't need that cause it's done in the patch already.)
(Can't use fakeroot in this last step, since the .deb are written to /usr/src.)
Binary kernel package installation
See MAS OS configuration .
The .deb's that come out of the compilation above are incomplete, be we install them anyway. They are missing arch/i386/Makefile.cpu, and Modules.symvers. They might be missing other things too, but MAS really misses those ones. These have been put into a patch; which must be applied at the end.
Patch creation
To generate a patch from a successful hack/patch/wobble-job, use, e.g.:
diff -urN linux-source-2.6.22 linux-source-2.6.22-bigphys > ~/bigphysarea-2.6.22-server.patch
Ubuntu 8.04
Bigphys kernel was successfully created for 8.04 x64. I don't know how to package it properly yet, so you just have to do it on each machine.
From fresh 8.04 install:
sudo apt-get update sudo apt-get install build-essential subversion kernel-package linux-kernel-source
The linux-kernel-source package should put an archive in /usr/src, e.g. linux-source-2.6.24.tar.bz2. Extract it:
cd /usr/src sudo tar -xjf linux-source-2.6.24.tar.bz2
Get the bigphys patch for 2.6.24: