qt-cross-compile

目前需要Cross Compile QT for hi3535,qt 4.8是可以使用-qws,但在qt5之後被QPA取代


更新記錄

item note
20160225 第一版

目錄


QT

1
./configure -prefix /usr/local/Trolltech/QtEmbedded-4.8.5-arm-hisiv200  -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-arm-g++ -depths all -little-endian -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-freetype -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-transformed -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -no-gfx-directfb -no-gfx-qnx -plugin-gfx-linuxfb -opensource
config description
-embedded arm -embedded ,: arm mips x86 generic
-platform qws/linux-x86-g++
-xplatform qws/linux-arm-g++
-depths all -depths …… Comma-separated list of supported bit-per-pixel
depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and ‘all’
-little-endian -little-endian …… Target platform is little endian (LSB first)
-big-endian ……… Target platform is big endian (MSB first).
-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.
-no-glib Do not compile Glib support.
-no-cups Do not compile CUPS support.
-no-largefile Disables large file support.
-largefile … Enables Qt to access files larger than 4 GB.
-no-gtkstyle Do not build the GTK theme integration
-qt-freetype Use the libfreetype bundled with Qt
-qt-mouse- Enable a mouse in the QtGui library.
-plugin-mouse- Enable mouse as a plugin to be linked to at runtime.
-qt-gfx-linuxfb
-plugin-gfx-linuxfb
-opensource Compile and link the Open-Source Edition of Qt.
1
configure -prefix /usr/local/qt5.5.1 -platform linux-g++-32  -xplatform linux-arm-gnueabi-g++  -release -no-openssl -linuxfb -opensource
config description
-prefix /usr/local/qt5.5.1
-platform linux-g++-32
-xplatform linux-arm-gnueabi-g++
-release
-no-openssl
-linuxfb
-opensource
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
   Configure summary

Building on: linux-g++-32 (i386, CPU features: none detected)
Building for: linux-arm-gnueabi-g++ (arm, CPU features: none detected)

Build options:
Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus enable_new_dtags evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv inotify i
pv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis no-pkg-config pcre png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config zlib
Build parts ............ libs examples
Mode ................... release
Using sanitizer(s)...... none
Using C++11 ............ yes
Using gold linker....... no
Using new DTAGS ........ yes
Using PCH .............. yes
Target compiler supports:
Neon ................. no

Qt modules and options:
Qt D-Bus ............... yes (loading dbus-1 at runtime)
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... yes
Use system proxies ..... no

Support enabled for:
Accessibility .......... yes
ALSA ................... no
CUPS ................... no
Evdev .................. yes
FontConfig ............. no
FreeType ............... yes (bundled copy)
Glib ................... no
GStreamer .............. no
GTK theme .............. no
HarfBuzz ............... yes (bundled copy)
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
libinput................ no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... yes
OpenGL / OpenVG:
EGL .................. no
OpenGL ............... no
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. no
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ no
EGLFS i.MX6....... . no
EGLFS KMS .......... no
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... no
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... yes (plugin, using bundled copy)
TDS .................. no
tslib .................. no
udev ................... no
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (bundled copy)

Ligthouse

  • Qt Lighthouse & Wayland
    • Lighthouse是QtGui的一個Window System Agnostic移植
    • 使得QtGui不瞭解它在什麼視窗系統上運行,把處理邏輯交給了Lighthouse的外掛程式
  • Wayland

    • Wayland是一款規定顯示伺服器(稱為Wayland Compositor)與其客戶機之間通信方式的協議
    • 這個專案也開發支援Wayland顯示的Qt,而不需要X。大部分應用程式都有望獲得透過函式庫,無需修改程式即可支援Wayland。
    • Wayland compositors, libwayland-client and toolkits
      Wayland
    • Wayland是一款協定,但與X server不同的是,Wayland只做它必須要做的事情
    • 在X中:
      • 內核捕獲滑鼠點擊事件並行送給X server
      • X server會計算該把這一事件傳送給哪個窗口 (窗口位置是由Compositor控制的,X server並不能夠正確的計算Compositor做過特效變化之後的按鈕)
      • 應用程式對此事件進行處理(將引發按鈕更新動作)(但是,在此之前它得向X server傳送繪製請求)
      • X server接收到這條繪製請求,然後把它發給影片驅動來渲染
      • Compositor知道它必須要重新合成螢幕上的一塊區域
      • 開始繪製。但是X server還會去做一些不必要的本職工作(窗口重疊計算、窗口剪裁計算等)
    • 在Wayland中:
      • 內核捕獲滑鼠點擊事件並行送給Wayland Compositor
      • 直接發給Wayland Compositor的,所以Wayland Compositor會正確地計算出按鈕的位置
      • 應用程式直接渲染,無需向Wayland Compositor請求
      • Wayland Compositor收到這條資訊後,立即重新合成整個桌面
  • Qt 5.x提供了QtWayland模塊以支援Wayland協議 (藉由-platform命令列選項)

    • 2011年1月,Wayland支援搬進了上游Qt版本庫的Lighthouse分枝

