Porting Environment ( red Bold font for modified content, blue bold text for special attention)
1, Host Environment: Vmare under linux5.7, 384 memory.
2, compiling the compilation environment: ARM-LINUX-GCC v4.4.3
3, Development Board: FL2440,4M nor flash,256m NAND flash.
4,u-boot version: u-boot-2011.09
5,linux version: linux-3.1
6, Reference articles:
Embedded Linux application Development complete manual, Vedon, authoring.
LDD3,
Source code required: madplay-0.15.2b.tar.gz,libmad-0.15.1b.tar.gz,libid3tag-0.15.1b.tar.gz and zlib-1.1.4.tar.gz
Download Address:
Http://www.gzip.org/zlib/zlib-1.1.4.tar.gz
Http://cdnetworks-kr-2.dl.sourceforge.net/project/mad/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
Http://cdnetworks-kr-1.dl.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz
Http://cdnetworks-kr-1.dl.sourceforge.net/project/mad/madplay/0.15.2b/madplay-0.15.2b.tar.gz
1. New Path
sudo mkdir/madplay
sudo mkdir/madplay/mad
2. Maximum permissions to the path
sudo chmod 777/madplay/madplay/mad
3. Copy four source packages to/madplay and unzip
4. Compile zlib-1.1.4
Go to zlib-1.1.4 Path:
CD zlib-1.2.5/
(1) First configure the Configure file, generate the Makefile, command (--prefix=/madplay/mad/the installation path for the specified final generated library file):
sudo./configure--prefix=/madplay/mad/
(2) Modify Makefile:
sudo vi Makefile
Modify the following three items:
CC=GCC-> CC=ARM-LINUX-GCC
Ar=ar RC-> Ar=arm-linux-ar RC
Ranlib=ranlib-> Ranlib=arm-linux-ranlib
(3) Compiling:
sudo make
(4) Installation:
sudo make install
5: Compiling libid3tag-0.15.1b
Go to libid3tag-0.15.1b Path:
CD libid3tag-0.15.1b/
1) Run the following command
sudo./configure cc=arm-linux-gcc ar=arm-linux-ar ranlib=arm-linux-ranlib--host=arm-linux--prefix=/home/zhao/ Madplay/mad--disable-shared Cppflags=-i/home/zhao/madplay/mad/include/ldflags=-l/home/zhao/madplay/mad/lib
(2) Compiling:
sudo make
(3) Installation:
sudo make install
6: Compiling libmad-0.15.1b
Go to libmad-0.15.1b Path:
CD libmad-0.15.1b/
1) Run the following command
sudo./configure cc=arm-linux-gcc ar=arm-linux-ar ranlib=arm-linux-ranlib--host=arm-linux--prefix=/home/zhao/ Madplay/mad--disable-shared Cppflags=-i/home/zhao/madplay/mad/include/ldflags=-l/home/zhao/madplay/mad/lib
(2) Compiling:
sudo make
(3) Installation:
sudo make install
7. Compile Madplay:
Enter Path/madplay/madplay-0.15.2b
1) Run the following command
./configure CC=ARM-LINUX-GCC Ar=arm-linux-ar ranlib=arm-linux-ranlib--host=arm-linux--prefix=/home/zhao/madplay/ Mad--disable-shared--enable-static--disable-nls cppflags=-i/home/zhao/madplay/mad/include/ldflags=-l/home/zhao/ Madplay/mad/lib
(2) Compiling:
sudo make
(3) Installation:
sudo make install
The resulting madplay are ultimately dynamically compiled, and for static compilation, the final compilation command that is output after make is replicated, and finally the-static is added, as follows:
/usr/local/arm/3.4.1/bin/arm-linux-gcc-wall-g-o2-o madplay madplay.o getopt.o getopt1.o version.o resample.o filter.o TAG.O crc.o rgain.o player.o audio.o audio_aiff.o audio_cdda.o audio_hex.o audio_null.o audio_raw.o audio_snd.o audio_wav E.O audio_oss.o-l/madplay/mad/lib/madplay/mad/lib/libmad.a/madplay/mad/lib/libid3tag.a-lz-lm-static
Enter, ok!
Download the Madplay in the current directory to the Development Board, and then download a MP3 format audio file to the development Board and execute:
./madplay Xxx.mp3
This allows you to hear the MP3 music played by the headset.
The encoding format for MPA1L3 song playback effect is also OK, playback speed is only a little slower than the PC.
The encoding format for MPA2L3 songs is obviously slow to play.