Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for QNX 7.1/8.0 #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pkleymonov-qnx
Copy link

These changes facilitate porting of CANdb for QNX7.1/8.0.
Build files are available at https://github.com/qnx-ports/build-files/tree/main/ports/CANdb

NOTE: QNX ports are only supported from a Linux host operating system

Create a workspace

mkdir -p ~/qnx_workspace && cd ~/qnx_workspace
git clone https://github.com/qnx-ports/build-files.git

Clone CANdb repository from tested release version

git clone https://github.com/qnx-ports/CANdb.git

Or clone it from original repository

git clone https://github.com/GENIVI/CANdb.git

Update 3rdParty dependencies

cd CANdb
git submodule update --init --recursive
cd -

Setup a Docker container

Pre-requisite:

# Build the Docker image and create a container
cd build-files/docker
./docker-build-qnx-image.sh
./docker-create-container.sh

# Now you are in the Docker container

Or setup Ubuntu host

# source qnxsdp-env.sh
source ~/qnx800/qnxsdp-env.sh

Compile the port for QNX

cd ~/qnx_workspace
# Build and install it in sysroot (QNX SDP)
make -C build-files/ports/CANdb install JLEVEL=$(nproc)
# Or build and install it in a staging area
make -C build-files/ports/CANdb install JLEVEL=$(nproc) INSTALL_ROOT_nto=<PATH_TO_YOUR_STAGING_AREA> USE_INSTALL_ROOT=true

How to run tests

Copy (scp) tests in to the QNX target.

cd ~/qnx_workspace

# define target IP address
TARGET_HOST=<target-ip-address-or-hostname>

# copy test binaries to your QNX target
scp -r $QNX_TARGET/aarch64le/usr/local/bin/CANdb_tests qnxuser@$TARGET_HOST:/data/home/qnxuser/
# or
scp -r $QNX_TARGET/x86_64/usr/local/bin/CANdb_tests qnxuser@$TARGET_HOST:/data/home/qnxuser/

Run tests on the target.

# ssh into the target
ssh qnxuser@$TARGET_HOST
## Run tests
cd /data/home/qnxuser/CANdb_tests/
./base_testsuite.sh

Tips and triks.

With your spd you can create and run virtual x86_64 TARGET of QNX.

# source qnxsdp-env.sh
source ~/qnx800/qnxsdp-env.sh

# Install on linux host virtual machine like qemu/vxbox/vmware
# Create and run virtual target of QNX
# qemu
mkqnximage --type=qemu --arch=x86_64 --clean --run --force
# or vmware
mkqnximage --type=vmware --arch=x86_64 --clean --run --force
# or virtual box
mkqnximage --type=vbox --arch=x86_64 --clean --run --force

Note: All tests have to return no error.

...
==========================================
Tests suites summary for CANdb
==========================================
# TOTAL: 5
# PASS: 5
# FAIL: 0
==========================================

extend opendbc_tests + 8 additional dbc files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant