diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2016-11-10 10:06:11 +0200 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2016-11-21 08:39:46 +0000 |
commit | 1a9ad4899efb2f3054ec0d676e41a85e01d8f806 (patch) | |
tree | 0db9018d6d7e3c6caa71fe4710e94e25021e041d /files | |
parent | 3ee5d97e4de4356d416dad28239324ab757ec27a (diff) | |
download | meta-boot2qt-1a9ad4899efb2f3054ec0d676e41a85e01d8f806.tar.gz |
Add support for creating QBSP package
QBSP is a Qt specific Board Support Package that can be installed with
the Qt SDK or MaintenanceTool and contains a system image and a toolchain.
The toolchain is automatically registered to the QtCreator.
The recipes used for creating the system image and the toolchain can be
configured with QBSP_IMAGE_TASK and QBSP_SDK_TASK. The files wanted for
the system image can be further configured with QBSP_IMAGE_CONTENT,
with a list of files located in DEPLOY_DIR_IMAGE folder. By default,
.img and .conf files are used from the selected image recipe.
QBSP_INSTALLER_COMPONENT defines the location in the Qt installer tree
where the QBSP is shown and QBSP_VERSION defines the version for the
components. The QBSP is installed to path defined by QBSP_INSTALL_PATH.
The regular SDK creation can now reuse the same image package .7z, so
update upload script to use it instead of creating new package.
Task-number: QTBUG-57018
Change-Id: Id1e7cc4ab3998a7d450f23ed603b8e676b314d63
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'files')
-rw-r--r-- | files/qbsp/base_package.xml | 8 | ||||
-rw-r--r-- | files/qbsp/image_package.xml | 8 | ||||
-rw-r--r-- | files/qbsp/toolchain_installscript.qs | 107 | ||||
-rw-r--r-- | files/qbsp/toolchain_package.xml | 10 |
4 files changed, 133 insertions, 0 deletions
diff --git a/files/qbsp/base_package.xml b/files/qbsp/base_package.xml new file mode 100644 index 0000000..28261d5 --- /dev/null +++ b/files/qbsp/base_package.xml | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <Package> | ||
3 | <Version>@VERSION@</Version> | ||
4 | <ReleaseDate>@RELEASEDATE@</ReleaseDate> | ||
5 | <DisplayName>@NAME@</DisplayName> | ||
6 | <Description>Boot to Qt for @NAME@ with Embedded Linux baselayer</Description> | ||
7 | <Dependencies>@LICENSEDEPENDENCY@</Dependencies> | ||
8 | </Package> | ||
diff --git a/files/qbsp/image_package.xml b/files/qbsp/image_package.xml new file mode 100644 index 0000000..1eaf69c --- /dev/null +++ b/files/qbsp/image_package.xml | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <Package> | ||
3 | <Version>@VERSION@</Version> | ||
4 | <ReleaseDate>@RELEASEDATE@</ReleaseDate> | ||
5 | <DisplayName>@NAME@ Linux System</DisplayName> | ||
6 | <Description>SD-Card image for @NAME@ hardware with Embedded Linux baselayer</Description> | ||
7 | <DownloadableArchives>image.7z</DownloadableArchives> | ||
8 | </Package> | ||
diff --git a/files/qbsp/toolchain_installscript.qs b/files/qbsp/toolchain_installscript.qs new file mode 100644 index 0000000..bcf9cd1 --- /dev/null +++ b/files/qbsp/toolchain_installscript.qs | |||
@@ -0,0 +1,107 @@ | |||
1 | /**************************************************************************** | ||
2 | ** | ||
3 | ** Copyright (C) 2016 The Qt Company Ltd. | ||
4 | ** Contact: https://www.qt.io/licensing/ | ||
5 | ** | ||
6 | ** This file is part of the Boot to Qt meta layer. | ||
7 | ** | ||
8 | ** $QT_BEGIN_LICENSE:GPL$ | ||
9 | ** Commercial License Usage | ||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
11 | ** accordance with the commercial license agreement provided with the | ||
12 | ** Software or, alternatively, in accordance with the terms contained in | ||
13 | ** a written agreement between you and The Qt Company. For licensing terms | ||
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | ||
15 | ** information use the contact form at https://www.qt.io/contact-us. | ||
16 | ** | ||
17 | ** GNU General Public License Usage | ||
18 | ** Alternatively, this file may be used under the terms of the GNU | ||
19 | ** General Public License version 3 or (at your option) any later version | ||
20 | ** approved by the KDE Free Qt Foundation. The licenses are as published by | ||
21 | ** the Free Software Foundation and appearing in the file LICENSE.GPL3 | ||
22 | ** included in the packaging of this file. Please review the following | ||
23 | ** information to ensure the GNU General Public License requirements will | ||
24 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. | ||
25 | ** | ||
26 | ** $QT_END_LICENSE$ | ||
27 | ** | ||
28 | ****************************************************************************/ | ||
29 | |||
30 | function Component() | ||
31 | { | ||
32 | } | ||
33 | |||
34 | Component.prototype.createOperations = function() | ||
35 | { | ||
36 | component.createOperations(); | ||
37 | |||
38 | var device = "@MACHINE@" | ||
39 | var platform = "@NAME@" | ||
40 | var sysroot = "@SYSROOT@" | ||
41 | var target = "@TARGET@" | ||
42 | var abi = "@ABI@" | ||
43 | var installPath = "@INSTALLPATH@/toolchain" | ||
44 | var sdkPath = "@SDKPATH@" | ||
45 | var sdkFile = "@SDKFILE@" | ||
46 | |||
47 | var path = installer.value("TargetDir") + installPath; | ||
48 | if (systemInfo.kernelType !== "winnt") { | ||
49 | var script = path + "/" + sdkFile; | ||
50 | component.addOperation("Execute", "{0}", "chmod", "+x", script); | ||
51 | component.addOperation("Execute", "{0}", script, "-y", "-d", path, "UNDOEXECUTE", "rm", "-rf", path); | ||
52 | component.addOperation("Execute", "{0}", "/bin/rm", script); | ||
53 | } else { | ||
54 | var search = sdkPath; | ||
55 | path = path.replace(/\\/g,"/"); | ||
56 | component.addOperation("Replace", | ||
57 | path + "/sysroots/i686-pokysdk-mingw32/usr/bin/qt.conf", | ||
58 | search, path); | ||
59 | } | ||
60 | // qt.embedded.b2qt.xx | ||
61 | var baseid = component.name.substring(17,19); | ||
62 | var basecomponent = component.name.substring(0, component.name.lastIndexOf(".")); | ||
63 | var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name; | ||
64 | var qtId = basecomponent + ".qt"; | ||
65 | var icon = installer.value("B2QtDeviceIcon"); | ||
66 | var executableExt = ""; | ||
67 | var hostSysroot = "x86_64-pokysdk-linux"; | ||
68 | if (systemInfo.kernelType === "winnt") { | ||
69 | executableExt = ".exe"; | ||
70 | hostSysroot = "i686-pokysdk-mingw32"; | ||
71 | } | ||
72 | var deviceType = "Boot2Qt.HwDevice" | ||
73 | |||
74 | component.addOperation("Execute", | ||
75 | ["@SDKToolBinary@", "addTC", | ||
76 | "--id", toolchainId, | ||
77 | "--name", "GCC (Boot2Qt " + platform + ")", | ||
78 | "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target + "/" + target + "-g++" + executableExt, | ||
79 | "--abi", abi, | ||
80 | "UNDOEXECUTE", | ||
81 | "@SDKToolBinary@", "rmTC", "--id", toolchainId]); | ||
82 | |||
83 | component.addOperation("Execute", | ||
84 | ["@SDKToolBinary@", "addQt", | ||
85 | "--id", qtId, | ||
86 | "--name", "Boot2Qt %{Qt:Version} " + platform, | ||
87 | "--type", "Boot2Qt.QtVersionType", | ||
88 | "--qmake", path + "/sysroots/" + hostSysroot + "/usr/bin/qmake" + executableExt, | ||
89 | "UNDOEXECUTE", | ||
90 | "@SDKToolBinary@", "rmQt", "--id", qtId]); | ||
91 | |||
92 | var addKitOperations = ["@SDKToolBinary@", "addKit", | ||
93 | "--id", basecomponent, | ||
94 | "--name", "Boot2Qt %{Qt:Version} " + platform, | ||
95 | "--mkspec", "devices/linux-oe-generic-g++", | ||
96 | "--qt", qtId, | ||
97 | "--debuggerengine", "1", | ||
98 | "--debugger", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target + "/" + target + "-gdb" + executableExt, | ||
99 | "--sysroot", path + "/sysroots/" + sysroot, | ||
100 | "--devicetype", deviceType, | ||
101 | "--toolchain", toolchainId, | ||
102 | "--icon", icon]; | ||
103 | |||
104 | addKitOperations.push("UNDOEXECUTE", "@SDKToolBinary@", "rmKit", "--id", basecomponent); | ||
105 | |||
106 | component.addOperation("Execute", addKitOperations); | ||
107 | } | ||
diff --git a/files/qbsp/toolchain_package.xml b/files/qbsp/toolchain_package.xml new file mode 100644 index 0000000..85a2c67 --- /dev/null +++ b/files/qbsp/toolchain_package.xml | |||
@@ -0,0 +1,10 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <Package> | ||
3 | <Version>@VERSION@</Version> | ||
4 | <ReleaseDate>@RELEASEDATE@</ReleaseDate> | ||
5 | <DisplayName>@NAME@ Linux Toolchain</DisplayName> | ||
6 | <Description>Toolchain and system root for @NAME@ with Embedded Linux baselayer</Description> | ||
7 | <DownloadableArchives>toolchain.7z</DownloadableArchives> | ||
8 | <Dependencies>qt.tools.qtcreator</Dependencies> | ||
9 | <Script>installscript.qs</Script> | ||
10 | </Package> | ||