Embedded common libraries

Source: Internet
Author: User
Transplantation of some common libraries in ARM-LINUX

10:51:47 | category: Arm-Linux | report | font size subscription

Some libraries are often reused in various projects. such as JPEG, FreeType, and iconv. each large project will be reused repeatedly. therefore, according to the original project specifications, it is generally placed under the project libs directory, but later found that each project has repeated operations. it is completely unnecessary. because it is now classified into a comm_lib public information.

 

The following is a typical arm-Linux transplant library, which is stored in the/home/hxy/common_lib directory. according to the porting specifications, output is in output/ARM-Linux, and the library itself is in libs.

 

The following is the migration of common databases for teaching and backup purposes.

 

Generic

 

1. zlib library porting

  •  

    Download

     

  •  

    Unzip tar xvzf zlib-1.2.3.tar.gz

     

  •  

    CD zlib-1.2.3

     

  •  

    Generate makefile (note that zlib can only be static and dynamically compiled separately. Therefore, two makefiles and two compilations and installations must be generated)

     

    •  

      Generate static library cc = arm-Linux-gcc cpp = "arm-Linux-gcc-e" Ar = "arm-Linux-ar RC" ranlib = arm-Linux-ranlib. /configure -- prefix = $ PWD /.. /.. /output/ARM-Linux

       

    •  

      Generate a dynamic library cc = arm-Linux-gcc cpp = "arm-Linux-gcc-e" Ar = "arm-Linux-ar RC" ranlib = arm-Linux-ranlib. /configure -- shared -- prefix = $ PWD /.. /.. /output/ARM-Linux

       

  •  

    Compile make

     

  •  

    Install make install

     

 

 

 

Image

 

1.jpeg library for JPEG Image Processing

  •  

    Ftp://ftp.nz.debian.org/gentoo/distfiles/jpegsrc.v6b.tar.gz

     

  •  

    Decompress tar xvzf unzip src.v6b.tar.gz

     

  •  

    CD jpeg-6b

     

  •  

    Generate makefile

     

    •  

      ./Configure -- enable-shared -- enable-static -- Host = arm-Linux -- prefix = $ PWD/.../../output/ARM-Linux

       

  •  

    Compile make

     

  •  

    Install make install

     

    •  

      Note that the installation program of this library has bugs and will not automatically create released Lib, include, man, etc. Therefore, you need to create it manually. Do not install other libraries first.

       

    • Mkdir-P/home/hxy/common_lib/output/ARM-Linux/include
    • Mkdir-P/home/hxy/common_lib/output/ARM-Linux/lib
    • Mkdir-P/home/hxy/common_lib/output/ARM-Linux/man/Man1

 

2. PNG for PNG Image Display

  •  

    Home http://www.libpng.org/

     

  •  

    Download http://prdownloads.sourceforge.net/libpng/libpng-1.4.1.tar.gz? Download

     

  •  

    Unzip tar xvjf libpng-1.2.19.tar.bz2

     

  •  

    CD libpng-1.2.19

     

  •  

    Generate makefile

     

    •  

      ./Configure -- Host = arm-Linux -- enable-shared -- enable-static -- prefix = $ PWD/.../../output/ARM-Linux

       

  •  

    Compile make

     

  •  

    Install make install

     

 

3. Tiff Library (displayed in TIFF Format)

  •  

    Official http://www.libtiff.org

     

  •  

    Download http://dl.maptools.org/dl/libtiff/tiff-3.8.2.tar.gz

     

  •  

    Unzip tar xvzf tiff-3.8.2.tar.gz

     

  •  

    CD Tiff-3.8.2

     

  •  

    Generate makefile

     

  •  

    . /Configure -- Host = arm-Linux -- enable-shared -- enable-static -- enable-JPEG -- enable-zlib -- prefix = $ PWD /.. /.. /output/ARM-Linux

     

  •  

    Compile make

     

  •  

    Install make install

     

 

 

Audio

 

 

2. Mad

  •  

    Official http://www.underbit.com/products/mad/

     

  •  

    Unzip tar xvzf libmad-0.15.1b.tar.gz

     

  •  

    CD libmad-0.15.1b

     

  •  

    Generate makefile (standard)

     

    •  

      ./Configure -- Host = arm-Linux -- enable-shared -- enable-static -- prefix = $ PWD/.../../output/ARM-Linux

       

  •  

    Remove-Fforce-MEM from makefile

     

    •  

      Because arm-Linux-GCC does not know this option, the compilation prompt is error: Unrecognized command line option "-Fforce-Mem"

       

  •  

    Compile make

     

  •  

    Install make install

     

 

3. id3tag: Read MP3 Information

 

Official http://www.underbit.com/products/mad/

  •  

    Unzip tar xvzf libid3tag-0.15.1b.tar.gz

     

  •  

    CD libid3tag-0.15.1b

     

  •  

    Generate makefile (standard)

     

    •  

      ./Configure -- Host = arm-Linux -- enable-shared -- enable-static -- prefix = $ PWD/.../../output/ARM-Linux

       

    •  

      Compile make

       

    •  

      Install make install

       

     

    4. Ogg audio decoding format

    •  

       

    •  

      Unzip tar xvzf libogg-1.1.4.tar.gz

       

    •  

      CD libogg-1.1.4

       

    •  

      Generate makefile (standard)

       

      •  

        ./Configure -- Host = arm-Linux -- enable-shared -- enable-static -- prefix = $ PWD/.../../output/ARM-Linux

         

    •  

      Compile make

       

    •  

      Install make install

       

     

     

     

     

     

    Text Encoding

    1. iconv library for text encoding conversion

    •  

      Home: http://www.gnu.org/software/libiconv

       

    •  

      Download: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz

       

    •  

      Unzip tar xvzf libiconv-1.13.1.tar.gz

       

    •  

      CD libiconv-1.13.1

       

    •  

      Generate makefile (standard)

       

      •  

        ./Configure -- Host = arm-Linux -- enable-shared -- enable-static -- prefix = $ PWD/.../../output/ARM-Linux

         

    •  

      Compile make

       

    •  

      Install make install

       

       

     

     

    2. FreeType: open-source high-quality font display function library

    •  

      Home: http://www.freetype.org/

       

    •  

      Download: http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.11.tar.gz

       

    •  

      Unzip tar xvzf freetype-2.3.11.tar.gz

       

    •  

      CD freetype-2.3.11

       

    •  

      Generate makefile (standard)

       

      •  

        ./Configure -- Host = arm-Linux -- enable-shared -- enable-static -- prefix = $ PWD/.../../output/ARM-Linux

         

    •  

      Compile make

       

    •  

      Install make install

       

       

     

     

    3.

Embedded common 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.