跳至主要内容

【转】Installing Qt/Embedded

This installation procedure is written for Linux. It may need to be modified for other platforms.

  1. Unpack the archive if you have not done so already

        cd ;     gunzip qt-embedded-VERSION-commercial.tar.gz    # uncompress the archive     tar xf qt-embedded-VERSION-commercial.tar       # unpack it 
    Replace VERSION with the Qt/Embedded version number throughout.

    This document assumes that the archive is installed as ~/qt-VERSION.

  2. Compile the Qt/Embedded library and examples.

        cd ~/qt-VERSION     export QTDIR=~/qt-VERSION     ./configure     make 

    The configuration system is designed to allow platform-specific options to be added, but in general all Linux system which have framebuffer support can use the "linux-generic-g++" platform. The configuration system also supports cross-compilers: to build on Linux/x86 for the Linux/MIPSEL target, you would use:

         ./configure -platform linux-x86-g++ -xplatform linux-mips-g++ 

    Only a small number of configurations are predefined, all much the same. Configurations files are found in configs/.

  3. Enable framebuffer support.

    You may need to recompile your kernel to enable the framebuffer. This document does not describe how to do this; the HOWTO-Framebuffer page contains a short description. (You should see a penguin logo at boot time when the frame buffer is enabled.)

    For Matrox G100/G200/G400 use the matrox frame buffer driver.

    For NVidia TNT cards use the nvidia frame buffer driver.

    For Mach64 and most other cards, use the vesafb driver.

    Note that some cards are only supported in VGA16 mode, this will not work with the current version of Qt/Embedded, since VGA/16 is not yet supported. You may need to upgrade your kernel, or even switch to an experimental kernel.

    The frame buffer must also be enabled with a boot parameter. See /usr/src/linux/Documentation/fb for details.

    The fbset program, which should be included in Linux distributions, may be used to switch video modes without rebooting the system. The video mode active when the server is started will be used. (8-bit modes are still experimental.) Note: fbset does not work with the vesafb driver.

  4. Change permissions.

    To run Qt/Embedded, you need write access to the framebuffer device /dev/fb0.

    You also need read access to the mouse device. (Note that /dev/mouse is normally a symbolic link; the actual mouse device must be readable.)

  5. How to run the demonstration program.

    Log into a virtual console and do:

        cd ~/qt-VERSION/     ./start-demo 

  6. Miscellaneous troubleshooting and known bugs.

    To kill gpm, run the following command as root:

        gpm -k 

    In some cases, if the server does not work, it will work when run as root.

    Some example programs may not compile with GCC 2.95.

    Show processes using the framebuffer:

        fuser -v /dev/fb0 

    Kill such processes:

        fuser -vk /dev/fb0 
    or harsher:
        fuser -k -KILL /dev/fb0 

    Show existing semaphores:

        ipcs             

    Remove semaphores:

        ipcrm 

    The communication between client and server is done through the named pipe /tmp/.QtEmbedded; sometimes it may need to be deleted (eg. if you run Qt/Embedded as root then later as an unprivileged user).

  7. Customization.

    The Qt/Embedded library can be reduced in size by removing unnecessary features.

评论

此博客中的热门博文

【转】VxWorks中的地址映射

在运用嵌入式系统VxWorks和MPC860进行通信系统设计开发时,会遇到一个映射地址不能访问的问题。 缺省情况下,VxWorks系统已经进行了如下地址的映射:   memory地址、bcsr(Board Control and Status)地址、PC_BASE_ADRS(PCMCIA)地址、Internal Memory地址、rom(Flach memory)地址等,但是当你的硬件开发中要加上别的外设时,如(falsh、dsp、FPGA等),对这些外设的访问也是通过地址形式进行读写,如果你没有加相应的地址映射,那么是无法访问这些外设的。   和VxWorks缺省地址映射类似,你也可以进行相应的地址映射。   如下是地址映射原理及实现:   1、 地址映射结构 在Tornado\target\h\vmLib.h文件中 typedef struct phys_mem_desc { void *virtualAddr; void *physicalAddr; UINT len; UINT initialStateMask; /* mask parameter to vmStateSet */ UINT initialState; /* state parameter to vmStateSet */ } PHYS_MEM_DESC; virtualAddr:你要映射的虚拟地址 physicalAddr:硬件设计时定义的实际物理地址 len;要进行映射的地址长度 initialStateMask:可以初始化的地址状态: 有如下状态: #define VM_STATE_MASK_VALID 0x03 #define VM_STATE_MASK_WRITABLE 0x0c #define VM_STATE_MASK_CACHEABLE 0x30 #define VM_STATE_MASK_MEM_COHERENCY 0x40 #define VM_STATE_MASK_GUARDED 0x80 不同的CPU芯片类型还有其特殊状态 initialState:实际初始化的地址状态: 有如下状态: #define VM_STATE_VALID 0x01 #define VM_STATE_VALID_NOT 0x00 #define VM_STATE_WRITA

