2010年2月3日 星期三

移植libmad (MAD)

1. 開發環境:
(1). CPU: Andes RISC CPU core_N12.
(2). 平台: ADP-XC5FF676 V1.1.
(3). Linux OS: Ubuntu10.04.
(4). Toolchains: AndeSight v1.3.3 for Linux.
(5). Embedded Linux2.6.18
2. 目的:
(1). 至 http://www.linuxfromscratch.org/blfs/view/cvs/multimedia/libmad.html 下載libmad 函式庫source code並移植至Andes Core.
(2). MAD(MPEG Audio Decoder)是提供MPEG音效解碼之用的函式庫,目前支援MPEG-1以及MPEG-2,與一般常使用到的MP3(MPEG-1 Layer 3).
3. 實驗步驟:
(1). 使用Terminal輸入〝source bashrc.nds32le-linux-V0〞指定交叉編譯路徑,這的步驟請參照setup步驟.
(2). 輸入〝tar xvf libmad-0.15.1b.tar.gz〞解壓縮.

(3). 輸入〝cd libmad-0.15.1b/〞至libmad目錄下. (4). 開啟〝config.sub〞檔案修改程式.Line 234增加,
Line 301增加 .
注意:〝Tab鍵〞與〝空白鍵〞差異.
(5). 輸入〝./configure --host=nds32le-linux CXX=nds32le-linux-g++ --prefix=/usr/local/mad〞自動設定Makefile參數.(6). 輸入〝make〞開始編譯.(7). 輸入〝sudo PATH=/home/acer/Andestech/AndeSight133/toolchains/nds32le-linux-glibc-V0/bin:$PATH make install〞,輸入password開始安裝.(8). 安裝的函式庫位置在〝/usr/local/mad/〞下.

備註:
--enable-speed : optimize for speed over accuracy.
--enable-accuracy : optimize for accuracy over speed
--disable-debugging : do not compile with debugging support, and use more optimizations.
--disable-shared : do not build a shared library.
--enable-fpm=ARCH : use the ARCH-specific version of the fixed-point math assembly routines
--enable-sso : use the subband synthesis optimization,with reduced accuracy.
--disable-aso : do not use certain architecture-specific optimizations.
--enable-debugging
: enable diagnostic debugging support and debugging symbols.
--enable-profiling : generate `gprof' profiling code.
--enable-experimental : enable code using the EXPERIMENTAL preprocessor define.


1 則留言:

  1. 使用Andes BSP_V3.0編譯時會發生"-fforce-mem"的erroe,可以將Makefile打開,將CFLAGS=下的fforce-mem參數刪除,再重新make就可以了.
    發生這個現象的原因是因為gcc4.4編譯條件更嚴緊.

    回覆刪除