Difference between revisions of "MAS kernel patch compilation"

From MCEWiki
(OS Installation)
Line 1: Line 1:
E-mail templates:
+
This procedure is based on
* [[ MAS OS Configuration email template ]]
 
* [[ MAS PC specifications email template ]]
 
  
 +
http://www.howtoforge.com/kernel_compilation_ubuntu
  
== OS Installation ==
 
  
- Boot from the 6.06 LTS server disk
+
== Get linux sources ==
- Default install.  Reformat boot partition.  Make data partition!
+
   
 
+
We use vanilla 2.6.15.7, vanilla, from kernel.org.
sudo apt-get update
 
sudo apt-get install build-essential subversion emacs21 finger
 
 
 
== Sources list ==
 
 
 
- If you get trouble from apt-get because it can't/won't read the Ubuntu disk, or you don't have it anymore, like this:
 
 
 
  Media change: please insert the disc labeled
 
  'Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)'
 
 
 
then remove (comment) the line
 
deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted
 
from /etc/apt/sources.list and do
 
apt-get sudo update
 
 
 
 
 
== Kernel patch + compile ==
 
  
- Get linux sources
+
== Get bigphys patch ==
- Apply bigphys patch (don't add the -bigphys in the Makefile, do it in the make-kpkg!)
 
- Follow the instructions here:
 
http://www.howtoforge.com/kernel_compilation_ubuntu
 
  
 +
Patch is available here:
 +
http://e-mode.phas.ubc.ca/~mhasse/mce/bigphysarea-2.6.15.7.patch
  
sudo rm /bin/sh
+
== Get kernel compilation packages ==
sudo ln -s /bin/bash /bin/sh
 
 
   
 
   
 
  apt-get update
 
  apt-get update
 
  apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
 
  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
 
  tar xjf linux-2.6.18.1.tar.bz2
 
  ln -s linux-2.6.18.1 linux
 
  ln -s linux-2.6.18.1 linux
Line 46: Line 32:
 
  bzip2 -dc /usr/src/patch-2.6.19-rc4.bz2 | patch -p1  
 
  bzip2 -dc /usr/src/patch-2.6.19-rc4.bz2 | patch -p1  
 
   
 
   
 +
== Configure and compile ==
 +
 
  cp /boot/config-`uname -r` ./.config
 
  cp /boot/config-`uname -r` ./.config
 
  make menuconfig
 
  make menuconfig
Line 55: Line 43:
  
 
== Binary kernel package installation ==
 
== 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.
 
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.
 
The steps are:
 
 
# Install the kernel packages
 
 
 
 
New boot options are: "bigphysarea=8192 acpi=off"
 
 
Without acpi=off, loading the DSP driver will crash the system really badly.  This has been observed in at least 2 machines.
 
 
== After the new kernel ==
 
 
For Ubuntu 6.06 LTS, add repository "Community maintained".
 

Revision as of 15:32, 5 March 2008

This procedure is based on

http://www.howtoforge.com/kernel_compilation_ubuntu


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

bzip2 -dc /usr/src/patch-2.6.19-rc4.bz2 | patch -p1 --dry-run
bzip2 -dc /usr/src/patch-2.6.19-rc4.bz2 | patch -p1 

Configure and compile

cp /boot/config-`uname -r` ./.config
make menuconfig

make-kpkg clean
sudo make-kpkg --initrd --append-to-version=-bigphys kernel_image kernel_headers

(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.