Migration process of mplayer on fs2410

Source: Internet
Author: User
○. Preparations before transplantation

The source code package is currently the latest mplayer-1.0pre7try2.tar.bz2, which can be easily found online and will not be associated. The compilation tool selects arm-linux-gcc-3.3.2.tar.bz2, which has more than 70 MB and forgets where to collect the data. I have these bad habits, did not expect this useful :) 2.95.3 in the compilation of this version of the MPlayer-1.0pre7try2 will have problems, in addition to the common online gcc3.4.1 version in the compilation of libavcodec/snow. the C file will be hung up and I don't know whether it is a GNU bug or a mplayer bug. I don't have time to go into it. The high man has come to a conclusion and can tell me about it. If the patch is not used, the compilation process can be completed smoothly.

 

 

1. Install the tool and decompress the source code

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 in ~ In the/src directory, perform the following operations. You can also install arm-Linux-GCC elsewhere.

CD/

Tar jxvf ~ /Src/arm-linux-gcc-3.3.2.tar.bz2

Modifying the $ PATH variable contains 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. Copy mplayer-1.0pre7try2.tar.bz2 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.

 

 

Ii. Start Compilation

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 that need to be executed on the host, such as codec-cfg. Remember not to miss it or make a mistake! Transplantation of mplayer on S3C2410 (hereinafter referred to as "mobile) this article introduces how to solve the problem of prompting that codec-CFG cannot be executed with an error: Compile codec-CFG to i386 platform, and then use codec-CFG of i386 to stop it. continue compilation. You don't need to worry about setting this parameter through the experiment, and the whole process is elegant.

-- Cc = arm-Linux-GCC. 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 to arm; the second part of the armv4l refers to the specific version, this should be noted that it must be consistent with the Platform directory name under the libavcodec directory, otherwise the optimization code for this platform cannot be compiled (as I have observed, this is what ^ _@); the third part is the system platform.

-- Enable-static is used to set static connections without a bunch of messy dynamic libraries, which saves a lot of trouble for new users. If this parameter is set, 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, which is useful for compiling in the console.

There is no better introduction to the remaining several parameters. Remember to add -- disable-mencoder. mencoder compilation may be problematic here and there is no time to study it. If you do not know the meaning of other parameters, see the configure file.

Compile after the configuration is complete. Run

Make

It takes about 2-3 minutes on my machine. In this way, the executable mplayer file is obtained in the current directory.

Iii. Trial Run

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 the host settings. Configure the NFS service of the host so that the host can be mounted to 2410 as a server (the kernel on 2410 needs to support NFS ). I have extracted some of the above steps from 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 must 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 as/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 stopped. Miserable! I am a newbie. How can I deal with it. Take a look at the prompt. The prompt information contains the following information:

Can't open/dev/fb0

VO [null]

Can't open/dev/DSP

AO [null]

Get the image first. This will prove that there are no problems 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 only one/dev/FB exists and no/dev/fb0 exists. Let's 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 with the compilation process? The Parameter Combinations of decoder and other things have been tried again. The LCD remains unchanged. 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 was wondering If CP myimage/dev/FB is equivalent to displaying myimage? Try again. Sure enough, the LCD started to act. Although it was not normal to show the image, it could still have three identical outlines. 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. After careful consideration, I used to compile the/dev/fb0 kernel. The node/dev/FB indicates that the framebuff driver is correct, so what is the difference between the old and new kernels? It seems that when I compile the kernel, I didn't actually modify the MTD partition parameter. Is that the case?

Modify the parameters in the drivers/MTD/NAND/s3c2410_nand.c file to re-compile the kernel and download the corresponding parameters. Go to the/dev directory and check whether/dev/fb0 appears ..... (Xxx bytes are omitted here) trace to/etc/init. d/RC file (different configurations for each person, please refer to your corresponding file). Let's study this file by yourself. Because the file partition information is incorrect, the kernel cannot execute/etc/init. d/RCs, resulting in some system initialization actions not being 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, and the resolution of 320x240 is quite smooth. There is nothing to say. Modify the sound driver to recompile the kernel according to the "shift" text.

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

Author blog: http://blog.csdn.net/bekars/

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.