Skip to content

fieldrndservices/libssh2lv-nilrt-ipk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libssh2lv-nilrt-ipk: A CMake Superbuild for the libssh2lv IPK package

The libssh2lv-nilrt-ipk project is a Cmake superbuild to build a opkg package (.ipk) of the libssh2lv library for the NI Linux RT operating system that is used for National Instruments (NI) embedded hardware, such as a CompactRIO (cRIO).

Table of Contents

Quick Start

These steps assume the libssh2 package/library is already installed and available on the cRIO.

  1. Download a IPK file from available from the Releases to a host computer. Make sure the architecture matches the cRIO's processor, i.e. ARM (cortexa9-vfpv3) or Intel (core2-64).

  2. Connect a cRIO to the host computer.

  3. Power on the cRIO.

  4. Transfer the IPK file to the cRIO.

  5. Log into the cRIO with a suitable SSH client from the host computer.

  6. Navigate to the directory containing the IPK file.

  7. Execute the following command:

    opkg install libssh2lv*.ipk
    

    The libssh2lv library will now be available to the cRIO.

Background

NI provides a package manager (opkg) and a repository (feed) to optionally install and extend the capabilities of their embedded hardware running the NI Linux RT operating system. There are many packages available from NI's official repository, but libssh2lv is not available in the repository. The libssh2lv library is used for client-side SSH and SFTP communication within LabVIEW. It does not implement a SSH server. It is specifically targeted at enabling clients to communicate with a SSH/SFTP server. This project is intended to provide a libssh2lv package that can be installed on the embedded hardware from NI using opkg package manager.

This project is structured as a CMake superbuild. There is no source code folder. The "source code" for this project is all related to building the libssh2lv source code provided as a compressed tar file and packaging it into a IPK file using CMake. The source code for the libssh2lv library is included in this project as a compressed tar file instead of using CMake's ExternalProject_Add download or version control features because the build procedure must be run on a properly configured cRIO that typically does not have access to the Internet. Providing the libssh2lv source code via an archive (*.tar.gz) makes it easier to simply download the source contents of a release for this project and transfer to the cRIO in an offline fashion.

Build

Ensure that a cRIO has been suitably configured as a build environment before completing the following steps to create the IPK file.

  1. Download a compressed tar file from the Releases to a host computer.

  2. Connect the cRIO running NI Linux RT to host computer.

  3. Power on the cRIO.

  4. Transfer the compressed tar file to the /tmp folder on the cRIO.

    scp libssh2lv-nilrt-ipk-X.X.tar.gz [email protected]:/tmp/
    

    where X.X is the version of the release for the IPK and YYY.YYY.YYY.YYY is the IP address, or host name, of the cRIO. Note, the contents of the /tmp folder are deleted after each reboot/power cycle of the cRIO.

  5. Log into the cRIO via SSH.

  6. Navigate to the /tmp folder on the cRIO.

    cd `/tmp`
    
  7. Extract the compressed tar file.

    tar -xzf libssh2lv-nilrt-ipk-X.X.tar.gz
    

    where X.X is the version of the released IPK.

  8. Navigate into the libssh2lv-nilrt-ipk-X.X folder.

    cd libssh2lv-nilrt-ipk-X.X
    

    where X.X is the version of the released IPK.

  9. Execute the following commands to build the IPK file:

    mkdir build
    cd build
    cmake ..
    cmake --build . --target ipk
    

    A IPK file will be created in the build directory. See the Quick Start instructions for installation.

License

The libssh2lv-nilrt-ipk project is licensed under the BSD-3-Clause license. See the LICENSE file for more information about licensing and copyright. Note, this license only overs files specific to this project and not the lv-libssh2-c project and related files. Please see the documentation for the lv-libssh2-c project for specifics on licensing and copyright of the lv-libssh2-c source code.