The libssh2-nilrt-ipk project is a Cmake superbuild to build a opkg package (.ipk) of the libssh2 library for the NI Linux RT operating system that is used for National Instruments (NI) embedded hardware, such as a CompactRIO (cRIO).
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 libssh2 is not available in the repository. The libssh2 library is used for client-side SSH and SFTP communication. 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 libssh2 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 libssh2 source code provided as a compressed tar file and packaging it into a IPK file using CMake. The source code for the libssh2 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 libssh2 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.
-
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).
-
Connect a cRIO to the host computer.
-
Power on the cRIO.
-
Transfer the IPK file to the cRIO.
-
Log into the cRIO with a suitable SSH client from the host computer.
-
Navigate to the directory containing the IPK file.
-
Execute the following command:
opkg install libssh2*.ipk
The libssh2 library will now be available to the cRIO.
Ensure that a cRIO has been suitably configured as a build environment before completing the following steps to create the IPK file.
-
Download a compressed tar file from the Releases to a host computer.
-
Connect the cRIO running NI Linux RT to host computer.
-
Power on the cRIO.
-
Transfer the compressed tar file to the
/tmp
folder on the cRIO.scp libssh2-nilrt-ipk.tar.gz admin@XXX.XXX.XXX.XXX:/tmp/
where
XXX.XXX.XXX.XXX
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. -
Log into the cRIO via SSH.
-
Navigate to the
/tmp
folder on the cRIO.cd `/tmp`
-
Extract the compressed tar file.
tar -xzf libssh2-nilrt-ipk.tar.gz
-
Navigate into the
libssh2-nilrt-ipk
folder.cd libssh2-nilrt-ipk
-
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.
The libssh2-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 covers files specific to this project and not libssh2. Please see libssh2's documentation for specifics on licensing and copyright of the libssh2 source code.