Post: arm mplayer porting process

Source: Internet
Author: User

 
The source code package is currently the latest mplayer-1.0pre7try2.tar.bz2, which can be easily found online and will not be connected.
For the compilation tool, select arm-linux-gcc-3.3.2.tar.bz2, which has more than 70 m and forgets where to collect the data.
, I have these bad habits, did not expect this time to use :) 2.95.3 In the compilation of the MPlayer-1.0pre7try2 version
This may cause problems. In addition, the common gcc3.4.1 version on the Internet will be suspended when compiling libavcodec/snow. c files.
GNU bug or mplayer bug. I don't have time to go into it. The tall man has come to a conclusion and can tell me if the patch is not used.
The compilation process is complete smoothly.

.
Install arm-Linux-GCC in/usr/local/ARM/3.3.2/bin to ensure that you have the root permission. Assume that your arm-
Linux-GCC toolkit is placed in ~ In the/src directory, perform the following operations. Of course, you can install arm-Linux-GCC to other places.
Side.
CD/
Tar jxvf ~ /Src/arm-linux-gcc-3.3.2.tar.bz2
Modify the $ PATH variable to include arm-Linux-GCC. I am used to modifying the. bash_profile file in the home directory of the current user.
Add a line to the. bash_profile file.
$ Path =/usr/local/ARM/3.3.2/bin: $ path
You can also use absolute paths for future use.
After installing the cross-compilation tool, decompress the mplayer source code-
1.0pre7try2.tar.bz2 copy to the working directory (for example ~ /Develop.
CP ~ /Src/MPlayer-1.0pre7try2.tar.bz2 ~ /Develop
Cd ~ /Develop
Tar jxvf MPlayer-1.0pre7try2.tar.bz2
Music MPlayer-1.0pre7try2 mplayer (here just change a name, the original is too long)
There should be no problem above, so we will start to compile it later. You may have to look at it. Please give me a round of applause.
..... Haha.

.
The first step is configuration. Here are a few notes. The command is as follows:
./Configure -- Host-CC = GCC -- cc = arm-Linux-GCC -- target = arm-armv4l-linux -- enable-static
-- Prefix =/tmp/mplayer -- disable-win32 -- disable-dvdread -- enable-fbdev -- disable-
Mencoder -- disable-Live 2> & 1 | tee logfile

-- Host-CC = GCC is used to compile intermediate files to be executed on the host, such as codec-cfg.
Wrong! Introduction to the online article "transplantation of mplayer on S3C2410" (hereinafter referred to as "Migration ")
When codec-CFG cannot be executed, the solution is to compile codec-CFG into the i386 platform and stop it here.
The codec-CFG replacement of i386 causes compilation to continue. This parameter is not so troublesome after the experiment is set, and the entire process
It also looks elegant.

-- Cc = arm-Linux-GCC is not well described. If the location of arm-Linux-GCC is not added to $ path
It is better to specify the absolute path here.

-- Target = arm-armv4l-linux this parameter should pay attention to a three-part, the first part of the arm refers to arch, here set
Set it to arm. The armv4l in the second part refers to the specific version. Note that you must follow the platform category under the libavcodec directory.
Otherwise, the optimization code for this platform cannot be compiled (as I have observed). The third part is the system
Platform.

-- Enable-static is used to set static connections without a bunch of messy dynamic libraries, especially for our new users.
A lot of trouble. If you set this parameter, you do not need to set-prefix, or execute make install.

The last 2> & 1 | tee logfile indicates that the execution is recorded in the logfile file while being output to the screen.
, Compilation in the console is more useful.

The remaining parameters are not well described. Remember to add -- disable-mencoder. Here mencoder compilation will ask
I have no time to study the problem. If you are not clear about the meaning of other parameters, check the configure file.
After the configuration is complete, compile. Execute make. It takes about 2-3 minutes on my machine. In this way, it is in the current directory.
The executable mplayer file is obtained.

.
The above figure shows the mplayer that can be executed on 2410. I have to run it to see how it works.
This section describes how to configure the NFS service of the host so that the host can be mounted to 2410 (
The core needs to support NFS.) I have extracted some of the above steps for many materials.
Modify the/etc/export file and add a line in it:/nfs * (RW, sync, no_root_squash)
Disable firewall: iptables-F
Enable Automatic Running of NFS service upon startup: Select Service after setup
The above file needs to be restarted before NFS can run. If you do not want to restart it, run it manually:
/Etc/rc. d/init. d/nfs start
Now we can proceed to the next step. Copy the mplayer to the NFS root directory of the host and copy the files to be played together.
CP mplayer/nfs
Cp xxx. AVI/nfs
From 2410, mount the/NFS Directory of the host to an empty directory not used on the Development Board. Generally, I select a directory under/mnt, such
/Mnt/nfs
Mount-t nfs 192.168.1.222:/nfs/mnt/nfs
Now try to see if it is successful. enter it in the terminal.
CD/mnt/nfs
./Mplayer XXX. Avi
I saw a bunch of real things in the terminal and it stopped. It was terrible! I'm a newbie. How can I deal with it?
Come on. Let's take a look at the prompt information. The prompt information may include
Can't open/dev/fb0
VO [null]
Can't open/dev/DSP
AO [null]

Get the image first. This will prove that there is no problem with compilation and basic settings, and the voice will be processed in the next step.
The video output described in the mplayer manual is FB. Go to/Dev and check that there is only one/dev/FB and no/dev/fb0.
Take a look at the valid output devices. Use mplayer-vo help to try mplayer-vo xx xxx. Avi one by one.
Is there a problem in the compilation process? I tried all the parameter combinations of decoder or something. The same is true. There is no dynamic or static LCD.
After a few nights, I plan to give up ......
One day hanging out on the Internet, I read an article about some Linux skills, such as CP/dev/FB myimage is equivalent to capturing a screen. Suddenly I
I was wondering if CP myimage/dev/FB is equivalent to displaying myimage. No matter how it is, try again. Sure enough, the LCD started to work.
Although the image is not normally displayed, three identical contours are still allowed. This proves that the LCD driver is correct.
While mplayer uses/dev/fb0. My CP is/dev/FB! And I have seen this/dev/fb0 somewhere.
In this case, I used to compile the/dev/fb0 kernel, and the/dev/FB Kernel
The node indicates that the framebuff driver is correct, so what is the difference between the old and new kernels? I think it seems that the kernel is being compiled.
When I didn't actually modify the MTD partition parameter, will it be strange?

Modify the parameters in the drivers/MTD/NAND/s3c2410_nand.c file to recompile the kernel and download the corresponding parameters.
In the/dev directory, check whether/dev/fb0 appears ..... (Xxx bytes are omitted here) trace to the/etc/init. d/RCS file (each person
The configuration is different, please check your corresponding file) Everything is clear, you should study this file yourself.
The kernel cannot execute/etc/init. d/RCs, causing some system initialization actions not to be executed.

Try again./mplayer XXX. Avi or not. Isn't it... Try to play only the image without playing the sound in the text of "shift"
,./Mplayer-nosound XXX. Avi Haha is normal. The resolution at 320x240 is quite smooth and there is nothing to say.
Modify the audio driver to recompile the kernel.

This should have ended,... But... Alas, embedded is like this. Success is always the same, and errors are always thousands of errors.
No.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.