diff options
author | Toni Saario <toni.saario@qt.io> | 2023-09-21 15:16:55 +0300 |
---|---|---|
committer | Toni Saario <toni.saario@qt.io> | 2023-11-14 21:18:20 +0200 |
commit | 92bdb686cc006f5af61d8547ff9494274df076bf (patch) | |
tree | c5dda1e45228e2f3f1fffd7e539d178f804ff84c /coin/provisioning/common | |
parent | 9b067849bf9dfa8a6b4c0831e3d5725d85e1b76c (diff) |
Add VxWorks target
Adds VxWorks VSB, VIP and libs. Exports VSB and work dir for
VxWorks qemu. Places VxWorks qemu launcher in home.
Use 8 cores on VxWorks target as qemu is run on 4 cores and
those 4 cores will be run at 100% all time due to RTOS nature
of VxWorks.
Task-number: COIN-297
Change-Id: If1ae42109a5a1ab7164f09a9eabf9fd9064fd0d9
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Jarno Lämsä <jarno.lamsa@qt.io>
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Diffstat (limited to 'coin/provisioning/common')
-rwxr-xr-x | coin/provisioning/common/linux/vx_works.sh | 50 | ||||
-rwxr-xr-x | coin/provisioning/common/linux/vxworks_qemu_launcher.sh | 39 |
2 files changed, 89 insertions, 0 deletions
diff --git a/coin/provisioning/common/linux/vx_works.sh b/coin/provisioning/common/linux/vx_works.sh new file mode 100755 index 00000000..e5f99499 --- /dev/null +++ b/coin/provisioning/common/linux/vx_works.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +# This script installs vxworks libs and toolchain. + +set -ex + +# shellcheck source=../unix/InstallFromCompressedFileFromURL.sh +source "${BASH_SOURCE%/*}/../unix/InstallFromCompressedFileFromURL.sh" +# shellcheck source=../unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" + +VXWORKS_VER="23_09" +######### VXworks libs ######### +# Installs to /opt/vxworks +PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_no_source_patched_$VXWORKS_VER.tar.gz" +AltUrl="" +sha1="35a457999b310a6128e3bd7de3103c2235063071" +targetFolder="/opt/" +InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$targetFolder" "$appPrefix" +SetEnvVar "VXWORKS_HOME" "/opt/vxworks" + +######### VXworks toolchain ######### +# Installs to /opt/fsl_imx6_2_0_6_2_VSB +PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_vsb_$VXWORKS_VER.tar.gz" +AltUrl="" +sha1="cd32d35e67fd6128fbfbb23207bb4d1d2d09b7d2" +targetFolder="/opt/" +InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$targetFolder" "$appPrefix" +SetEnvVar "WIND_CC_SYSROOT" "/opt/fsl_imx6_2_0_6_2_VSB" + +######### VXworks VIP kernel ######### +# Installs to /opt/fsl_imx6_2_0_6_2_VIP_QEMU +PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_vip_kernel_$VXWORKS_VER.tar.gz" +AltUrl="" +sha1="d72bb635a00a5b1b82185e3c200078cbe5c39561" +targetFolder="/opt/" +InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$targetFolder" "$appPrefix" + +SetEnvVar "VXWORKS_SSH" "WindRiver@10.0.2.4" + +# Setup NFS exports that are needed by VxWorks qemu +sudo bash -c "echo '/home/qt/work 10.0.2.4/24(rw,sync,root_squash,no_subtree_check,anonuid=1000,anongid=1000)' >> /etc/exports" +sudo bash -c "echo '/opt/fsl_imx6_2_0_6_2_VSB 10.0.2.4/24(rw,sync,root_squash,no_subtree_check,anonuid=1000,anongid=1000)' >> /etc/exports" +sudo exportfs -a + +# Copy start script in place +cp "${BASH_SOURCE%/*}/../linux/vxworks_qemu_launcher.sh" "${HOME}" +SetEnvVar "VXWORKS_EMULATOR" "${HOME}/vxworks_qemu_launcher.sh" diff --git a/coin/provisioning/common/linux/vxworks_qemu_launcher.sh b/coin/provisioning/common/linux/vxworks_qemu_launcher.sh new file mode 100755 index 00000000..e64e1ec5 --- /dev/null +++ b/coin/provisioning/common/linux/vxworks_qemu_launcher.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +# Setup bridge if not exist for VxWorks QEMU +if ! ip link show br0 >/dev/null 2>&1; then + sudo brctl addbr br0 + sudo brctl stp br0 off + sudo ifconfig br0 10.0.2.1 netmask 255.255.255.0 promisc up + sudo tunctl -u qt -t tap0 + sudo ifconfig tap0 promisc up + sudo brctl addif br0 tap0 +fi + +QEMU_LOG_PATH="/home/qt/work/vxworks_qemu_log.txt" +qemu-system-arm \ + -machine sabrelite \ + -smp 4 \ + -m 1G \ + -nographic \ + -monitor none \ + -serial null \ + -serial stdio \ + -kernel /opt/fsl_imx6_2_0_6_2_VIP_QEMU/default/uVxWorks \ + -dtb /opt/fsl_imx6_2_0_6_2_VIP_QEMU/default/imx6q-sabrelite.dtb \ + -append "enet(0,0)host:vxWorks h=10.0.2.1 g=10.0.2.1 e=10.0.2.4 u=target pw=vxTarget s=/romfs/startup_script_arm.txt" \ + -nic "tap,ifname=tap0,script=no" >"${QEMU_LOG_PATH}" 2>&1 & + +for counter in $(seq 30) +do + status=$(ssh -o BatchMode=yes -o HostKeyAlgorithms=+ssh-rsa -o ConnectTimeout=1 ${VXWORKS_SSH} echo emulator up) + if [[ $status == *"emulator up"* ]] ; then + echo "VXWORKS QEMU SSH server up" + break + else + echo "Waiting VXWORKS QEMU SSH server" + sleep 1 + fi +done |