來源

1
2
3
Lighthouse is the project name for the Qt Platform Abstraction – making it much easier to port Qt to new platforms.

./configure -developer-build -qpa -opensource -nomake examples -nomake demos -nomake tests

QPA

新版的 QT5改用 QPA取代QWS

The Qt Platform Abstraction


資料來源">X Window,資料來源

  • X11 是在 UNIX 系統下的視窗軟體,它分為二種版本
    • FreeBSD 5.2.1 以前用的 XFree86
    • FreeBSD 5.3 以後預設使用的 Xorg
  • 原本的 X11 是以 XFree86 為主,但最近由於版權爭議及管理問題,分裂成二套軟體
  • X11 是一個 Client/Server 架構的軟體,之所以會是 Client/Server 架構是因為在一開始設計 X 時,為了做到網路集中管理
    • X Server 指的是有滑鼠及鍵盤的機器
    • X Client 是畫面顯示的機器
  • X11 只是用來做基本的圖形顯示,我們除了介紹安裝 X11 外,另外我們會再加裝視窗管理軟體,如果沒有了它,X Windows 就只能看到白白一片
  • port 來安裝 X Window 及 KDE 3,但是必須花費很長的一段時間來進行編譯
    • Step1:安裝X Window (X.Org 套件)
    • Step2:安裝KDE 3
    • Step3:安裝中文化字型
    • Step4:產生設定檔 (Xorg -configure)
    • Step 5:進入 X Window

X Window System

資料來源

  • X能為GUI環境提供基本的框架:在螢幕上描繪、呈現圖像與移動程式視窗,同時也受理、執行、及管理電腦與滑鼠、鍵盤的互動程式
  • X採用主從式的架構模型

    • 一個X伺服器與多個X用戶端程式進行通訊
    • 伺服器接受對於圖形輸出(視窗)的請求並反應使用者輸入(鍵盤、滑鼠、觸控螢幕)
    • 伺服器可能是一個能顯示到其他顯示系統的應用程式
      參考來源
      X Window System
  • 應用程式(「客戶端」應用程式)所執行的機器,不一定是使用者原生的機器(顯示的「伺服器」

  • 使用者介面

    • 桌面環境: GNOME

      • 目標作業系統是Linux,但是大部分的BSD系統亦支援GNOME
      • GNOME 1
        • 1996年K桌面環境版本1自由桌面環境發布,但KDE所依賴的Qt當時並未使用GPL授權
        • GIMP Toolkit(GTK+)被選中做為Qt toolkit的替代,擔當GNOME桌面的基礎
        • 在GNOME變得普及後,1999年Qt加入GPL授權
      • GNOME 2: Metacity為它的預設視窗管理員
      • GNOME 3: Mutter取代了Metacity成為預設的視窗管理員
        GNOME3
    • 桌面環境: KDE

      • Mathias Ettrich選擇使用Qt程式庫開發KDE桌面系統
      • Qt 4.5在2009年3月3日發布,遵循了LGPL 2.1協定,放寬了KDE函式庫的授權
        KDE
    • 桌面環境: CDE

      • 通用桌面環境(Common Desktop Environment)
      • CDE是一個由惠普、IBM和Sun透過X/Open公司共同開發的基於X11使用者環境,介面和生產工具都基於Motif圖形部件工具包
        CDE

桌面環境

資料來源

base 桌面環境
GTK+ GNOME,XFCE,LXDE,ROX
QT KDE, LXQT, Razor-qt
motif CDE
  • 窗口管理器
    • Beryl · Compiz · xcompmgr · Enlightenment ,,等

其它參考