CSDN博客

img jnstone3

曾经做的一个电气防火的项目

发表于2008/10/3 10:55:00  1370人阅读

开发环境:

  宿主机主机编译环境 winxp qdeveloper0.24 + gdb +MinGW 
  


  交叉编译环境 arm-linux-gcc-3.4.1
  操作系统     redhat linux 9.0c
   触摸屏  tslib-1.4 (可选 )
   qte 环境 Qtopia coe 4.3.0


一.搭建开发环境

///////////////////////////////////////////////////////////////////
//
//       开启ftp,telnet服务   --root用户
//
///////////////////////////////////////////////////////////////////
关闭防火墙,关闭SELINUX
开启telent,Telnet root用户的登入
# mv /etc/securetty /etc/securetty.bak

 

///////////////////////////////////////////////////////////////////
//
//       开发主机安装ftp client端,及netterm工具
//
///////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////
//
//      安装ELDK(Embedded Linux Development Tools)--root用户
//
///////////////////////////////////////////////////////////////////

1、挂载光驱
 #mount -t iso9660 /dev/cdrom /mnt/cdrom
注:自动挂载可能权限不足,最好手动挂载。
2、更改光驱权限,增加执行权限
 #chmod a+x /mnt/cdrom
3、进入光驱目录,安装
 #cd /mnt/cdrom
 #./install -d /opt/eldk arm
4.设置环境变量
 #vi /etc/profile 中加入下面内容
 CROSS_COMPILE=arm-linux-
 PATH=$PATH:/opt/eldk/usr/bin:/opt/eldk/bin
 #export CROSS_COMPILE PATH
保存。然后执行
 #source profile
5. 设定 NFS 的挂载能力
#cd /opt/eldk/arm/dev
#sudo /mnt/cdrom/ELDK_MAKEDEV

#cd /opt/eldk/arm/eldk
#sudo /mnt/cdrom/ELDK_FIXOWNER -a arm

注意:linux内核文件 /opt/eldk/arm/usr/src/linux/

 

 

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//    安装 qt-x11-opensource-src-4.3.0.tar.gz,项目里未使用到X11下编程,可以省略次步
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
# tar -zxvf qt-x11-opensource-src-4.3.0

  QTDIR=""
  export QTDIR
  export LANG=zh_CN    //.GB2312
  export LC_ALL=zh_CN  //.GB2312

 


# ./configure
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
This is the Qt/X11 Open Source Edition.

