NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2017/RIO 17.0 PSA: Feed Adjustment for OPKG

Thanks for the Putty tip.
admin@NI-sbRIO-9607-030d69b0:~# opkg info ntp
Package: ntp
Version: 4.2.8p8-r0.1
Depends: ntp-tickadj, libcap2 (>= 2.24), libc6 (>= 2.23), base-files, shadow, initscripts-functions, base-passwd
Recommends: update-rc.d
Suggests: iana-etc
Provides: ntp-systemd
Replaces: ntp-systemd
Conflicts: ntp-systemd
Status: unknown ok not-installed
Section: net
Architecture: cortexa9-vfpv3
Maintainer: NI Linux Real-Time Maintainers <nilrt@ni.com>
MD5Sum: 5d433bc8ed1e9cb6be1a1b05db49fda0
Size: 321074
Filename: ntp_4.2.8p8-r0.1_cortexa9-vfpv3.ipk
Source: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p8.tar.gz file://ntp-4.2.4_p6-nano.patch file://ntpd file://ntp.conf file://ntpdate file://ntpdate.default file://ntpdate.service file://ntpd.service file://sntp.service file://sntp file://ntpd.list
Description: Network Time Protocol daemon and utilities  The Network Time Protocol
 (NTP) is used to synchronize the time of a   computer client or server to
 another server or reference time source,   such as a radio or satellite
 receiver or modem.

Package: ntp
Version: 4.2.8-r0.4
Depends: libgcc1 (>= 4.9.2), ntp-tickadj, libcap2 (>= 2.24), libc6 (>= 2.21), base-files, shadow, initscripts-functions, base-passwd
Recommends: update-rc.d
Suggests: iana-etc
Provides: ntp-systemd
Replaces: ntp-systemd
Conflicts: ntp-systemd
Status: install ok not-installed
Architecture: cortexa9-vfpv3

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

0 Kudos
Message 11 of 22
(3,773 Views)

Hmm, try just downloading the package but not installing it: opkg install --download-only ntp, check to make sure that this command is able to download the package file

0 Kudos
Message 12 of 22
(3,770 Views)

Output below

 

admin@NI-sbRIO-9607-030d69b0:~# opkg install --download-only ntp
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:~# 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 --download-only ntp
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:~#

0 Kudos
Message 13 of 22
(3,764 Views)

OK, we're rounding the home stretch here. Try the following from the target:

 

admin@crispus-attux:~# wget http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/Packages.gz
Connecting to download.ni.com (130.164.81.30:80)
Packages.gz 100% |*******************************| 582k 0:00:00 ETA
admin@crispus-attux:~# zcat Packages.gz | grep ^"Package: libevent"
Package: libevent-dbg
Package: libevent-dev
Package: libevent-staticdev
Package: libevent

Here, I'm downloading the architecture-specific (not machine-specific) Package.gz file from the target, then checking the contents of the package listing to ensure that I see a listing for the libevent package (since that's the first one that is complained-about).

 

If this works correctly, the next step would be to check (using tcpdump or wireshark) what's going on from the network-side of things.

 

Another question that I posed some time back and I still haven't gotten an answer to is "what does the network look like where this target is located?" I'm just trying to rule-out that your IT dept. isn't doing something to foul things up...

0 Kudos
Message 14 of 22
(3,762 Views)

We have a very plain vanilla network. No IT department. I have 3 sbRIO-9607s running LV 2016 and using NTP for time sync. I upgraded one to the LV2017 CRIO package last week. I think I'll keep the others at 2016. 😉

 

admin@NI-sbRIO-9607-030d69b0:~# wget http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/Packages.gz
Connecting to download.ni.com (23.218.156.66:80)
Packages.gz          100% |*******************************|   582k  0:00:00 ETA
admin@NI-sbRIO-9607-030d69b0:~#  zcat Packages.gz | grep ^"Package: libevent"
Package: libevent-dbg
Package: libevent-dev
Package: libevent-staticdev
Package: libevent
admin@NI-sbRIO-9607-030d69b0:~#

0 Kudos
Message 15 of 22
(3,754 Views)

