呵呵,这两天人品大爆发,连续解决困扰我多日的几个问题,昨天解决的动态编译问题一下子将alsa编译推进了一大步,现记录如下:

alsa驱动移植请参考:http://blog.csdn.net/yichi7758/archive/2010/02/14/5308789.aspx

 

我编译的源码版本:alsa-lib-1.0.22,alsa-utils-1.0.22,ncurses-5.7(在使用amixer等使用界面的时候需要的库)。

使用交叉编译器:友善的arm-linux-gcc-4.3.2.tar.gz

 

//编译alsa-lib:
./configure --bindir=/usr/arm/4.3.2/bin/ --host=arm-linux --prefix=/home/yichi/work2010/alsa/target --disable-python --datadir=/usr/share

//若不指定datadir在运行aplay等程序时会出现ALSA lib conf.c:2827:(snd_config_hook_load) cannot access file /usr/share/arm-alsa/share/alsa/cards/aliases.conf错误。

 

su
make
make install

//编译ncurses
./configure  --prefix=/home/yichi/work2010/alsa/target CC=arm-linux-gcc LD=arm-linux-ld RANLIB=arm-linux-ranlib AR=arm-linux-ar --host=arm-linux --with-shared
make
make install

//建立动态库的软链接以兼容早期版本,否则配置alsa-utils将出现找不到panel等库的错误

  989  cd /home/yichi/work2010/alsa/target/lib

  990  ln -s libformw.so.5 libform.so.5.7
  991  ln -s libform.so.5.7 libformw.so.5
  992  ln -s libmenu.so.5.7 libmenuw.so.5
  993  ln -s libncurses.so.5.7 libncursesw.so.5
  994  ln -s libpanel.so.5.7 libpanelw.so.5
  996  ln -s libform.so.5.7 libformw.so
  997  ln -s libmenu.so.5.7 libmenuw.so
  998  ln -s libpanel.so.5.7 libpanelw.so
  999  ln -s libncurses.so.5.7 libncursesw.so



//编译alsa-utils
LDFLAGS="-L/usr/arm/4.3.2/arm-linux/lib -lpthread -lc -lgcc" CFLAGS="-I/home/yichi/work2010/alsa/target/include/ncurses" ./configure --host=arm-linux --with-alsa-inc-prefix=/home/yichi/work2010/alsa/target/include --with-alsa-prefix=/home/yichi/work2010/alsa/target/lib --prefix=/home/yichi/work2010/alsa/target
make
make install

Logo

更多推荐