From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Linux Real-Time Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Archived: NI Linux Real-Time and opkg: Introduction to ipks

Note: This document is now archived and is no longer being updated. The new documentation can be found at https://nilrt-docs.ni.com/ and updates can be submitted to https://github.com/ni/nilrt-docs.

Overview

With the release of NI Linux Real-Time for PXI and further improvements to the NI Linux Real-Time platform, NI now utilizes ipks for software installation using the opkg package manager that ships with NI Linux Real-Time. 

 

Description

The attached tutorial covers:

  • Creation of a simple "Hello, World!" executable
  • Packaging the executable in an ipk for distribution with the opkg package manager
  • The document also includes a more general discussion for how to build an ipkg and feeds

Note: NI Support does not officially support the usage of custom ipks. If issues are encountered, NI recommends posting to NI Linux Real-Time community forums for assistance from other NI Linux Real-Time users. 

 

Hardware and Software Requirements

  • NI Linux Real-Time System with one of the following
    • NI Linux Real-Time
    • Access to the online NI Repositories or an offline version of the repo copied from the
      online NI Repositories
    • Source for a Linux Package (this tutorial includes source code for a "Hello, World!" example

Brian D.

National Instruments

Brian.D
NI Product Owner
VeriStand
Comments
RVallieu
Active Participant
Active Participant
on

Ok I created the HelloWorld.c file on my system and was able to utilize the gcc tools installed to compile to code.  Yes!

 

Next I tested the executable by running the compiled exe using

# ./hello

 

Rewarded by 

Hello world!

 

printed on the screen.

 

With that success I then tried to follow the directions to build the opkg ipk.  

 

I created the hellopgk folder

hellopgk

    CONTROL {directory}

         control {text file}

    usr {directory}

        bin {directory}

            hello {exe created by gcc compile and tested above}

        lib {folder}

    deiban-binary {text file? with 2.0}

 

Then I navigated to the opkg-utils folder on my system and ran

 

./opkg-build /SystemPath/hellowworld/hellopkg /SystemPath/helloworld

 

This DID build the hellopkg_1.0.0_x64.ipk

 

However, when I ran opkg install hellopkg_1.0.0_x64.ipk  I got errors unrelated to this package popping up, from a failed prior opkg install...

 

Any clue on why a prior install error would stick around?

 

When I did an opkg info hellopkg after the failed install, it returned nothing.

 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
Contributors