1. Development Environment
Host: debian5.0
Host gcc version: gcc (Debian 4.3.2-1.1) 4.3.2
Cross compiler: arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
Cross compiler download address:
http://www.codesourcery.com/sgpp/lite/arm/portal/release1293
2. Host Software
Since some host software is needed in the cross-compilation process, install it first to avoid problems when compiling later. Since all the software packages used in this cross-compilation are the latest versions, the host software should also use the latest version to avoid problems due to version matching.
1. Autoconf
autoconf-2.68.tar.bz2
2. Automake
automake-1.11.tar.bz2
3. Libtool
libtool-2.4.tar.gz
4. Ncurses
ncurses-5.7.tar.gz
5. Zlib
zlib-1.2.5.tar.bz2
6. Tiff
tiff-3.8.2.tar.gz
7. Libpng
libpng-1.4.4.tar.gz
8. Libjpeg
jpeg-8b.tar.gz
9. Gettext
gettext-0.18.1.1.tar.gz
10. gdk-pixbuf
gdk-pixbuf-2.22.0.tar.bz2
11. glib
glib-2.26.0.tar.bz2
All software version numbers are provided above. After downloading the above source code, install the above tools from source code on Linux. The unified steps are: unzip the source code, configure, make, make install.
It should be noted that when configuring, add the --prefix=/usr parameter, otherwise some tools may not be found during cross-compilation later; in addition, root privileges are required when executing makeinstall.
3. Cross-compilation
First, execute the following command in the terminal to initialize some environment variables and prepare for cross-compilation:
exportCC="arm-none-linux-gnueabi-gcc -mabi=aapcs-linux -march=armv4t"
exportCXX="arm-none-linux-gnueabi-g++ -mabi=aapcs-linux -march=armv4t"
exportPKG_CONFIG_PATH=/mnt/nfs/lib/pkgconfig
exportCPPFLAGS=-I/mnt/nfs/include
exportCFLAGS=-I/mnt/nfs/include
exportCXXFLAGS=-I/mnt/nfs/include
exportLDFLAGS=-L/mnt/nfs/lib
CC and CXX are the cross-compilers of gcc and g++ respectively, and -mabi=aapcs-linux –march=armv4t is added at the end because the cross-compiler we downloaded is output according to the armv5 architecture by default, which cannot run on mini2440. In addition, the target address of our installation is /mnt/nfs, so first create an nfs directory with write permission for ordinary users under your /mnt directory.
1. Tslib
Tslib download address: http://github.com/kergoth/tslib
The package I downloaded is kergoth-tslib-1.0-45-gd9ff92d.tar.gz. Unzip the package, then go to the source directory and run the following command:
./autogen.sh
After completion, run the following command to configure:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--enable-shared
--disable-static
--enable-linear
--enable-dejitter
--disable-linear-h2200
--enable-variance
--enable-pthres
--disable-ucb1x00
--disable-cy8mrln-palmpre
--disable-corgi
--disable-collie
--disable-h3600
--disable-mk712
--disable-arctic2
--disable-tatung
--enable-input
If everything is OK, run make, and then run make install.
2. Zlib
zlib-1.2.5.tar.bz2, download address is zlib.net
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs –shared
Then make; make install
3. Libpng
libpng-1.4.4.tar.gz
Download address: http://www.libpng.org/pub/png/libpng.html
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--enable-shared
Then make; make install
4. Libjpeg
jpeg-8b.tar.gz
Download address: http://artfiles.org/sunfreeware.com/pub/freeware/SOURCES/jpeg-8b.tar.gz
Unzip and enter the source code, configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--disable-static
Then make; make install
5. Freetype
freetype-2.4.3.tar.bz2
Download address: http://sourceforge.net/projects/freetype/files/
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--disable-static
Then make; make install
6. Directfb
DirectFB-1.4.6.tar.gz
Download address: http://www.directfb.org/downloads/Core/DirectFB-1.4/DirectFB-1.4.6.tar.gz
Compiling directfb requires support for fusion header files, and the kernel must also have fusion support.
linux-fusion-8.1.2.tar.gz
Download address: http://www.directfb.org/downloads/Core/linux-fusion/linux-fusion-8.1.2.tar.gz
Add the downloaded fusion to the kernel. You can refer to the documentation for details on how to add it. Then, extract the fusion.h header file and put it in the /mnt/nfs/include/linux directory. If there is no fusion.h header file in the /mnt/nfs/include/linux directory during configure, directfb will use its own internal fusion. I have used this method but it did not work, so be sure to use a separate fusion module.
After decompressing directfb, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--disable-osx
--disable-x11
--disable-network
--enable-multi
--enable-fbdev
--enable-zlib
--disable-gif
--disable-vnc
--with-gfxdrivers=none
--with-inputdrivers=tslib,keyboard
Even if there is no keayboard on your platform, you still need to add this kerboard, otherwise there will be an error of can't get request id when starting the gtk application.
After configuration is complete, make; make install
7. Tiff
tiff-3.8.2.tar.gz
Download address: http://www.libtiff.org/
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--enable-shared
Then make; make install
8. Glib
glib-2.26.0.tar.bz2
Download address: http://ftp.gnome.org/pub/gnome/sources/glib/2.26/glib-2.26.0.tar.bz2
After decompression, enter the source directory and first execute the following command:
echoglib_cv_stack_grows=yes > arm-linux.cache
echo glib_cv_uscore=no >>arm-linux.cache
echo ac_cv_func_posix_getpwuid_r=no >> arm-linux.cache
echo ac_cv_func_posix_getgrgid_r=no >> arm-linux.cache
Then configure:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--disable-selinux
--disable-gtk-doc-html
--with-threads=posix
--cache-file=arm-linux.cache
Then make; make install
9. xml
libxml2-2.6.30.tar.bz2
Download address: http://ftp.gnome.org/pub/gnome/sources/libxml2/2.6/libxml2-2.6.30.tar.bz2
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--disable-static
Then make; make install
10. atk
atk-1.32.0.tar.bz2
Download address: http://ftp.gnome.org/pub/gnome/sources/atk/1.32/atk-1.32.0.tar.bz2
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
Then make; make install
11. fontconfig
fontconfig-2.8.0.tar.gz
Download address: http://www.fontconfig.org/release/fontconfig-2.8.0.tar.gz
After decompression, enter the directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--enable-shared
--enable-libxml2
--with-arch=arm
--with-freetype-config=/mnt/nfs/bin/freetype-config
Then make; make install
12. Pixman
pixman-0.20.0.tar.gz
Download address: http://cairographics.org/releases/pixman-0.20.0.tar.gz
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
Then make; make install
13. cairo
cairo-1.10.0.tar.gz
Download address: http://cairographics.org/releases/cairo-1.8.10.tar.gz
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--disable-static
--enable-xlib=no
--enable-win32=no
--enable-directfb=yes
--with-x=no
Then make; make install
14. pango
pango-1.28.3.tar.bz2
Download address: http://ftp.gnome.org/pub/gnome/sources/pango/1.28/pango-1.28.3.tar.bz2
After decompression, enter the source directory and configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--with-x=no
Then make; make install
15. gtk+
gtk+-2.90.0.tar.bz2
Download address: http://ftp.gnome.org/pub/gnome/sources/gtk+/2.90/gtk+-2.90.0.tar.bz2
After decompression, enter the source directory and first run the following command:
sed -is/'if$PKG_CONFIG --uninstalled $PANGO_PACKAGES; then'/'if $PKG_CONFIG$PANGO_PACKAGES; then'/g configure
echo gio_can_sniff=yes > arm-linux.cache
Then configure the command:
./configure --prefix=/mnt/nfs
--build=i686
--host=arm-none-linux-gnueabi
--enable-gtk-doc-html=no
--with-x=no
--with-gdktarget=directfb
--cache-file=arm-linux.cache
Then make; make install
4. Preparation before operation
1. pango configuration
Create a pango directory in the /mnt/nfs/etc/ directory of the development board, and then run the following commands on the development board:
pango-querymodules> /mnt/nfs/etc/pango/pango.modules
The pango-querymodules are generated in the /mnt/nfs/bin directory of the host machine when the pango library is compiled. You can run it by copying it directly from this location to the development board.
2. Fonts
After the compilation is complete, there will be a fonts.conf file in the /mnt/nfs/etc/fonts directory of the host machine. Put this file in the /mnt/nfs/etc/fonts directory of the development board.
3. Fonts
According to the configuration of the host machine, create a truetype directory in the /usr/share/fonts directory of the development board, and put the ttf font library into this directory.
After finishing the above work, the gtk hello world program can be run. However, there are still some problems with the operation of gtk3-demo, which will cause the signal 11 problem. The specific solution needs further research.
This document is a preliminary document, just the first step to successfully run gtk. I hope to have the opportunity to improve the more complete document in the future. If you are interested, please contact me and study it together. Contact information is in my personal profile.
Previous article:Porting of opencv on fl2440
Next article:Transplantation of gtk in ARM
Recommended ReadingLatest update time:2024-11-16 14:46
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- STM32CUbe usage issues
- Low-power MCUs and smart buildings
- STM32F103C8T6 low power consumption issue
- [D-Gesture Recognition Device] D_Gesture Recognition
- The difference between continuous wave power and pulse power
- About the memory FRAM of msp430fr2000!!
- Optimal control of solar panel position based on GD32E231
- STM32F103C8T6 low power consumption problem
- ADAFRUIT PYBADGE LC CAN RUNNING MAKECODE ARCADE, CIRCUITPYTHON AND ARDUINO
- STSPIN32F0 FOC control board drives DJI model aircraft motor/single resistor/schematic diagram/code/debugging instructions and other information are open source