Cross-compilation environment: arm-linux-gcc3.4.1 Operating System: Fedora13 hardware platform: FL2440 source package: javassrc.v6b.tar.gz, gsnap.tar.gz A: Install libjpeg unzip jpeg Library source package, enter the root directory: tarzxfw.src.v6b.tar.gz cdjpeg-6
Cross-compilation environment: arm-linux-gcc 3.4.1
Operating System: Fedora 13
Hardware Platform: FL2440
Source code package: jpegsrc.v6b.tar.gz,gsnap.tar.gz
I. Install libjpeg
Decompress the jpeg Library source code package and go to the root directory:
Tar zxf restart src.v6b.tar.gz
Cd jpeg-6b
Ii. Configure the compiling environment:
./Configure -- prefix =/usr/local/arm/3.4.1/arm-linux -- exec-
Prefix =/usr/local/arm/3.4.1/arm-linux -- enable-shared -- enable-static
3. Modify makefile
CC = gcc changed to CC = arm-linux-gcc
AR = ar ac changed to AR = arm-linux-ar ac
AR2 = ranlib to AR2 = arm-linux-ranlib
4. Create the man/man1 directory in/usr/local/arm/3.4.1/arm-linux:
Cd/usr/local/arm/3.4.1/arm-linux
Mkdir-p man/man1
V. Compilation and Installation
Make
Make install
In this case, the following files are generated in the/usr/local/arm/3.4.1/arm-linux/man/man1 directory:
C0000.1 djpeg.1 adjust tran.1 rdjpgcom.1 wrjpgcom.1
Generate the following file in the/usr/local/arm/3.4.1/arm-linux/lib directory:
Libjpeg. a libjpeg. la libjpeg. so libjpeg. so.62 libjpeg. so.62.0.0
6. Decompress gsnap
Tar zxf gsnap.tar.gz
Cd gsnap
7. Modify makefile
All:
Arm-linux-gcc-g gsnap. c-ljpeg-o gsnap
Clean:
Rm-f gsnap
8. Compile and obtain the executable file gsnap.
Make
9. Copy the jpeg library file to the lib directory of the file system. Ensure that the file link attribute is retained.
Cp-a libjpeg. s * "File System Path"/lib
10. Copy the executable file gsnap to the sbin directory of the file system.
Cp gsnap "File System Path"/sbin
11. Recreate the file system, download it to the Development Board, and use the following command to intercept the graphic interface:
Gsnap 1.jpg/dev/fb0
You can also save images in other formats such as bmp and png.