Skip to content

Commit

Permalink
Add VxWorks x86_64 target
Browse files Browse the repository at this point in the history
Adds VxWorks with intel skylake VSB.

Change-Id: I2e6b1c1f7a45657d81c29fc3a5c8fe8526d4ad29
Reviewed-by: Simo Fält <[email protected]>
  • Loading branch information
Toni Saario committed Sep 29, 2024
1 parent 10da0ba commit 2891afd
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ Configurations:
'TARGET_CONFIGURE_ARGS=-release -force-debug-info -qpa offscreen -nomake examples',
'TARGET_CMAKE_ARGS=-DBUILD_SHARED_LIBS=OFF -DWARNINGS_ARE_ERRORS=OFF -DCMAKE_TOOLCHAIN_FILE="{{.Env.WIND_CC_SYSROOT}}/mk/rtp.toolchain.cmake" -DFEATURE_vulkan=OFF -DQT_QMAKE_TARGET_MKSPEC=vxworks-clang -DQT_HOST_PATH=/home/qt/work/install -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_STAGING_PREFIX:PATH=/home/qt/work/install/target'
]
-
Id: 'vxworks-x86_64-buildtest'
Template: 'qtci-linux-Ubuntu-22.04-x86_64-51'
Target os: 'VxWorks'
Target arch: 'X86_64'
Compiler: 'Clang'
Target compiler: 'Clang'
Platform dependency: 'ubuntu-22.04'
Features: ['VMSize8', 'UseConfigure', 'DoNotRunTests', 'DoNotUploadTests']
Environment variables: [
'WIND_CC_SYSROOT=/opt/itl_generic_skylake_VSB',
'TARGET_CONFIGURE_ARGS=-release -force-debug-info -qpa offscreen -nomake examples',
'TARGET_CMAKE_ARGS=-DBUILD_SHARED_LIBS=OFF -DWARNINGS_ARE_ERRORS=OFF -DCMAKE_TOOLCHAIN_FILE="{{.Env.WIND_CC_SYSROOT}}/mk/rtp.toolchain.cmake" -DFEATURE_vulkan=OFF -DQT_QMAKE_TARGET_MKSPEC=vxworks-clang -DQT_HOST_PATH=/home/qt/work/install -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_STAGING_PREFIX:PATH=/home/qt/work/install/target'
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,18 @@ Configurations:
'TARGET_CONFIGURE_ARGS=-release -force-debug-info -qpa offscreen -nomake examples',
'TARGET_CMAKE_ARGS=-DBUILD_SHARED_LIBS=OFF -DWARNINGS_ARE_ERRORS=OFF -DCMAKE_TOOLCHAIN_FILE="{{.Env.WIND_CC_SYSROOT}}/mk/rtp.toolchain.cmake" -DFEATURE_vulkan=OFF -DQT_QMAKE_TARGET_MKSPEC=vxworks-clang -DQT_HOST_PATH=/home/qt/work/install -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_STAGING_PREFIX:PATH=/home/qt/work/install/target'
]
-
Id: 'vxworks-x86_64-tests'
Template: 'qtci-linux-Ubuntu-22.04-x86_64-51'
Target os: 'VxWorks'
Target arch: 'ARMv7'
Compiler: 'Clang'
Target compiler: 'Clang'
Platform dependency: 'vxworks-x86_64-buildtest'
Features: ['VMSize8', 'UseConfigure', 'BuildTestsInTest', 'TestOnly', 'InsignificantTests']
Environment variables: [
'WIND_CC_SYSROOT=/opt/itl_generic_skylake_VSB',
'VXWORKS_TEST_LIBS_PATH=/opt/itl_generic_skylake_VSB/usr/lib/common;/opt/itl_generic_skylake_VSB/usr/root/llvm/bin;/opt/itl_generic_skylake_VSB/usr/3pp/develop/usr/lib;/home/qt/work/install/target/lib',
'TARGET_CONFIGURE_ARGS=-release -force-debug-info -qpa offscreen -nomake examples',
'TARGET_CMAKE_ARGS=-DBUILD_SHARED_LIBS=OFF -DWARNINGS_ARE_ERRORS=OFF -DCMAKE_TOOLCHAIN_FILE="{{.Env.WIND_CC_SYSROOT}}/mk/rtp.toolchain.cmake" -DFEATURE_vulkan=OFF -DQT_QMAKE_TARGET_MKSPEC=vxworks-clang -DQT_HOST_PATH=/home/qt/work/install -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_STAGING_PREFIX:PATH=/home/qt/work/install/target'
]
6 changes: 3 additions & 3 deletions coin/provisioning/common/linux/install-vxworks-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "/tmp" "$appPre
targetFolder=/tmp/qemu-${QEMU_VER}
mkdir -p "$targetFolder/build"
cd "$targetFolder/build"
../configure --target-list=arm-softmmu
make -j8
../configure --target-list=arm-softmmu,x86_64-softmmu --prefix=/opt/qemu-${QEMU_VER}
make -j8 -s
sudo make -s install
sudo mkdir -p /usr/share/qemu/keymaps
sudo cp -r "$targetFolder/build/pc-bios/keymaps" "/usr/share/qemu/"
sudo mv "$targetFolder/build" "/opt/qemu-$QEMU_VER"
rm -rf $targetFolder

