linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Bruno Wolff III <bruno@wolff.to>
Cc: Josh Boyer <jwboyer@redhat.com>, Daniel Mack <zonque@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Kernel module build workflow (Re: Logitech USB headset not working in 3.6-rc3)
Date: Sun, 26 Aug 2012 14:46:04 +0200	[thread overview]
Message-ID: <s5h1uit95yr.wl%tiwai@suse.de> (raw)
In-Reply-To: <20120825121621.GA24462@wolff.to>

At Sat, 25 Aug 2012 07:16:21 -0500,
Bruno Wolff III wrote:
> 
> On Sat, Aug 25, 2012 at 08:13:27 -0400,
>    Josh Boyer <jwboyer@redhat.com> wrote:
> >On Sat, Aug 25, 2012 at 07:07:40AM -0500, Bruno Wolff III wrote:
> >> On Sat, Aug 25, 2012 at 14:02:51 +0200,
> >>   Daniel Mack <zonque@gmail.com> wrote:
> >> >
> >> >Can you revert commit e9ba389c5 ("ALSA: usb-audio: Fix
> >> >scheduling-while-atomic bug in PCM capture stream") and see if that
> >>
> >> I can try that, but it takes a long time to build a new kernel on my
> >> old hardware.
> >
> >I started a scratch build of a kernel with that patch reverted (via
> >patch -R).  You'll find it here when it finishes:
> >
> >http://koji.fedoraproject.org/koji/taskinfo?taskID=4421817
> >
> >josh
> 
> I'll test it when it finishes. Thanks. It takes me a long time to build 
> kernels locally, and I wasn't sure how to do a scratch build on koji without 
> committing stuff remotely.

Actually you don't have to rebuild the whole kernel at all just for
debugging this usb-audio bug.  The workflow below is what I do often
for debugging a driver problem on a distro kernel.

1. Prepare the compile-ready kernel source tree corresponding to your
   running kernel.  This may depend on distro; in the case of SUSE,
   kernel-default-devel.rpm must be installed for kernel-default.rpm,
   for example.

2. Copy sound/usb subdirectory of the kernel source tree locally
   anywhere else, say, $HOME/usb.  It can be a normal user
   directory.

3. Apply the patch to that local directory.

4. Build modules as a normal user like
	% make -C /lib/modules/$(uname -r)/build M=$HOME/usb modules

5. Make an extra update directory in the module directory once, e.g.
	# mkdir /lib/modules/$(uname -r)/updates

6. Copy *.ko files to there
	# cp $HOME/usb/*.ko /lib/modules/$(uname -r)/updates

7. Run depmod once
	# /sbin/depmod -a

8. Reload snd-usb-audio module.

If you want to take back to the original module, just remove updates
module directory and run depmod again.  Pretty convenient, eh?


HTH,

Takashi

  reply	other threads:[~2012-08-26 12:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 19:08 Logitech USB headset not working in 3.6-rc3 Josh Boyer
2012-08-24 21:30 ` Daniel Mack
2012-08-24 22:30   ` Josh Boyer
2012-08-24 22:30 ` Daniel Mack
2012-08-25 11:17   ` Bruno Wolff III
2012-08-25 11:54     ` Bruno Wolff III
2012-08-25 12:02       ` Daniel Mack
2012-08-25 12:07         ` Bruno Wolff III
2012-08-25 12:13           ` Josh Boyer
2012-08-25 12:16             ` Bruno Wolff III
2012-08-26 12:46               ` Takashi Iwai [this message]
     [not found]                 ` <CAFz=ag47OU1GbS-a8GUug4bJ04JA6kn_uBUZ0LiBjzUCJ0fN_w@mail.gmail.com>
2012-08-27 18:46                   ` [alsa-devel] Kernel module build workflow (Re: Logitech USB headset not working in 3.6-rc3) Takashi Iwai
2012-08-25 15:00             ` Logitech USB headset not working in 3.6-rc3 Bruno Wolff III
2012-08-25 12:13           ` Daniel Mack
2012-08-25 12:17             ` Josh Boyer
2012-08-25 13:45               ` Takashi Iwai
2012-08-29 11:26               ` Daniel Mack
2012-08-29 13:29                 ` Takashi Iwai
2012-08-29 13:32                   ` Daniel Mack
2012-08-29 14:14                     ` Takashi Iwai
2012-08-29 14:25                       ` Daniel Mack
2012-08-29 15:01                         ` Takashi Iwai
2012-08-29 17:07                     ` Josh Boyer
2012-08-29 17:22                       ` Josh Boyer
2012-08-29 18:50                         ` Bruno Wolff III
2012-08-30 14:10                     ` Takashi Iwai
2012-08-30 15:03                       ` Bruno Wolff III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h1uit95yr.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=bruno@wolff.to \
    --cc=jwboyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).