<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
	<id>http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=Compilaci%C3%B3_del_Kernel_amb_Ubuntu_Studio_2n_m%C3%A8tode</id>
	<title>Compilació del Kernel amb Ubuntu Studio 2n mètode - Historial de revisió</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=Compilaci%C3%B3_del_Kernel_amb_Ubuntu_Studio_2n_m%C3%A8tode"/>
	<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Compilaci%C3%B3_del_Kernel_amb_Ubuntu_Studio_2n_m%C3%A8tode&amp;action=history"/>
	<updated>2026-08-30T07:55:38Z</updated>
	<subtitle>Historial de revisió per a aquesta pàgina del wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=Compilaci%C3%B3_del_Kernel_amb_Ubuntu_Studio_2n_m%C3%A8tode&amp;diff=1602&amp;oldid=prev</id>
		<title>Joan a 13:58, 3 feb 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Compilaci%C3%B3_del_Kernel_amb_Ubuntu_Studio_2n_m%C3%A8tode&amp;diff=1602&amp;oldid=prev"/>
		<updated>2009-02-03T13:58:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pàgina nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Tinc acabat d'instal.lar el Ubuntu Studio 8.04, que té el kernel 2.6.24-19-rt&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls /usr/src&lt;br /&gt;
linux-headers-2.6.24-19  linux-headers-2.6.24-19-generic&lt;br /&gt;
$ ls /boot&lt;br /&gt;
config-2.6.24-19-rt  initrd.img-2.6.24-19-rt      memtest86+.bin           vmlinuz-2.6.24-19-rt&lt;br /&gt;
grub                 initrd.img-2.6.24-19-rt.bak  System.map-2.6.24-19-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Miro la meva tarja de so internal&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cat /proc/asound/cards&lt;br /&gt;
 0 [ICH6           ]: ICH4 - Intel ICH6&lt;br /&gt;
                      Intel ICH6 with STAC9752,53 at irq 16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
