← Back to team overview

torios-dev team mailing list archive

Kernel

 

Hi everyone,
I finally got down to looking at compiling my own kernel.  Why?
well... ToriOS 1.0 is almost out, and I need to get in gear for 2.0
which we will need to maintain our own kernel for.

I am currently testing out this procedure to build a custom Kernel, I am
mainly doing it as a test run, but I have also enabled math emulation
(cmov) because we had an interested user post about cmov support in a
kernel.  I would like to maintain a separate kernel in 14.04 with cmov
and non-pae support, as I think this will be helpful.  It is possible
that cmov support will slow down the OS considerably if there is no need
for cmov... so we may need to build one cmov kernel, and maintain a
non-pae kernel.  I don't entirely know what this will end up being like,
but so far it has been extremely easy to start building the kernel.
I found this:
http://www.debian-administration.org/article/90/Debian_Kernel_Building_Mini-HOWTO

sudo apt-get build-dep linux-image-`uname -r` 
sudo apt-get install libncurses5-dev kernel-package fakeroot

echo"postinst_hook = /sbin/update-grub
postrm_hook = /sbin/update-grub
do_bootloader = no" | sudo tee /etc/kernel-img.conf
This ensures grub updates when it is installed

this is a nice graphical program for choosing all the kernel options
(there are a lot!!)
sudo make menuconfig

Things to do:
From: https://help.ubuntu.com/community/Kernel/Compile
"If you re-used the existing configuration, note that Ubuntu kernels
build with debugging information on, which makes the resulting kernel
modules (*.ko files) much larger than they would otherwise be. To turn
this off, go into the config's "Kernel hacking"<!-- ; then, under
"Kernel debugging", --> and turn OFF "Compile the kernel with debug info". "
*Turn off kernel debugging!*
If you want to enable cmov look for *Math Emulation* in the options... I
forgot just where it was.. sorry it has been a few hours since that
machine started compiling the kernel.

change to your kernel directory (it was in my home directory), and run:
sudo fakeroot make-kpkg kernel_image

Go eat some cake, or lentils and rice... this takes a long time at least
on my 900mhz AMD Duron :P Next time I will use a much faster computer...
because this really has taken a few hours so far, and still not done. I
think it has been like 3 hours.... so next time use the faster 32bit
processor.
I suppose I could use my 64bit machine and compile for 32bit... but I am
not entirely sure.

I am posting this in case anyone wanted to try!

-- 
Regards

-Israel
ToriOS Team