QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2458|回复: 35

???? alsa-0.9.2 @ RedHat 9.0 ?

[复制链接]
发表于 2003-4-22 23:25:35 | 显示全部楼层 |阅读模式
make三个包一切顺利,到这一不时:
# modprobe snd-via82xx
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: unresolved symbol schedule_work
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod /lib/modules/2.4.20-8/kernel/sound/acore/snd.o failed
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod snd-via82xx failed

什么意思,这么解决??
谢谢!
发表于 2003-4-22 23:29:51 | 显示全部楼层
用insmod -f /lib/modules/2.4.20-8/kernel/sound/acore/snd.o行吗?
好像rh9是有这个问题
回复

使用道具 举报

 楼主| 发表于 2003-4-22 23:32:18 | 显示全部楼层
忘说了,VIA686B
回复

使用道具 举报

 楼主| 发表于 2003-4-22 23:33:07 | 显示全部楼层
# insmod -f /lib/modules/2.4.20-8/kernel/sound/acore/snd.o
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: unresolved symbol schedule_work
回复

使用道具 举报

 楼主| 发表于 2003-4-22 23:35:25 | 显示全部楼层
想换成原来使用的alsa-0.5.9,make不能通过,是不是alsa-0.5.9对rh9不支持啊?
回复

使用道具 举报

发表于 2003-4-22 23:46:07 | 显示全部楼层
VIA686B 好像有它自己的模块吧?你./configure --help看一下,里面的--with-cards一项会列出所有的模块的。
回复

使用道具 举报

发表于 2003-4-23 03:25:25 | 显示全部楼层

Re: ???? alsa-0.9.2 @ RedHat 9

[quote:0425f192d8="lbohr"]make三个包一切顺利,到这一不时:
# modprobe snd-via82xx
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: unresolved symbol schedule_work
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod /lib/modules/2.4.20-8/kernel/sound/acore/snd.o failed
/lib/modules/2.4.20-8/kernel/sound/acore/snd.o: insmod snd-via82xx failed

什么意思,这么解决??
谢谢![/quote]
u make is succ. but do u notice that when u compile the alsa driver. does it report 'implicitly declare schedule_work' or ''implicitly declare snd_compat_schedule_work'.
schedule_work is a new function defined in linux kernel 2.5.45 or later. so u 2.4.20-8 do not have it. when u insmod this module into kernel, kernel find that this module use a symbol it does not know. then insmod will fail. in alsa drive code init.c it handle thsi problem like this. it detect linux kernel version, if >2.5.45 then use the one defined in kernel. if not, it define its own one. now the problem is that its code to detect the kernel verson fails.
do u install u linux kenrel source code? u need this.
can u 'ls /usr/src' and post the screen output here?
can u 'more linux-2.4.20-8/include/linux/version.h' and post the screen output here, if u have this linux-2.4.20-8?
can u 'ln -s /usr/src/linux-2.4.20-8 /usr/src/linux', then recompile the alsa-drivers and try again?
good luck.
回复

使用道具 举报

 楼主| 发表于 2003-4-23 08:50:20 | 显示全部楼层
I got it.try again.
btw,how to get 'linux-2.4.20-8/include/linux/version.h'?recompile kernel?
how to get it quickly?
回复

使用道具 举报

 楼主| 发表于 2003-4-23 09:08:29 | 显示全部楼层
[quote:9a7a25e2e2="dalin"]VIA686B 好像有它自己的模块吧?你./configure --help看一下,里面的--with-cards一项会列出所有的模块的。[/quote]
VIA芯片在alsa-0.9.0beta11后使用同一个module : via82xx
回复

使用道具 举报

 楼主| 发表于 2003-4-23 09:35:25 | 显示全部楼层
cd /usr/src/linux
make mrproper
make include/linux/version.h
make symlinks

这样生成version.h可以吗?
#define UTS_RELEASE "2.4.20-8custom"
                                      ^^^^^^^^^^是不是要改成2.4.20-8?
#define LINUX_VERSION_CODE 132116
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << + (c))
回复

使用道具 举报

发表于 2003-4-23 10:01:30 | 显示全部楼层
[quote:4343aa03fb="lbohr"]cd /usr/src/linux
make mrproper
make include/linux/version.h
make symlinks

这样生成version.h可以吗?
#define UTS_RELEASE "2.4.20-8custom"
                                      ^^^^^^^^^^是不是要改成2.4.20-8?
#define LINUX_VERSION_CODE 132116
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << + (c))[/quote]

u need not recompile kernel, this is enough. the two important ones are LINUX_VERSION_CODE and KERNEL_VERSION(a,b,c), u can check alsa source code to know why. be sure to add /usr/src/linux symbol link, otherwise ./configure --help to see how to explicitly set kernel include.
回复

使用道具 举报

 楼主| 发表于 2003-4-23 10:20:48 | 显示全部楼层
# ./configure --with-kernel=/usr/src/linux-2.4.20-8 --with-moddir=/lib/modules/2.4.20-8/kernel --with-sequencer=yes --with-cards=via82xx

checking for kernel module symbol versions... "no"

# make
gcc -M -D__KERNEL__ -DMODULE=1 -I/home/src/alsa-driver-0.9.2/include  -I/usr/src/linux-2.4.20-8/include -O2  -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD  hwdep32.c ioctl32.c pcm32.c rawmidi32.c seq32.c timer32.c > .depend
In file included from /usr/src/linux-2.4.20-8/include/linux/vmalloc.h:4,
                 from /usr/src/linux-2.4.20-8/include/asm/io.h:47,
                 from /home/src/alsa-driver-0.9.2/include/adriver.h:115,
                 from /home/src/alsa-driver-0.9.2/include/sound/driver.h:43,
                 from ../../alsa-kernel/core/ioctl32/hwdep32.c:21,
                 from hwdep32.c:2:
/usr/src/linux-2.4.20-8/include/linux/sched.h:1115:36: macro "need_resched" passed 1 arguments, but takes just 0

sched.h 怎么又有问题,不能make了?
回复

使用道具 举报

发表于 2003-4-23 10:25:41 | 显示全部楼层
checking for kernel module symbol versions... "no" ? seems has problem.
can u do make menuconfig, enable all three options in load module support, save configuration, and make dep? then try again. i download the alsa driver code and compile it just now, works fine.
回复

使用道具 举报

发表于 2003-4-23 10:28:39 | 显示全部楼层
刚刚在redhat内核2.4.20-9的源码目录下查了一下,内核源码里有两个地方用到这个schedule_work函数,按道理应该支持才对
drivers/message/fusion/mptscsih.h:      if (schedule_work(x) == 0) {    \
drivers/message/fusion/mptlan.c:                        schedule_work(&priv->post_buckets_task);
include/linux/workqueue.h:extern int FASTCALL(schedule_work(struct work_struct *work));

不知道你现在用的内核是不是自己编译的?如果用的还是rh9原装自带的2.4.18-8,试试将kernel-source rpm包用--force参数覆盖安装一遍,然后重新make alsa驱动
回复

使用道具 举报

 楼主| 发表于 2003-4-23 10:35:27 | 显示全部楼层
# ./configure --with-kernel=/usr/src/linux-2.4.20-8 --with-moddir=/lib/modules/2.4.20-8/kernel --with-sequencer=yes --with-cards=via82xx

checking for kernel module symbol versions... "yes"

#make
proceeding....

Thank u
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-3 00:32 , Processed in 0.057898 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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