SetEnvVar "VXWORKS_QEMU" "/opt/qemu-$QEMU_VER"
30 changes: 26 additions & 4 deletions coin/provisioning/common/linux/vx_works.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ sha1="8152c527ca489b1e51f2954e6e88c6daa22d88f6"
targetFolder="/opt"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$sha1" "$targetFolder" ""
SetEnvVar "VXWORKS_HOME" "/opt/vxworks"
SetEnvVar "VXWORKS_SSH" "[email protected]"

VXWORKS_BUILD_VER="19-08-2024"
VXWORKS_BUILD_VER="26-08-2024"
######### VXworks toolchain #########
# Installs to /opt/fsl_imx6_2_0_6_2_VSB
PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_arm_vsb_${VXWORKS_BUILD_VER}.tar.gz"
AltUrl=""
sha1="9c1abcc066aff40230a7f432e1f076bac8c6912a"
sha1="e3c7db136e25d2ef31f5f8d2fecb10191793fdf0"
targetFolder="/opt/"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$sha1" "$targetFolder" ""
SetEnvVar "WIND_CC_SYSROOT" "/opt/fsl_imx6_2_0_6_2_VSB"
Expand All @@ -34,10 +35,22 @@ SetEnvVar "WIND_CC_SYSROOT" "/opt/fsl_imx6_2_0_6_2_VSB"
# Installs to /opt/fsl_imx6_2_0_6_2_VIP_QEMU
PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_arm_vip_${VXWORKS_BUILD_VER}.tar.gz"
AltUrl=""
sha1="db48525d9f5b105f9da632f0c3f557247c1fd041"
sha1="787555c2fb2571afac7c6706b8bc2ddc65effdf8"
targetFolder="/opt/"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$sha1" "$targetFolder" ""

# Installs to /opt/itl_generic_skylake_VSB
PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_intel_vsb_${VXWORKS_BUILD_VER}.tar.gz"
AltUrl=""
sha1="0ffcbde47d5d95c90db68addd0f534f2aee41df1"
targetFolder="/opt/"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$sha1" "$targetFolder" ""
# Installs to /opt/itl_generic_skylake_VIP_QEMU
PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_intel_vip_${VXWORKS_BUILD_VER}.tar.gz"
AltUrl=""
sha1="29afd81568bb647c778d622c997f4bd9ccb7e595"
targetFolder="/opt/"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$sha1" "$targetFolder" ""
SetEnvVar "VXWORKS_SSH" "[email protected]"

