Notes on porting DFB-GTK to MINI2440

Publisher:数字之舞Latest update time:2022-05-31 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

[1] [2]
Reference address:Notes on porting DFB-GTK to MINI2440

Previous article:Porting of opencv on fl2440
Next article:Transplantation of gtk in ARM

Recommended ReadingLatest update time:2024-11-16 14:46

Linux-2.6.32 porting LCD backlight control on mini2440 development board
Editor: LCD backlight control is actually an I/O port driver, which is exactly the same as LED control, or even simpler, because it usually controls several LEDs at the same time. This is a standard entry-level driver. I won't say much about this, just follow the manual. The I/O port here is GPG4. 1 LCD bac
[Microcontroller]
Linux-2.6.32 porting LCD backlight control on mini2440 development board
Analysis of the first C program to light up LED of mini2440
Startup File + Library + File Startup file: Hardware initialization 1. Turn off the watchdog (the watchdog is a timer that is turned on when the system starts. If it is not turned off within 3 seconds, the system will automatically restart) 2. Initialize the clock (the 2440 starts at 12 Hz when p
[Microcontroller]
Mini2440 bare metal programming--------LCD driver
Record the process of LCD programming. Part of the article is reproduced. To use LCD correctly, you must pay attention to two points: 1. Timing; 2. Display buffer area. 1. Timing LCD generally requires three timing signals: VSYNC, HSYNC and VCLK. VSYNC is a vertical synchronization signal. Before each frame (i.e
[Microcontroller]
Mini2440 bare metal programming--------LCD driver
2. Mini2440 bare metal program key detection experiment
Development board: mini2440, NandFlash: K9F2G08U0B 256M size, CPU: S3C2440A. Development environment: MDK4.11 Emulator: Jlink v8 This is my first article published on csdn. I have used arm-linux-gcc bare metal to develop mini2440 before, but many functions cannot be called directly (my technical problem). I am going
[Microcontroller]
2. Mini2440 bare metal program key detection experiment
mini2440 simple lcd display driver
In the past few days, I have studied the LCD display principle and the framebuffer type device driver framework of the Linux kernel. What is worth learning is the layered concept of drivers in the kernel. fbmem.c implements the common abstraction of framebuffers. The LCD driver is actually Set the working mode of the
[Microcontroller]
mini2440 simple lcd display driver
Establish Keil MDK/Jlink development and debugging environment for mini2440 development board
Create a new Keil project, select Samsung's s3c2440 as the device. When asked whether to copy the startup code to the project directory, select Yes. In the Target tab of the project configuration, make the following configuration: After confirmation, write the main function and compile the project. If there is n
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号