
Now for the image build
So now we have all our packages built, we can move onto building our actual image. But not so fast, remember from our documentation something about a feed? Let’s run through this a bit.
Before we get going we need to get rid of an outdated http feed referring to “Panda” and fix that. The way I solved this is by a top tip for yocto users. When your source throws an error and refers to something that looks like a developer nomenclature or something that may be written in a script/recipe somewhere. Run this in terminal:
grep -rnw '/path/to/somewhere/' -e 'pattern'
Where path to search is our source folder (not the whole build directory, the number of build files is insane to search through and irrelevant. The pattern here was Panda, where I found the only result, in /sources/meta-nilrt/conf/distro/nilrt-nxg.conf
Here it builds up a set of IPK Feeds from variable assignments throughout the file, the actual URL no longer exists and we need to repoint it from what it looks for to, with these line changes:
NILRT_RELEASE_NAME = "2020.5"
NI_SUBFEED_URI ?= "${NILRT_MACHINE_FEED_URI}/main"
The rest of the feed URL works fine and is correct now, so now let’s update and add our feed which has our packages we just built by updating the IPK FEED URL’s section to be:
# Configure feed URIs for image builds
IPK_FEED_URIS += "\
NIOE-all##${IPK_NIOE_SUBFEED_URI}/all \
NIOE-${MACHINE}##${IPK_NIOE_SUBFEED_URI}/${MACHINE} \
NIOE-${TUNE_PKGARCH}##${IPK_NIOE_SUBFEED_URI}/${TUNE_PKGARCH} \
NI-software##${IPK_NI_SUBFEED_URI} \
Buildall##http://127.0.0.1/ipk/all \
Buildcore##http://127.0.0.1/ipk/core2-64 \
Build64##http://127.0.0.1/ipk/x64 \
"
Where buildall, buildcore and build64 are my personal packages built through the steps in this article. Now that that is done, there’s one final thing to fix, which is that there are some postinstalls requiring packages which no longer exist on the NI feeds and if we were to go build them, they have new names by the third party developers. So, lets go remove these, using my little grep method we can find that it’s this file to modify:
/sources/meta-nilrt/recipes-core/images/include/ni-external-components.inc
Basically, just delete the contents, we don’t need it, salt is mainly part of SystemLink which I wouldn’t normally use (although I will at some stage show you how to modify that platform).
We can finally build our image! Let’s run:
bitbake restore-mode-image
And there we have it, a working build with a built image. Following the instructions we can now put the wic folder in /build/tmp-glibc/deploy/images onto a USB as per the instructions, boot from this USB and then reformat. Unfortunately I don’t actually have a NI PXI or cRIO to perform this test, for now, we’ll purely be using it to build packages with that could get loaded onto those devices and show how to do this.
I also discovered when talking to R&D that this doesn’t include several proprietary NI packages so they don’t recommend putting this on an actual NI device since it would no longer operate as expected or needed. The main purpose of the yocto repo being public is so that we can automate the build process for programs and applications or create or update packages and create our own package feed to manage. This is great in principle but I would’ve liked to have a way to reimage devices using mender.

If you want to download this working source copy, you can do so here:
Thank you for every other informative website.
The place else could I get that kind of info written in such
an ideal approach? I’ve a project that I am simply now running
on, and I’ve been at the look out for such info.