Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752083Ab2HZMqK (ORCPT ); Sun, 26 Aug 2012 08:46:10 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38770 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858Ab2HZMqI (ORCPT ); Sun, 26 Aug 2012 08:46:08 -0400 Date: Sun, 26 Aug 2012 14:46:04 +0200 Message-ID: From: Takashi Iwai To: Bruno Wolff III Cc: Josh Boyer , Daniel Mack , Jaroslav Kysela , 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) In-Reply-To: <20120825121621.GA24462@wolff.to> References: <20120824190808.GC20043@zod.bos.redhat.com> <5038007E.5060505@gmail.com> <20120825111749.GA17048@wolff.to> <20120825115423.GA14327@wolff.to> <5038BEEB.6090303@gmail.com> <20120825120740.GA19539@wolff.to> <20120825121326.GE20043@zod.bos.redhat.com> <20120825121621.GA24462@wolff.to> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2300 Lines: 67 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 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 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/