Has anyone got any experience or tips how to add additional dev packages to the NI RT toolchain?
The toolchain comes with opkg and I assumed it would be straightforward to use that to install additional packages into the toolchain on the build host, but it refuses to install anything due to incompatible architecture. "opkg print-architecture" shows:
arch all 1
arch noarch 1
arch x86_64 10
(I was expecting to see cortexa9-vfpv3 somewhere)
This is the package I'm attempting to install (downloaded from http://download.ni.com/ni-linux-rt/feeds/2017/arm/cortexa9-vfpv3/ )
That package installs without issue on my target device.
Suggestions are welcome.
Solved! Go to Solution.
A couple of questions to get a better understanding of the system state.
We have several devices, mostly NI-9064 and NI-9065 cRIOs. My question is not about installing packages on the device however, I have no issue with that.
I should have been clearer in my original post. We use the NI toolchain from here to cross-compile C applications on a build host, which we then package and install onto various target devices:
My question is really just about how to get additional development packages installed into the toolchain on the build host. I only mentioned opkg because it's there in the toolchain (i.e. it runs on the build host), and I can't see any other reason for it to be there. I also don't really see what use those development packages (i.e. header files and libraries) would be on the target device itself, unless someone is compiling natively on the device (we are not). If these assumptions are incorrect, please ignore them.
If there is another recommended mechanism to get additional development packages in the toolchain itself, please educate me. One of our subprojects has introduced a dependency on some external libraries and it's causing some headaches at the moment.
[ apologies if this is a repeat, my original reply was flagged as spam ]
Thanks for your reply. Sorry I should have been clearer in my original post.
We use various devices, mostly NI-9064 and NI-9065 cRIOs. We have no issue installing packages on any target devices, that's not what I am asking about.
We are developing in C using a toolchain from NI (oecore-x86_64-cortexa9-vfpv3-toolchain-5.0). We cross-compile on a Linux host, build an ipk file, transfer to a target cRIO, and install using opkg on the target. No problems there.
However one of our subprojects has recently introduced a compile-time dependency on an external library that is not present in the NI toolchain. I am looking for a way to install the development version of that library (i.e. header files and libraries) into the toolchain on the build host. My immediate need is for libxml2-dev (found in the ni-linux-rt feed) but I am really looking for a general solution to installing dev packages into the toolchain on the build host, not on the target.
My first assumption was that's the reason a host version of opkg is included in the toolchain. I can't think of any other use for a version of opkg that runs on the host.
Ah, I misunderstood your question. You're looking for dependencies in the sysroot for either linking or inclusion as dependencies.
I'll be honest: I usually just copy the dependencies manually from the target or (if there's a larger number of them) compile on the target itself. That being said, people have had success with opkg on the host system previously. However, i believe you'll want to copy the /etc/opkg/ directory from your target to the sysroot to overcome the arch limitation as well as ensure you're using the flag to install to the sysroot.
EDIT: For some additional context, you need to manually copy the conf as our toolchain may support more than one version of the software installed to a Linux Real-Time system. E.g., the 18.0 toolchain supports both 2018 and 2019 software stacks. However, those stacks have different opkg repos and you'll need to manually switch the configurations to ensure the package version you build against are the same as in the repos.