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.