Skip to content

Commit

Permalink
Change build to use archive file instead of submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
volks73 committed Apr 20, 2019
1 parent 40060fa commit 96dcaa5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,36 @@ This project is structured as a CMake superbuild, using [git](https://git-scm.co

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

1. Clone this project on a host computer.
1. Download a compressed tar file from the [Releases](https://github.com/fieldrndservices/libssh2-nilrt-ipk/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.

```
git clone https://github.com/fieldrndservices/libssh2-nilrt-ipk.git
```
scp libssh2-nilrt-ipk.tar.gz admin@XXX.XXX.XXX.XXX:/tmp/
```

2. Update the git submodules to get the [libssh2](https://github.com/libssh2/libssh2) source code.
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.
6. Log into the cRIO via SSH.
7. Navigate to the `/tmp` folder on the cRIO.

```
git submodule update --init --recursive
cd `/tmp`
```

3. Connect the cRIO running NI Linux RT to host computer.
4. Power on the cRIO.
5. Transfer the contents of the cloned source code, including the `libssh2` directory, to the cRIO's `/tmp` directory. Note, the contents of the `/tmp` folder are deleted after each reboot/power cycle of the cRIO. It may help to first create an archive (ZIP or compressed tar, *.tar.gz) file to easily transfer the contents. The `.git` hidden file does _not_ need to be transferred.
6. Log into the cRIO via SSH.
7. Navigate to the source code on the cRIO.
8. Extract the compressed tar file.

```
cd `/tmp/libssh2-nilrt-ipk`
tar -xzf libssh2-nilrt-ipk.tar.gz
```

9. Navigate into the `libssh2-nilrt-ipk` folder.

8. Execute the following commands to build the IPK file:
```
cd libssh2-nilrt-ipk
```

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

```
mkdir build
Expand Down
6 changes: 1 addition & 5 deletions cmake/External_libssh2.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
set(_source "${CMAKE_CURRENT_SOURCE_DIR}/${LIBSSH2}")
set(_build "${CMAKE_CURRENT_BINARY_DIR}/${LIBSSH2}")

ExternalProject_Add(${LIBSSH2}
SOURCE_DIR ${_source}
BINARY_DIR ${_build}
URL file:///${CMAKE_CURRENT_SOURCE_DIR}/${LIBSSH2}-${LIBSSH2_VERSION}.tar.gz
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DCRYPTO_BACKEND=OpenSSL
BUILD_IN_SOURCE NO
)
Expand Down
Binary file added libssh2-1.8.2.tar.gz
Binary file not shown.

0 comments on commit 96dcaa5

Please sign in to comment.