What this is telling me is that opkg is downloading the appropriate feed package listings, there must be some issue when you're attempting to download the actual .ipk files for installation. I would recommend trying to use tcpdump to get a dump of what the traffic looks like when attempting to install ntp from the target's POV. This, however, kinda presents a chicken-and-egg problem: you'll need to install the tcpdump package to your target using the very process that seemingly is broken. And I suppose this gets at the heart of the issue: if you care about getting to the bottom of the problem, downloading the packages for tcpdump (which would be laborious task of tracking down all of the dependencies, downloading them, and making all of the needed packages available on the target's filesystem for a direct installation. Of course, you can use this same methodology to simply install the ntp stack, which is the end-game anyway. It really kinda depends on how often you intend on installing software to the controller with 2017 on it.

 

Another simple test that will tell us something would be to try to use wget to download a .ipk that is failing to install in your testing: 

wget http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/libevent_2.0.22-r0.5_cortexa9-v...

0 Kudos
Message 16 of 22
(3,752 Views)

Thanks Brad. I guess I have some new Linux skills to learn. Can you point me to a resource to get me started with the direct installation?

 

Thanks,

 

Richard

0 Kudos
Message 17 of 22
(3,748 Views)

RichardJennings,

 

There are a few times this has come up in discussions on these forums, e.g. here.
The basic process is:

  1. Start with package=foo.ipk, the package that you want to use (e.g. package=ntp_4.2.8p8-r0.1_cortexa9-vfpv3.ipk)
  2. Download package from the feed URL that matches your OS version (e.g. http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/)
  3. Transfer package to target and attempt to install with opkg install (e.g. opkg install ntp_4.2.8p8-r0.1_cortexa9-vfpv3.ipk)
  4. If this succeeds, and package was the desired package to install (from 1.), you're done!
  5. If this succeeds but package was not the desired package to install (from 1.), set package=$(the package that depended on what was just installed), and go to 3. (e.g. if you just installed bar and foo failed to install because bar was not installed, package was bar but is now set to foo)
  6. If this does not succeed reporting missing dependencies, set package=$(first missing dependency), and go to 2. (e.g. if you attempted to install package=dog, and the installation failed complaining about missing package dogfood, set package=dogfood and go to step 2.)

Basically, you're doing an expansion of the tree of dependencies for the packages that you need, playing the part of the packagemanager since it's having difficulties installing packages for some reason.

0 Kudos
Message 18 of 22
(3,743 Views)

Thanks Brad. I eventually worked around the problem. I used wget to download and opkg install and ran into the following issues for several ipk.

admin@NI-sbRIO-9607-030d69b0:~# wget http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/ntp_4.2.8p8-r0.1_cortexa9-vfpv3...
Connecting to download.ni.com (23.215.99.40:80)
ntp_4.2.8p8-r0.1_cor 100% |***************************************|   313k  0:00:00 ETA
admin@NI-sbRIO-9607-030d69b0:~# opkg install ntp_4.2.8p8-r0.1_cortexa9-vfpv3.ipk
Solver encountered 1 problem(s):
Problem 1/1:
  - package ntp-4.2.8-r0.4.cortexa9-vfpv3 conflicts with ntp-systemd provided by ntp-4.2.8p8-r0.1.cortexa9-vfpv3

Solution 1:
  - do not ask to install ntp-4.2.8-r0.4.cortexa9-vfpv3

Solution 2:
  - do not ask to install ntp-4.2.8p8-r0.1.cortexa9-vfpv3

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

 

My workaround was to roll back to cRIO 2016 and reinstall ntp. It worked.

 

Thanks for all your help.

Richard

0 Kudos
Message 19 of 22
(3,733 Views)

@BradMFix

From a shell, 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 didn't work. I get the following error:

sed: can't create temp file '/etc/opkg/base-feeds.confVKCB4E': Permission denied

I have actually previously manually fixed this myself, as discussed in my service request 7720981, but I don't have my notes immediately on hand how I did it. So I thought I would try the "official fix" which doesn't work.

 

Has this been fixed in an update or patch? I would prefer to just install a later version of NI CompactRIO than have to deal with this.

0 Kudos
Message 20 of 22
(3,280 Views)