主题 : madplay与alsa移植问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 65147
精华: 0
发帖: 33
金钱: 165 两
威望: 33 点
综合积分: 66 分
注册时间: 2012-03-14
最后登录: 2013-08-13
楼主  发表于: 2013-03-15 22:48

 madplay与alsa移植问题

开发环境:Red Hat 企业版6.3
开发板:tiny210

开发板内核版本:linux  2.6.35.7-FriendlyARM
交叉编译工具版本:4.5.1
目的:编译madplay,移植alsa库,最终制作一个在linux下的Mp3播放器。
    根据网上提供的madplay编译源码编译了madplay拷贝到友善提供的Linux文件系统下可以运行MP3了,但是我自己做的文件系统,将madplay拷贝到文件文件系统不能运行;还有,
alsa我使用的1.0.24,在红帽下编译不成功,

alsa-driver-1.0.24编译:1.生成Makefile:"./configure --host=arm-linux"
    2.make 编译:提示Please, run the configure script as first...,然后make  install  if [ -L /include/sound ]; then \        rm -f /include/sound; \        ln -sf /opt/tiny210/mp3/SDK-MP3/resources/alsa/alsa-driver-1.0.24/include/sound /include/sound; \    else \        rm -rf /include/sound; \        install -d -m 755 -g root -o root /include/sound; \        for f in include/sound/*.h; do \            install -m 644 -g root -o root $f /include/sound; \        done \    fiinstall: 无法获取"include/sound/*.h" 的文件状态(stat): 没有那个文件或目录make: *** [install-headers] 错误 1 
所以移植不到开发板中去。
希望大神们能够指导一下,提供一下开发板中使用的alsa库和编译帮助。
谢谢!

*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2013-04-11 13:06
根据源代码根目录下的INSTALL文件,

* Kernel Source Tree
   On 2.4/2.6 kernels, the location of the kernel source tree is
   parsed automatilly from the running kernel.
   If it's not in the standard place, specify the path via
   --with-kernel=<kernel_directory>.
   On 2.6 kernels, the build directory has to be given via
   --with-build=<kernel_build_dir> option additionally, too.

你需要在configure的时候指定"--with-kernel"和"--with-build"这两个参数,因为编译alsa-driver依赖内核源代码里的头文件。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."