Possible how to compile 2.6.33 from source on a free Debian

aurelien ice.cube at gmx.com
Fri Mar 5 06:25:35 UTC 2010


You'll find here working solution to compile your 2.6.33 from source on
a free Debian.

Thanks to all!

Have a happy hacking

#

How-To-compile-your-own-free-kernel-on-free-debian-based

Libre-Kernel version :: 2.6.33

Last edit Fri March 5 2010.

Type: GNU documentation

License: gplv3 or later

Made on Operating System : Debian with free software only

Distribution: GNU / linux

#

Compile your free kernel on a Free Debian based


This part is important and long (depending on the computers you have
got)

If you are running on a fresh install or if you never made that type of
operation before, you will need to install packages needed for kernel
compilation. First, make sure your apt database is updated

#

Normaly, on Debian, you use su instead of sudo. the # define the root.

#

su

# aptitude update


Install the needed packages


# aptitude install fakeroot kernel-package libncurses5-dev libqt3-mt-dev
bzip2 wget build-essential


In a web browser go to last free kernel release


http://www.linux-libre.fsfla.org/pub/linux-libre/releases/


Copy the link adress of the free kernel version you want.


In a terminal go to /usr/src and get the source :


# wget
http://www.linux-libre.fsfla.org/pub/linux-libre/releases/2.6.33-libre/linux-2.6.33-libre.tar.bz2


Uncompress the archive file


# tar xvjf linux-2.6.33-libre.tar.bz2


Go to the newly created directory of the uncompressed source


cd linux-2.6.33

Enter


you have to edit a file in the kernel source before compiling

Edit on > linux-2.6.33/Documentation/lguest/Makefile


# emacs Documentation/lguest/Makefile

all: lguest

to

all:

save and close (under emacs C-x C-s)

Now you have to create a file ::

create the utsrelease.h file in the linux-2.6.33/include/linux
containing ::

# emacs

C-x C-f create an empty file and copy past this line (you can modify
"planet" by what you want)

#define UTS_RELEASE "2.6.33-libre-planet"

C-x C-s save the file
in /usr/src/linux-2.6.33/include/linux/utsrelease.h


Now you can start the compilation of the last free kernel

normaly at this point you are already in /usr/src/linux2.6.''


# make clean mrproper

Now, you will need to have a base .config file that will control the
build process. If you don't have a specific .config file, you can use
the default file in the /boot directory. Just copy that into the source
directory.

# cp /boot/config-* /usr/src  (if you have already compile another
kernel before, import just the last one in /usr/src from /boot)

Now, you can review and change config variables. First, update your
config file to the new options of the kernel source

sudo make oldconfig

and answer the configuration questions there. Enter yes for the module
to be built into the kernel, m for it to be build modularly which will
only load if needed and no to exclude the module. You can also enter ?
to get information about the module. However, you don't have to worry
too much as you will be able to revise your decisions in the next step.

Next, enter

# make xconfig

(make menuconfig is an alternative .config editing tool)

This will open an application that classifies and explains the
properties and available modules you can either 'build into' the kernel,
make modularly available or disable. When you are done, save it and
exit.


Now, you can build your kernel. First enter


sudo make-kpkg clean


As the final command, enter


# fakeroot make-kpkg --initrd --append-to-version=-'''' kernel_image
kernel_headers kernel_source


You can change custom by '''' value with anything as long it starts with
- (minus sign) and has no whitespace in between. Optionally, you can add
kernel_source at the end, if you want to build a source pack. You can
also put CONCURRENCY_LEVEL=N (where N should be replaced by the number
of CPU cores your computer has) at the beginning of the command to make
the building process take advantage of multiple core systems.

The last command will take some time to complete. At the end, you will
have linux-image and linux-headers (and linux-source if you chose)
installation files.


go to linux-image and linux-headers files to the directory you want.
Then, either go to that directory in terminal with cd command and
install the two .deb packages:


# dpkg -i linux-image-2.6.33-''''.deb

# dpkg -i linux-headers-2.6.33-''''.deb

# dpkg -i linux-source-2.6.33-''''.deb


Or, just double-click on the two files and click on the Install Package
button.

Restart and choose free-planet kernel from your GRUB.

#

http://www.aligunduz.org/articles/buildkernel.html for the first version
of the receipe
ali gundunz :: gndz.ali(at)gmail(dot)com

#

For the creation of the utsrelease.h file
nks- from #gnewsense for the utsrelease.h file

#

For the modification part on /linux-2.6.32.5/lguest/Makefile
Damian Fossi damianfossi(at)gmail(dot)com

#

For the receipe :: Aurélien DESBRIÈRES ice.cube(at)gmx(dot)com

FSF Associate Member  |  http://groups.fsf.org/wiki/User:Aurelien

http://groups.fsf.org/wiki/Corsica_Gnu_Group


#

This document is gplv3 or later
Last modification bring the Fri March 5 2010.

#


-- 
Libreplanet.org
http://groups.fsf.org/wiki/User:Aurelien



More information about the linux-libre mailing list