El primer mètode va funcionar aparentment bé, seguint pas a pas, i podia arrencar la màquina amb tres kernels:  2.6.24-19-rt,  2.6.24-21-rt i  2.6.24-22-rt&lt;br /&gt;
&lt;br /&gt;
però en un dels kernels (ara no recordo quin) estava totalment desconfigurat tot el sistema de so (ls /proc/asound/cards) no existeix, i en el que funciona reconeix bé l'EDIROL UA-25EX en el mode normal, però no en el mode avançat (no s'ha aplicat bé el patch del kernel, recordem que l'objectiu es poder treballar amb la UA-25EX en mode avançat per tal que funcioni el MIDI).&lt;br /&gt;
&lt;br /&gt;
Seguiré ara el howto del Sergi Tur [http://acacha.dyndns.org/mediawiki/index.php/Kernel_Linux._Compilaci%C3%B3], que respon a un mètode més clàssic i usual.&lt;br /&gt;
&lt;br /&gt;
També segueixo la informació de [http://www.howtogeek.com/howto/ubuntu/how-to-customize-your-ubuntu-kernel/ http://www.howtogeek.com/howto/ubuntu/how-to-customize-your-ubuntu-kernel/]. Compte perquè aquest enllaç m'ha proporcionat dues o tres modificacions interessants respecte l'article original&lt;br /&gt;
&lt;br /&gt;
Informació oficial: un cop m'hagi baixat el kernel source, disposaré del document /usr/share/doc/kernel-package/README.gz, que podré accedir fent: $ zless README.gz (ben explicat)&lt;br /&gt;
&lt;br /&gt;
== Obtenció del kernel (les fonts) ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install build-essential fakeroot kernel-package&lt;br /&gt;
$ sudo adduser joan src&lt;br /&gt;
$ su joan&lt;br /&gt;
$ groups&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find the kernel source you want with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ apt-cache search source 2.6&lt;br /&gt;
...&lt;br /&gt;
linux-source-2.6.24 - Linux kernel source for version 2.6.24 with Ubuntu patches&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download the kernel source using the following command. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install linux-source&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Són 47Mb. Les fonts les posa a /usr/src, i aquí trobem el fitxer  '''linux-source-2.6.24.tar.bz2''', és a dir, disposem de la revisió 24&lt;br /&gt;
&lt;br /&gt;
If you see a link called linux to an older kernel source remove it [No és el meu cas]&lt;br /&gt;
&lt;br /&gt;
Desempaquetem:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tar jxvf linux-source-2.6.24.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
es crea el directori linux-source-2.6.24 que pertany a joan i al grup src. Creem el link 'linux' que apunta a aquest directori&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ln -s linux-source-2.6.24 linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuració del kernel ==&lt;br /&gt;
&lt;br /&gt;
There are several ways to configure the kernel. You will probably use &amp;quot;xconfig&amp;quot;. Perform the following steps prior to configuring the kernel:&lt;br /&gt;
&lt;br /&gt;
Dins de /boot existeix el fitxer config-2.6.24-19-rt, que representa la configuració del meu kernel ajustat a les necessitats rt (real-time)&lt;br /&gt;
Partiré d'aquest fitxer config per fer la meva configuració particular (si calgués). Per fer-ho, s'ha de copiar a /usr/src/linux (compte perquè en el howto original no queda clar aquest pas)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd /boot&lt;br /&gt;
$ find .config -type f -print | xargs egrep -i RT | more -&amp;gt; vull mirar de quina manera el meu config file està adaptat a 'RT' (realtime). De totes maneres, m'és molt difícil veure-ho&lt;br /&gt;
$ uname --kernel-release&lt;br /&gt;
2.6.24-19-rt -&amp;gt; és el meu kernel, i el que he de fer és partir d'aquesta configuració&lt;br /&gt;
$ cd /usr/src/linux&lt;br /&gt;
$ cp /boot/config-`uname --kernel-release` ./.config -&amp;gt; copio el config original a /usr/src/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two ways to configure the kernel - using an X-based menu or using an ncurses (command-line) menu. To use the X-based menu [d'entrada no funciona, probaré l'altra possibilitat]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install qt3-dev-tools libqt3-mt-dev&lt;br /&gt;
$ /usr/src/linux$ make xconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2a possibilitat. If you are not using X, or don't want to use your mouse:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install libncurses5-dev&lt;br /&gt;
$ /usr/src/linux$ make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
En la pantalla del ncurses escollir a ''Load an Alternate Configuration File'' el fitxer .config que hem copiat (potser no caldria fer-ho, però per si de cas...)&lt;br /&gt;
&lt;br /&gt;
Assegurar-me de què està activat el mòdul USB-Audio:&lt;br /&gt;
&lt;br /&gt;
go to Device Driver-&amp;gt;Sound-&amp;gt;Alsa-&amp;gt;USB and activate the module USB-Audio.&lt;br /&gt;
&lt;br /&gt;
=== Aplico el patch ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
el fitxer '''usbquirks.h''', que és el que s'ha de modificar, està a /usr/src/linux/sound/usb&lt;br /&gt;
&lt;br /&gt;
El fitxer.diff és:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- sound/usb/usbquirks.h.00	2007-11-28 02:15:11.000000000 -0700&lt;br /&gt;
+++ sound/usb/usbquirks.h	2007-11-28 02:17:51.000000000 -0700&lt;br /&gt;
@@ -1311,6 +1311,37 @@&lt;br /&gt;
 	}&lt;br /&gt;
 },&lt;br /&gt;
 	/* TODO: add Edirol MD-P1 support */&lt;br /&gt;
