Linux under cross compiler production

Source: Internet
Author: User

At present, I use the cross-compiler is TQ2440 matching CD-ROM in the production, after decompression needs the following configuration:

1. For Fedora Systems: Modify the settings of the/etc/profile file, where the cross-compiler environment variables are added.   For Ubuntu systems, modify the/etc/enviroment file 2. I'm using the Fedora system, modifying the path value, and then adding the paths to the cross-compiler, adding pathmunge/opt/embedsky/4.3.3/bin For Ubuntu systems, modify the Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/embedsky/4.3.3 /bin "3.source/etc/profile make it effective, note: Only the current terminal is in effect, it is recommended to restart the system.

In the development process, often encountered-/bin/sh:xx (command) not found error, in general, this error is caused by the lack of a dynamic library. The corresponding dynamic library is also required at compile time.

Here's an example of how to build your own cross-compiler with libjpeg.

1. First download Libjpeg Source: libjpeg-turbo-1.2.1.tar.gz

2. Unzip the source code: Tar xzf libjpeg-turbo-1.2.1.tar.gz

3. Enter the source directory: CD libjpeg-turbo-1.2.1

4. Create a new TMP directory to hold the compiled Libjpeg file: mkdir tmp

5. Configuration:./configure--prefix=/work/projects/13.libjpeg/libjpeg-turbo-1.2.1/tmp/--host=arm-linux, Where--prefix is used to specify the directory to be compiled,--host is used to specify the compiler

6. Compiling: Make

7. Install: Make install, after the installation is completed, in the TMP directory just created with bin, Incluide, Lib and other directories

8. Copy all the files from the compiled include directory to the Include directory of the cross-compilation tool, my/opt/embedsky/4.3.3/arm-none-linux-gnueabi/libc/usr/include/directory

9. Copy all the so files from the compiled Lib directory to the Lib directory, my/opt/embedsky/4.3.3/arm-none-linux-gnueabi/libc/armv4t/lib/directory

10. Copy all the so files from the compiled Lib directory to the file system, as the application runs with the appropriate libraries.

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.