LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: qing

讨论linux-2.6的编译,使用问题.......

[复制链接]
发表于 2003-11-1 22:25:49 | 显示全部楼层
继续
期待……
自己编的失败了
 楼主| 发表于 2003-11-13 19:27:46 | 显示全部楼层
ALSA & 2.6 kernel mini HOW-TO?

[PHP]I had some trouble enabling ALSA on my 2.6 kernel. I was able to get it working when i applied the following changes to the standard ALSA-guide (http://www.gentoo.org/doc/en/alsa-guide.xml):

In 2.6 ALSA support is built into the kernel, so you have to enable it there (do NOT build it as a module). Also make sure that all relevant options are set:
Code:
cd /usr/src/linux-beta
make menuconfig

Choose the Sound option, and answer Y to:

      <*> Sound card support

and, under Advanced Linux Sound Architecture --->

      <*> Advanced Linux Sound Architecture
      <*> Sequencer support
      <*> OSS API emulation
      <*> OSS Mixer API
      <*> OSS PCM (digital audio) API
      <*> OSS Sequencer API

and enable your soundcard under the correct subheading (mine is under "CI devices"). Make sure you disable

      < > Open Sound System (DEPRECATED)

Now rebuild your kernel with
Code:
make clean bzImage modules modules_install
mount /boot
cp arch/i386/boot/bzImage /boot

and reboot. So you no longer have to emerge any ALSA drivers. But you still have to emerge the utilities with
Code:
emerge alsa-utils

Clearly there is no need anymore to add alsasound to the boot runlevel since it's built into the kernel already, so skip that and proceed to unmuting the sound channels as described in the guide:
Code:
amixer set Master 100 unmute
amixer set PCM 100 unmute

Now sound should be working when you start KDE!

/EDIT Note: I just found out that unmuting is not preserved across reboots![/PHP]

http://forums.gentoo.org/viewtopic.php?t=97157&highlight=
 楼主| 发表于 2003-11-13 19:28:56 | 显示全部楼层
[PHP]Well, the real way to get ALSA to work with 2.6 kernels is -

1. Configure the kernel with the ALSA stuff as _modules_
Code:
make && make modules_install
then copy the /usr/src/arch/i386/boot/bzImage to /boot

2.
Code:
emerge alsa-lib alsa-utils


3. edit /etc/modules.d/alsa for your card (see the Gentoo ALSA guide and also the individual card pages on the ALSA website for how to do this)

4.
Code:
update-modules


5.
Code:
rc-update add alsasound boot


6.
Code:
alsamixer
- unmute what you need and set your levels

7.
Code:
alsactl store


8. Instead of rebooting, you can
Code:
/etc/init.d/alsasound start


Now this method means that the alsasound script takes care of loading the modules at boot, and restores your mixer settings, and also stores them when you shut down. [/PHP]
发表于 2003-11-13 22:34:56 | 显示全部楼层
这个不能泡!!!
发表于 2003-11-13 23:30:41 | 显示全部楼层
shutdown command have no --z option.
发表于 2003-11-18 19:20:52 | 显示全部楼层

安装ALSA错误,求助

/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-hea ders system headers,
/usr/include/linux/modversions.h:2:2: #error but rather headers from an appropri ate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or  similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/in clude
/usr/include/linux/modversions.h:5:2: #error to build against the currently-runn ing kernel.
 楼主| 发表于 2003-11-19 17:22:21 | 显示全部楼层
你是具体什么操作的。。。
 楼主| 发表于 2003-11-19 17:23:44 | 显示全部楼层
发表于 2003-11-19 21:38:16 | 显示全部楼层

回复: 安装ALSA错误,求助

一开始的时候,我先编译了内核声卡选择alsa, 能启动 光电鼠标也能用,就是没有声音,再然后我又从ALSA的网站下载驱动,我是校园网不能出国,用代理下载下了半个小时才下完。./configure没有错误,make后最后显示
make[1]: *** [serialmidi.o] Error 1
make[1]: Leaving directory `/home/forever/soft/alsa-driver-0.9.8/drivers'
make: *** [compile] Error 1


然后make install 就出现了下面的错误
最初由 laozhang 发表
安装ALSA错误,求助

[QUOTE]
    /usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-hea ders system headers,
    /usr/include/linux/modversions.h:2:2: #error but rather headers from an appropri ate kernel-source package.
    /usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or similar) to
    /usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/in clude
    /usr/include/linux/modversions.h:5:2: #error to build against the currently-runn ing kernel.

[/QUOTE]



就出现了上面的错误。根据nbxmedia的帖子又重新编译选了OSS,终于有声音了。
http://www.linuxsir.cn/forum.php ... =5&pagenumber=2
 楼主| 发表于 2003-12-20 20:05:05 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表