Build a Linux-PDA software development environment

Source: Internet
Author: User
Tags automake
Linux-building the PDA software development environment-Linux general technology-Linux programming and kernel information. The following is a detailed description. To build a Linux-PDA development environment, you must:
(1) the Linux kernel supports Frame Buffer.
This item needs to be prepared for use of DirectFB
(2) There is a runable Linux release version that supports chroot
This item is prepared to run the Linux-PDA compiling environment.
(3) Support for devfs in Linux kernel (optional)
This option is available in the latest version 2.4.x kernel, which is also supported by the 2.6 kernel, but changed to the obsolescent kernel. In the future, it will be changed to udev.
This item facilitates the use of external devices in the compilation environment.
The specific building steps are as follows:
1. download the latest version of root_fs_i386 from http://www.uclibc.org/downloads/
Web site (http://www.uclibc.org/downloads)
I use the 25-Jul-2004 version. When writing this article, the latest version is 03-Jan-2005. The specific operations may vary, but the installation process should be basically the same.
2. chroot to the decompressed root_fs. Future work will be carried out in this environment.
To download the SDK, open another console, complete the download task, and copy it to the root_fs directory.
3, download the perl-5.8.5 source code, compile and install
Web site (http://www.cpan.org/src/stable.tar.gz)
The above URL corresponds to the perl-5.8.6 version when writing this article, not tested, but should not have too much problem
Please use
$/Bin/bash Configure-d-e-O-Uuseperlio
To avoid perlio errors during perl compilation using uclibc
4, download the pkgconfig-0.15.0 source code, compile and install
Web site (http://www.freedesktop.org/softw... onfig-0.15.0.tar.gz)
5. Download The libiconv-1.9.2 source code, compile and install
Web site (http://ftp.gnu.org/gnu/libiconv/libiconv-1.9.2.tar.gz)
6. Download gettext-0.13 source code, compile and install
Web site (http://ftp.gnu.org/gnu/gettext/gettext-0.13.tar.gz)
Glib-2.4.8 requires this software package. uclibc has the function interfaces provided by this software package, but it has not been implemented yet.
7. Download the glib-2.4.8 source code, compile and install
Web site (ftp://ftp.gtk.org/pub/gtk/v2.4/glib-2.4.8.tar.bz2)
8. Download The expat-1.95.8 source code, compile and install
Web site (http://sourceforge.net/projects/expat)
9. Download The freetype-2.1.4 source code, compile and install
URL (http://sourceforge.net/project/showfiles.php? Group_id = 3157)
Do not use an updated freetype-2, such as a freetype-2.1.9, or it may cause compatibility issues with the fontconfig package
10. Download The fontconfig-2.2.90 source code, compile and install
Web site (http://freedesktop.org/software/... onfig-2.2.90.tar.gz)
You may need to copy the content in the local directory/usrs/share/fonts/to $ your_develop_dir/usr/share/fonts/in your development directory so that fontconfig can run properly.
11. Download The pango-1.4.1 source code, compile and install
Web site (ftp://ftp.gtk.org/pub/gtk/v2.4/pango-1.4.1.tar.bz2)
12. Download The atk-1.6.1 source code, compile and install
Web site (ftp://ftp.gtk.org/pub/gtk/v2.4/atk-1.6.1.tar.bz2)
13. Download The libpng-1.2.7 source code, compile and install
URL (http://sourceforge.net/project/showfiles.php? Group_id = 5624)
Libpng1.2.7 has two versions. One is configure and the other is not. Choose one as you like.
When writing this article, you will see a warning about libpng Security (http://www.libpng.org/pub/png/libpng.html) Try to compile and install it with a libpng-1.2.8
14. Download The jpeg-6b source code, compile and install
Web site (ftp://ftp.gtk.org/pub/gtk/v2.4/dependencies/jpegsrc.v6b.tar.gz)
15. Download The tiff-v3.6.1 source code, compile and install
Web site (ftp://ftp.gtk.org/pub/gtk/v2.4/dependencies/tiff-v3.6.1.tar.gz)
16. Download The libtool-1.5.10 source code, compile and install
Web site (http://ftp.gnu.org/gnu/libtool/libtool-1.5.10.tar.gz)
Libtool is required to install the DirectFB package.
17. Download The DirectFB-0.9.21 source code, compile and install
Web site (http://www.directfb.org/downloads/Core/DirectFB-0.9.21.tar.gz)
Run autogen. sh to automatically generate the configuration file and perform the first default compilation,
You do not need to run autogen. sh during subsequent compilation. You can directly use configure to configure
18. On the cvs server at www.directfb.org, the latest version of co gdk-directfb is available.
Read carefully
README
19. Download The gtk +-2.4.14 source code and decompress it.
Web site (ftp://ftp.gtk.org/pub/gtk/v2.4/gtk+-2.4.14.tar.bz2)
Assume that you decompress the package to the/root/gtk +-2.4.14/directory.
20. After the gdk-directfb README is installed, move gdk-directfb to the/root/gtk +-2.4.14/gdk/directory and change the name to directfb.
You will find in the/root/gtk-2.4.14/gdk/directory, there are x11, win32, linux-fb and directfb four directories, these are gtk graphics interface bankend. We will only use directfb, but you can refer to other directories, especially the content of the linux-fb directory.
21. Return to the/root/gtk-2.4.14/directory and execute the patch action
$ Cd/root/gtk-2.4.14/
$ Patch-Np0-I gdk/directfb/gtk-directfb.patch
The system will prompt that the position of the patch is offset in some places, it doesn't matter, because the gtk-directfb.patch is just the configuration file for patch gtk +, this patch should be made for the gtk-2.4.9, but does not affect the use
22. regenerate the configuration file
$ Aclocal
$ Automake -- add-missing
$ Autoconf
This requires installation of autoconf-2.59 web site (http://ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.bz2) and automake-1.7 web site (http://ftp.gnu.org/gnu/autoconf/automake-1.7.9.tar.bz2)
You also need to edit the configure. in file and add
AM_CONDITIONAL (ENABLE_GTK_DOC, false)
AM_CONDITIONAL (GTK_DOC_USE_LIBTOOL, false)
For more information about automake, autoconf, and libtool, see the autobook web site (http://sources.redhat.com/autobook/) and Learning the GNU development tools
Web site (http://autotoolset.sourceforge.net/tutorial.html)
23. Compile and install GTK/DirectFB
$./Configure -- with-gdktarget = directfb
$ Make
$ Make install
Therefore, your Linux-PDA Development Environment Based on uclibc + directfb + gtk + has been set up.
Next, you can try to develop a Linux-PDA application based on GTK.
24. First, try the demo program that comes with GTK.
If you are working in X window system (or in a desktop environment), exit X window and return to the console.
Before Running gtk-demo, disable gpm because the gpm conflicts with DirectFB and the mouse cannot work properly.
Warning !!! The author has not yet found a way to exit gtk-demo in 640xlarge mode. After each running, he uses another console to restart the machine: p
After running gtk-demo, you can try to open various widgets and restart the machine after the test.
Okay, now you can try GPE, for details about GPE Please browse (http://gpe.handhelds.org /)
25. Download SQLite-2.8.15 source code, compile and run
Web site (http://www.sqlite.org/sqlite-2.8.15.tar.gz)
GPE uses SQLite as a data management tool. This software package has not been used in the experiment, but install it first.
26. Download gpe-icon-0.24 and install
Web site (ftp://gpe.handhelds.org/projects/gpe/source/gpe-icons-0.24.tar.gz)
27. Download The libschedule-0.13 source code, compile and install
Web site (ftp://gpe.handhelds.org/projects... chedule-0.13.tar.gz)
28. Download libgpewidget-0.95 as a reference
Web site (ftp://gpe.handhelds.org/projects... ewidget-0.95.tar.gz)
At the time of writing this article, libgpewidget has released version 0.97. The author of this article is based on the libgpewidget-0.95 to modify it so that it can run in GTK/DirectFB.
The main task of modification is to replace the Xlib function in the original libgpewidget with the function in GDK. to verify the feasibility, the modification is simple and there are many bugs. Please be careful: p
Download the appendix file for this article, unzip and install libgpewidget-0.95-dfb
29. Download gpe-clock-0.9 as a reference
Web site (ftp://gpe.handhelds.org/projects/gpe/source/gpe-clock-0.9.tar.gz)
We will try to modify gpe-clock so that it runs under GTK/DirectFB as a GPE test.
Download the appendix file for this article, unzip and install gpe-clock-0.9-dfb
30. Run gpe-clock and exit (use the aforementioned Restart Method if you cannot exit)
You will see a small clock running in the upper left corner of the screen. Of course, in the Familiar release version, it is on the toolbar in the lower right corner.
/*
* The following are the reasons for the author to comfort himself :-)
*/
Through the above steps, we can see that a PDA software system with clear structure has been constructed, and its basic framework is shown in:
+ ---------------------------------------------- +
| Application/GPE |
+ -------------------------- + ------------------- +
| GTK | other libs |
+ -------------- + ----------- + Libpng |
| GDK/DirectFB | libjpeg |
+ -------------- + Pango/ATK | libtiff |
| Glib |... |
+ -------------- + ----------- + ------------------- |
| Uclibc |
+ ---------------------------------------------- +
| DirectFB/Linux-kernel-fb |
+ ---------------------------------------------- +
The system architecture replaces the X window system with DirectFB. The original GPE system is separated from the X window system, which improves the degree of polymerization of each module, the coupling between modules may be reduced. Hardware Abstraction is also supported by hardware acceleration (this depends on the implementation of DirectFB)
In fact, this trend can be seen from the development plan of GTK. Now, GTK is not only a ToolKit built on X window system, but also a GUI abstract interface, the GDK layer is used to smooth the differences between different indexing wing systems at the underlying layer and provide unified interfaces for application developers. Of course, if you want to use the features of the underlying indexing Wing system, you may need to directly access the underlying indexing Wing system api. However, if the GDK is well enough, these solutions can be solved.
/*
* The above text is of pure water type and may not be considered
*/
Future work:
1. Porting existing GPE applications to the above Software Architecture
2. participate in function development not implemented by The GPE Project
3. Streamline the final code length and put the final basic system into 8 M/16 M flash.
The article "Building a Linux-PDA software development environment" may be confusing to everyone. There is an old saying: "An example is better than preaching it over one thousand times." (said by foreigners in ancient times, it probably means this ;-))
Now, let's officially experience this software development environment.
First, let's talk about my system environment.
My system is Red Hat 9 and runs on vmWare4.5.2, the cpu is Intel P4-2.4's
If you are using AMD cpu, the kernel provided in the attachment may not be suitable for you.
You need a Linux kernel that supports Frame bufferand devfs. If You Want To compile a script, download boot.tar.bz2 in the attachment.
Decompress the package to the/boot directory. If your boot program uses GRUB, add a title similar to the following:
Title Red Hat Linux (2.4.27-fb)
Root (hd0, 6)
Kernel/vmlinuz-2.4.27-fb root =/dev/hda8 devfs = mount vga = 785
Initrd/initrd-2.4.27-fb.img
Note that the devfs = mount vga = 785 parameter is added after the kernel.
Devfs = mount indicates that the kernel uses devfs
Vga = 785 indicates the VGA 640x480x64k color mode of the VESA Frame Buffer.
See the table below.
# VESA framebuffer console @ 1024x768x64 k
Vga = 1, 791
# Normal VGA console
# Vga = normal
# VESA framebuffer console @ 1024x768x64 k
# Vga = 1, 791
# VESA framebuffer console @ 1024x768x32 k
# Vga = 1, 790
# VESA framebuffer console @ 1024x768x256
# Vga = 1, 773
# VESA framebuffer console @ 800x600x64 k
# Vga = 1, 788
# VESA framebuffer console @ 800x600x32 k
# Vga = 1, 787
# VESA framebuffer console @ 800x600x256
# Vga = 1, 771
# VESA framebuffer console @ 640x480x64 k
# Vga = 1, 785
# VESA framebuffer console @ 640x480x32 k
# Vga = 1, 784
# VESA framebuffer console @ 640x480x256
# Vga = 1, 769
If you use lilo, please refer to the relevant information
If you are using the Red Hat release version, Red Hat has configured some devfs for you. If you are using another release version, please refer to the relevant information.
Now, if you have successfully started and entered the system with the new kernel, let's try the Linux-PDA software environment.
Download the attachment developroot.tar.bz2 and decompress it. Assume that you use the root user
# Tar jvxf developroot.tar.bz2
# Chroot developroot
Go to the Linux-PDA software environment
#./Initroot. sh
Connect devfs and proc to prepare the runtime environment
Next, you can try gtk-demo,
# Killall gpm
Shut down the gpm Process
# Gtk-demo
Now you can see the list of various widgets in gtk-demo. Try them one by one.
Okay, use the restart method.
As shown in the previous operations, go to the Linux-PDA software environment.
# Chroot developroot
#./Initroot. sh
# Killall gpm
# Gpe-clock
You can see a small clock in the upper-left corner of the screen. Click it and a menu will pop up. Check the options and select "remove from panel" to exit the program.
If you are interested in the environment and want to understand the structure, download the root.tar.bz2 file in the attachment and extract the content of the root.tar.bz2 file to the/root directory under the root directory of the development environment, you will see that some directories are added to the/root directory in your development environment. The functions and functions of these directories are as follows, for more information about how to compile and install the software package, see "build a Linux-PDA software development environment.
Isn't that difficult? In fact, Linux is so simple. Come and have a try.
Related Article

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.