Usage:  configure [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
        [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
        [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
        [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
        [-debug-and-release] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
        [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
        [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
        [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
        [-platform] [-D <string>] [-I <string>] [-L <string>] [-help] [-no-zlib]
        [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-system-libtiff]
        [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
        [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
        [-no-make <part>] [-R <string>]  [-l <string>] [-no-rpath]  [-rpath] [-continue]
        [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
        [-iconv] [-no-pch] [-pch] [-no-qdbus] [-qdbus] [-no-separate-debug-info]
        [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
        [-separate-debug-info] [-armfpa] [-no-optimized-qmake] [-optimized-qmake]

        [additional platform specific options (see below)]
         

Installation options:

 These are optional, but you may specify install directories.

    -prefix <dir> ...... This will install everything relative to <dir>
                         (default /usr/local/Trolltech/Qt-4.3.0)

  * -prefix-install .... Force a sandboxed "local" installation of
                         Qt. This will install into
                         /usr/local/Trolltech/Qt-4.3.0, if this option is
                         disabled then some platforms will attempt a
                         "system" install by placing default values to
                         be placed in a system location other than
                         PREFIX.

 You may use these to separate different parts of the install:

    -bindir <dir> ......... Executables will be installed to <dir>
                            (default PREFIX/bin)
    -libdir <dir> ......... Libraries will be installed to <dir>
                            (default PREFIX/lib)
    -docdir <dir> ......... Documentation will be installed to <dir>
                            (default PREFIX/doc)
    -headerdir <dir> ...... Headers will be installed to <dir>
                            (default PREFIX/include)
    -plugindir <dir> ...... Plugins will be installed to <dir>
                            (default PREFIX/plugins)
    -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
                            (default PREFIX)
    -translationdir <dir>.. Translations of Qt programs will be installed to <dir>
                            (default PREFIX/translations)
    -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
                            (default PREFIX/etc/settings)
    -examplesdir <dir> .... Examples will be installed to <dir>
                            (default PREFIX/examples)
    -demosdir <dir> ....... Demos will be installed to <dir>
                            (default PREFIX/demos)

 You may use these options to turn on strict plugin loading.

    -buildkey <key> .... Build the Qt library and plugins using the specified
                         <key>.  When the library loads plugins, it will only
                         load those that have a matching key.

Configure options:

 The defaults (*) are usually acceptable. A plus (+) denotes a default value
 that needs to be evaluated. If the evaluation succeeds, the feature is
 included. Here is a short explanation of each option:

 *  -release ........... Compile and link Qt with debugging turned off.
    -debug ............. Compile and link Qt with debugging turned on.
    -debug-and-release . Compile and link two versions of Qt, with and without
                         debugging turned on. [Mac only]

 *  -shared ............ Create and use shared Qt libraries.
    -static ............ Create and use static Qt libraries.

 *  -no-fast ........... Configure Qt normally by generating Makefiles for all
                         project files.
    -fast .............. Configure Qt quickly by generating Makefiles only for
                         library and subdirectory targets.  All other Makefiles
                         are created as wrappers, which will in turn run qmake.

    -no-largefile....... Disables large file support.
 +  -largefile.......... Enables Qt to access files larger than 4 GB.

    -no-exceptions ..... Disable exceptions on compilers that support it.
 *  -exceptions ........ Enable exceptions on compilers that support it.

    -no-accessibility .. Do not compile Accessibility support.
 *  -accessibility ..... Compile Accessibility support.

    -no-stl ............ Do not compile STL support.
 *  -stl ............... Compile STL support.

    -no-sql-<driver> ... Disable SQL <driver> entirely.
    -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
                         none are turned on.
    -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
                         at run time.

                         Possible values for <driver>:
                         [  ibase mysql odbc psql sqlite sqlite2 ]

    -system-sqlite ..... Use sqlite from the operating system.

    -no-qt3support ..... Disables the Qt 3 support functionality.
 *  -qt3support ........ Enables the Qt 3 support functionality.

    -platform target ... The operating system and compiler you are building
                         on (linux-g++).

                         See the README file for a list of supported
                         operating systems and compilers.

    -no-mmx ............ Do not compile with use of MMX instructions.
    -no-3dnow .......... Do not compile with use of 3DNOW instructions.
    -no-sse ............ Do not compile with use of SSE instructions.
    -no-sse2 ........... Do not compile with use of SSE2 instructions.

    -D <string> ........ Add an explicit define to the preprocessor.
    -I <string> ........ Add an explicit include path.
    -L <string> ........ Add an explicit library path.

    -help, -h .......... Display this information.

Third Party Libraries:

    -no-zlib ........... Do not compile in ZLIB support. Implies -no-libpng.
    -qt-zlib ........... Use the zlib bundled with Qt.
 +  -system-zlib ....... Use zlib from the operating system.
                         See http://www.gzip.org/zlib

 *  -no-gif ............ Do not compile the plugin for GIF reading support.
    -qt-gif ............ Compile the plugin for GIF reading support.
                         See also src/plugins/imageformats/gif/qgifhandler.h

    -no-libtiff ........ Do not compile the plugin for TIFF support.
    -qt-libtiff ........ Use the libtiff bundled with Qt.
 +  -system-libtiff .... Use libtiff from the operating system.
                         See http://www.libtiff.org

    -no-libpng ......... Do not compile in PNG support.
    -qt-libpng ......... Use the libpng bundled with Qt.
 +  -system-libpng ..... Use libpng from the operating system.
                         See http://www.libpng.org/pub/png

    -no-libmng ......... Do not compile the plugin for MNG support.
    -qt-libmng ......... Use the libmng bundled with Qt.
 +  -system-libmng ..... Use libmng from the operating system.
                         See http://www.libmng.com

    -no-libjpeg ........ Do not compile the plugin for JPEG support.
    -qt-libjpeg ........ Use the libjpeg bundled with Qt.
 +  -system-libjpeg .... Use libjpeg from the operating system.
                         See http://www.ijg.org

    -no-openssl ........ Do not compile support for OpenSSL.
 +  -openssl ........... Use OpenSSL from the operating system.

Additional options:

    -make <part> ....... Add part to the list of parts to be built at make time.
                         (libs tools examples demos)
    -nomake <part> ..... Exclude part from the list of parts to be built.

    -R <string> ........ Add an explicit runtime library path to the Qt
                         libraries.
    -l <string> ........ Add an explicit library.

    -no-rpath .......... Do not use the library install path as a runtime
                         library path.
 +  -rpath ............. Link Qt libraries and executables using the library
                         install path as a runtime library path. Equivalent
                         to -R install_libpath

    -continue........... Continue as far as possible if an error occurs.

    -verbose, -v ....... Print verbose information about each step of the
                         configure process.

    -silent ............ Reduce the build output so that warnings and errors
                         can be seen more easily.

 *  -no-optimized-qmake ... Do not build qmake optimized.
    -optimized-qmake ...... Build qmake optimized.

    -no-nis ............ Do not compile NIS support.
 *  -nis ............... Compile NIS support.

    -no-cups............ Do not compile CUPS support.
 *  -cups .............. Compile CUPS support.

    -no-iconv........... Do not compile support for iconv(3).
 *  -iconv.............. Compile support for iconv(3).

    -no-pch ............ Do not use precompiled header support.
 *  -pch ............... Use precompiled header support.

    -no-qdbus........... Do not compile the QtDBus module.
 +  -qdbus.............. Compile the QtDBus module.

    -reduce-relocations ... Reduce relocations in the libraries through extra linker
                            optimizations (Qt/X11 / Qtopia/Core only;
                            experimental; needs GNU ld >= 2.18)


Qt/X11 only:

 *  -no-nas-sound ...... Do not compile in NAS sound support.
    -system-nas-sound .. Use NAS libaudio from the operating system.
                         See http://radscan.com/nas.html
 
    -no-opengl.......... Do not support OpenGL.
 +  -opengl............. Enable OpenGL support.

    -no-sm ............. Do not support X Session Management.
 *  -sm ................ Support X Session Management, links in -lSM -lICE.

    -no-xshape ......... Do not compile XShape support.
 *  -xshape ............ Compile XShape support.
                         Requires X11/extensions/shape.h.

    -no-xinerama ....... Do not compile Xinerama (multihead) support.
 *  -xinerama .......... Compile Xinerama support.
                         Requires X11/extensions/Xinerama.h and libXinerama.

    -no-xcursor ........ Do not compile Xcursor support.
 *  -xcursor ........... Compile Xcursor support.
                         Requires X11/Xcursor/Xcursor.h and libXcursor.

    -no-xfixes ......... Do not compile Xfixes support.
 *  -xfixes ............ Compile Xfixes support.
                         Requires X11/extensions/Xfixes.h and libXfixes.

    -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
 *  -xrandr ............ Compile Xrandr support.
                         Requires X11/extensions/Xrandr.h and libXrandr.

    -no-xrender ........ Do not compile Xrender support.
 *  -xrender ........... Compile Xrender support.
                         Requires X11/extensions/Xrender.h and libXrender

    -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
 *  -fontconfig ........ Compile FontConfig support.
                         Requires fontconfig/fontconfig.h, libfontconfig,
                         freetype.h and libfreetype.

    -no-tablet ......... Do not compile Tablet support.
 *  -tablet ............ Compile Tablet support.
                         Requires IRIX with wacom.h and libXi or
                         XFree86 with X11/extensions/XInput.h and libXi.

    -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
 *  -xkb ............... Compile XKB support.

    -no-glib............ Do not compile Glib support.
 +  -glib............... Compile Glib support.

    -no-separate-debug-info Do not store debug information in a separate file
 *  -separate-debug-info    Strip debug information into a separate .debug file

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

# ./configure -no-openssl           //redhat9下make时ssl出错
# gmake
# gmake install   默认目标路径(/usr/local/Trolltech/Qt-4.3.0/)


gmake confclean 清除配置
./configure 上加上 ——release 参数。 这样只编译一份release的,可以省下一半以上的时间。

 可选
 /////////////////////////////////////////////////////////////////////////////////
 PATH=/usr/lib/qt4/bin:$PATH export PATH QTDIR=/usr/lib/qt4/ export QTDIR
 执行以下命令:

    cd /usr/bin
    ln -s /usr/lib/qt4/bin/qmake qmake4
    ln -s /usr/lib/qt4/bin/designer designer4
    ln -s /usr/lib/qt4/bin/assistant assistant4
    当然,以后如果使用了KDE4桌面就不会有这等麻烦事。
  ///////////////////////////////////////////////////////////////////////////////////////

#vi /etc/profile
添加 export PATH=/usr/local/Trolltech/Qt-4.2.3/bin:$PATH

#source /etc/profile

 

装完qt-x11后还得编译tools、qvfb。
//////////////////////////////////////////////////////////////////
//
//    安装 编译tools & qvfb
//
//////////////////////////////////////////////////////////////////

# cd tools    //qvfb不包含在tools里
# make
# make install


# cd tools/qvfb
# make
# make install

装完qt-x11后还得编译qvfb。
cd qt/tools/qvfb后,make就能生成qvfb工具。所生成的qvfb工具不在当前目录,而失去了QTDIR,所以今后用的时候要将其拷贝到 QTEDIR中


问题一:执行qvfb时报“Qtopia Core data directory is not owned by user 0”的问题处理
目录的所有者改为普通用户,且将权限改为777也不起作用,不明白“Qtopia Core data directory”是什么意思。造成QTOPIA要用ROOT权限编译的假象。

处理方法:
是/tmp下生成的东西, 你rm /tmp/qt* /tmp/.qt* -r

 


//////////////////////////////////////////////////////////////////////
//
//      安装arm-linux-gcc-3.4.1       与上一步两者选一执行 --root用户
//
//////////////////////////////////////////////////////////////////////
目标路径:PATH:/usr/local/arm/3.4.1/bin

#tar jxvf arm-linux-gcc-3.4.1.tar.bz2
#cp -r ./usr/* /usr/
#vi /etc/profile
添加 export PATH=$PATH:/usr/local/arm/3.4.1/bin

#source /etc/profile

 

 

//////////////////////////////////////////////////////////////////
//
//    编译tslib(如果准备用Qt自带的触摸屏校正工具可以不编译):
//
//////////////////////////////////////////////////////////////////
cd $MYHOME/src/tslib

export CC=arm-linux-gcc
export CXX=arm-linux-g++
./autogen.sh
echo "ac_cv_func_malloc_0_nonnull=yes" > arm-linux.cache
./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=/mnt/nfs/tslib1.4-install      /*--enable-inputapi=no --srcdir=/home/qtopia-arm-home/arm/tslib*/

<可能出现的错误一>
    为了防止出现“libtool: link: only absolute run-paths are allowed“的错误,在/tslib/plugins/Makefile里面找rpath,找到将其注释并加上绝对路径。
#LDFLAGS := $(LDFLAGS) -rpath $(PLUGIN_DIR)
LDFLAGS := $(LDFLAGS) -rpath `cd $(PLUGIN_DIR) && pwd`

# make
# make install

排除错误
1.ts_calibrate时总是出现一个错误:ts_open:Inappropriate ioctol for device. 可能是自己板子的触摸屏驱动不支持ioctl操作
./configure 时,添加 --enable-inputapi=no

 

 

//////////////////////////////////////////////////////////////////
//
//    安装 qtopia-core-opensource-src-4.3.0
//
//////////////////////////////////////////////////////////////////
# tar -zxvf qtopia-core-opensource-src-4.3.0

#./configure --help
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

This is the Qtopia Core Open Source Edition.

Usage:  configure [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
        [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
        [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
        [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
        [-debug-and-release] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
        [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
        [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
        [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
        [-platform] [-D <string>] [-I <string>] [-L <string>] [-help] [-no-zlib]
        [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-system-libtiff]
        [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
        [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
        [-no-make <part>] [-R <string>]  [-l <string>] [-no-rpath]  [-rpath] [-continue]
        [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
        [-iconv] [-no-pch] [-pch] [-no-qdbus] [-qdbus] [-no-separate-debug-info]
        [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
        [-separate-debug-info] [-armfpa] [-no-optimized-qmake] [-optimized-qmake]

        [additional platform specific options (see below)]
         

Installation options:

 These are optional, but you may specify install directories.

    -prefix <dir> ...... This will install everything relative to <dir>
                         (default /usr/local/Trolltech/QtopiaCore-4.3.0)

  * -prefix-install .... Force a sandboxed "local" installation of
                         Qt. This will install into
                         /usr/local/Trolltech/QtopiaCore-4.3.0, if this option is
                         disabled then some platforms will attempt a
                         "system" install by placing default values to
                         be placed in a system location other than
                         PREFIX.

 You may use these to separate different parts of the install:

    -bindir <dir> ......... Executables will be installed to <dir>
                            (default PREFIX/bin)
    -libdir <dir> ......... Libraries will be installed to <dir>
                            (default PREFIX/lib)
    -docdir <dir> ......... Documentation will be installed to <dir>
                            (default PREFIX/doc)
    -headerdir <dir> ...... Headers will be installed to <dir>
                            (default PREFIX/include)
    -plugindir <dir> ...... Plugins will be installed to <dir>
                            (default PREFIX/plugins)
    -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
                            (default PREFIX)
    -translationdir <dir>.. Translations of Qt programs will be installed to <dir>
                            (default PREFIX/translations)
    -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
                            (default PREFIX/etc/settings)
    -examplesdir <dir> .... Examples will be installed to <dir>
                            (default PREFIX/examples)
    -demosdir <dir> ....... Demos will be installed to <dir>
                            (default PREFIX/demos)

 You may use these options to turn on strict plugin loading.

    -buildkey <key> .... Build the Qt library and plugins using the specified
                         <key>.  When the library loads plugins, it will only
                         load those that have a matching key.

Configure options:

 The defaults (*) are usually acceptable. A plus (+) denotes a default value
 that needs to be evaluated. If the evaluation succeeds, the feature is
 included. Here is a short explanation of each option:

 *  -release ........... Compile and link Qt with debugging turned off.
    -debug ............. Compile and link Qt with debugging turned on.
    -debug-and-release . Compile and link two versions of Qt, with and without
                         debugging turned on. [Mac only]

 *  -shared ............ Create and use shared Qt libraries.
    -static ............ Create and use static Qt libraries.

 *  -no-fast ........... Configure Qt normally by generating Makefiles for all
                         project files.
    -fast .............. Configure Qt quickly by generating Makefiles only for
                         library and subdirectory targets.  All other Makefiles
                         are created as wrappers, which will in turn run qmake.

    -no-largefile....... Disables large file support.
 +  -largefile.......... Enables Qt to access files larger than 4 GB.

 *  -no-exceptions ..... Disable exceptions on compilers that support it.
    -exceptions ........ Enable exceptions on compilers that support it.

    -no-accessibility .. Do not compile Accessibility support.
 *  -accessibility ..... Compile Accessibility support.

    -no-stl ............ Do not compile STL support.
 *  -stl ............... Compile STL support.

    -no-sql-<driver> ... Disable SQL <driver> entirely.
    -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
                         none are turned on.
    -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
                         at run time.

                         Possible values for <driver>:
                         [  ibase mysql odbc psql sqlite sqlite2 ]

    -system-sqlite ..... Use sqlite from the operating system.

    -no-qt3support ..... Disables the Qt 3 support functionality.
 *  -qt3support ........ Enables the Qt 3 support functionality.

    -platform target ... The operating system and compiler you are building
                         on (qws/linux-x86-g++).

                         See the README file for a list of supported
                         operating systems and compilers.

    -no-mmx ............ Do not compile with use of MMX instructions.
    -no-3dnow .......... Do not compile with use of 3DNOW instructions.
    -no-sse ............ Do not compile with use of SSE instructions.
    -no-sse2 ........... Do not compile with use of SSE2 instructions.

    -D <string> ........ Add an explicit define to the preprocessor.
    -I <string> ........ Add an explicit include path.
    -L <string> ........ Add an explicit library path.

    -help, -h .......... Display this information.

Third Party Libraries:

    -no-zlib ........... Do not compile in ZLIB support. Implies -no-libpng.
    -qt-zlib ........... Use the zlib bundled with Qt.
 +  -system-zlib ....... Use zlib from the operating system.
                         See http://www.gzip.org/zlib

 *  -no-gif ............ Do not compile the plugin for GIF reading support.
    -qt-gif ............ Compile the plugin for GIF reading support.
                         See also src/plugins/imageformats/gif/qgifhandler.h

    -no-libtiff ........ Do not compile the plugin for TIFF support.
    -qt-libtiff ........ Use the libtiff bundled with Qt.
 +  -system-libtiff .... Use libtiff from the operating system.
                         See http://www.libtiff.org

    -no-libpng ......... Do not compile in PNG support.
    -qt-libpng ......... Use the libpng bundled with Qt.
 +  -system-libpng ..... Use libpng from the operating system.
                         See http://www.libpng.org/pub/png

    -no-libmng ......... Do not compile the plugin for MNG support.
    -qt-libmng ......... Use the libmng bundled with Qt.
 +  -system-libmng ..... Use libmng from the operating system.
                         See http://www.libmng.com

    -no-libjpeg ........ Do not compile the plugin for JPEG support.
    -qt-libjpeg ........ Use the libjpeg bundled with Qt.
 +  -system-libjpeg .... Use libjpeg from the operating system.
                         See http://www.ijg.org

    -no-openssl ........ Do not compile support for OpenSSL.
 +  -openssl ........... Use OpenSSL from the operating system.

Additional options:

    -make <part> ....... Add part to the list of parts to be built at make time.
                         (libs tools examples demos)
    -nomake <part> ..... Exclude part from the list of parts to be built.

    -R <string> ........ Add an explicit runtime library path to the Qt
                         libraries.
    -l <string> ........ Add an explicit library.

    -no-rpath .......... Do not use the library install path as a runtime
                         library path.
 +  -rpath ............. Link Qt libraries and executables using the library
                         install path as a runtime library path. Equivalent
                         to -R install_libpath

    -continue........... Continue as far as possible if an error occurs.

    -verbose, -v ....... Print verbose information about each step of the
                         configure process.

    -silent ............ Reduce the build output so that warnings and errors
                         can be seen more easily.

 *  -no-optimized-qmake ... Do not build qmake optimized.
    -optimized-qmake ...... Build qmake optimized.

    -no-nis ............ Do not compile NIS support.
 *  -nis ............... Compile NIS support.

    -no-cups............ Do not compile CUPS support.
 *  -cups .............. Compile CUPS support.

    -no-iconv........... Do not compile support for iconv(3).
 *  -iconv.............. Compile support for iconv(3).

    -no-pch ............ Do not use precompiled header support.
 *  -pch ............... Use precompiled header support.

    -no-qdbus........... Do not compile the QtDBus module.
 +  -qdbus.............. Compile the QtDBus module.

    -reduce-relocations ... Reduce relocations in the libraries through extra linker
                            optimizations (Qt/X11 / Qtopia/Core only;
                            experimental; needs GNU ld >= 2.18)


Qtopia Core only:

    -xplatform target ... The target platform when cross-compiling.

    -no-feature-<feature> Do not compile in <feature>.
    -feature-<feature> .. Compile in <feature>. The available features
                          are described in src/corelib/global/qfeatures.txt

    -embedded <arch>..... This will enable the embedded build, you must have a
                          proper license for this switch to work.
                          Example values for <arch>: arm mips x86 generic

    -armfpa ............. Target platform is uses the ARM-FPA floating point format.
    -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.

                          The floating point format is usually autodetected by configure. Use this
                          to override the detected value.

    -little-endian ...... Target platform is little endian (LSB first).
    -big-endian ......... Target platform is big endian (MSB first).

                          You only need to specify the endianness when
                          cross-compiling, otherwise the host
                          endianness will be used.

    -no-freetype ........ Do not compile in Freetype2 support.
    -qt-freetype ........ Use the libfreetype bundled with Qt.
 *  -system-libfreetype.  Use libfreetype from the operating system.
                          See http://www.freetype.org/

    -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
                          default (full).

    -depths <list> ...... Comma-separated list of supported bit-per-pixel
                          depths, from: 4, 8, 16, 18, 24, and 32.

    -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
                               by default all available decorations are on.
          Possible values for <style>: [ styled windows default ]
    -plugin-decoration-<style> Enable decoration <style> as a plugin to be
                               linked to at run time.
          Possible values for <style>: [  default windows ]
    -no-decoration-<style> ....Disable decoration <style> entirely.
                               Possible values for <style>: [ styled windows default ]

    -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
                         Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ]
    -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
                         linked to at run time.
                         Possible values for <driver>: [  qvfb transformed vnc ]
    -no-gfx-<driver> ... Disable graphics <driver> entirely.
                         Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ]

    -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
    -no-kbd-<driver> ... Disable keyboard <driver> entirely.

                         Possible values for <driver>: [ tty usb sl5000 yopy vr41xx qvfb ]

    -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
                           Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ]
    -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be
                           linked to at runtime.
                           Possible values for <driver>: [  tslib ]
    -no-mouse-<driver> ... Disable mouse <driver> entirely.
                           Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ]

    -iwmmxt............. Compile using the iWMMXt instruction set
                         (available on some XScale CPUs).


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

 

选项
-qconfig local  -> qconfig-local.h

minimal-> qconfig-minimal.h
medium-> qconfig-medium.h
dist-> qconfig-dist.h
small-> qconfig-small.h
large-> qconfig-large.h

cp ./src/corelib/global/qconfig-medium.h ./src/corelib/global/qconfig-local.h


-depths 4, 8, 16, 18, 24, and 32


用qvfb的版本
# ./configure -silent -release  -prefix /mnt/nfs/qtopia4/qtopiatslibtarget -xplatform qws/linux-arm-g++ -embedded arm -qconfig local -qt-sql-sqlite -depths 16,32 -qt-kbd-usb -no-kbd-tty -no-mouse-linuxtp -qt-mouse-tslib -I/mnt/nfs/tslib1.4-install/include -L/mnt/nfs/tslib1.4-install/lib   2>../qtopiaconfgureERR.txt
不用qvfb的版本
# ./configure -silent -release  -prefix /mnt/nfs/qtopia4/qtopiatslibtarget -no-qvfb  -xplatform qws/linux-arm-g++ -embedded arm -qconfig local -qt-sql-sqlite -depths 16,32 -qt-kbd-usb -no-kbd-tty -no-mouse-linuxtp -qt-mouse-tslib -I/mnt/nfs/tslib1.4-install/include -L/mnt/nfs/tslib1.4-install/lib   2>../qtopiaconfgureERR.txt


完全安装不要qt3支持
 ./configure -silent -release  -prefix /mnt/nfs/qtopia4/qtopiatslibtarget -no-qvfb -xplatform qws/linux-arm-g++ -embedded arm  -no-qt3support -qt-sql-sqlite -depths 16,32 -qt-kbd-usb -no-kbd-tty -no-mouse-linuxtp -qt-mouse-tslib -I/mnt/nfs/tslib1.4-install/include -L/mnt/nfs/tslib1.4-install/lib   2>../qtopiaconfgureERR.txt


去掉tslib, 键盘鼠标的定义
 ./configure -silent -release  -prefix /mnt/nfs/qtopia4/qtopiatslibtarget -no-qvfb -xplatform qws/linux-arm-g++ -embedded arm -little-endian -no-qt3support -qt-sql-sqlite -depths 4,8,16,24,32
 
./configure -silent -release  -prefix /mnt/nfs/qtopia4/qtopiatslibtarget -no-qvfb -xplatform qws/linux-arm-g++ -embedded arm -little-endian -no-qt3support -qt-sql-sqlite -depths 4,8,16,32


//arm
./configure -silent -release  -prefix /mnt/nfs/qtopia4/qtopiatslibtarget -no-qvfb -xplatform qws/linux-arm-g++ -embedded arm -little-endian -qt-gfx-linuxfb -no-qt3support -qt-sql-sqlite -depths 4,8,16,24,32


//x86
./configure -silent -release  -prefix /mnt/nfs/qtopia4/qtopiatslibhost -qvfb -xplatform qws/linux-x86-g++ -embedded x86 -little-endian -qt-gfx-linuxfb -no-qt3support -no-openssl -qt-sql-sqlite -depths 4,8,16,24,32


gmake

//To reconfigure, run 'gmake confclean' and 'configure'.
gmake confclean
gmake install


# make
# make install     //安装到“/mnt/nfs/qtopia4/qtopiatslibtarget”下

 

////////////////////////////////////////////////////////////////////
//
//    如果用tslib触摸屏驱动,nfs到目标板 测试刚刚编译出的库及demo程序
//
////////////////////////////////////////////////////////////////////
编辑"qtopiatslib.sh"

export TSLIB_FBDEVICE=/dev/fb0    //指定帧缓冲设备
export TSLIB_TSEVENTTYPE=event0
export TSLIB_TSDEVICE=/dev/input/event0   //指定触摸屏设备节点文件
export TSLIB_CONFFILE=/mnt/nfs/tslib1.4-install/etc/ts.conf   //指定TSLIB配置文件的位置
export TSLIB_CONSOLEDEVICE=none               //tslib运行需要的控制台,这里就是LCD屏幕 ,设定控制台设备为none,否则默认为/dev/tty,
export TSLIB_CALIBFILE=/mnt/yaffs/tmp/pointercal    //指定触摸屏校准文件pintercal的存放位置
#export TSLIB_PLUGINDIR=/mnt/nfs/tslib1.4-install/share/ts/plugins   //指定触摸屏插件所在路径

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nfs/tslib1.4-install/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nfs/qtopia4/qtopiatslibtarget/lib
export QWS_SIZE=640x480
export QWS_MOUSE_PROTO="Tslib:/dev/input/event0"
export POINTERCAL_FILE=/mnt/yaffs/tmp/pointercal
export LANG=zh_CN

insmod /mnt/yaffs/touchscreen/ts-uptech.o
cd /mnt/nfs/tslib1.4-install/bin
./ts_calibrate
cd /mnt/nfs/qtopia4/qtopiatslibtarget/examples/graphicsview
if [ -f "$TSLIB_CALIBFILE" ]; then
./diagramscene -qws
else
/mnt/nfs/tslib1.4-install/bin/ts_calibrate
./diagramscene -qws
fi

tsllib-1.4的一个完整的ts.conf配置文件如下所示:

module_raw input        (需要把#去掉)
module pthres
module variance delta=30
module dejitter delta=100
module linear
将第一行的“#”去掉,让触摸屏起作用。

 

 

/*
export set HOME=/root
export set QTDIR=/opt/qt
export set QPEDIR=/opt/qtopia
export set QWS_KEYBOARD="USB:/dev/input/event1"
export set QWS_MOUSE_PROTO="USB:/dev/input/mouse0"
export set PATH=$QPEDIR/bin:$PATH
export set LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib

ln -sf /dev/touchscreen/0raw /dev/ts
*/

 

////////////////////////////////////////////////////////////////////////////////////
//
//      测试运行 Qtopia core 4 的例子
//
//
////////////////////////////////////////////////////////////////////////////////////


#192.168.0.55:/mnt/nfs下的文件nfs挂载到目标板/mnt/nfs
mount -t nfs 192.168.0.55:/mnt/nfs /mnt/nfs

export LANG=zh_CN
export set QWS_KEYBOARD=TTY
#置空系统自动测试鼠标
export set QWS_MOUSE_PROTO=   
export QWS_SIZE=640x480

export QTDIR=/mnt/nfs/qtopia4/qtopiatslibtarget
export LD_LIBRARY_PATH=/mnt/nfs/qtopia4/qtopiatslibtarget/lib:/lib:/usr/lib    #mnt/nfs/tslib1.4-install/lib:
PATH=/mnt/nfs/qtopia4/qtopiatslibtarget/bin:/bin:/sbin:/usr/bin:/usr/sbin


//export QWS_DISPLAY=transformed:rot90:0   //旋转90度
//export QWS_DISPLAY=transformed:rot180:0
//export QWS_DISPLAY=transformed:rot270:0

///////////////////////////////////////////////////////////////////////////////////////////
//
//       Windows 环境下开发的程序移植到arm平台下并运行
//
///////////////////////////////////////////////////////////////////////////////////////////
//export LANG=zh_CN
//export QTDIR=/mnt/nfs/qtopia4/qtopiatslibtarget        //编译制定qt目录

export QTDIR=/home/donglei/src/qtopia-core-opensource-src-4.3.0

#export LD_LIBRARY_PATH=/mnt/nfs/qtopia4/qtopiatslibtarget/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/donglei/src/qtopia-core-opensource-src-4.3.0/lib:$LD_LIBRARY_PATH


#确保/home/donglei/src/qtopia-core-opensource-src-4.3.0/bin在PATH第一位置,/usr/bin下及其他目录有qmake
export PATH=/usr/local/arm/2.95.3/bin:/home/donglei/src/qtopia-core-opensource-src-4.3.0/bin:$PATH
//export QMAKESPEC=linux-arm-g++ 或 /mnt/nfs/qtopia4/qtopiatslibinstall/mkspecs/qws/linux-arm-g++
//export QMAKESPEC=/mnt/nfs/qtopia4/qtopiatslibinstall/mkspecs/qws/linux-arm-g++


依次运行
cd src/eFireProof
qmake *.pro
make
cp eFireProof /mnt/nfs/eFireProof/
cd /mnt/nfs/eFireProof/

///////////////////////////////////////////////////////////////////////////////////////////
//
//       在arm板上运行
//
///////////////////////////////////////////////////////////////////////////////////////////

设置“测试运行 Qtopia core 4 的例子”相同的环境变量

cd /mnt/nfs/eFireProof

./eFireProof -qws -font wenquanyi

./eFireProof -qws -font wenquanyi  -style motif         //motif、windows和platinum

./eFireProof -qws -font wenquanyi  -style windows

./eFireProof -qws -font wenquanyi  -title -decoration windows

 Ctrl+Alt+Backspace 退出

阅读全文
0 0

相关文章推荐

img
取 消
img