Jetson Nano as LinuxCNC driver

More
16 Jun 2020 10:50 - 16 Jun 2020 11:10 #171825 by tim292stro
@hobbyno1, no I have not. Last fall (2019) the land under my shop trailer and the storage yard company was sold out from under us (me and 400+ other tenants). I took a $250K personal write-off to save my credit history so that some guy next door could have a bigger parking lot - all my tools (including the Bridgeport S2 mill and tooling I had for a few weeks after trading up from the S1) are gone. Around the same time, Nvidia came out with its Preempt-RT patch for the L4T distribution on Jetson. If you think the storage situation is bad luck, I'm a white guy in his 40's who just bought a retired Ford Police Interceptor Utility (police "Ford Explorer") in February because I liked the car for technical and practical reasons, and I live in the S.F. Bay Area in the USA. I drive around with a target on my back in the current political climate, because of a few other people's poor choices. I'm up right now at 3:30am PDT because I can't sleep after getting into a row with my parents about the political climate.

I had pushed pretty much everyone I knew who was still there at Nvidia to escalate the Preempt-RT patch up in priority, and like you and numerous others, I have had success in applying the patch to a Jetson Nano, but that's as far as I got

To happier stuff...

@andypugh, the Nano uses an ARM A57, whereas the RPi 3 uses the A53 or the 4 uses the A72. The codebase may be compatible from a practical code-base sense, but it'll likely require some adaptation as libraries and dependencies are likely to vary.

To both of you, I'd recommend starting with a recent Nvidia L4T distribution, getting the P-RT patch applied (which it sounds like hobbyno1 has done), then start compiling LinuxCNC from there manually to see what if anything breaks. If you do find something that breaks, report it here and it can be worked through. There are likely some assumptions that have been made over the course of developing LinuxCNC that just by habit rather than malice are not compatible with various ARM implementations and will need to be rethought. It's just the nature of applying an existing code base to a new architecture. Since some work has been done for RaspberryPi already, I'm fairly certain that you'll find a lot of it "just works" with some tweaks to compilers/installers.

I'm willing to collaborate in this thread and help out where I can. My personal preference is to not lock it down to a specific OS image that gets flashed to a unit, but to have the LinuxCNC compilation be applicable to any suitable platform - this requires finding where build tools get "stuck".

I had gotten as far as purchasing some MESA hardware (I went to their shop in person to pick it up one lunch), but I had focussed on the RPi platform first. Got motion control running before the ground came out from under me last year. I was in the process of looking at adding a bunch of HW-level logic into the FPGA front-end of the MESA to do serial BISS absolute encoder correlation to A/B/Z encoder inputs, and to take a serial SpaceMouse Module as a 6-DOF jog-wheel... I had also been poking at Gecko about a closed-loop stepper/encoder version of their GR214V so that I could do 10000steps/per rev direct-drive into a "zero backlash" planetary roller-screw movement on the Bridgeport table. I was chasing 1uM per step.

