Giter VIP home page Giter VIP logo

nilrt's Introduction

NI Linux Real-Time

Introduction

This project builds packages and images for the NI Linux RT distribution.

NI Linux RT is a Real-Time-scheduling enabled OS, for use on NI's embedded hardware devices. This project uses the OpenEmbedded framework to build and package the kernel, software, images, and installation media which compose NI Linux RT.

Community (non-NI) developers can use this project to build packages for open-source software projects, which are installable to their existing NI Linux RT devices - including custom Linux kernels and kernel modules.

Additional community documentation can be found at https://nilrt-docs.ni.com.

Mainlines

This project currently has three concurrent development mainlines (sorry). They are, in short:

  • nilrt/master/kirkstone - the current x64 dev HEAD
  • nilrt/master/sumo - the current arm32 dev HEAD
  • nilrt-academic/master/sumo - a forked arm32 HEAD for FIRST Robotics Competition

Entering the Bitbake Build Environment

This project uses the pyrex tool to transparently provide most of the toolchain requirements needed to run bitbake. However, there are are still a few setup steps.

  1. Initial repo and submodules

    Checkout the source and initialize the project submodules.

    git clone https://github.com/ni/nilrt.git
    cd nilrt
    git checkout nilrt/$release
    git submodule init
    git submodule update --remote --checkout
  2. Install docker

    Install the docker engine on your build host. If you can successfully run docker run hello-world, then you have everything you should need.

    Do not use the Docker Desktop product as your docker installation. Docker Desktop uses virtual machine indirection that will interfere with this project's docker scripting. Other users have had success switching to the bare docker engine instead.

  3. Set up pyrex

    Build (or pull) the build-nilrt pyrex container image.

    bash ./docker/create-build-nilrt.sh  # will tag the image as build-nilrt:${NILRT_codename}
    
    # Verification
    docker images build-nilrt  # should print the image you just built
  4. Set up build environment

    Source the ni-oe-init-build-env script, using the . (or source) command in your shell. This will automatically setup your OpenEmbedded build environment, and the pyrex container shim that will transparently wrap your bitbake commands.

    . ./ni-oe-init-build-env [--org]
    
    # Verification
    bitbake --version  # If this succeeds, you're done.

    If you are building on a virtual machine and do not have nested virtualization enabled on the host, you will need to locally remove the --device /dev/kvm entry in the args assignment in the top-level pyrex.ini file.

    NI builders who are connected to the NI corporate network should specify -org in their init script args, to provoke the script into adding the ni-org.conf snippet to your bitbake directory. External builders should not use --org.

    If you are building on a nilrt/master/* branch ref (rather than a release branch) and if you are building outside of the NI corporate network, you will need to set the version of the ni-main opkg feed to one which has already been published to download.ni.com. Do this by setting the NILRT_MAIN_FEED_VERSION bitbake variable to the latest published release. eg.

    echo 'NILRT_MAIN_FEED_VERSION = "2022Q3"' >> ./conf/local.conf
    
  5. Build package or packagegroups

    For example, to build Python, Ruby, and Apache for x64 targets, run the following commands:

     bitbake python3 ruby apache2
    

    To build all supported OpenEmbedded packages in NI's feed, run the following commands to build these packagegroups:

     bitbake packagefeed-ni-core
     bitbake --continue packagefeed-ni-extra
    

    NOTE If a package within a package group is updated, rebuilding the package group will automatically rebuild that package and all package depending on that package.

    NOTE The configuration files (build/conf/*.conf) can optionally be changed to reflect the desired build settings instead of setting environment variables.

    NOTE Building packages through OpenEmbedded can use significant disk space, on the order of 100s of gigabytes. If you are preparing a virtual machine to build images, make sure to allocate sufficient disk space.

    The resulting ipk files that can be installed through opkg exist at the following directory:

     tmp-glibc/deploy/ipk/...
    
  6. Building package feeds

    The NILRT repo has scripting in the :scripts/pipelines/ directory, which can be used to automate the process of building package feeds. The NI build pipelines use these scripts directly - so they are canonical.

    # after completing the build setup steps above...
    bash ../scripts/pipelines/build.core-feeds.sh

    These scripts are also a good source for understanding the steps to build a package feed manually. Note that if you are building package feeds manually, you must bitbake the special package-index target before using the feed.

  7. Building various images

    NOTE You must build packagefeed-ni-core and package-index first to build images.

    • Build a safemode image by running the following command:

        bitbake nilrt-safemode-rootfs
      

      The resulting root file system images for the NILRT safemode image is located at the following paths:

        tmp-glibc/deploy/images/x64/nilrt-safemode-rootfs-x64.tar.gz
      

      You can install this on target by copying the file over to the target and running the following command:

        tar xf nilrt-safemode-rootfs-x64.tar.gz -C /boot/.safe/
      
    • Build a runmode image by running the following command:

        bitbake nilrt-base-system-image
      

      The resulting root file system images for the NILRT runmode image is located at the following paths:

        tmp-glibc/deploy/images/x64/nilrt-base-system-image-x64.tar
      

      You can install this on target by copying the file over to the target while the target is in safe mode and running the following commands:

        tar xf nilrt-base-system-image-x64.tar
        tar xf data.tar.gz -C /mnt/userfs && ./postinst
      
    • Build a bootable recovery media by running the following command:

        bitbake nilrt-recovery-media
      

      The bootable recovery media, which you can install onto a USB memory stick or burn to a CD, is located at the following path:

        tmp-glibc/deploy/images/x64/nilrt-recovery-media-x64.iso
      

      Boot your NI Linux Real-Time compatible hardware from the recovery media and follow on-screen instructions to perform a factory reset.

    NOTE By default, National Instruments software is pulled from a feed hosted on ni.com. You can redirect to a mirror by setting IPK_NI_SUBFEED_URI to any URI supported by opkg in your org.conf,site.conf, or auto.conf.

  8. Building the cross-compile toolchain

    In order to compile custom packages for NI Linux Real-Time on a host system, a cross-compile toolchain is necessary. This can be built directly from one of the scripts in the :scripts/pipelines/ directory. By default, it builds for x86_64 Linux hosts.

    bash ../scripts/pipelines/build.toolchain.sh

    During the build, a script is generated at $BUILDDIR/tmp-glibc/deploy/sdk, with a name like oecore-x86_64-core2-64-toolchain-9.2.sh. The script is a self-extracting archive, and can be copied to and executed on an appropriate host system to install the toolchain.

    To build the toolchain for an x86_64 Windows host, there is a different script that can be used.

    bash ../scripts/pipelines/build.cross-toolchain.sh

    During the build, an archive is generated at $BUILDDIR/tmp-glibc/deploy/sdk, with a name like oecore-x86_64-core2-64-toolchain.tar.xz. This archive can be extracted on a Windows system to to access the toolchain.


Enjoy, and happy hacking!
ni.com/community/

nilrt's People

Contributors

adelcast avatar amstewart avatar andzn avatar bstreiff avatar chaitu236 avatar dylan-matthew-turner avatar gratian avatar harisokanovic avatar jeminor avatar jpautler avatar ni-jxie avatar pratheekshasn avatar rtollert avatar sharpk avatar shruthi-ravi avatar vanceaadi avatar xhuff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nilrt's Issues

bitbake fatal, outdated?

When following the Readme for 17.0, I got following error

| DEBUG: Running export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-m5Wkks09pt,guid=41fadb0808b6f534efb4ba5c5e84532e"; export SSH_AGENT_PID="1672"; export SSH_AUTH_SOCK="/tmp/ssh-t1ugOLz6EaGv/agent.1592"; export PATH="/home/mas/nilrt/sources/openembedded-core/scripts/native-intercept:/home/mas/nilrt/sources/openembedded-core/scripts:/home/mas/nilrt/build/tmp_nilrt_3_0_xilinx-zynq-glibc/sysroots/x86_64-linux/usr/bin/x86_64-linux:/home/mas/nilrt/build/tmp_nilrt_3_0_xilinx-zynq-glibc/sysroots/x86_64-linux/usr/bin:/home/mas/nilrt/build/tmp_nilrt_3_0_xilinx-zynq-glibc/sysroots/x86_64-linux/usr/sbin:/home/mas/nilrt/build/tmp_nilrt_3_0_xilinx-zynq-glibc/sysroots/x86_64-linux/usr/bin:/home/mas/nilrt/build/tmp_nilrt_3_0_xilinx-zynq-glibc/sysroots/x86_64-linux/sbin:/home/mas/nilrt/build/tmp_nilrt_3_0_xilinx-zynq-glibc/sysroots/x86_64-linux/bin:/home/mas/nilrt/sources/openembedded-core/scripts:/home/mas/nilrt/sources/bitbake/bin:/home/mas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"; export HOME="/home/mas"; git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master
| DEBUG: Python function base_do_unpack finished
| DEBUG: Python function do_unpack finished
| ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:
| fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.
| 
ERROR: Task 88 (virtual:native:/home/mas/nilrt/sources/openembedded-core/meta/recipes-devtools/gnu-config/gnu-config_git.bb, do_unpack) failed with exit code '1'

I'm on ubuntu 18.04 and git 2.17.1 installed
The command git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master fails, cause the '--set-upstream' option is no longer supported.

Looks for me, that ni/bitbake is outdated. Any way to update that? or change source to original repo?

Cannot modify resolution

I installed NI LinuxRT on the PC, but the resolution only a default 800*600, this is not right, there is no way to change the resolution?
1234

Bitbake on nilrt/16.0 branch outside NI domain fails to fetch from git.amer.corp.natinst hostmane

If I'm working outside the NI network and I try to bitbake on any of the nilrt/16.0 recipes, I get this error when issuing bitbake-layers show-recipes

Parsing recipes..ERROR: ExpansionError during parsing /nilrt/sources/meta-nilrt/recipes-kernel/linux/linux-nilrt_3.14.bb: Failure expanding variable do_populate_sysroot: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command failed with exit code 128, output:
fatal: unable to connect to git.amer.corp.natinst.com:
git.amer.corp.natinst.com: Name or service not known

It seems that .bb class tries to fetch your internal git repo and fails since it's reachable only by computers inside the NI network. This might be an issue for all customers trying to build images\packages with Yocto. It seems that with older branches (e.g. nilrt/15.5) this issue does not show up.

Bitbake problem for building bootable recovery disk 21.0 for ARM

Hi,
I installed a fresh copy of "Ubuntu 20.04.3 LTS" and then added this packages :

 $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
 xz-utils debianutils iputils-ping libsdl1.2-dev xterm

I followed the instructions for 21.0 release (git checkout nilrt/21.0/sumo) for ARM target (export MACHINE=xilinx-zynq) but I have errors in step 3 ...

I only need "Bootable recovery disk 21.0 for ARM"
Thank you very much if anyone can give me the ready to use iso file

Installing an Image to ARM Target ends blinking LED

Refering to the 19.1 Branch README

I've successully built the "niconsole-image". Trying to install the rootfs ends up with a continuous blinking Status LED. Therefore a few questions to following section

Installing a Complete Image to an RT Target

  1. Boot the target into safe mode. Refer to your hardware's manual for details on booting to safe mode.

  2. If you are using a custom kernel, backup the NI-built kernel and modules.

/boot/linux_runmode.itb  # kernel location on ARM targets
/lib/modules/            # kernel modules

[...]

  1. Restore the NI-built kernel and module to their original locations in
    /boot and /lib/modules/ or install your custom-built kernel as
    described in KERNEL_SOURCE.md.

Logging In

NI's additions to the base image include scripts and other software affecting login. To enable login without NI software, you will need to make a few more changes. Assuming you are in safe mode and the run mode filesystem is mounted at /mnt/userfs:

To Point 2:
a) only if when using custom kernel, or anyway?
b) and are the paths correct when running in safe mode or do I need to backup those in /mnt/userfs

3 and 4 looks pretty clear

To Point 5:
same than 2b)

To Logging In
The NI Software, is the one installed by /usr/local/natinst/tools/versioning_utils.sh and /usr/local/natinst/nikal/bin/updateNIDrivers as decribed in Kernel Source?

Thanks

PS: Running a custom Kernel runs fine. Brad's Videos are really helpful.

Install Kernel 20.x

For the 19.x Kernel we could install a new Kernel following this procedure:

# copy Kernel/modules/module-versioning-image.squashfs
source /usr/local/natinst/tools/versioning_utils.sh
setup_versioning_env
versioning_call /usr/local/natinst/nikal/bin/updateNIDrivers $(kernel_version)

On the 20.x Branches the /usr/local/natinst/nikal/bin/updateNIDrivers is gone.

What procedure is recommended for the module-versioning ?
With just copying the kernel and modules, I miss the ni-modules. And the Target is not recognized by MAX.

Question: When you you use NI-Realtime Linux with Labview extended period of time consuming all the available ram and becoming unresponsive

When you use NI-Realtime Linux with Labview install vs python does the system leverage Wine in some capacity i notice the file hierarchy leverages /c/NI and there are .ini files there if so do you see issues with memory leaks? I am seeing some chassis that are left on for an extended period of time consuming all the available ram and becoming unresponsive. I can post some screenshots if needed i would really appreciate the info.
MicrosoftTeams-image

Difficulty compiling Linux kernel for ni/nilrt/nilrt/19.1 and ni/linux/nilrt/19.1/4.14

I'm having some problems compiling the NILRT kernel for LabVIEW 2019 SP1 (which I'm hoping is the 19.1 branches in this and the ni/linux repositories) in order to enable an additional kernel module.

Initially I tried using a Linux machine I had easy access to without using the nilrt build-chain, this used a GCC-8.3.1 compiler and after using make oldconfig and make menuconfig having copied the running configuration from a cRIO-9045 (using zcat /proc/config.gz > existingConfig and then various scp commands to get a .config file in the linux directory on the build machine).

When running make modules_prepare in this configuration, I get an error from SE_Linux:

In file included from scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please update secclass_map.
 #error New address family defined, please update secclass_map.

Some searching seems to tell me that this is because my build machine's glibc version is newer than the intended version (or the previously built version, or the version for this config?)

I then attempted to use the nilrt build-chain, but ran into some issues with missing commands. I'll probably come back to this, but without root access I can imagine rpcgen and chrpath might be fiddly to get correctly picked up in scripts (maybe not...)

I then downloaded the toolchain mentioned in the README from https://www.ni.com/en-gb/support/downloads/software-products/download.gnu-c---c---compile-tools-x64.html#338443
These installed without any problems but I haven't had any success using them; the closest attempt gives the following error:

arch/x86/Makefile:245: *** You are building kernel with non-retpoline compiler, please update your compiler..  Stop.

which I'm guessing is because although gcc --version still returns 8.3.1 (system version), ${CROSS_COMPILE}gcc --version now gives x86_64-nilrt-linux-gcc (GCC) 6.3.0, and versions older than 8, or 7.x with backported patches, apparently don't have whichever patch satisfies the kernel in relation to some branch target injection mitigation.

Presumably there is some correct way to go about this - which path is best for me to move down to best accomplish my goal (in this case, compiling the NAT tables parts of netfilter either into the kernel or as a module)?

RoboRIO Hardknott

Hello,

I have noticed that commits such as 7143fec are hard-coding x64, does this mean that the RoboRIO v1 and v2 are going to stay on Sumo for the long term? I was hoping to see the compiler version eventually be bumped to GCC 10 for FRC usage.

Failed to download http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz headers: Couldn't resolve host name

my build machine: x86-64
build branch: nilrt/master/kirkstone
build target: nilrt-base-system-image
my error:

ERROR: nilrt-runmode-rootfs-1.0-r0 do_rootfs: Unable to update the package index files. Command '/media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/opkg.conf -t /media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/temp/ipktemp/ -o /media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/rootfs  --force_postinstall --prefer-arch-to-version  --add-exclude rauc --add-exclude rauc-mark-good update' returned 1:
 * opkg_validate_cached_file: Failed to download http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz headers: Couldn't resolve host name.
Downloading file:///media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/deploy/ipk/all/Packages.gz.
Updated source 'NIOE-all'.
Downloading file:///media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/deploy/ipk/x64/Packages.gz.
Updated source 'NIOE-x64'.
Downloading file:///media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/deploy/ipk/core2-64/Packages.gz.
Updated source 'NIOE-core2-64'.
Downloading http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz.

I run ping download.ni.com fine in my host

PING download.ni.com (60.9.4.70) 56(84) bytes of data.
64 bytes from 60.9.4.70: icmp_seq=1 ttl=49 time=20.8 ms
64 bytes from 60.9.4.70: icmp_seq=2 ttl=49 time=23.5 ms
64 bytes from 60.9.4.70: icmp_seq=3 ttl=49 time=23.0 ms

I run wget fine in my host

--2024-06-07 06:39:52--  http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz
Resolving download.ni.com (download.ni.com)... 60.9.4.70, 2408:871a:8810:205:3d4b:e240:6811:fffe
Connecting to download.ni.com (download.ni.com)|60.9.4.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74375 (73K) [application/x-gzip]
Saving to: ‘Packages.gz’

Packages.gz                           100%[========================================================================>]  72.63K   177KB/s    in 0.4s

2024-06-07 06:39:55 (177 KB/s) - ‘Packages.gz’ saved [74375/74375]

why opkg update failed?

Legacy Bios

How can i add Legacy Bios support i will do the legwork if needed i want to deploy on a computer for development that is non UEFI

KERNEL_SOURCE.txt does not mention required host build tools

Perhaps an oversight of developers installing linux with development tools pre-selected but the kernel_source.txt calls out requiring Make but not host GCC and other dependencies. Another required package on some systems was openssl-devel

NI RT Linux LabView Can instability

I have a question about the NI-RTLinux Labview X-Net Dongles and the software interface. I have been seeing this issue with socket can protocol with 10ms signals that have checksum dropping out I wanted to know if you have seen this or if you are using socket can? If so can we change the connection interface to an internal transport that we host within the company?

Length of time building packages

How long should a normal build of the packages take?
I was at this step:

after completing the build setup steps above...

bash ../scripts/pipelines/build.core-feeds.sh

It was just 50% through after an hour. Then my CPU was at 100% and suddenly Ubuntu logged me out and looks like it crashed. Obviously the crashing isn't normal but regardless something seems off with the building of packages taking that long. Will that have to happen every time?

Error building minimal-nilrt-image

Hi,

I am trying to build the minimal-nilrt-image but I get the error below :

ERROR: minimal-nilrt-image-1.0-r0 do_rootfs: Unable to install packages. Command '/home/pierre/Documents/nilrt-nilrt-18.0/build/tmp_nilrt_3_0_x64-glibc/work/x64-nilrt-linux/minimal-nilrt-image/1.0-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /home/pierre/Documents/nilrt-nilrt-18.0/build/tmp_nilrt_3_0_x64-glibc/work/x64-nilrt-linux/minimal-nilrt-image/1.0-r0/opkg.conf -t /home/pierre/Documents/nilrt-nilrt-18.0/build/tmp_nilrt_3_0_x64-glibc/work/x64-nilrt-linux/minimal-nilrt-image/1.0-r0/temp/ipktemp/ -o /home/pierre/Documents/nilrt-nilrt-18.0/build/tmp_nilrt_3_0_x64-glibc/work/x64-nilrt-linux/minimal-nilrt-image/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version install ni-sysmgmt-salt-minion-support nisdmon packagegroup-ni-base packagegroup-ni-tzdata opkg run-postinsts' returned 255:
Collected errors:

  • opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ni-sysmgmt-salt-minion-support'.

ERROR: minimal-nilrt-image-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/pierre/Documents/nilrt-nilrt-18.0/build/tmp_nilrt_3_0_x64-glibc/work/x64-nilrt-linux/minimal-nilrt-image/1.0-r0/temp/log.do_rootfs.4283
ERROR: Task (/home/pierre/Documents/nilrt-nilrt-18.0/sources/meta-nilrt/recipes-core/images/minimal-nilrt-image.bb:do_rootfs) failed with exit code '1'

Could you help me with this error.

Thanks.

bitbake error: potential misconfiguration

I've checked out the nilrt/comms-2-0 branch nd followed the steps in the readme. After sourcing the oe environment I run bitbake and get the following error:

(bb) morjgus@morjgus-mint ~/Documents/projects/nilrt/build $ bitbake gcc
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Please install the following missing utilities: makeinfo,chrpath
libsdl-native is set to be ASSUME_PROVIDED but sdl-config can't be found in PATH. Please either install it, or configure qemu not to require sdl.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

How can this issue be solved?

Regards,
Markus

Y2038 ARM

Hi! Not entirely sure this is the right place to bring this up.

I've got a sbRIO 9651 (32-bit ARM) that appears to be affected by the Year 2038 problem.

From what I understand Linux >= 5.1 and glibc >= 2.34 (better yet 2.35) would provide opt-in mitigations in form of a 64-bit time_t.

I've updated my system software installation to the currently most recent 2024Q1 (for which I've been unable to find corresponding tags / branches in this repository btw.) and find the presumably too old Linux 4.14.146-rt67 and glibc 2.24.

I also notice that the nilrt/master/sumo branch hasn't been touched in two years and the note in docs/README.kernel.md about only supporting Linux 4.14 and below on ARM.

Is the issue known / being worked on?
Is the ARM port still being worked on at all or has it perhaps moved elsewhere (I assume the updated system image releases have to be coming from somewhere)?

ETA for 19.0?

I noticed that packages for 2019 are posted on the NI packages feed, however a 19.0 version has not been posted to this repo. Our project uses this repo to build Mono, and it would be nice to get a head start on having the builds for the next image ready to go.

Build Evironment Error:return non zero exit status 9

I run the env file as root, and got the error like:
INFO: Using /home/lab/Downloads/nilrt/nilrt/build as the OE build workspace. BB_NUMBER_THREADS=40 INFO: Using pyrex image: build-nilrt:hardknott useradd: user 'root' already exists Traceback (most recent call last): File "/usr/libexec/pyrex/entry.py", line 201, in <module> sys.exit(main()) File "/usr/libexec/pyrex/entry.py", line 105, in main subprocess.check_call( File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['useradd', '--non-unique', '--uid', '0', '--gid', '0', '--groups', '0', '--home', '/root', '--no-create-home', '--shell', '/bin/sh', 'root']' returned non-zero exit status 9.

Missing libgflags

I installed NI LinuxRT on my hardware, but the lack of libgflags files caused my own wrapped so files can not be executed, copy these files to the usr/lib path, my so files can be executed normally, such as pictures
miss

[sbRIO-9651] restore-mode-image is not buildable for xilinx-zynqhf machine

Hi!

I try to build restore-mode-image for sbRIO-9651 but i have a missing package issue.

livius@ubuntu16:/Yocto_NI/nilrt/build$ bitbake restore-mode-image
Parsing recipes: 100% |###################################################################| Time: 0:01:20
Parsing of 3723 .bb files complete (0 cached, 3723 parsed). 4779 targets, 147 skipped, 4 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'grub-efi-nilrt' (but /Yocto_NI/nilrt/build/../sources/meta-nilrt/recipes-core/images/minimal-nilrt-bundle-image.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'grub-efi-nilrt' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['grub-efi-nilrt']
ERROR: Required build target 'restore-mode-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['restore-mode-image', 'minimal-nilrt-bundle', 'minimal-nilrt-bundle-image', 'grub-efi-nilrt']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

I am using Ubuntu 16.04 LTS which compatible with Yocto sumo in 100%. My terminal commands was the following:

git clone https://github.com/ni/nilrt.git
cd nilrt
git checkout nilrt/20.6/sumo
git submodule init
git submodule update --remote --checkout
. ni-oe-init-build-env
export MACHINE=xilinx-zynqhf # or change it in local.conf
bitbake restore-mode-image

Can i use restore-mode-image for sbRIO-9651? Is it compatible for it? What images are compatible for developing in Zynq from meta-nilrt/recipes-core/images/ ? As i can see Yocto can not find any grub package which is totally wrong way in ARM, it should be exist only for x64 and u-boot for ARM, so i think, something went wrong in the recipe files for xilinx-zynqhf. Please fix it!

My further questions is, what values can i use for MACHINE and DISTRO variables in local.conf?
As i see there are two Zynq machine in meta-nilrt/conf/machine/, xilinx-zynq and xilinx-zynqhf what should i use and what are the differences? For DISTRO variable, is nilrt-nxg the only one which can i use or there are any others?

Build Issue

Hello,

I'm trying to build an image to make it run on Zynq 7020 (Pynq Z2 or PynqBerry).
I'm facing an issue when trying to build.

I'm a newbie in this, but I just follow the steps and fix many depencencies, but this one, I did'nt find the solution :

| ../../glib-2.54.3/gio/gdbusauth.c: In function ‘_g_dbus_auth_run_server’:
| ../../glib-2.54.3/gio/gdbusauth.c:1305:11: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
| 1305 | debug_print ("SERVER: WaitingForBegin, read '%s'", line);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have setup the tools Ubuntu 20.14 VM using Virtualbox. Do you recommend another Linux distribution ?
I have tried in different branches 17.0, 18. and master barnch and for x86 or ARM build.

Trying to build the Python package failed at the same step. I found a forum saying that the I need to removed the argument in the specific file or appmly a patch on a specific tool, but I'm just want to see if you have any recommandation to make it more straightforward.

Best regards

Trying to Build recovery image for cRIO-9045

Hello there,
I am very inexperienced with this.
Nevertheless, I need a recoervery image for a cRIO with x86_64 architecture(cRIO-9045). The following steps I have done, but without success:
install all packages from the list Yocto Project Quick Start guide+python

 git clone https://github.com/ni/nilrt.git
 cd nilrt
 git checkout nilrt/20.0/sumo
 git submodules init
 git submodule update --remote --checkout
 . ni-oe-init-build-env
 export MACHINE=x64
 export DISTRO=nilrt
 bitbake packagegroup-ni-coreimagerepo

Here my system gives me the following debug info:
shell_output.txt
the log from glib-2.0-native:
log.do_compile.1138304.txt
could you help me with this?
kind regards

Docker image for testing purposes

Including a docker image in the official pipeline would be helpful so that we can use that image for testing in our own CI workflows. Having the simulated DAQmx devices might be asking for too much but it would be great. Ideally you could include a ini/json/toml/.... file in your Dockerfile which setup the simulated DAQmx devices.

DM me for more specifics as to my teams use case.

Build Error: master/hardknott

Hi,

I'm having issues building the latest version. I managed to compile the repositories using the pyrex docker container using the guidance but hit the following error when i try to build an image..

ERROR: nilrt-safemode-initramfs-9.2-r0 do_rootfs: Unable to update the package index files. Command '/mnt/storage/nilrt/build/tmp-glibc/work/x64-nilrt-linux/nilrt-safemode-initramfs/9.2-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /mnt/storage/nilrt/build/tmp-glibc/work/x64-nilrt-linux/nilrt-safemode-initramfs/9.2-r0/opkg.conf -t /mnt/storage/nilrt/build/tmp-glibc/work/x64-nilrt-linux/nilrt-safemode-initramfs/9.2-r0/temp/ipktemp/ -o /mnt/storage/nilrt/build/tmp-glibc/work/x64-nilrt-linux/nilrt-safemode-initramfs/9.2-r0/rootfs  --force_postinstall --prefer-arch-to-version  --add-exclude python-core --add-exclude python3-core --add-exclude rauc-mark-good update' returned 1:
 * opkg_validate_cached_file: Failed to download http://download.ni.com/ni-linux-rt/feeds/2023Q1/ni-main/Packages.gz headers: HTTP response code said error.
 * rm_r: Failed to open dir /mnt/storage/nilrt/build/tmp-glibc/work/x64-nilrt-linux/nilrt-safemode-initramfs/9.2-r0/temp/ipktemp//opkg-g4lMHv: No such file or directory.
Downloading file:///mnt/storage/nilrt/build/tmp-glibc/deploy/ipk/all/Packages.gz.
Updated source 'NIOE-all'.
Downloading file:///mnt/storage/nilrt/build/tmp-glibc/deploy/ipk/x64/Packages.gz.
Updated source 'NIOE-x64'.
Downloading file:///mnt/storage/nilrt/build/tmp-glibc/deploy/ipk/core2-64/Packages.gz.
Updated source 'NIOE-core2-64'.
Downloading http://download.ni.com/ni-linux-rt/feeds/2023Q1/ni-main/Packages.gz.

ERROR: Logfile of failure stored in: /mnt/storage/nilrt/build/tmp-glibc/work/x64-nilrt-linux/nilrt-safemode-initramfs/9.2-r0/temp/log.do_rootfs.588
ERROR: Task (/mnt/storage/nilrt/sources/meta-nilrt/recipes-core/images/nilrt-safemode-initramfs.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5687 tasks of which 5667 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /mnt/storage/nilrt/sources/meta-nilrt/recipes-core/images/nilrt-safemode-initramfs.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

When I tried to download the links in the messages I hit a 404 error - has NI changed these feeds?

Many thanks,
Ollie

Building SDK for 2020 release seems to be broken

I'd be happy to use a pre-built 2020 SDK instead but I couldn't find one released anywhere.

Building nativesdk-glibc results in the following error due to -Werror:

| In file included from ../sysdeps/unix/sysv/linux/sigwait.c:24:0:
| ../nptl/pthreadP.h:604:1: error: 'prio_inherit_missing' defined but not used [-Werror=unused-function]
|  prio_inherit_missing (void)

Unsure if removing the error on unused-function is a valid solution or if this is a symptom of something not configuring correctly.

I've tried building from RELEASE_NILRT_2020.1 and nilrt/20.5/sumo with the same result. I also tried in both Ubuntu 18.04 and inside the provided Docker environment with the same result.

I'm just running these commands to build the linux host SDK:

. ni-oe-init-build-env
export MACHINE=x64
SDKMACHINE=x86_64 bitbake -c populate_sdk host-toolchain-sysroot

More detailed log here:
error.txt

edit: If I add __attribute__ ((unused)) to prio_inherit_missing then it at least builds nativesdk-glibc but there seem to be a bunch of other issues after that. Curious how this happened on a release tag - maybe because the system image was built for release but not the SDK?

edit 2: After chipping away at this on and off, I've found these patches on the submodules seem to be enough to get a usable cross toolchain when building inside the docker container, unsure if messing with the locale generation will break certain things though:

nilrt/sources/meta-nilrt:

diff --git a/recipes-core/glibc/glibc/0001-pi-condvars-add-protocol-support-to-pthread_condattr.patch b/recipes-core/glibc/glibc/0001-pi-condvars-add-protocol-support-to-pthread_condattr.patch
old mode 100644
new mode 100755
index b1195788..97d83d59
--- a/recipes-core/glibc/glibc/0001-pi-condvars-add-protocol-support-to-pthread_condattr.patch
+++ b/recipes-core/glibc/glibc/0001-pi-condvars-add-protocol-support-to-pthread_condattr.patch
@@ -187,7 +187,7 @@ index 4edc74b1ef..4cf5e50524 100644
  # define USE_REQUEUE_PI(mut) 0
  #endif

-+static bool
++static bool __attribute__ ((unused))
 +prio_inherit_missing (void)
 +{
 +#ifdef __NR_futex

nilrt/sources/meta-mono:

diff --git a/recipes-mono/mono/mono-git.inc b/recipes-mono/mono/mono-git.inc
old mode 100644
new mode 100755
index 290a969..31a8933
--- a/recipes-mono/mono/mono-git.inc
+++ b/recipes-mono/mono/mono-git.inc
@@ -7,7 +7,7 @@ LICENSE = "GPLv2"

 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=80862f3fd0e11a5fa0318070c54461ce"

-SRCBRANCH = "master"
+SRCBRANCH = "main"
 SRCREV = "${AUTOREV}"

 SRC_URI = "git://github.com/mono/mono.git;branch=${SRCBRANCH}\

nilrt/sources/openembedded-core:

diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
old mode 100644
new mode 100755
index d6a503372a..d158fb33bf
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -42,7 +42,7 @@ def generate_locale_archive(d, rootfs):
     env = dict(os.environ)
     env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-archive")

-    for name in os.listdir(localedir):
+    for name in []:# os.listdir(localedir):
         path = os.path.join(localedir, name)
         if os.path.isdir(path):
             try:
@@ -147,7 +147,7 @@ class Sdk(object, metaclass=ABCMeta):
             generate_locale_archive(self.d, oe.path.join(self.sdk_host_sysroot, self.sdk_native_path))
             # And now delete the binary locales
             pkgs = fnmatch.filter(pm.list_installed(), "nativesdk-glibc-binary-localedata-*.utf-8")
-            pm.remove(pkgs)
+            #pm.remove(pkgs)
         else:
             # No linguas so do nothing
             pass
diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc
old mode 100644
new mode 100755
index 0d80869650..5a14c35b14
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -23,7 +23,7 @@ RDEPENDS_localedef += "glibc"

 # default to disabled
 ENABLE_BINARY_LOCALE_GENERATION = "0"
-ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "1"
+ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "0"

 #enable locale generation on these arches
 # BINARY_LOCALE_ARCHES is a space separated list of regular expressions
@@ -31,7 +31,7 @@ BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64"

 # set "1" to use cross-localedef for locale generation
 # set "0" for qemu emulation of native localedef for locale generation
-LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "0"
+LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1"

 PROVIDES = "virtual/libc-locale"

edit 3: also needed this patch on nilrt/sources/meta-openembedded

diff -uraBN nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil/0001-setup.py-Pin-setuptools_scm.patch nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil/0001-setup.py-Pin-setuptools_scm.patch
--- nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil/0001-setup.py-Pin-setuptools_scm.patch	1970-01-01 10:00:00.000000000 +1000
+++ nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-dateutil/0001-setup.py-Pin-setuptools_scm.patch	2021-03-30 16:21:23.350000000 +1100
@@ -0,0 +1,25 @@
+From f230331f1c1766ea0e562a5573b0a5ad59fcc689 Mon Sep 17 00:00:00 2001
+From: Ed Bordin <[email protected]>
+Date: Tue, 30 Mar 2021 16:12:37 +1100
+Subject: [PATCH] pin setuptools_scm at version that works in python 3.5
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index b59bd63..c5afd94 100644
+--- a/setup.py
++++ b/setup.py
+@@ -63,7 +63,7 @@ setup(name="python-dateutil",
+       package_data={"dateutil.zoneinfo": ["dateutil-zoneinfo.tar.gz"]},
+       zip_safe=True,
+       requires=["six"],
+-      setup_requires=['setuptools_scm'],
++      setup_requires=['setuptools_scm==1.15.7'],
+       install_requires=["six >=1.5"],  # XXX fix when packaging is sane again
+       classifiers=[
+           'Development Status :: 5 - Production/Stable',
+-- 
+2.25.1
+
diff -uraBN nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc
--- nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc	2021-03-30 16:14:54.000000000 +1100
+++ nilrt/sources/meta-openembedded/meta-python/recipes-devtools/python/python-dateutil.inc	2021-03-30 16:18:29.590000000 +1100
@@ -4,6 +4,7 @@
 LICENSE = "BSD-3-Clause & Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e3155c7bdc71f66e02678411d2abf996"
 
+SRC_URI_append_class-target = " file://0001-setup.py-Pin-setuptools_scm.patch "
 SRC_URI[md5sum] = "03a08c8bcf0a2b29f1cd21b9de4d12fb"
 SRC_URI[sha256sum] = "9d8074be4c993fbe4947878ce593052f71dac82932a677d49194d8ce9778002e"

libxkbcommon fails to compile

Using the docker container, compiling libxkbcommon fails with this message:

| src/xkbcomp/parser.c: In function '_xkbcommon_parse':
| src/xkbcomp/parser.c:1839:12: error: 'YYEMPTY' undeclared (first use in this function); did you mean 'YYCOPY'?
| yychar = YYEMPTY; /* Cause a token to be read. */
| ^~~~~~~
| YYCOPY
| src/xkbcomp/parser.c:1839:12: note: each undeclared identifier is reported only once for each function it appears in
| src/xkbcomp/parser.c:1959:22: error: 'YYerror' undeclared (first use in this function); did you mean 'perror'?
| else if (yychar == YYerror)
| ^~~~~~~
| perror
| src/xkbcomp/parser.c:1965:16: error: 'YYUNDEF' undeclared (first use in this function); did you mean 'YYENOMEM'?
| yychar = YYUNDEF;
| ^~~~~~~
| YYENOMEM
| Makefile:1505: recipe for target 'src/xkbcomp/parser.lo' failed
| make[1]: *** [src/xkbcomp/parser.lo] Error 1
| make[1]: Leaving directory '/home/nilrt/nilrt/build/tmp-glibc/work/core2-64-nilrt-linux/libxkbcommon/0.8.0-r0/build'
| Makefile:1022: recipe for target 'all' failed
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/nilrt/nilrt/build/tmp-glibc/work/core2-64-nilrt-linux/libxkbcommon/0.8.0-r0/temp/run.do_compile.2650918:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /home/nilrt/nilrt/build/tmp-glibc/work/core2-64-nilrt-linux/libxkbcommon/0.8.0-r0/temp/log.do_compile.2650918)
ERROR: Task (/home/nilrt/nilrt/sources/openembedded-core/meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.0.bb:do_compile) failed with exit code '1'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.