1. 程式人生 > >手動部署QtSylixOS的方法

手動部署QtSylixOS的方法

sylixos qt 手動部署

1. 適用範圍

本文檔介紹了QtSylixOS相關庫文件和應用程序手動部署的方法。

實際開發過程中,有些板卡無網絡功能,此時需要手動對QtSylixOS的庫文件和應用程序進行部署。

本文介紹的是通過U盤或SD卡將QtSylixOS部署到以Nand Flash為根文件系統的設備中。


2. QtSylixOS需要部署的文件

QtSylixOS部署的文件都位於Qt安裝路徑的"Qt\qtcreator-3.4.0\SylixOS\sdk"中,如圖 2.1所示。

技術分享

2.1 QtSylixOS安裝目錄下的sdk文件夾

以armv7架構的處理器為例,其使用的sdk版本為armv7-sylixos-qt-4.8.7。如圖 2.2所示,在"Qt\qtcreator-3.4.0\SylixOS\sdk\fs"目錄下有需要部署的文件。

技術分享

2.2需要部署的fs目錄

fs目錄對應目標板卡上的"/"目錄,所以fs目錄下的apps,etc,qt分別與目標板卡上的"/apps","/etc","/qt"目錄對應。

3. 部署步驟

3.1 拷貝fs目錄

首先將U盤或SD卡接入PC,拷貝fs目錄至U盤或SD中。


3.2 拷貝Base庫

應用程序運行時會依賴Base工程中如表 3.1所示的文件。

3.1 Base工程需要拷貝的庫文件

名稱路徑
libcextern.soBase/libcextern/Release/strip/libcextern.so
envBase/libsylixos/Release/strip/env
libvpmpdm.soBase/libsylixos/Release/strip/libvpmpdm.so
xinput.koBase/libsylixos/Release/strip/xinput.ko
xsiipc.koBase/libsylixos/Release/strip/xsiipc.ko


在fs同目錄下建立base文件夾,將以上文件拷貝至base文件夾中。

以上兩步結束後,U盤或SD卡目錄下應該有如圖 3.1所示的兩個文件夾。

技術分享

3.1拷貝結束後的目錄

3.3 創建自動拷貝腳本

在fs目錄同一層級中,創建copy.sh腳本文件,並在copy.sh中鍵入如程序清單 4.1所示的內容。


3.4 目標板卡掛載U盤或SD卡

將U盤或SD卡接入目標板卡,SylixOS會自動做掛載。


3.5 執行拷貝腳本

進入掛載後的U盤或SD卡目錄,一般為/media/sdcardX(X為0…n)或/media/udiskX(X為0…n),使用shfile copy.sh命令執行拷貝腳本。

4. 拷貝腳本內容

程序清單 4.1拷貝腳本