Full disclosure before the next part (I think I've done this before), I worked at Nvidia for about 8 years in the Desktop Chip Solutions HW group (consumer video cards division) until a few years back. In my opinion, Nvidia has been doing an okay job getting a lot of this Linux stuff figured out - though it's still the bastard child of an OS to them in a lot of cases. Most of the time and effort they expend is for large commercial contracts - as you would expect, it pays the bills. I am also of a mind that in the service of the demands of large corporate customers, they have taken a triage approach to finding and fixing shortcomings rather than a structural approach to supporting the OS itself. Best advice I can give in light of that, is if you find something that isn't working and it's an Nvidia issue - get on their support forum and start making some noise.
Last edit: 16 Jun 2020 11:10 by tim292stro. Reason: Spelling/conext

Please Log in or Create an account to join the conversation.

More
16 Jun 2020 11:04 #171827 by andypugh

@andypugh, the Nano uses an ARM A57, whereas the RPi 3 uses the A53 or the 4 uses the A72. The codebase may be compatible from a practical code-base sense, but it'll likely require some adaptation as libraries and dependencies are likely to vary.


It would only take 10 minutes to install the .deb package and see if it worked, though.

Please Log in or Create an account to join the conversation.

More
16 Jun 2020 11:09 #171829 by tim292stro
That is why I recommend hobbyno1 give it a try and report back findings. My Nano is not in a condition to even do the attempt. It has been re-tasked to a PC for one of my kids so that they could do school from home due to COVID-19.

Please Log in or Create an account to join the conversation.

More
16 Jun 2020 11:17 #171830 by andypugh

That is why I recommend hobbyno1 give it a try and report back findings.


You suggested compiling from source (which very much ought to work)
But I was suggesting installing the deb package to see what happened.
wget http://buildbot.linuxcnc.org/dists/buster/2.8-rtpreempt/binary-armhf/linuxcnc-uspace_2.8.0~pre1.5968.g69df9c1ba_armhf.deb
sudo apt-get install ./linuxcnc-uspace_2.8.0~pre1.5968.g69df9c1ba_armhf.deb

And see what happens.

Please Log in or Create an account to join the conversation.

More
16 Jun 2020 15:54 #171861 by hobbyno1
Thank you both for your replies. I saved the file as per the wget command line. When I tried sudo apt-get install it said it was selecting "linux-uspace:armhf" instead of "./linuxcnc-uspace_2.8.0~pre1.5968.g69df9c1ba_armhf.deb" and said "Some packages could not be installed. This may mean you have requested an impossible situation or if you are using the unstable distribution that some packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies." It the lists about 50 dependencies of linux-uspace:armhf, just about each of which it states is not installable.
I can post the terminal o/p if that helps, but it's long.
On the other hand, if I were to compile it from source, I would appreciate any pointers as to how to start that process.
thx

Please Log in or Create an account to join the conversation.

More
16 Jun 2020 20:33 #171877 by andypugh

On the other hand, if I were to compile it from source, I would appreciate any pointers as to how to start that process.
thx


You would need to satisfy the same dependencies to compile, so it might be useful to see the list.

Please Log in or Create an account to join the conversation.

More
17 Jun 2020 00:22 #171889 by hobbyno1
Hi andypugh,
thanks for taking a look at this.

user1@computer1:~$ uname -a
Linux computer1 4.9.140-rt93 #1 SMP PREEMPT RT Fri Jun 12 17:19:01 IST 2020 aarch64 aarch64 aarch64 GNU/Linux
user1@computer1:~$ wget buildbot.linuxcnc.org/dists/buster/2.8-r...g69df9c1ba_armhf.deb
--2020-06-16 16:14:28-- buildbot.linuxcnc.org/dists/buster/2.8-r...g69df9c1ba_armhf.deb
Resolving buildbot.linuxcnc.org (buildbot.linuxcnc.org)... 71.218.138.100
Connecting to buildbot.linuxcnc.org (buildbot.linuxcnc.org)|71.218.138.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10658176 (10M) [application/x-debian-package]
Saving to: ‘linuxcnc-uspace_2.8.0~pre1.5968.g69df9c1ba_armhf.deb’

linuxcnc-uspace_2.8 100%[===================>] 10.16M 948KB/s in 11s

2020-06-16 16:14:40 (946 KB/s) - ‘linuxcnc-uspace_2.8.0~pre1.5968.g69df9c1ba_armhf.deb’ saved [10658176/10658176]

user1@computer1:~$ sudo apt-get install ./linuxcnc-uspace_2.8.0~pre1.5968.g69df9c1ba_armhf.deb
[sudo] password for user1:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linuxcnc-uspace:armhf' instead of './linuxcnc-uspace_2.8.0~pre1.5968.g69df9c1ba_armhf.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
linuxcnc-uspace:armhf : Depends: libatk1.0-0:armhf (>= 1.12.4) but it is not installable
Depends: libboost-python1.67.0:armhf but it is not installable
Depends: libc6:armhf (>= 2.28) but it is not installable
Depends: libcairo2:armhf (>= 1.2.4) but it is not installable
Depends: libfontconfig1:armhf (>= 2.12.6) but it is not installable
Depends: libfreetype6:armhf (>= 2.2.1) but it is not installable
Depends: libgcc1:armhf (>= 1:3.5) but it is not installable
Depends: libgdk-pixbuf2.0-0:armhf (>= 2.22.0) but it is not installable
Depends: libgl1:armhf but it is not installable
Depends: libglib2.0-0:armhf (>= 2.16.0) but it is not installable
Depends: libglu1-mesa:armhf but it is not installable or
libglu1:armhf but it is not installable
Depends: libgtk2.0-0:armhf (>= 2.8.0) but it is not installable
Depends: libmodbus5:armhf (>= 3.1.4) but it is not installable
Depends: libpango-1.0-0:armhf (>= 1.14.0) but it is not installable
Depends: libpangocairo-1.0-0:armhf (>= 1.14.0) but it is not installable
Depends: libpangoft2-1.0-0:armhf (>= 1.14.0) but it is not installable
Depends: libpython2.7:armhf (>= 2.7) but it is not installable
Depends: libreadline5:armhf (>= 5.2) but it is not installable
Depends: libstdc++6:armhf (>= 5.2) but it is not installable
Depends: libtk8.6:armhf (>= 8.6.0) but it is not installable
Depends: libudev1:armhf (>= 183) but it is not installable
Depends: libusb-1.0-0:armhf (>= 2:1.0.22) but it is not installable
Depends: libx11-6:armhf but it is not installable
Depends: libxext6:armhf but it is not installable
Depends: libxft2:armhf (> 2.1.1) but it is not installable
Depends: libxinerama1:armhf but it is not installable
Depends: libxmu6:armhf but it is not installable
Depends: libxss1:armhf but it is not installable
Depends: zlib1g:armhf (>= 1:1.1.4) but it is not installable
Depends: libudev-dev:armhf but it is not installable
Depends: bwidget:armhf (>= 1.7) but it is not installable
Depends: libtk-img:armhf (>= 1.13) but it is not installable
Depends: python:armhf (>= 2.7) but it is not installable
Depends: python:armhf (< 2.8) but it is not installable
Depends: python2.7-tk:armhf but it is not installable
Depends: python2.7-glade2:armhf but it is not installable or
python-glade2:armhf but it is not installable
Depends: python2.7-numpy:armhf but it is not installable or
python-numpy:armhf but it is not installable
Depends: python2.7-imaging:armhf but it is not installable or
python-imaging:armhf but it is not installable or
python-pil:armhf but it is not installable
Depends: python2.7-imaging-tk:armhf but it is not installable or
python-imaging-tk:armhf but it is not installable or
python-pil.imagetk:armhf but it is not installable
Depends: python-gtksourceview2:armhf but it is not installable
Depends: python-vte:armhf but it is not installable or
gir1.2-vte-2.91:armhf but it is not installable
Depends: python-gst-1.0:armhf but it is not installable
Depends: gstreamer1.0-plugins-base:armhf but it is not installable
Depends: python-xlib:armhf but it is not installable
Depends: python-gtkglext1:armhf but it is not installable
Depends: python-configobj:armhf but it is not installable
Depends: tclreadline:armhf but it is not installable
Depends: tclx:armhf but it is not installable
Depends: mesa-utils:armhf but it is not installable
Depends: blt:armhf but it is not installable
Recommends: linuxcnc-doc-en:armhf but it is not installable or
linuxcnc-doc:armhf but it is not installable
Recommends: hostmot2-firmware-all:armhf but it is not installable
E: Unable to correct problems, you have held broken packages.

Please Log in or Create an account to join the conversation.

More
17 Jun 2020 00:32 #171890 by andypugh
That is quite a list.

Do any of them exist in the package manager? Which Linux version are you running?

Please Log in or Create an account to join the conversation.

More
17 Jun 2020 09:52 #171898 by Cerna
Well, and have you tried adding the foreign architecture to your installation? Armhf sould be compatible with aarch64.

From Linux headers 4.9 it looks like you are using a Stretch. Any chance to upgrade to Buster? (Multi-Arch has better support on Buster. [But Stretch is OK too.])

Please Log in or Create an account to join the conversation.

More
17 Jun 2020 11:55 #171901 by hobbyno1
I ran a dpkg -s query and about half are not installed, see below. It is Unbuntu 18.04.3LTS

user1@computer1:~$ dpkg -s Libatk1.0-0 libboost-python1.67.0 libc6 libcairo2 libfontconfig1 libfreetype6 libgcc1 libgdk-pixbuf2.0-0 libgl1 libglib2.0-0 libglu1-mesa libglu1 libgtk2.0-0 libmodbus5 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpython2.7 libreadline5 libstdc++6 libtk8.6 libudev1 libusb-1.0-0 libx11-6 libxext6 libxft2 libxinerama1 libxmu6 libxss1 zlib1g libudev-dev bwidget libtk-img python python python2.7-tk python2.7-glade2 python-glade2 python2.7-numpy python-numpy python2.7-imaging python-imaging python-pil python2.7-imaging-tk python-imaging-tk python-pil.imagetk python-gtksourceview2 python-vte gir1.2-vte-2.91 python-gst-1.0 gstreamer1.0-plugins-base python-xlib python-gtkglext1 python-configobj tclreadline tclx mesa-utils blt linuxcnc-doc-en linuxcnc-doc hostmot2-firmware-all 1> installed.txt
dpkg-query: package 'libboost-python1.67.0' is not installed and no information is available
dpkg-query: package 'libglu1' is not installed and no information is available
dpkg-query: package 'libmodbus5' is not installed and no information is available
dpkg-query: package 'libreadline5' is not installed and no information is available
dpkg-query: package 'libtk8.6' is not installed and no information is available
dpkg-query: package 'libudev-dev' is not installed and no information is available
dpkg-query: package 'bwidget' is not installed and no information is available
dpkg-query: package 'libtk-img' is not installed and no information is available
dpkg-query: package 'python2.7-tk' is not installed and no information is available
dpkg-query: package 'python2.7-glade2' is not installed and no information is available
dpkg-query: package 'python-glade2' is not installed and no information is available
dpkg-query: package 'python2.7-numpy' is not installed and no information is available
dpkg-query: package 'python-numpy' is not installed and no information is available
dpkg-query: package 'python2.7-imaging' is not installed and no information is available
dpkg-query: package 'python-imaging' is not installed and no information is available
dpkg-query: package 'python-pil' is not installed and no information is available
dpkg-query: package 'python2.7-imaging-tk' is not installed and no information is available
dpkg-query: package 'python-imaging-tk' is not installed and no information is available
dpkg-query: package 'python-pil.imagetk' is not installed and no information is available
dpkg-query: package 'python-gtksourceview2' is not installed and no information is available
dpkg-query: package 'python-vte' is not installed and no information is available
dpkg-query: package 'python-gst-1.0' is not installed and no information is available
dpkg-query: package 'python-xlib' is not installed and no information is available
dpkg-query: package 'python-gtkglext1' is not installed and no information is available
dpkg-query: package 'python-configobj' is not installed and no information is available
dpkg-query: package 'tclreadline' is not installed and no information is available
dpkg-query: package 'tclx' is not installed and no information is available
dpkg-query: package 'mesa-utils' is not installed and no information is available
dpkg-query: package 'blt' is not installed and no information is available
dpkg-query: package 'linuxcnc-doc-en' is not installed and no information is available
dpkg-query: package 'linuxcnc-doc' is not installed and no information is available
dpkg-query: package 'hostmot2-firmware-all' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

user1@computer1:~$ hostnamectl
Static hostname: computer1
Icon name:
Machine ID:
Boot ID:
Operating System: Ubuntu 18.04.3 LTS
Kernel: Linux 4.9.140-rt93
Architecture: arm64
user1@computer1:~$

Please Log in or Create an account to join the conversation.

Time to create page: 0.437 seconds
Powered by Kunena Forum