+{	/*&lt;br /&gt;
+	 * This quirk is for the &amp;quot;Advanced&amp;quot; modes of the Edirol UA-25EX.&lt;br /&gt;
+	 * If the switch is not in an advanced setting, the UA-25EX has&lt;br /&gt;
+	 * ID 0x0582/0x00a4 and is standard compliant (no quirks), but&lt;br /&gt;
+	 * offers only 16-bit PCM at 44.1 kHz and no MIDI.&lt;br /&gt;
+	 */&lt;br /&gt;
+	USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6),&lt;br /&gt;
+	.driver_info = (unsigned long) &amp;amp; (const struct snd_usb_audio_quirk) {&lt;br /&gt;
+		.vendor_name = &amp;quot;EDIROL&amp;quot;,&lt;br /&gt;
+		.product_name = &amp;quot;UA-25EX&amp;quot;,&lt;br /&gt;
+		.ifnum = QUIRK_ANY_INTERFACE,&lt;br /&gt;
+		.type = QUIRK_COMPOSITE,&lt;br /&gt;
+		.data = (const struct snd_usb_audio_quirk[]) {&lt;br /&gt;
+			{&lt;br /&gt;
+				.ifnum = 0,&lt;br /&gt;
+				.type = QUIRK_AUDIO_EDIROL_UA700_UA25&lt;br /&gt;
+			},&lt;br /&gt;
+			{&lt;br /&gt;
+				.ifnum = 1,&lt;br /&gt;
+				.type = QUIRK_AUDIO_EDIROL_UA700_UA25&lt;br /&gt;
+			},&lt;br /&gt;
+			{&lt;br /&gt;
+				.ifnum = 2,&lt;br /&gt;
+				.type = QUIRK_AUDIO_EDIROL_UA700_UA25&lt;br /&gt;
+			},&lt;br /&gt;
+			{&lt;br /&gt;
+				.ifnum = -1&lt;br /&gt;
+			}&lt;br /&gt;
+		}&lt;br /&gt;
+	}&lt;br /&gt;
+},&lt;br /&gt;
 {&lt;br /&gt;
 	/* Roland SH-201 */&lt;br /&gt;
 	USB_DEVICE(0x0582, 0x00ad),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install patch&lt;br /&gt;
$ patch &amp;lt; fitxer.diff&lt;br /&gt;
patching file usbquirks.h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visualitzem que s'han realitzat els canvis&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -la usbquirks.h&lt;br /&gt;
-rw-r--r--  1 joan joan  46928 2008-10-24 13:56 usbquirks.h&lt;br /&gt;
$ find usbquirks.h -type f -print | xargs egrep -i UA-25EX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compilació del kernel ==&lt;br /&gt;
&lt;br /&gt;
L'objectiu és crear un paquet Debian (.deb) del tipus ''kernel-image-2.6.8.1.181004_10.00.Custom_i386.deb'', que més tard instal.larem&lt;br /&gt;
&lt;br /&gt;
make-kpkg&lt;br /&gt;
&lt;br /&gt;
To build the kernel you'll invoke &amp;quot;make-kpkg&amp;quot;, a script which automates and replaces the sequence &amp;quot;make dep; make clean; make bzImage; make modules&amp;quot;. Take a few minutes and read over the manual page for make-kpkg. The make-kpkg command line can be complex and at first intimidating. Its basic syntax is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/src/linux$ make-kpkg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your target will be &amp;quot;kernel_image&amp;quot;. Let's examine two of the more important and common options, &amp;quot;--append-to-version&amp;quot; and &amp;quot;--revision&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
'''--append-to-version'''&lt;br /&gt;
&lt;br /&gt;
The first option lets you specify an addition to the kernel version, which then becomes part of the kernel's name. You may use alphanumeric characters, &amp;quot;+&amp;quot; and &amp;quot;.&amp;quot; (period or full stop); do not use underscore &amp;quot;_&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here's the kernel I'm running now:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/src/linux$ /usr/src/$ uname -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Linux ubuntu 2.6.24-21-rt #1 SMP PREEMPT RT Mon Aug 25 19:24:40 UTC 2008 i686 GNU/Linux&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should avoid using --append-to-version values such as &amp;quot;-686&amp;quot;, &amp;quot;-K7&amp;quot;, and &amp;quot;-sparc&amp;quot;. They are commonly used for Debian pre-compiled kernels.&lt;br /&gt;
&lt;br /&gt;
Kernel modules live in subdirectories of /lib/modules; each kernel has its own subdirectory. Every time you install a kernel image with a new name, the package installer creates a new subdirectory of /lib/modules to hold its modules.&lt;br /&gt;
&lt;br /&gt;
This means that by using a new value for --append-to-version each time you build a kernel image, you can ensure that the new kernel will have a new name, and that its modules won't conflict with those of other kernels.&lt;br /&gt;
&lt;br /&gt;
If you install a kernel with the same name (the same version and --append-to-version) as an already-installed kernel, installing the new kernel package will overwrite the old kernel and its modules. You will be warned and offered the chance to abort. Take it. Use another value for --append-to-version and rebuild. &lt;br /&gt;
&lt;br /&gt;
'''--revision'''&lt;br /&gt;
&lt;br /&gt;
Another make-kpkg option is &amp;quot;--revision&amp;quot;, which affects the name of the Debian package itself but not the kernel name. As with --append-to-version, you may use only alphanumeric characters, &amp;quot;+&amp;quot; and &amp;quot;.&amp;quot;. Do not use underscores &amp;quot;_&amp;quot;. If you do not supply a value for --revision, make-kpkg will use &amp;quot;10.00.Custom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using different values of --revision will not prevent conflicts between kernels with the same name. They are just for you to see the difference, for example recompiling the same kernel with a very small change. &lt;br /&gt;
&lt;br /&gt;
'''Kernel package names'''&lt;br /&gt;
&lt;br /&gt;
Debian kernel-image file names have the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel-image-(kernel-version)(--append-to-version)_(--revision)_(architecture).deb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package name is everything before the first underscore.&lt;br /&gt;
&lt;br /&gt;
per ex,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel-image-2.6.8.1.181004_10.00.Custom_i386.deb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can see why underscores are not allowed in make-kpkg options — they separate the elements of package names.&lt;br /&gt;
&lt;br /&gt;
I recommend using a different --append-to-version value for each kernel you compile, and letting make-kpkg assign the default revision. Date-based values work for me, but you are free to invent your own scheme.&lt;br /&gt;
&lt;br /&gt;
Please read /usr/share/doc/kernel-package/README.gz if --append-to-version or --revision is unclear, or if you plan on using options different from the ones I suggest. (One way to do this is &amp;quot;zless README.gz&amp;quot;.) Ignore the discussions of flavours and epochs until you are more familiar with make-kpkg and with Debian packages generally; they are not likely to be useful to you now. &lt;br /&gt;
[Compte amb això últim, perquè precisament el que jo vull fer és compilar un kernel amb el ''rt flavour'']&lt;br /&gt;
&lt;br /&gt;
'''fakeroot'''&lt;br /&gt;
&lt;br /&gt;
When you added yourself to the src group you made it possible to do most kernel-package work with normal user privilege. However the files that are part of a kernel package (like the kernel and kernel modules) will be owned by root and run with root privilege; they must be created with root privilege.&lt;br /&gt;
&lt;br /&gt;
Using fakeroot you can start make-kpkg as a normal user, and most of the job will be run with normal permissions. Near the end of the job, fakeroot will simulate a root environment to create the kernel-image package.&lt;br /&gt;
&lt;br /&gt;
The manual page for make-kpkg describes one way to use fakeroot; we will use the simpler method of putting &amp;quot;fakeroot&amp;quot; at the beginning of the make-kpkg command line, like this:&lt;br /&gt;
&lt;br /&gt;
 fakeroot make-kpkg &amp;lt;options&amp;gt; &amp;lt;target&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Making the kernel image&lt;br /&gt;
&lt;br /&gt;
Finally! The time has arrived — you're ready to make the kernel image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/src/linux $ fakeroot make-kpkg clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/src/linux $ fakeroot make-kpkg --append-to-version=.241008 kernel_image --initrd binary&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now all you can do is wait for the computer to finish. Take a few minutes off and enjoy yourself while the computer does its fair share of the work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Instal.lació del paquet del kernel-image (el .deb) ==&lt;br /&gt;
&lt;br /&gt;
Once the kernel image is built you will install the kernel-image package, which includes the kernel and its modules. First check to make sure it was built successfully by changing to the /usr/src directory and listing its contents:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/src/linux$ cd ..&lt;br /&gt;
/usr/src$ ls &lt;br /&gt;
linux-image-2.6.24.3.181004_2.6.24.3.181004-10.00.Custom_i386.deb&lt;br /&gt;
linux-source-2.6.24/&lt;br /&gt;
linux-source-2.6.24.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There it is! Notice how the --append-to-version value became part of the kernel name.&lt;br /&gt;
&lt;br /&gt;
To install the kernel and all its modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/src$ sudo dpkg -i linux-image-2.6.24.3.181004_2.6.24.3.181004-10.00.Custom_i386.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To install a kernel-image package from disk (as opposed to installing from a Debian archive) use the full file name. You can use tab for command-line-completion.&lt;br /&gt;
&lt;br /&gt;
M'ha donat un error...&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Desempaquetando linux-image-2.6.24.3.181004 (de linux-image-2.6.24.3.181004_2.6.24.3.181004-10.00.Custom_i386.deb) ...&lt;br /&gt;
Done.&lt;br /&gt;
dpkg-deb: fin de fichero inesperado en entre números en linux-image-2.6.24.3.181004_2.6.24.3.181004-10.00.Custom_i386.deb&lt;br /&gt;
dpkg: error al procesar linux-image-2.6.24.3.181004_2.6.24.3.181004-10.00.Custom_i386.deb (--install):&lt;br /&gt;
 el subproceso dpkg-deb --fsys-tarfile devolvió el código de salida de error 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything went well, all you need to do now is reboot. If your new kernel doesn't boot, boot your previous kernel or insert your boot floppy and restart. Go back to Configuring the kernel, tweak your configuration, and try again. Wrapping it all up Hold that kernel!&lt;br /&gt;
&lt;br /&gt;
If you used --append-to-version you shouldn't need to worry about apt-get trying to &amp;quot;upgrade&amp;quot; your kernel. If you're paranoid (it is out to get you) you can make sure by doing this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ echo &amp;quot;kernel-image-2.6.8.1.181004 hold&amp;quot; | sudo dpkg --set-selections&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course substitute the real name of your kernel. To refer to a package that dpkg knows about (an installed package or one in an archive's list) use the package name rather than the full file name. Check that the package really is on hold; if it is you should see:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ dpkg --get-selections | grep kernel-image&lt;br /&gt;
 kernel-image-2.6.8.1.181004_10.00.Custom_i386.deb    hold&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Somebody should write about holding packages, what it does etc. &lt;br /&gt;
&lt;br /&gt;
'''Removing the symlink'''&lt;br /&gt;
&lt;br /&gt;
Next, you should get rid of the symlink you created in the /usr/src directory. There are several reasons for this:&lt;br /&gt;
&lt;br /&gt;
1. The next time you download a kernel it might not be from a Debian archive. When you expand the source tarball it could overwrite your old source tree right through the old symlink. Bummer.&lt;br /&gt;
2. The next time you download the kernel source from the Debian archive, you might expand the source into its own tree without problems. But since you already have a symlink called &amp;quot;linux&amp;quot; in the src directory, you might go ahead and compile (forgetting of course that it's linked to your old source tree.)&lt;br /&gt;
3. When you download patches or other source code into a specific source tree, you don't want anything else messing with it. By removing the symlink you might prevent 1. 1 from happening. &lt;br /&gt;
&lt;br /&gt;
To remove the link do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rm /usr/src/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now reboot. Running &amp;quot;cat /proc/version&amp;quot; should tell you if you're running under your new kernel.&lt;br /&gt;
&lt;br /&gt;
==Per acabar, més coses==&lt;br /&gt;
&lt;br /&gt;
===Backing up your kernel===&lt;br /&gt;
&lt;br /&gt;
While not required, it's a good idea to back up your custom kernel .deb. Copy it to a secure undisclosed location.&lt;br /&gt;
&lt;br /&gt;
Once your kernel has been packaged with its modules, you can install it on any machine that has the hardware you specified in your kernel configuration. You could even reinstall it on your current machine after reinstalling your system. Making a new boot diskette&lt;br /&gt;
&lt;br /&gt;
Create another boot diskette, this one for the kernel you just installed. Grab another floppy — it's not a good idea to overwrite your old boot disk; you haven't been using your new kernel long enough to be sure it works. A boot disk is only necessary if you messed up your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/src# cd /boot&lt;br /&gt;
/boot# mkboot /boot/vmlinuz-2.4.18.030320&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Building your next kernel===&lt;br /&gt;
&lt;br /&gt;
If you want to rebuild your kernel because you just bought a new sound card, or you want to enable a new feature you forgot to include the first time, all you need to do is reconfigure, do &amp;quot;fakeroot make-kpkg clean&amp;quot;, and rebuild with a different value for --append-to-version. Your session should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ cd /usr/src&lt;br /&gt;
 bash:/usr/src$ ln -s linux-source-2.6.8.1 linux&lt;br /&gt;
 bash:/usr/src$ cd linux&lt;br /&gt;
 bash:/usr/src/linux$ make xconfig&lt;br /&gt;
 (reconfigure your kernel)&lt;br /&gt;
 bash:/usr/src/linux$ fakeroot make-kpkg clean&lt;br /&gt;
 (lots of cleaning here)&lt;br /&gt;
 bash:/usr/src/linux$ fakeroot make-kpkg --append-to-version=.181004 kernel_image --initrd binary&lt;br /&gt;
 (screens and screens of stuff)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using an existing configuration===&lt;br /&gt;
&lt;br /&gt;
When you installed your custom kernel, its configuration was copied to /boot/config-x.y.z. You may want to squirrel it away in another location (or several other locations) for safekeeping or later re-use.&lt;br /&gt;
&lt;br /&gt;
Suppose that just last week you picked your way through the maze of options, and settled on a configuration that supports all the hardware and features you want. Today a new stable kernel is released and of course you want to upgrade right away. Is it necessary to start from scratch configuring the new kernel? Not at all.&lt;br /&gt;
&lt;br /&gt;
Download and expand the new source tarball and make a new symlink. Then change directory to /usr/src/linux, copy your existing configuration there and do &amp;quot;make oldconfig&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 bash:/usr/src/linux$ cp /boot/config-2.4.18.030320 .config&lt;br /&gt;
 bash:/usr/src/linux$ make oldconfig&lt;br /&gt;
&lt;br /&gt;
You'll be asked questions about new kernel options. It's generally safe to answer &amp;quot;no&amp;quot; to all the questions; make notes of the new options that interest you.&lt;br /&gt;
&lt;br /&gt;
After you finish oldconfig you can run xconfig or menuconfig to review your selections, change your answers, or investigate the options you noted.&lt;br /&gt;
&lt;br /&gt;
Build the latest stable kernel with your own configuration.&lt;br /&gt;
&lt;br /&gt;
fakeroot make-kpkg clean&lt;br /&gt;
&lt;br /&gt;
Checklist&lt;br /&gt;
&lt;br /&gt;
   1. Make backup boot diskette.&lt;br /&gt;
   2. Install required packages.&lt;br /&gt;
   3. build-essential fakeroot kernel-package&lt;br /&gt;
   4. Setup source tree.&lt;br /&gt;
   5. Add yourself to src. Logout, login. Use groups to confirm.&lt;br /&gt;
   6. Remove old symlink.&lt;br /&gt;
   7. Expand source tarball.&lt;br /&gt;
   8. Make and check new symlink.&lt;br /&gt;
   9. Configure kernel.&lt;br /&gt;
  10. Use old config file if available. cp /boot/config-x.y.z .config&lt;br /&gt;
  11. make oldconfig or make xconfig or make menuconfig.&lt;br /&gt;
  12. Save .config file somewhere else for later use.&lt;br /&gt;
  13. Build kernel-image package.&lt;br /&gt;
  14. fakeroot make-kpkg clean&lt;br /&gt;
  15. fakeroot make-kpkg --append-to-version=alpha+numeric.but.no.underscore kernel_image --initrd binary&lt;br /&gt;
  16. Install kernel-image package.&lt;br /&gt;
  17. dpkg -i kernel-image-x.y.z.yy.mm.dd_10.00.Custom_i386.deb&lt;br /&gt;
  18. Reboot.&lt;br /&gt;
  19. What next?&lt;br /&gt;
  20. Hold your package. echo &amp;quot;kernel-image-x.y.z.yymmdd hold&amp;quot; | dpkg --set-selections&lt;br /&gt;
  21. Remove symlink.&lt;br /&gt;
  22. Back up kernel image.&lt;br /&gt;
  23. Remove old kernel image packages.&lt;br /&gt;
  24. Make new boot diskette. &lt;br /&gt;
&lt;br /&gt;
Outside Links&lt;br /&gt;
&lt;br /&gt;
Here are some links to other ways of building the kernel.&lt;br /&gt;
&lt;br /&gt;
   *[WWW] Ben Edwards Article&lt;br /&gt;
   *[WWW] Debian Kernel 2.6 How To&lt;br /&gt;
   *{OK} [WWW] Creating custom kernels with Debian's kernel-package system&lt;br /&gt;
&lt;br /&gt;
{{Autor}}, octubre 2008&lt;br /&gt;
[[Categoria: Kernel]]&lt;br /&gt;
[[Categoria: Ubuntu Studio]]&lt;br /&gt;
[[Categoria: Linux]]&lt;br /&gt;
[[Categoria: Llenguatge C]]&lt;/div&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
</feed>