mkdir /apps
mkdir /apps/mousecalibration
cp –rf fs/apps/mousecalibration/mousecalibration /apps/mousecalibration/.
mkdir /etc
cp –rf fs/etc/fs_init.sh /etc/fs_init.sh
cp –rf fs/etc/fs_no_symlink_init.sh /etc/fs_no_symlink_init.sh
cp –rf fs/etc/pointercal /etc/pointercal
cp –rf fs/etc/qtcp_4.8.7.sh /etc/qtcp_4.8.7.sh
cp –rf fs/etc/qtenv.sh /etc/qtenv.sh
cp –rf fs/etc/qtln_4.8.7.sh /etc/qtln_4.8.7.sh
cp –rf fs/etc/startup.sh /etc/startup.sh
mkdir /qt
mkdir /qt/lib
mkdir /qt/lib/fonts
cp –rf fs/qt/lib/fonts/DejaVuSans.ttf /qt/lib/fonts/DejaVuSans.ttf
cp –rf fs/qt/lib/libQt3Support.so.4.8.7 /qt/lib/libQt3Support.so.4.8.7
cp –rf fs/qt/lib/libQtCLucene.so.4.8.7 /qt/lib/libQtCLucene.so.4.8.7
cp –rf fs/qt/lib/libQtCore.so.4.8.7 /qt/lib/libQtCore.so.4.8.7
cp –rf fs/qt/lib/libQtDeclarative.so.4.8.7 /qt/lib/libQtDeclarative.so.4.8.7
cp –rf fs/qt/lib/libQtDesigner.so.4.8.7 /qt/lib/libQtDesigner.so.4.8.7
cp –rf fs/qt/lib/libQtDesignerComponents.so.4.8.7 /qt/lib/.
cp –rf fs/qt/lib/libQtGui.so.4.8.7 /qt/lib/libQtGui.so.4.8.7
cp –rf fs/qt/lib/libQtHelp.so.4.8.7 /qt/lib/libQtHelp.so.4.8.7
cp –rf fs/qt/lib/libQtMultimedia.so.4.8.7 /qt/lib/libQtMultimedia.so.4.8.7
cp –rf fs/qt/lib/libQtNetwork.so.4.8.7 /qt/lib/libQtNetwork.so.4.8.7
cp –rf fs/qt/lib/libQtScript.so.4.8.7 /qt/lib/libQtScript.so.4.8.7
cp –rf fs/qt/lib/libQtScriptTools.so.4.8.7 /qt/lib/libQtScriptTools.so.4.8.7
cp –rf fs/qt/lib/libQtSerialPort.so.1.0.0 /qt/lib/libQtSerialPort.so.1.0.0
cp –rf fs/qt/lib/libQtSql.so.4.8.7 /qt/lib/libQtSql.so.4.8.7
cp –rf fs/qt/lib/libQtSvg.so.4.8.7 /qt/lib/libQtSvg.so.4.8.7
cp –rf fs/qt/lib/libQtTest.so.4.8.7 /qt/lib/libQtTest.so.4.8.7
cp –rf fs/qt/lib/libQtWebKit.so.4.9.4 /qt/lib/libQtWebKit.so.4.9.4
cp –rf fs/qt/lib/libQtXml.so.4.8.7 /qt/lib/libQtXml.so.4.8.7
cp –rf fs/qt/lib/libQtXmlPatterns.so.4.8.7 /qt/lib/libQtXmlPatterns.so.4.8.7
cp –rf fs/qt/lib/libqwt.so.6.1.2 /qt/lib/libqwt.so.6.1.2
cp –rf base/libvpmpdm.so /lib/libvpmpdm.so
mkdir /lib/modules/
mkdir /usr/bin
cp –rf base/xinput.ko /lib/modules/xinput.ko
cp –rf base/xsiipc.ko /lib/modules/xsiipc.ko
cp –rf base/env /usr/bin/env
cp –rf base/libcextern.so /lib/libcextern.so
mkdir /qt/plugins/
mkdir /qt/plugins/accessible
cp –rf fs/qt/plugins/accessible/libqtaccessiblecompatwidgets.so /qt/plugins/accessible/.
cp –rf fs/qt/plugins/accessible/libqtaccessiblewidgets.so /qt/plugins/accessible/.
mkdir /qt/plugins/bearer
cp –rf fs/qt/plugins/accessible/libqgenericbearer.so /qt/plugins/bearer/.
mkdir /qt/plugins/designer
cp –rf fs/qt/plugins/accessible/libcontainerextension.so /qt/plugins/designer/.
cp –rf fs/qt/plugins/accessible/libcustomwidgetplugin.so /qt/plugins/designer/.
cp –rf fs/qt/plugins/accessible/libqdeclarativeview.so /qt/plugins/designer/.
cp –rf fs/qt/plugins/accessible/libqt3supportwidgets.so /qt/plugins/designer/.
cp –rf fs/qt/plugins/accessible/libqwebview.so /qt/plugins/designer/.
cp –rf fs/qt/plugins/accessible/libtaskmenuextension.so /qt/plugins/designer/.
cp –rf fs/qt/plugins/accessible/libworldtimeclockplugin.so /qt/plugins/designer/.
mkdir /qt/plugins/iconengines
cp –rf fs/qt/plugins/iconengines/libqsvgicon.so /qt/plugins/iconengines/.
mkdir /qt/plugins/imageformats
cp –rf fs/qt/plugins/imageformats/libqgif.so /qt/plugins/libqgif/.
cp –rf fs/qt/plugins/imageformats/libqico.so /qt/plugins/libqico/.
cp –rf fs/qt/plugins/imageformats/libqjpeg.so /qt/plugins/libqjpeg/.
cp –rf fs/qt/plugins/imageformats/libqmng.so /qt/plugins/libqmng/.
cp –rf fs/qt/plugins/imageformats/libqsvg.so /qt/plugins/libqsvg/.
cp –rf fs/qt/plugins/imageformats/libqtga.so /qt/plugins/libqtga/.
cp –rf fs/qt/plugins/imageformats/libqtiff.so /qt/plugins/libqtiff/.
mkdir /qt/plugins/qmltooling
cp –rf fs/qt/plugins/qmltooling/libqmldbg_inspector.so /qt/plugins/qmltooling/.
cp –rf fs/qt/plugins/qmltooling/libqmldbg_tcp.so /qt/plugins/qmltooling/.
mkdir /qt/qml/
mkdir /qt/qml/Qt/
mkdir /qt/qml/Qt/labs/
mkdir /qt/qml/Qt/labs/folderlistmodel
cp –rf fs/qt/qml/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.so /qt/qml/Qt/labs/folderlistmodel/.
cp –rf fs/qt/qml/Qt/labs/folderlistmodel/qmldir /qt/qml/Qt/labs/folderlistmodel/.
mkdir /qt/qml/Qt/labs/gestures
cp –rf fs/qt/qml/Qt/labs/gestures/libqmlgesturesplugin.so /qt/qml/Qt/labs/gestures/.
cp –rf fs/qt/qml/Qt/labs/gestures/qmldir /qt/qml/Qt/labs/gestures/.
mkdir /qt/qml/Qt/labs/particles
cp –rf fs/qt/qml/Qt/labs/particles/libqmlparticlesplugin.so /qt/qml/Qt/labs/particles/.
cp –rf fs/qt/qml/Qt/labs/particles/qmldir /qt/qml/Qt/labs/particles/.
mkdir /qt/qml/QtWebKit/
cp –rf fs/qt/qml/QtWebKit/libqmlwebkitplugin.so /qt/qml/QtWebKit/.
cp –rf fs/qt/qml/QtWebKit/qmldir /qt/qml/QtWebKit/.


手動部署QtSylixOS的方法