######### VXworks fonts and certs #########
# Installs to /opt/fsl_imx6_2_0_6_2_VSB
Expand All @@ -46,10 +59,19 @@ AltUrl=""
sha1="1bc529b90b35b0b249f219e47d5798225a9b68d8"
targetFolder="/opt/fsl_imx6_2_0_6_2_VSB/"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$sha1" "$targetFolder" ""
######### VXworks fonts and certs #########
# Installs to /opt/itl_generic_skylake_VSB
PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/vxworks/vxworks_misc.tar.gz"
AltUrl=""
sha1="1bc529b90b35b0b249f219e47d5798225a9b68d8"
targetFolder="/opt/itl_generic_skylake_VSB/"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$sha1" "$targetFolder" ""

# Setup NFS exports that are needed by VxWorks qemu
sudo bash -c "echo '/home/qt/work 172.31.1.10/24(rw,sync,root_squash,no_subtree_check,anonuid=2001,anongid=100)' >> /etc/exports"
sudo bash -c "echo '/opt/fsl_imx6_2_0_6_2_VSB 172.31.1.10/24(rw,sync,root_squash,no_subtree_check,anonuid=2001,anongid=100)' >> /etc/exports"
sudo bash -c "echo '/opt/itl_generic_skylake_VSB 172.31.1.10/24(rw,sync,root_squash,no_subtree_check,anonuid=2001,anongid=100)' >> /etc/exports"

sudo exportfs -a

# Enable ipv4 routing from vxWorks to Qt DNS
Expand Down
44 changes: 31 additions & 13 deletions coin/provisioning/common/linux/vxworks_qemu_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,41 @@ if ! ip link show br0 >/dev/null 2>&1; then
sudo brctl addif br0 tap0
fi

[ $# -eq 1 ] || echo "Supply parameter which emulator to start <arm|intel>"
TYPE=$1

QEMU_LOG_PATH="/home/qt/work/vxworks_qemu_log.txt"
$VXWORKS_QEMU/qemu-system-arm \
-machine sabrelite \
-smp 4 \
-m 1G \
-nographic \
-monitor none \
-serial null \
-serial pipe:/tmp/guest \
-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=172.31.1.1 g=172.31.1.1 e=172.31.1.10 u=target pw=vxTarget s=/romfs/startup_script_arm.txt" \
-nic "tap,ifname=tap0,script=no" >"${QEMU_LOG_PATH}" 2>&1 &
if [ "$TYPE" = "arm" ] || [ "$TYPE" = "" ]; then
$VXWORKS_QEMU/bin/qemu-system-arm \
-machine sabrelite \
-smp 4 \
-m 1G \
-nographic \
-monitor none \
-serial null \
-serial pipe:/tmp/guest \
-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=172.31.1.1 g=172.31.1.1 e=172.31.1.10 u=target pw=vxTarget s=/romfs/startup_script.txt" \
-nic "tap,ifname=tap0,script=no" >"${QEMU_LOG_PATH}" 2>&1 &
elif [ "$TYPE" = "intel" ]; then
$VXWORKS_QEMU/bin/qemu-system-x86_64 \
-M q35 \
-smp 8 \
-m 8G \
-cpu "Skylake-Client" \
-monitor none \
-nographic \
-serial null \
-serial pipe:/tmp/guest \
-kernel "/opt/itl_generic_skylake_VIP_QEMU/default/vxWorks" \
-append "sysbootline:gei(0,0)host:vxWorks h=172.31.1.1 g=172.31.1.1 e=172.31.1.10 u=target pw=vxTarget s=/romfs/startup_script.txt" \
-nic tap,ifname=tap0,script=no,downscript=no >"${QEMU_LOG_PATH}" 2>&1 &
fi

for _ in $(seq 30)
do
status=$(ssh -o BatchMode=yes -o HostKeyAlgorithms=+ssh-rsa -o ConnectTimeout=1 "${VXWORKS_SSH}" echo emulator up)
status=$(ssh -o BatchMode=yes -o HostKeyAlgorithms=+ssh-rsa -o ConnectTimeout=1 "${VXWORKS_SSH}" echo emulator up) || true
if [[ $status == *"emulator up"* ]] ; then
echo "VXWORKS QEMU SSH server up"
break
Expand Down

0 comments on commit 2891afd

Please sign in to comment.