[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What is the procedure for patching the Debian kernel ?



Soon after writing this message and after studying your document I
realised I'd forgotten something. As I found there are complexities
such as the revision string that need to be known about, as are
covered in your document, and your document will certainly come in
useful for any future problems !

The thing I forgot is that I originally used test-patches (in
debian/bin). I had the problem with the conflict of revision strings;
test-patches adds "a~test". So I thought, "why not remove this string"
? I ended up editing test-patches ...

# Append 'a~test' to Debian version; this should be less than any official
# successor and easily recognisable
# version="$(dpkg-parsechangelog | sed 's/^Version: //; t; d')"
# if [ "${version%a~test}" = "$version" ]; then
#    version="$version"a~test
#    dch -v "$version" --distribution UNRELEASED "Testing patches $*"
#fi

I commented out lines 50 to 56. Now test-patches builds the kernel
without the revision string mismatch. I proceeded to install Nvidia
DKMS without any problems (therefore fixing my original problem).

sudo apt-get source linux
cd linux-3.2.23
sudo chown -R djbarney.djbarney *
sudo chown -R djbarney.djbarney .*
Config options added to debian/config/featureset-rt/config
bash debian/bin/test-patches -f 686-pae -s rt -j 4
../alsa-snd-usb-audio-Replace-mixer-for-Electrix-Ebox-44.patch
../alsa-snd-usb-audio-Skip-un-parseable-mixer-units.patch

This builds ...

linux-headers-3.2.0-3-rt-686-pae_3.2.23-1_i386.deb
linux-image-3.2.0-3-rt-686-pae_3.2.23-1_i386.deb
linux-image-3.2.0-3-rt-686-pae-dbg_3.2.23-1_i386.deb

After installing the RT kernel and booting on it I run ...

sudo apt-get install --reinstall nvidia-kernel-dkms

I know this actually creates (I think) a revision string conflict with
official packages. But I can live with that. I just need to reinstall
after any future updates.

Testing currently shows qjackctl (Jack Audio) reporting a working
real-time system, with my external USB audio hardware (the patches for
ebox) with ZERO X-Runs and a 10.7ms latency.

So I seem to have stumbled upon a method that seems to be reserved by
Debian kernel developers for testing patches that actually makes this
process pretty painless. Of course some of this may be dependent on
the current state of Wheezy testing and other Debian kernel policies
that seem to be in flux. Hopefully what I've discovered here can help
other people who need to patch the kernel (to get hardware working,
etc) and encourage the development and documentation of procedures to
make all this a relatively painless process.

Barney Holmes

On 1 October 2012 02:39, Stephen Powell <zlinuxman@wowway.com> wrote:
> On Sun, 30 Sep 2012 18:17:36 -0400 (EDT), Xelsior wrote:
>>
>> So, interesting document.
>>
>> I actually found an RT kernel in the repository ... the one linked
>> from here - http://wiki.debian.org/DebianMultimedia#Realtime_kernel
>>
>> However that does not have the patches applied to usb/audio for the
>> Electrix Ebox44. It also does not have ...
>>
>> CONFIG_HZ_1000=y
>> CONFIG_HZ=1000
>>
>> Is there a SIMPLE procedure here to build this kernel image (or the
>> stock one that downloads the rt patch in a separate archive).
>>
>> All I need to do is build everything as it is out of the box ACCEPT
>> for a couple of patches to usb/audio AND the two config options. Of
>> course the revision string must be right otherwise there are conflicts
>> with linux-headers and DKMS.
>
> Building a custom kernel is not a simple procedure.  Period.
> Of course, the more changes you make, the more complicated the
> procedure is.  But even making a simple change involves doing
> a lot of things.  If you have out-of-kernel-source-tree modules
> you need to build, and there is no Debian source package for it
> that is designed to work with kernel-package, then you will
> probably need to build custom headers, as well as a custom kernel.
> The document to which I referred explains how to do this, but
> the short answer is to use the kernel_headers target in addition
> to the kernel_image target.  For example:
>
>    fakeroot make-kpkg ... kernel_image kernel_headers
>
> Note that when building a headers package you must run the entire
> make-kpkg command under fakeroot: you can't use the --rootcmd fakeroot
> option in this case.
>
> --
>   .''`.     Stephen Powell
>  : :'  :
>  `. `'`
>    `-
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 925925381.194221.1349055542693.JavaMail.root@md01.wow.synacor.com">http://lists.debian.org/[🔎] 925925381.194221.1349055542693.JavaMail.root@md01.wow.synacor.com
>



-- 
         ~~~
http://djbarney.org
         ~~~


Reply to: