This instruction contains the information on how to build and run SDL depending on target OS and HMI type 1. General 1.1. To build SDL for QNX, cross-compiling only shall be used. 1.2. To run SDL under Linux with Web HMI please follow steps: 3.1; 5.3; 5.5; 6. 1.3. To run SDL under Linux with QML HMI please follow steps: 3.1; 5.4; 5.5; 6. 1.4. To run SDL under virtualized QNX with Web HMI under Linux Host please follow steps: 3.1; 3.2; 3.3; 4.1; 5.1; 5.5; 7; 8. 1.5. To run SDL under virtualized QNX with QML HMI under Linux Host please follow steps: 3.1; 3.2; 3.3; 4.2; 5.2; 5.5; 5.4; 5.5; 9. 1.6. To run SDL under virtualized QNX with QML HMI under QNX Host please follow steps: 3.1; 3.2; 3.3; 5.2; 5.5; 7. 1.7. To turn media features (like audio/video streaming) on/off please set EXTENDED_MEDIA_MODE to ON/OFF (e.g. "cmake -DEXTENDED_MEDIA_MODE=OFF"). ========================================================================================================== 2. Known problems. 2.1. Web HMI does not display icons in case it is running on distant computer (the reason: SDL sends absolute paths on local computer). 2.2. Bluetooth does not work under QNX (the reason: BT stack absence for QNX). ========================================================================================================== 3. Preparation steps. Note: see '1. General' to determine which of the below steps must be used. 3.1. To prepare the Linux Host: Note: in case Ubuntu/Xubuntu 12.04 is already installed, git repository is cloned and is switched to branch, proceed from the step 3.1.6. 3.1.1. Install Ubuntu/Xubuntu 12.04 or higher. 3.1.2. Configure source repositories (check "Canonical Partners" repositories in Update Manager->Settings->SW source). 3.1.3. Perform "sudo apt-get install git" command in terminal. 3.1.4. Clone git repository with "git clone git@adc.luxoft.com:applink". Note: the permissions to download the repository are required. Apply PSavyelyev@luxoft.com on this matter. 3.1.5. Switch to branch: "git checkout ". 3.1.6. Initialize submodule(s): "git submodule init". 3.1.7. Update submodule(s): "git submodule update". 3.1.8. Run "sudo ./setup_env.sh -a" to install all mandatory and optional packages. Note: read the built-in setup environment help ("./setup_env.sh --help") which provides the description of predefined options: a) for Web HMI, b) for QML HMI, c) for QNX support. 3.2. To set up QNX cross platform build for Linux: 3.2.1. Download and install QNX SDP 6.5.0 SP1 cross platform tools for Linux (http://www.qnx.com/download/download/21179/qnxsdp-6.5.0-201007091524-linux.bin). Note: it is necessary to obtain license key: either trial or commercial one (Register on http://www.qnx.com/ website, enter 'QNX product evaluation' and apply for a license key). Note: during tools installation mark "GNU Public Licence Utility" check-box. 3.2.2. To build SDL with MME support (iPhone connection over USB) unpack iap archives from src/thirdPartyLibs: # tar -xjf iap.build.tar.bz2 -C $QNX_TARGET # tar -xjf iap.armv7-qnx.runtime.tar.bz2 -C $QNX_TARGET/armle-v7 Note: MME is supported only for ARMv7 platform 3.2.3. SSH configuration on Linux host: 3.2.3.1. Install Open-SSH server (For Xubuntu run "sudo apt-get install ssh", for Ubuntu run "sudo apt-get install openssh-server"). 3.2.3.1. Restart computer if necessary. 3.3. To run specially prepared QNX in virtual machine: 3.3.1. Download and install VMware Player from https://my.vmware.com/web/vmware/downloads 3.3.2. Download the archived QNX image for VMware from ftp://ford-applink.luxoft.com/Distrs/QNX/QNX_SDP_6.5.0.tar.gz 3.3.3. Extract image from archive and open it in VMware Note: QNX image has root with empty pass and user with pass 'user'. SSH is configured 3.3.4. Log as root. Note: ssh server shall be started automatically. (Common command is "/usr/sbin/sshd"). Note: verify that you QNX host ip address is 192.168.243.131 (if not change see step 4.2.1.) 3.4. To make QNX virtual machine from scratch: 3.4.1. SSH configuration on QNX server: 3.4.1.1 Download VMware Player https://my.vmware.com/web/vmware/downloads 3.4.1.2. Download the QNX Software Development Platform 6.5.0 bootable iso image from http://www.qnx.com/download/download/21182/qnxsdp-6.5.0-x86-201007091524-nto.iso 3.4.1.3. Create new VMware virtual machine and boot from QNX Software Development Platform bootable iso image Note: it is necessary to obtain license key: either trial or commercial one (Register on http://www.qnx.com/ website, enter 'QNX product evaluation' and apply for a license key). 3.4.2. SSH configuration on QNX server: 3.4.2.1. Run “passwd user” and set the new user id (just press enter), group (just press enter) and non-empty password. 3.4.2.2. Run "ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key". 3.4.2.3. Run "ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key". 3.4.2.4. Run ssh server if it is not running "/usr/sbin/sshd". 3.4.3. Set up sshd to run at time login 3.4.3.1 Create file "/etc/profile.d/sshd.sh" with command "/usr/sbin/sshd" 3.4.4. Set up USB access mode 3.4.4.1 If file "/etc/rc.d/rc.local" is either absent or empty then copy file "/qnx/rc.local" to folder "/etc/rc.d" 3.4.4.2 If file "/etc/rc.d/rc.local" exists and is nonempty then append the last line of file "/qnx/rc.local" to its end 3.5. To set up Android Simulator for using instead of real device: 3.5.1. Install and configure the Android Simulator in keeping with the following instructions https://adc.luxoft.com/confluence/display/APPLINK/How+to+install+and+setup+android+emulator+on+Ubuntu ========================================================================================================== 4. Configuration steps. Note: see '1. General' to determine which of the below steps must be used. 4.1. Use this step if Web HMI and SDL are running on separate computers (virtualized QNX is also considered to be running on a separate computer): 4.1.1. LinHost: update SDL config file “/src/appMain/smartDeviceLink.ini”: find “ServerAddress = ” there and replace the value with . 4.1.2. LinHost: update Web HMI network parameters: in file “/src/components/HMI/app/Flags.js” find “WEBSOCKET_URL: ” and replace the value ("ws://localhost:8087") with . (e.g. "url: "ws://192.168.177.128:8087"") Note: is the IP of the computer where SDL is running. 4.2. Use this step if QML HMI and SDL are running on separate computers (virtualized QNX is also considered to be running on a separate computer): 4.2.1. QNXServer: add the following lines in the file "/usr/etc/dbus-1/session.conf": "tcp:host=IP-OF-YOUR-QNX-PC,port=PORT-FOR-LISTEN" (e.g. "tcp:host=192.168.243.131,port=8087). 4.2.2. LinHost: set up "export DBUS_SESSION_BUS_ADDRESS=tcp:host=,port=" on HMI side (e.g. "export DBUS_SESSION_BUS_ADDRESS=tcp:host=192.168.243.131,port=8087"). ========================================================================================================== 5. Build SDL from source on Linux Host. Note: in above cases the is the path to 'Project_Root_Src' git folder (e.g. "/home/user_name/Work/Project_Root_src"). Note: for release build add "-DCMAKE_BUILD_TYPE=Release" to cmake arguments. For QNX+QtHMI build flag "-DCMAKE_BUILD_TYPE=Release" is plainly required. 5.1. For QNX with Web HMI run command "mkdir && cd "cmake -DCMAKE_TOOLCHAIN_FILE=/qnx_6.5.0_linux_x86.cmake". 5.2. For QNX with QML HMI run command "mkdir && cd “cmake -DCMAKE_TOOLCHAIN_FILE=/qnx_6.5.0_linux_x86.cmake -DHMI=qt -DCMAKE_BUILD_TYPE=Release”. 5.3. For Linux with Web HMI run command "mkdir && cd "cmake -DEXTENDED_MEDIA_MODE=ON". 5.4. For Linux with QML HMI run command "mkdir && cd "cmake -DEXTENDED_MEDIA_MODE=ON -DHMI=qt". 5.5. To build and install 3rd party libs run "make 3rd_party" "sudo make install-3rd_party" Note: this step has to be done just once for each combination of target system (Linux/QNX) and CPU architecture (x86/armv7). 5.6. Run build process “make install” in previous directory. ========================================================================================================== 6. Common run on Linux host (SDL + HMI). 6.1. Go to the binary folder "cd /bin" or /bin". 6.2. Prepare Policy as described in Additions, p.1 6.3. Run SDL "./smartDeviceLinkCore". Note: HMI shall be started automatically. Type of started HMI depends on build options described in 5.2. ========================================================================================================== 7. Common run on QNX host with Qt HMI. 7.1. Log as root and make sure you are not running Photon 7.2. QnxServ: download binary folder “scp -r @://bin/* ./” . 7.3. QnxServ: download 3rd party folder “scp -r @://3rd_party/* ./” . 7.4. Prepare QDB on QNX as described in Additions, p.1 7.5. Prepare Policy as described in Additions, p.2 7.6. Prepare log4cxx as described in Additions, p.3 7.7. Prepare D-Bus as described in Additions, p.4 7.8. QnxServ: start SDL “su -c ./smartDeviceLinkCore”. Note: For QML usage start SDL as root “su -c ./smartDeviceLinkCore”. ========================================================================================================== 8. Run Web version on QNX host. 8.1. Log as root and make sure you are not running Photon 8.2. QnxServ: download binary folder “scp -r @://bin/* ./” . 8.3. QnxServ: download 3rd party folder “scp -r @://3rd_party/* ./” . 8.4. Prepare Policy as described in Additions, p.1 8.5. Prepare log4cxx as described in Additions, p.2 8.6. QnxServ: start SDL “su -c ./smartDeviceLinkCore”. Note: For USB transport usage start SDL as root “su -c ./smartDeviceLinkCore”. 8.7. LinHost: start Chrome “chromium-browser '/src/components/HMI/index.html'”. Note: in case there is no connection with Web HMI probably it is necessary to add QNX Server IP to "no_proxy" config. ========================================================================================================== 9. Run SDL on QNX Server and QML HMI on Linux host. 9.1. LinHost: make "/bin/start_hmi.sh" file empty 9.2. Log as root and make sure you are not running Photon 9.3. QnxServ: download binary folder “scp -r @://bin/* ./” . 9.4. QnxServ: download 3rd party folder “scp -r @://3rd_party/* ./” . 9.5. Prepare QDB on QNX as described in Additions, p.1 9.6. Prepare Policy as described in Additions, p.2 9.7. Prepare log4cxx as described in Additions, p.3 9.8. Prepare D-Bus as described in Additions, p.4 9.9. QnxServ: start SDL “su -c ./smartDeviceLinkCore”. Note: For USB transport usage start SDL as root “su -c ./smartDeviceLinkCore”. Note: If SDL unexpectedly terminates (with any error) check that real IP of QNX Server is same to IP in "/etc/dbus-1/session.conf" If not perform steps 4.2 and restart QNX server 9.10. LinHost: goto "/bin" folder and execute "/qmlscene -I ./hmi/plugins ./hmi/MainWindow.qml" command. =========================================================================================================== Additions: 1. To use library of policy (libPolicy.so) execute following commands: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. export LD_LIBRARY_PATH Note: If libPolicy.so is in other place then use following format: LD_LIBRARY_PATH=$LD_LIBRARY_PATH: 2. To use log4cxx execute export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: e.g. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../3rd_party/lib 4. To use D-Bus execute DBUS_SESSION_BUS_ADDRESS=`/dbus-daemon --config-file=/session.conf --fork --print-address` (e.g. DBUS_SESSION_BUS_ADDRESS=`../3rd_party/bin/dbus-daemon --config-file=../3rd_party/etc/dbus-1/session.conf --fork --print-address`) export DBUS_SESSION_BUS_ADDRESS Note: it might be necessary to create directory session.d in the same folder with session.conf e.g. mkdir ../3rd_party/etc/dbus-1/session.d Note: D-Bus can be started automatically: Copy dbus-daemon binary and config to system folders, e.g. cp ../3rd_party/bin/dbus-daemon /usr/bin cp -r ../3rd_party/etc/dbus-1 /etc mkdir /etc/dbus-1/session.d Create file "/etc/profile.d/dbus.sh" with command "if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then DBUS_SESSION_BUS_ADDRESS=`/usr/bin/dbus-daemon --fork --config-file=/etc/dbus-1/session.conf --print-address` export DBUS_SESSION_BUS_ADDRESS fi" In this case system has to be rebooted and this step is no more needed