NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

Summary

The OS image that ships with LV 2017 and RIO 17.0 has the opkg feeds configured to point to the internal-to-NI feed server and therefore you will be unable to install software through opkg without changing the configuration in a config file

 

Fix

From a shell logged in as "admin", execute the following command:

sed -i 's#nickdanger\.amer\.corp\.natinst\.com/feeds/\([^/]\+\)/\([^/]\+\)/#download.ni.com/ni-linux-rt/feeds/\1/\2/ipk/#' /etc/opkg/base-feeds.conf

This will need to be run each time you format your target, possibly after software installation through MAX as well

 

Steps have been put in place to ensure that this doesn't happen in future releases. Thank you for your attention and understanding.

 

MAX-based installation of fix

If you are uncomfortable with editing files on the target console or running commands, attached is a zipfile that includes the files needed to provide a MAX-installable fix. Note that it will only install for 2017 Base and, while installed, it will prevent the update of the Base component to a different version (you can still update LabVIEW RT, but newer driver components may not be installable while the Fix 2017 Feeds component is installed. If in doubt, format your target and install newer software.

 

Extract the zipfile and place the "Fix Feeds" folder in your RT Images folder (e.g. C:\Program Files (x86)\ National Instruments\RT Images). If you have MAX already opened, close and re-open MAX for the new software to be installable. Note that the software is not available in a Recommended Software Set and is only installable through a "Custom Software Installation"

 

feed_fix_1_of_2.jpg

 

feed_fix_2_of_2.jpg

Message 1 of 22
(3,967 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

This fix did not work for me.  Attached is a screenshot of the response.  When I check the base-feeds.conf file it still has the nickdanger path.

0 Kudos
Message 2 of 22
(3,834 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

This didn't work but if I used VI to go into the base-feeds.conf and change the text to the text that is output from this command then it works and I can use opkg again

0 Kudos
Message 3 of 22
(3,831 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

Thanks jdaming, I'd forgotten the "-i" to indicate to sed to inplace-edit the file

 

update_feeds_2017.jpg

0 Kudos
Message 4 of 22
(3,820 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

I am not sure if it is related but I just tried an opkg update on one of my 2016 cRIOs (it had 2017 for a while) and it came back with errors.  Any ideas?  Screenshot attached.

0 Kudos
Message 5 of 22
(3,813 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

It's only related insomuch as it's an opkg issue. The hint here is that opkg's use of wget is printing out the error message wget: bad address 'download.ni.com'. This tells me that your cRIO, for some reason, is unable to resolve the FQDN "download.ni.com", indicating a network issue at your site. You can use a few tools like host or dig (installed through the bind-utils package) and tcpdump to help sort out what's happening.

0 Kudos
Message 6 of 22
(3,805 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

Yeah I suspected not too.  One of the people who set up the network for this cRIO didn't enter a DNS server. Smiley Frustrated

Message 7 of 22
(3,798 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG


@jdaming wrote:

Yeah I suspected not too.  One of the people who set up the network for this cRIO didn't enter a DNS server. Smiley Frustrated


Gremlins

Message 8 of 22
(3,795 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

I'm having trouble installing ntp. It was working until I installed 2017. I worked around the nickdanger issue by updating base-feeds.conf to:

src/gz uri-all-0 http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/all
src/gz uri-cortexa9-vfpv3-0 http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3
src/gz uri-xilinx-zynq-0 http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/xilinx-zynq

 

Then ran

admin@NI-sbRIO-9607-030d69b0:~# opkg update
Downloading http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/all/Packages.gz.
Updated source 'uri-all-0'.
Downloading http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/Packages.gz.
Updated source 'uri-cortexa9-vfpv3-0'.
Downloading http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/xilinx-zynq/Packages.gz.
Updated source 'uri-xilinx-zynq-0'.
admin@NI-sbRIO-9607-030d69b0:~# opkg install ntp ntp-tickadj ntp-utils ntpdate
Installing libevent (2.0.21) on root
Installing ntp-tickadj (4.2.8) on root
Installing libperl5 (5.20.0) on root
Installing ntpdate (4.2.8) on root
Installing ntp (4.2.8) on root
Installing perl (5.20.0) on root
Installing ntp-utils (4.2.8) on root
Collected errors:
 * get_pkg_url: Package libevent is not available from any configured src.
 * opkg_install_pkg: Failed to download libevent. Perhaps you need to run 'opkg update'?
 * get_pkg_url: Package ntp-tickadj is not available from any configured src.
 * opkg_install_pkg: Failed to download ntp-tickadj. Perhaps you need to run 'opkg update'?
 * get_pkg_url: Package libperl5 is not available from any configured src.
 * opkg_install_pkg: Failed to download libperl5. Perhaps you need to run 'opkg update'?
 * get_pkg_url: Package ntpdate is not available from any configured src.
 * opkg_install_pkg: Failed to download ntpdate. Perhaps you need to run 'opkg update'?
 * get_pkg_url: Package ntp is not available from any configured src.
 * opkg_install_pkg: Failed to download ntp. Perhaps you need to run 'opkg update'?
 * get_pkg_url: Package perl is not available from any configured src.
 * opkg_install_pkg: Failed to download perl. Perhaps you need to run 'opkg update'?
 * get_pkg_url: Package ntp-utils is not available from any configured src.
 * opkg_install_pkg: Failed to download ntp-utils. Perhaps you need to run 'opkg update'?
admin@NI-sbRIO-9607-030d69b0:~# ^C
admin@NI-sbRIO-9607-030d69b0:~# Installing libevent (2.0.21) on root
-bash: syntax error near unexpected token `('
admin@NI-sbRIO-9607-030d69b0:~# Installing ntp-tickadj (4.2.8) on root
-bash: syntax error near unexpected token `('
admin@NI-sbRIO-9607-030d69b0:~# Installing libperl5 (5.20.0) on root
-bash: syntax error near unexpected token `('
admin@NI-sbRIO-9607-030d69b0:~# Installing ntpdate (4.2.8) on root
-bash: syntax error near unexpected token `('
admin@NI-sbRIO-9607-030d69b0:~# Installing ntp (4.2.8) on root
-bash: syntax error near unexpected token `('
admin@NI-sbRIO-9607-030d69b0:~# Installing perl (5.20.0) on root
-bash: syntax error near unexpected token `('
admin@NI-sbRIO-9607-030d69b0:~# Installing ntp-utils (4.2.8) on root
-bash: syntax error near unexpected token `('
admin@NI-sbRIO-9607-030d69b0:~# Collected errors:
-bash: Collected: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * get_pkg_url: Package libevent is not available from any configured src.
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * opkg_install_pkg: Failed to download libevent. Perhaps you need to run 'opkg update'?
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * get_pkg_url: Package ntp-tickadj is not available from any configured src.
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * opkg_install_pkg: Failed to download ntp-tickadj. Perhaps you need to run 'opkg update'?
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * get_pkg_url: Package libperl5 is not available from any configured src.
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * opkg_install_pkg: Failed to download libperl5. Perhaps you need to run 'opkg update'?
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * get_pkg_url: Package ntpdate is not available from any configured src.
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * opkg_install_pkg: Failed to download ntpdate. Perhaps you need to run 'opkg update'?
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * get_pkg_url: Package ntp is not available from any configured src.
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * opkg_install_pkg: Failed to download ntp. Perhaps you need to run 'opkg update'?
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * get_pkg_url: Package perl is not available from any configured src.
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * opkg_install_pkg: Failed to download perl. Perhaps you need to run 'opkg update'?
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * get_pkg_url: Package ntp-utils is not available from any configured src.
-bash: *: command not found
admin@NI-sbRIO-9607-030d69b0:~#  * opkg_install_pkg: Failed to download ntp-utils. Perhaps you need to run 'opkg update'?
-bash: *: command not found

0 Kudos
Message 9 of 22
(3,613 Views)

Re: LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

I was able to run the commands you had posted without issue:

 

opkg_ntp_install_2017.jpg

 

I'm not sure why the installation reports being unable to find the packages after successfully(?) updating the package listings. Is there something unusual about your network configuration where your sbRIO is located?

 

Then, of course, the other errors that you're seeing thereafter are a result of you copying the output from the installation command and attempting to run that as commands

...

admin@NI-sbRIO-9607-030d69b0:~# ^C

//This is you hitting [CTRL+C], attempting to copy the output

admin@NI-sbRIO-9607-030d69b0:~# Installing libevent (2.0.21) on root
-bash: syntax error near unexpected token `('

//This is your shell pasting the first line of the selected text into the console, attempting to run the

//command "Installing libevent (2.0.21) on root"

//If you are using PuTTY, selecting text with a left-click "copies" from the window and a right-click "pastes"

//into the window

...

Note that your output indicates failure when attempting to install, so I'm guessing that the attempts to download the files (in my pasted console, the "Downloading http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/ntp-tickadj_4.2.8p8-r0.1_cortex....", e.g., is opkg downloading the .ipk file for installation). This is where your output indicates that the packages that it attempted to download is not available from any configured source.

 

What is the result of running opkg info ntp on this controller?

0 Kudos
Message 10 of 22
(3,604 Views)