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 | |
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>
-rw-r--r-- | classes/qbsp-image.bbclass | 53 | ||||
-rw-r--r-- | classes/qbsp.bbclass | 151 | ||||
-rw-r--r-- | conf/distro/b2qt.conf | 5 | ||||
-rw-r--r-- | conf/distro/include/emulator.conf | 2 | ||||
-rw-r--r-- | conf/distro/include/tegra-t18x.conf | 5 | ||||
-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 | ||||
-rw-r--r-- | recipes-qt/images/b2qt-automotive-qt5-image.bb | 2 | ||||
-rw-r--r-- | recipes-qt/images/b2qt-embedded-qt5-image.bb | 2 | ||||
-rw-r--r-- | recipes-qt/meta/meta-b2qt-automotive-qbsp.bb | 47 | ||||
-rw-r--r-- | recipes-qt/meta/meta-b2qt-embedded-qbsp.bb | 48 | ||||
-rw-r--r-- | recipes-qt/qt5-addons/installer-framework_2.0.3.bb | 48 | ||||
-rwxr-xr-x | scripts/upload.sh | 34 |
15 files changed, 504 insertions, 26 deletions
diff --git a/classes/qbsp-image.bbclass b/classes/qbsp-image.bbclass new file mode 100644 index 0000000..c80aa23 --- /dev/null +++ b/classes/qbsp-image.bbclass | |||
@@ -0,0 +1,53 @@ | |||
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 | QBSP_IMAGE_CONTENT ??= "" | ||
31 | |||
32 | fakeroot do_qbsp_image () { | ||
33 | if [ -z "${QBSP_IMAGE_CONTENT}" ]; then | ||
34 | exit 0 | ||
35 | fi | ||
36 | |||
37 | mkdir -p ${S}/qbsp | ||
38 | |||
39 | for item in ${QBSP_IMAGE_CONTENT}; do | ||
40 | src=`echo $item | awk -F':' '{ print $1 }'` | ||
41 | dst=`echo $item | awk -F':' '{ print $2 }'` | ||
42 | |||
43 | install -D -m 0755 ${DEPLOY_DIR_IMAGE}/$src ${S}/qbsp/$dst | ||
44 | done | ||
45 | |||
46 | cd ${S}/qbsp | ||
47 | 7z a ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.7z . | ||
48 | |||
49 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.7z | ||
50 | ln -s ${IMAGE_NAME}.7z ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.7z | ||
51 | } | ||
52 | |||
53 | IMAGE_POSTPROCESS_COMMAND += "do_qbsp_image;" | ||
diff --git a/classes/qbsp.bbclass b/classes/qbsp.bbclass new file mode 100644 index 0000000..6707ce3 --- /dev/null +++ b/classes/qbsp.bbclass | |||
@@ -0,0 +1,151 @@ | |||
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 | inherit meta nopackages abi-arch | ||
31 | |||
32 | FILESEXTRAPATHS_prepend := "${B2QTBASE}/files/qbsp:" | ||
33 | |||
34 | SRC_URI = "\ | ||
35 | file://base_package.xml \ | ||
36 | file://image_package.xml \ | ||
37 | file://toolchain_package.xml \ | ||
38 | file://toolchain_installscript.qs \ | ||
39 | " | ||
40 | |||
41 | INHIBIT_DEFAULT_DEPS = "1" | ||
42 | do_qbsp[depends] += "\ | ||
43 | installer-framework:do_populate_sysroot \ | ||
44 | ${QBSP_SDK_TASK}:do_populate_sdk \ | ||
45 | ${QBSP_IMAGE_TASK}:do_image_complete \ | ||
46 | " | ||
47 | |||
48 | QBSP_VERSION ?= "${PV}${VERSION_AUTO_INCREMENT}" | ||
49 | QBSP_INSTALLER_COMPONENT ?= "${MACHINE}" | ||
50 | QBSP_INSTALL_PATH ?= "/Extras/${MACHINE}" | ||
51 | |||
52 | QBSP_LICENSE_DEPENDENCY ?= "" | ||
53 | QBSP_LICENSE_DEPENDENCY_imx = "qt.embedded.b2qt.freescalelicense" | ||
54 | |||
55 | VERSION_AUTO_INCREMENT = "-0-${DATETIME}" | ||
56 | VERSION_AUTO_INCREMENT[vardepsexclude] = "DATETIME" | ||
57 | |||
58 | DEPLOY_CONF_NAME ?= "${MACHINE}" | ||
59 | RELEASEDATE = "${@time.strftime('%Y-%m-%d',time.gmtime())}" | ||
60 | |||
61 | IMAGE_PACKAGE = "${QBSP_IMAGE_TASK}-${MACHINE}.7z" | ||
62 | SDK_NAME = "${DISTRO}-${SDK_MACHINE}-${QBSP_SDK_TASK}-${MACHINE}.${SDK_POSTFIX}" | ||
63 | SDK_POSTFIX = "sh" | ||
64 | SDK_POSTFIX_sdkmingw32 = "7z" | ||
65 | REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" | ||
66 | SDK_MACHINE = "${@d.getVar('SDKMACHINE', True) or '${SDK_ARCH}'}" | ||
67 | |||
68 | B = "${WORKDIR}/build" | ||
69 | |||
70 | patch_installer_files() { | ||
71 | sed -e 's#@NAME@#${DEPLOY_CONF_NAME}#' \ | ||
72 | -e 's#@VERSION@#${QBSP_VERSION}#' \ | ||
73 | -e 's#@RELEASEDATE@#${RELEASEDATE}#' \ | ||
74 | -e 's#@MACHINE@#${MACHINE}#' \ | ||
75 | -e 's#@SYSROOT@#${REAL_MULTIMACH_TARGET_SYS}#' \ | ||
76 | -e 's#@TARGET@#${TARGET_SYS}#' \ | ||
77 | -e 's#@ABI@#${ABI}#' \ | ||
78 | -e 's#@INSTALLPATH@#${QBSP_INSTALL_PATH}#' \ | ||
79 | -e 's#@SDKPATH@#${SDKPATH}#' \ | ||
80 | -e 's#@SDKFILE@#${SDK_NAME}#' \ | ||
81 | -e 's#@LICENSEDEPENDENCY@#${QBSP_LICENSE_DEPENDENCY}#' \ | ||
82 | -i ${1}/* | ||
83 | } | ||
84 | |||
85 | prepare_qbsp() { | ||
86 | # Toolchain component | ||
87 | TOOLCHAIN_PATH="${B}/pkg/${QBSP_INSTALLER_COMPONENT}.toolchain" | ||
88 | mkdir -p ${TOOLCHAIN_PATH}/meta | ||
89 | mkdir -p ${TOOLCHAIN_PATH}/data | ||
90 | |||
91 | cp ${WORKDIR}/toolchain_package.xml ${TOOLCHAIN_PATH}/meta/package.xml | ||
92 | cp ${WORKDIR}/toolchain_installscript.qs ${TOOLCHAIN_PATH}/meta/installscript.qs | ||
93 | patch_installer_files ${TOOLCHAIN_PATH}/meta | ||
94 | |||
95 | mkdir -p ${B}/toolchain/${QBSP_INSTALL_PATH}/toolchain | ||
96 | if [ "${SDK_POSTFIX}" == "7z" ]; then | ||
97 | 7z x ${DEPLOY_DIR}/sdk/${SDK_NAME} -o${B}/toolchain/${QBSP_INSTALL_PATH}/toolchain/ | ||
98 | else | ||
99 | cp ${DEPLOY_DIR}/sdk/${SDK_NAME} ${B}/toolchain/${QBSP_INSTALL_PATH}/toolchain/ | ||
100 | fi | ||
101 | |||
102 | cd ${B}/toolchain | ||
103 | archivegen ${TOOLCHAIN_PATH}/data/toolchain.7z * | ||
104 | |||
105 | # Image component | ||
106 | IMAGE_PATH="${B}/pkg/${QBSP_INSTALLER_COMPONENT}.system" | ||
107 | mkdir -p ${IMAGE_PATH}/meta | ||
108 | mkdir -p ${IMAGE_PATH}/data | ||
109 | |||
110 | cp ${WORKDIR}/image_package.xml ${IMAGE_PATH}/meta/package.xml | ||
111 | patch_installer_files ${IMAGE_PATH}/meta | ||
112 | |||
113 | mkdir -p ${B}/images/${QBSP_INSTALL_PATH}/images | ||
114 | 7z x ${DEPLOY_DIR_IMAGE}/${IMAGE_PACKAGE} -o${B}/images/${QBSP_INSTALL_PATH}/images/ | ||
115 | |||
116 | cd ${B}/images | ||
117 | archivegen ${IMAGE_PATH}/data/image.7z * | ||
118 | |||
119 | # Base component | ||
120 | BASE_PATH="${B}/pkg/${QBSP_INSTALLER_COMPONENT}" | ||
121 | mkdir -p ${BASE_PATH}/meta | ||
122 | |||
123 | cp ${WORKDIR}/base_package.xml ${BASE_PATH}/meta/package.xml | ||
124 | patch_installer_files ${BASE_PATH}/meta | ||
125 | } | ||
126 | |||
127 | create_qbsp() { | ||
128 | prepare_qbsp | ||
129 | |||
130 | # Repository creation | ||
131 | repogen -p ${B}/pkg ${B}/repository | ||
132 | |||
133 | mkdir -p ${DEPLOY_DIR}/qbsp | ||
134 | rm -f ${DEPLOY_DIR}/qbsp/${PN}-${MACHINE}.qbsp | ||
135 | |||
136 | cd ${B}/repository | ||
137 | archivegen ${DEPLOY_DIR}/qbsp/${PN}-${SDK_MACHINE}-${MACHINE}.qbsp * | ||
138 | } | ||
139 | |||
140 | python do_qbsp() { | ||
141 | bb.build.exec_func('create_qbsp', d) | ||
142 | } | ||
143 | |||
144 | addtask qbsp after do_unpack before do_build | ||
145 | |||
146 | do_qbsp[cleandirs] += "${B}" | ||
147 | |||
148 | do_configure[noexec] = "1" | ||
149 | do_compile[noexec] = "1" | ||
150 | do_populate_sysroot[noexec] = "1" | ||
151 | do_populate_lic[noexec] = "1" | ||
diff --git a/conf/distro/b2qt.conf b/conf/distro/b2qt.conf index de7381e..4a8f73b 100644 --- a/conf/distro/b2qt.conf +++ b/conf/distro/b2qt.conf | |||
@@ -80,6 +80,11 @@ PACKAGE_EXCLUDE_COMPLEMENTARY ?= "qtquickcompiler" | |||
80 | IMAGE_FSTYPES = "conf" | 80 | IMAGE_FSTYPES = "conf" |
81 | IMAGE_CLASSES += "image_types_sdcard deploy-conf" | 81 | IMAGE_CLASSES += "image_types_sdcard deploy-conf" |
82 | 82 | ||
83 | QBSP_IMAGE_CONTENT ?= "\ | ||
84 | ${IMAGE_LINK_NAME}.img \ | ||
85 | ${IMAGE_LINK_NAME}.conf \ | ||
86 | " | ||
87 | |||
83 | LICENSE_CREATE_PACKAGE = "1" | 88 | LICENSE_CREATE_PACKAGE = "1" |
84 | COPY_LIC_MANIFEST = "1" | 89 | COPY_LIC_MANIFEST = "1" |
85 | 90 | ||
diff --git a/conf/distro/include/emulator.conf b/conf/distro/include/emulator.conf index d7cb2c3..a5b95b5 100644 --- a/conf/distro/include/emulator.conf +++ b/conf/distro/include/emulator.conf | |||
@@ -32,6 +32,8 @@ IMAGE_ROOTFS_ALIGNMENT = "1048576" | |||
32 | ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3" | 32 | ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3" |
33 | IMAGE_FSTYPES = "ext3" | 33 | IMAGE_FSTYPES = "ext3" |
34 | 34 | ||
35 | QBSP_IMAGE_CONTENT = "${IMAGE_LINK_NAME}.hdd" | ||
36 | |||
35 | MACHINE_EXTRA_RRECOMMENDS += "\ | 37 | MACHINE_EXTRA_RRECOMMENDS += "\ |
36 | kernel-module-snd-intel8x0 \ | 38 | kernel-module-snd-intel8x0 \ |
37 | " | 39 | " |
diff --git a/conf/distro/include/tegra-t18x.conf b/conf/distro/include/tegra-t18x.conf index ebdb63b..80f4d57 100644 --- a/conf/distro/include/tegra-t18x.conf +++ b/conf/distro/include/tegra-t18x.conf | |||
@@ -33,6 +33,11 @@ TARGET_CFLAGS += " -DWIN_INTERFACE_CUSTOM" | |||
33 | DISTRO_FEATURES_DEFAULT += "wayland" | 33 | DISTRO_FEATURES_DEFAULT += "wayland" |
34 | IMAGE_FSTYPES += "tar.gz" | 34 | IMAGE_FSTYPES += "tar.gz" |
35 | 35 | ||
36 | QBSP_IMAGE_CONTENT = "\ | ||
37 | ${IMAGE_LINK_NAME}.tar.gz \ | ||
38 | Image \ | ||
39 | " | ||
40 | |||
36 | KERN_DIR ?= '${@os.path.normpath("${TOPDIR}/../sources/vibrante-t186/kernel")}' | 41 | KERN_DIR ?= '${@os.path.normpath("${TOPDIR}/../sources/vibrante-t186/kernel")}' |
37 | PLATFORM_TOPDIR ?= '${@os.path.normpath("${TOPDIR}/../sources/vibrante-t186")}' | 42 | PLATFORM_TOPDIR ?= '${@os.path.normpath("${TOPDIR}/../sources/vibrante-t186")}' |
38 | NVLAYER_DIR ?= "${TOPDIR}/../sources/nvidia-layer" | 43 | NVLAYER_DIR ?= "${TOPDIR}/../sources/nvidia-layer" |
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> | ||
diff --git a/recipes-qt/images/b2qt-automotive-qt5-image.bb b/recipes-qt/images/b2qt-automotive-qt5-image.bb index d0e13d5..179831a 100644 --- a/recipes-qt/images/b2qt-automotive-qt5-image.bb +++ b/recipes-qt/images/b2qt-automotive-qt5-image.bb | |||
@@ -42,7 +42,7 @@ IMAGE_FEATURES += "\ | |||
42 | hwcodecs \ | 42 | hwcodecs \ |
43 | " | 43 | " |
44 | 44 | ||
45 | inherit core-image | 45 | inherit core-image qbsp-image |
46 | inherit consistent_timestamps | 46 | inherit consistent_timestamps |
47 | 47 | ||
48 | IMAGE_INSTALL += "\ | 48 | IMAGE_INSTALL += "\ |
diff --git a/recipes-qt/images/b2qt-embedded-qt5-image.bb b/recipes-qt/images/b2qt-embedded-qt5-image.bb index 970d30f..4d0bfa4 100644 --- a/recipes-qt/images/b2qt-embedded-qt5-image.bb +++ b/recipes-qt/images/b2qt-embedded-qt5-image.bb | |||
@@ -42,7 +42,7 @@ IMAGE_FEATURES += "\ | |||
42 | hwcodecs \ | 42 | hwcodecs \ |
43 | " | 43 | " |
44 | 44 | ||
45 | inherit core-image | 45 | inherit core-image qbsp-image |
46 | inherit consistent_timestamps | 46 | inherit consistent_timestamps |
47 | 47 | ||
48 | IMAGE_INSTALL += "\ | 48 | IMAGE_INSTALL += "\ |
diff --git a/recipes-qt/meta/meta-b2qt-automotive-qbsp.bb b/recipes-qt/meta/meta-b2qt-automotive-qbsp.bb new file mode 100644 index 0000000..ebd12c5 --- /dev/null +++ b/recipes-qt/meta/meta-b2qt-automotive-qbsp.bb | |||
@@ -0,0 +1,47 @@ | |||
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 | DESCRIPTION = "Meta task for QBSP creation" | ||
31 | |||
32 | LICENSE = "The-Qt-Company-DCLA-2.1" | ||
33 | LIC_FILES_CHKSUM = "file://${QT_LICENSE};md5=80e06902b5f0e94ad0a78ee4f7fcb74b" | ||
34 | |||
35 | # get Qt version number | ||
36 | require recipes-qt/qt5/qt5-git.inc | ||
37 | S = "${WORKDIR}" | ||
38 | |||
39 | inherit qbsp | ||
40 | |||
41 | PV = "1.1" | ||
42 | |||
43 | QBSP_INSTALLER_COMPONENT = "qt.automotive.10.yocto.${MACHINE}" | ||
44 | QBSP_INSTALL_PATH = "/${QT_MODULE_BRANCH}/Automotive/${MACHINE}" | ||
45 | |||
46 | QBSP_SDK_TASK = "meta-toolchain-b2qt-automotive-qt5-sdk" | ||
47 | QBSP_IMAGE_TASK = "b2qt-automotive-qt5-image" | ||
diff --git a/recipes-qt/meta/meta-b2qt-embedded-qbsp.bb b/recipes-qt/meta/meta-b2qt-embedded-qbsp.bb new file mode 100644 index 0000000..56da506 --- /dev/null +++ b/recipes-qt/meta/meta-b2qt-embedded-qbsp.bb | |||
@@ -0,0 +1,48 @@ | |||
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 | DESCRIPTION = "Meta task for QBSP creation" | ||
31 | |||
32 | LICENSE = "The-Qt-Company-DCLA-2.1" | ||
33 | LIC_FILES_CHKSUM = "file://${QT_LICENSE};md5=80e06902b5f0e94ad0a78ee4f7fcb74b" | ||
34 | |||
35 | # get Qt version number | ||
36 | require recipes-qt/qt5/qt5-git.inc | ||
37 | S = "${WORKDIR}" | ||
38 | |||
39 | inherit qbsp | ||
40 | |||
41 | PV := "${@d.getVar('PV', True)[0:5]}" | ||
42 | |||
43 | VERSION_SHORT = "${@d.getVar('QT_MODULE_BRANCH', True).replace('.','')}" | ||
44 | QBSP_INSTALLER_COMPONENT = "qt.embedded.b2qt.${VERSION_SHORT}.yocto.${MACHINE}" | ||
45 | QBSP_INSTALL_PATH = "/${QT_MODULE_BRANCH}/Boot2Qt/${MACHINE}" | ||
46 | |||
47 | QBSP_SDK_TASK = "meta-toolchain-b2qt-embedded-qt5-sdk" | ||
48 | QBSP_IMAGE_TASK = "b2qt-embedded-qt5-image" | ||
diff --git a/recipes-qt/qt5-addons/installer-framework_2.0.3.bb b/recipes-qt/qt5-addons/installer-framework_2.0.3.bb new file mode 100644 index 0000000..03cba46 --- /dev/null +++ b/recipes-qt/qt5-addons/installer-framework_2.0.3.bb | |||
@@ -0,0 +1,48 @@ | |||
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 | DESCRIPTION = "Qt Installer Framework" | ||
31 | LICENSE = "The-Qt-Company-DCLA-2.1" | ||
32 | LIC_FILES_CHKSUM = "file://${QT_LICENSE};md5=80e06902b5f0e94ad0a78ee4f7fcb74b" | ||
33 | |||
34 | inherit bin_package native | ||
35 | |||
36 | SRC_URI = "http://ci-files02-hki.ci.local/packages/jenkins/opensource/ifw/installer-framework/installer-framework-build-stripped-linux-x64.7z" | ||
37 | |||
38 | SRC_URI[md5sum] = "08beb5450c3938fcfd1b380f6aaec75d" | ||
39 | SRC_URI[sha256sum] = "91bfef896db58f28e4c2c6db437b958101a59e87aa880c38b6ddc40ebe6c38e6" | ||
40 | |||
41 | S = "${WORKDIR}/ifw-pkg" | ||
42 | |||
43 | do_install() { | ||
44 | install -d ${D}${bindir} | ||
45 | install -m 0755 -t ${D}${bindir} ${S}/bin/* | ||
46 | } | ||
47 | |||
48 | INSANE_SKIP_${PN} += "already-stripped" | ||
diff --git a/scripts/upload.sh b/scripts/upload.sh index 5048797..14d45c8 100755 --- a/scripts/upload.sh +++ b/scripts/upload.sh | |||
@@ -33,28 +33,14 @@ set -e | |||
33 | 33 | ||
34 | RELEASE=5.8 | 34 | RELEASE=5.8 |
35 | UPLOADPATH=QT@ci-files02-hki.ci.local:/srv/jenkins_data/enterprise/b2qt/yocto/${RELEASE}/ | 35 | UPLOADPATH=QT@ci-files02-hki.ci.local:/srv/jenkins_data/enterprise/b2qt/yocto/${RELEASE}/ |
36 | UPLOADS="\ | ||
37 | tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.7z \ | ||
38 | tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-${PROJECT}-qt5-sdk-${MACHINE}.sh \ | ||
39 | tmp/deploy/sdk/b2qt-i686-mingw32-meta-toolchain-b2qt-${PROJECT}-qt5-sdk-${MACHINE}.7z \ | ||
40 | " | ||
36 | 41 | ||
37 | if [ -e tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.hdd ]; then | 42 | for f in ${UPLOADS}; do |
38 | 7z a -l b2qt-${PROJECT}-qt5-image-${MACHINE}.7z \ | 43 | if [ -e ${f} ]; then |
39 | $PWD/tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.hdd | 44 | rsync -L ${f} ${UPLOADPATH}/ |
40 | elif [ -e tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.img ]; then | 45 | fi |
41 | 7z a -l b2qt-${PROJECT}-qt5-image-${MACHINE}.7z \ | 46 | done |
42 | $PWD/tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.img \ | ||
43 | $PWD/tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.conf | ||
44 | elif ([ ${MACHINE} = "tegra-x1" ] || [ ${MACHINE} = "tegra-t18x" ]) \ | ||
45 | && [ -e tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.tar.gz ]; then | ||
46 | 7z a -l b2qt-${PROJECT}-qt5-image-${MACHINE}.7z \ | ||
47 | $PWD/tmp/deploy/images/${MACHINE}/b2qt-${PROJECT}-qt5-image-${MACHINE}.tar.gz \ | ||
48 | $PWD/tmp/deploy/images/${MACHINE}/*Image | ||
49 | fi | ||
50 | |||
51 | if [ -e b2qt-${PROJECT}-qt5-image-${MACHINE}.7z ]; then | ||
52 | rsync b2qt-${PROJECT}-qt5-image-${MACHINE}.7z ${UPLOADPATH}/ | ||
53 | fi | ||
54 | |||
55 | if [ -e tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-${PROJECT}-qt5-sdk-${MACHINE}.sh ]; then | ||
56 | rsync tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-${PROJECT}-qt5-sdk-${MACHINE}.sh ${UPLOADPATH}/ | ||
57 | fi | ||
58 | if [ -e tmp/deploy/sdk/b2qt-i686-mingw32-meta-toolchain-b2qt-${PROJECT}-qt5-sdk-${MACHINE}.7z ]; then | ||
59 | rsync tmp/deploy/sdk/b2qt-i686-mingw32-meta-toolchain-b2qt-${PROJECT}-qt5-sdk-${MACHINE}.7z ${UPLOADPATH}/ | ||
60 | fi | ||