【转】cs8900网卡的移植至基于linux2.6内核的s3c2410平台

cs8900网卡的移植至基于linux2.6内核的s3c2410平台(转) 2008-03-11 20:58 硬件环境:SBC-2410X开发板(CPU:S3C2410X) 内核版本:2.6.11.1 运行环境:Debian2.6.8 交叉编译环境:gcc-3.3.4-glibc-2.3.3 第一部分 网卡CS8900A驱动程序的移植 一、从网上将Linux内核源代码下载到本机上,并将其解压: #tar jxf linux-2.6.11.1.tar.bz2 二、打开内核顶层目录中的Makefile文件,这个文件中需要修改的内容包括以下两个方面。 (1)指定目标平台。 移植前:         ARCH?= $(SUBARCH) 移植后: ARCH            :=arm (2)指定交叉编译器。 移植前: CROSS_COMPILE ?= 移植后: CROSS_COMPILE   :=/opt/crosstool/arm-s3c2410-linux-gnu/gcc-3.3.4-glibc-2.3.3/bin/arm-s3c2410-linux-gnu- 注:这里假设编译器就放在本机的那个目录下。 三、添加驱动程序源代码,这涉及到以下几个方面。(1)、从网上下载了cs8900.c和cs8900.h两个针对2.6.7的内核的驱动程序源代码,将其放在drivers/net/arm/目录下面。 #cp cs8900.c ./drivers/net/arm/ #cp cs8900.h ./drivers/net/arm/ 并在cs8900_probe()函数中,memset (&priv,0,sizeof (cs8900_t));函数之后添加如下两条语句: __raw_writel(0x2211d110,S3C2410_BWSCON); __raw_writel(0x1f7c,S3C2410_BANKCON3); 注:其原因在"第二部分"解释。 (2)、修改drivers/net/arm/目录下的Kconfig文件,在最后添加如下内容: Config ARM_CS8900    tristate "CS8900 support" depends on NET_ETHERNET && A

【转】多迷人Gtkmm啊

前边已经说过用glade设计界面然后动态装载,接下来再来看看怎么改变程序的皮肤(主题)     首先从 http://art.gnome.org/themes/gtk2 下载喜欢的主题,从压缩包里提取gtk-2.0文件夹让它和我们下边代码生成的可执行文件放在同一个目录下,这里我下载的的 http://art.gnome.org/download/themes/gtk2/1317/GTK2-CillopMidnite.tar.gz     然后用glade设计界面,命名为main.glade,一会让它和我们下边代码生成的可执行程序放在同一个目录下边     然后开始写代码如下: //main.cc #include <gtkmm.h> #include <libglademm/xml.h> int main(int argc, char *argv[]) {     Gtk::Main kit(argc,argv);         Gtk::Window *pWnd;        gtk_rc_parse("E:\\theme-viewer\\themes\\gtk-2.0\\gtkrc");       Glib::RefPtr<Gnome::Glade::Xml> refXml;     try     {         refXml = Gnome::Glade::Xml::create("main.glade");     }     catch(const Gnome::Glade::XmlError& ex)     {         Gtk::MessageDialog dialog("Load glade file failed!", false,       \                                   Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK);         dialog.run();               return 1;     }         refXml->get_widget("main", pWnd);     if(pW