1 / 9

Madplay 移植实验

Madplay 移植实验. 1 .实验目的 掌握 Madplay 移植方法。. 2 .实验设备. 硬件: PC 机 1 台 软件: RedHat Linux 9.0 操作系统 嵌入式 Linux 开发环境 madplay-0.15.2b.tar.gz libid3tag-0.15.1b.tar.gz libmad-0.15.1b.tar.gz zlib-1.2.3.tar.gz. 3 .实验内容. 在 PC 机上配置和编译 Madplay ,并使用 Madplay 播放 mp3 ;. 6 .实验步骤. ( 1 )准备源代码

ezra-pace
Download Presentation

Madplay 移植实验

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Madplay移植实验 • 1.实验目的 • 掌握Madplay移植方法。

  2. 2.实验设备 • 硬件: PC机 1台 • 软件:RedHat Linux 9.0操作系统 • 嵌入式Linux开发环境 • madplay-0.15.2b.tar.gz • libid3tag-0.15.1b.tar.gz • libmad-0.15.1b.tar.gz • zlib-1.2.3.tar.gz

  3. 3.实验内容 • 在PC机上配置和编译Madplay,并使用Madplay播放mp3;

  4. 6.实验步骤 (1)准备源代码 可以到http://sourceforge.net/project/showfiles.php? group_id=12349下载madplay-0.15.2b. tar.gz源代码和相关依赖包: madplay-0.15.2b.tar.gz libid3tag-0.15.1b.tar.gz libmad-0.15.1b.tar.gz 另外,还需要zlib库,请到http://www.gzip.org/zlib/上下载。目前最新版本是zlib-1.2.3,下载软件包zlib-1.2.3.tar.gz。

  5. 6.实验步骤 (2)安装zlib-1.2.3 新建目录install,作为库文件的安装路径。解压zlib-1.2.3.tar.gz,在当前目录下生成的zlib-1.2.3目录就是zlib-1.2.3源代码所在路径。 $ mkdir install $ tar xzvf zlib-1.2.3.tar.gz 编译zlib-1.2.3。进入zlib-1.2.3目录,在交叉编译时需修改Makefile文件的CC=arm-linux-gcc prefix=$(PWD)/../install 然后编译并安装: $ make $ make install

  6. 6.实验步骤 • (3)编译安装libid3tag-0.15.1b • 解压libid3tag-0.15.1b.tar.gz,在当前目录下生成的libid3tag-0.15.1b目录就是安装目录。 • $ tar xzvf libid3tag-0.15.1b.tar.gz • 使用configure命令配置库编译选项,包括C编译器、编译选项、链接选项和安装路径等。 • 在PC机上使用: • $ ./configure • 用ARM编译工具交叉编译libid3 • $ ./configure --host=arm-linux --enable-static --disable-shared --disable-debugging --prefix=$INSTALLPATH • 编译并安装库,将编译好的库安装到指定目录下。 • $ make 、 $ make install

  7. 6.实验步骤 (4)编译安装libmad-0.15.1b 解压libmad-0.15.1b.tar.gz,在当前目录下生成的libmad-0.15.1b就是安装路径。 $ tar xzvf libmad-0.15.1b.tar.gz 使用configure命令配置库编译选项,包括C编译器、编译选项、链接选项和安装路径等。 在PC机上使用: $ ./configure 用ARM编译工具交叉编译libmad $ ./configure --host=arm-linux --enable-static --disable-shared -disable-debugging --prefix=$INSTALLPATH 编译并安装库,将编译好的库安装到指定目录下。 $ make 、$ make install

  8. 6.实验步骤 • (5)编译安装madplay-0.15.2b • 解压madplay-0.15.2b.tar.gz,在当前目录下生成的madplay-0.15.2b就是安装路径。 • $ tar xzvf madplay-0.15.2b.tar.gz • 使用configure命令配置库编译选项,包括C编译器、编译选项和链接选项等。 • 在PC机上使用: • $ ./configure • 用ARM编译工具交叉编译libmad • $ ./configure --host=arm-linux --enable-static --disable-shared --with-pic --disable-debugging • 编译madplay,当前目录下会生成madplay文件。 • $ make

  9. 6.实验步骤 (6)播放mp3 使用NFS方式调试或者将生成的madplay添加到文件系统中,重新下载文件系统。使用madplay播放mp3文件。 # ./madplay music.mp3

More Related