During the process of porting madplay to mini2440 under Ubuntu8.10, I also referred to a post on the Internet. Since I didn't expect to put the process here, I didn't record the website of that post, so I would like to thank you! Madplay porting record: 1. The compilation of the PC version of madplayPC is basically the same as that in the mini2440 manual. Madplay1‑compiled zlib-1.2.3decompress zlib-1.2.3.tar.gz to/opt/
During the process of porting madplay to mini2440 in Ubuntu 8.10, I also referred to a post on the Internet. Since I didn't expect to put the process here, I didn't record the website of the post, thank you!
Madplay port record:
I. PC version of madplay
The compilation of the PC version is basically the same as that in the mini2440 manual.
2. ARM version of madplay
1. Compile zlib-1.2.3
Decompress zlib-1.2.3.tar.gz to/opt/FriendlyARM/mini2440/madplay/src-arm/zlib-1.2.3
Go to zlib-1.2.3 directory
Configure:
Sudo gedit configure
A. Change AR =$ {AR-"ar rc"}:
AR =$ {AR-"/usr/local/arm/3.4.1/bin/arm-linux-ar rc "}
B. Change RANLIB =$ {RANLIB-"ranlib"}
RANLIB =$ {RANLIB-"/usr/local/arm/3.4.1/bin/arm-linux-ranlib "}
C. Change cc =$ {CC-gcc}
Cc =$ {CC-/usr/local/arm/3.4.1/bin/arm-linux-gcc}
Here,/usr/local/arm/3.4.1/bin is the installation path of the arm-linux-gcc compiler. Save and exit.
Run the following command:
Sudo./configure -- prefix =/opt/FriendlyARM/mini2440/madplay/target-arm
Sudo make
Sudo make install
Zlib-1.2.3 installation is complete.
2. Compile libid3tag-0.15.1b
Decompress zlib-1.2.3.tar.gz to/opt/FriendlyARM/mini2440/madplay/src-arm/libid3tag-0.15.1b
Go to libid3tag-0.15.1b directory
Run the following command:
Sudo. /configure CC =/usr/local/arm/3.4.1/bin/arm-linux-gcc -- host = arm-linux -- prefix =/opt/FriendlyARM/mini2440/madplay/target- arm -- disabl
E-shared CPPFLAGS =-I/opt/FriendlyARM/mini2440/madplay/target-arm/include LDFLAGS =-L/opt/FriendlyARM/mini2440/madplay/target-arm/lib
Sudo make
Sudo make install
Libid3tag-0.15.1b Installation Complete
3. Compile libmad-0.15.1b
Decompress zlib-1.2.3.tar.gz to/opt/FriendlyARM/mini2440/madplay/src-arm/libmad-0.15.1b
Go to libmad-0.15.1b directory
Run the following command:
Sudo. /configure CC =/usr/local/arm/3.4.1/bin/arm-linux-gcc -- host = arm-linux -- prefix =/opt/FriendlyARM/mini2440/madplay/target- arm -- disable-shared
Sudo make
Sudo make install
Libmad-0.15.1b Installation Complete
4. Compile madplay-0.15.2b
Uncompress madplay-0.15.2b.tar.gz to/opt/FriendlyARM/mini2440/madplay/src-arm/madplay-0.15.2b
Go to madplay-0.15.2b directory
Run the following command:
Sudo. /configure CC =/usr/local/arm/3.4.1/bin/arm-linux-gcc -- host = arm-linux -- prefix =/opt/FriendlyARM/mini2440/madplay/target- arm -- enable-static -- disable-shared CPPFLAGS =-I/opt/FriendlyARM/mini2440/madplay/target-arm/include LDFLAGS =-L/opt/FriendlyARM/mini2440/madplay/ target-arm/lib
Sudo make
Sudo make install
5. Related Files after compilation
The executable file madplay generated after compilation is in the/opt/FriendlyARM/mini2440/madplay/target-arm/bin directory.
Rename madplay to mymadplay to be different from madplay on the Development Board.
Run sudo mv madplay mymadplay.
The madplay library file generated after compilation is in the/opt/FriendlyARM/mini2440/madplay/target-arm/lib directory.
6. Porting
Place the executable file in the/usr/bin directory of the Development Board.
Put the madplay library file in the/usr/lib directory of the Development Board.
Implementation Method: U disk, nfs, ftp, etc.
7. Test
The root directory of the Development Board contains the mp3 file: shanghaitan.pdf
Command: mymadplay shanghaitan.pdf
This music is played on the Development Board.