Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RFE: more clarity in the ALSA guide RE: kernel re-compile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
mattmunz
n00b
n00b


Joined: 10 Mar 2003
Posts: 23

PostPosted: Sun Jun 15, 2003 3:21 pm    Post subject: RFE: more clarity in the ALSA guide RE: kernel re-compile Reply with quote

When I compiled my kernel the first time, I found the ALSA guide to be very useful.[1] When I re-compile my kernel subsequently, however, I have trouble getting ALSA to work. The guide mentions re-compiling ALSA, but it is not clear how to do so, at least, not for me. :) [2]

In my case, I had to unmerge alsa-driver and them emerge alsa-driver. "emerge alsa-driver" by itself did nothing (as I would expect). Perhaps this information could be added to the ALSA guide?

[1] http://www.gentoo.org/doc/en/alsa-guide.xml
[2]
Quote:

Important: This means, whenever you recompile your kernel later on, you MUST recompile alsa-driver.
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Sun Jun 15, 2003 3:41 pm    Post subject: Reply with quote

I don't believe you have to unmerge alsa before emerging it again. When you emerge it, it should overwrite what's there. It is possible you may need to remove the module before emerging the new one (modprobe -r ) but as I said, it works fine for me without.

I believe you do have to reboot the new kernel before (re)emerging alsa. Maybe that's the difference.
Back to top
View user's profile Send private message
mattmunz
n00b
n00b


Joined: 10 Mar 2003
Posts: 23

PostPosted: Sun Jun 15, 2003 3:53 pm    Post subject: Reply with quote

Thanks, jkcunningham. My suspicion was that unmerge might be overkill. Whatever the solution, I think that a step-by-step "re-enabling asla after re-compile/reboot" section of the guide would be welcome.
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Sun Jun 15, 2003 4:07 pm    Post subject: Reply with quote

I think the docs are clear enough for the most part. There are other modules that need to get rebuilt after a kernel rebuild. When maintaining multiple systems with different hardware, its very easy to forget which takes which, so here's my suggestion:

in /root make two shell scripts, one called /root/build-kernel.sh, the other called /root/build-drivers.sh

Here's /root/build-kernel.sh:
Code:

#!/bin/sh
cd /usr/src/linux
make dep && make clean bzImage modules modules_install
mount /boot
cp /usr/src/linux/arch/i386/boot/bzImage /boot
echo "New kernel has been copied to /boot/bzImage"
echo "Reboot now to run the new kernel, then run /root/rebuild-drivers"


Here's my /root/build-drivers.sh:
Code:

#!/bin/sh
echo "Building drivers wiped out by kernel rebuild:"
emerge xfree-drm
modprobe radeon
modprobe agpgart
emerge alsa-driver
update-modules
/etc/init.d/alsasound start
opengl-update xfree
lsmod
echo "If lsmod doesn't show both radeon and agpgart,"
echo "then probably forgot to reboot before doing emerge xfree-drm"
echo "modprobe them after emerging them in that case"


Someone more clever at bash scripts than I could probably tell you how to combine these so it reboots itself (with error checking so it doesn't if there are kernel compile errors). But this works well for me. I don't have to go through my notes on each machine to remember which modules I need to rebuild, etc.

-Jeff
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum