RPI4 Raspbian 64 bit & LinuxCNC
15 Aug 2020 15:38 - 18 Mar 2021 22:34 #178299
by elovalvo
RPI4 Raspbian 64 bit & LinuxCNC was created by elovalvo
Edit 18/3/2021:
NOTE: This post describes how to install a 64-bit kernel and build LinuxCNC to suit on the Pi.
If you need a 64-bit kernel then these are the right instructions.
If, however, you just want to run LinuxCNC on a Pi, then it is much simpler to follow the instructions on the download page, and run the provided 32-bit kernel and LinuxCNC. linuxcnc.org/docs/2.8/html/getting-start...tml#_normal_download
End-Edit 18/3/2021:
Install a fresh Raspbian 64 bit from this
Raspberry Pi OS (64 bit)
Following this link,
www.instructables.com/id/64bit-RT-Kernel...or-Raspberry-Pi-4B-/
it's possible obtained a Raspbian 64bit RT-Preempt kernel. .
The kernel can be also download from:
rt64-kernel.tgz
Copy this file in /tmp and install:
cd /tmp
tar xzf rt64-kernel.tgz
cd boot
sudo cp -rd * /boot/
cd ../lib
sudo cp -dr * /lib/
cd ../overlays
sudo cp -dr * /boot/overlays
cd ../broadcom
sudo cp -dr bcm* /boot/
Edit /boot/config.txt file and add following line.
kernel=kernel8.img
then reboot.
The command.
uname -a
done this:
Linux raspberrypi 5.4.51-rt32-v8 #1 SMP PREEMPT_RT Fri Aug 14 16:57:40 CEST 2020 aarch64 GNU/Linux
Building LinuxCNC:
sudo apt update
sudo apt install devscripts
sudo apt install dh-python libudev-dev tcl8.6-dev tk8.6-dev asciidoc dblatex
sudo apt install libreadline-gplv2-dev docbook-xsl dvipng ghostscript graphviz
sudo apt install groff imagemagick inkscape python-lxml source-highlight
sudo apt install texlive-extra-utils texlive-font-utils texlive-fonts-recommended
sudo apt install texlive-lang-cyrillic texlive-lang-french texlive-lang-german
sudo apt install texlive-lang-polish texlive-lang-spanish texlive-latex-recommended
sudo apt install w3c-linkchecker xsltproc python-dev python-tk libxmu-dev
sudo apt install libglu1-mesa-dev libgtk2.0-dev intltool libboost-python-dev
sudo apt install libmodbus-dev libusb-1.0-0-dev desktop-file-utils yapps2
sudo apt install python-yapps bwidget libtk-img mesa-utils tclx8.4
sudo apt install tcl-tclreadline python-configobj python-gtkglext1
sudo apt install python-xlib gstreamer0.10-plugins-base netcat
sudo apt install python-pil python-glade2 python-pil.imagetk
sudo apt install python-gst-1.0 w3c-linkchecker libxmu-dev libtirpc-dev
sudo apt install gdebi gdebi-core
git clone github.com/LinuxCNC/linuxcnc.git emc
cd emc
debian/configure uspace
dpkg-checkbuilddeps
debuild -uc -us
cd ..
The .debs file can be also download from this link:
LinuxCNC_64bit.zip
Installing LinuxCNC:
cd ~/
wget ftp.it.debian.org/debian/pool/main/p/pyg...2_2.10.1-3_arm64.deb
sudo dpkg -i python-gtksourceview2_2.10.1-3_arm64.deb
sudo apt --fix-broken install
sudo gdebi linuxcnc-uspace_2.9.0~pre0_arm64.deb
sudo gdebi linuxcnc-uspace-dev_2.9.0~pre0_arm64.deb
sudo gdebi linuxcnc-doc-en_2.9.0~pre0_all.deb
This is latency test obtained from command:
latency-histogram --nobase --sbinsize 1000 --show
NOTE: This post describes how to install a 64-bit kernel and build LinuxCNC to suit on the Pi.
If you need a 64-bit kernel then these are the right instructions.
If, however, you just want to run LinuxCNC on a Pi, then it is much simpler to follow the instructions on the download page, and run the provided 32-bit kernel and LinuxCNC. linuxcnc.org/docs/2.8/html/getting-start...tml#_normal_download
End-Edit 18/3/2021:
Install a fresh Raspbian 64 bit from this
Raspberry Pi OS (64 bit)
Following this link,
www.instructables.com/id/64bit-RT-Kernel...or-Raspberry-Pi-4B-/
it's possible obtained a Raspbian 64bit RT-Preempt kernel. .
The kernel can be also download from:
rt64-kernel.tgz
Copy this file in /tmp and install:
cd /tmp
tar xzf rt64-kernel.tgz
cd boot
sudo cp -rd * /boot/
cd ../lib
sudo cp -dr * /lib/
cd ../overlays
sudo cp -dr * /boot/overlays
cd ../broadcom
sudo cp -dr bcm* /boot/
Edit /boot/config.txt file and add following line.
kernel=kernel8.img
then reboot.
The command.
uname -a
done this:
Linux raspberrypi 5.4.51-rt32-v8 #1 SMP PREEMPT_RT Fri Aug 14 16:57:40 CEST 2020 aarch64 GNU/Linux
Building LinuxCNC:
sudo apt update
sudo apt install devscripts
sudo apt install dh-python libudev-dev tcl8.6-dev tk8.6-dev asciidoc dblatex
sudo apt install libreadline-gplv2-dev docbook-xsl dvipng ghostscript graphviz
sudo apt install groff imagemagick inkscape python-lxml source-highlight
sudo apt install texlive-extra-utils texlive-font-utils texlive-fonts-recommended
sudo apt install texlive-lang-cyrillic texlive-lang-french texlive-lang-german
sudo apt install texlive-lang-polish texlive-lang-spanish texlive-latex-recommended
sudo apt install w3c-linkchecker xsltproc python-dev python-tk libxmu-dev
sudo apt install libglu1-mesa-dev libgtk2.0-dev intltool libboost-python-dev
sudo apt install libmodbus-dev libusb-1.0-0-dev desktop-file-utils yapps2
sudo apt install python-yapps bwidget libtk-img mesa-utils tclx8.4
sudo apt install tcl-tclreadline python-configobj python-gtkglext1
sudo apt install python-xlib gstreamer0.10-plugins-base netcat
sudo apt install python-pil python-glade2 python-pil.imagetk
sudo apt install python-gst-1.0 w3c-linkchecker libxmu-dev libtirpc-dev
sudo apt install gdebi gdebi-core
git clone github.com/LinuxCNC/linuxcnc.git emc
cd emc
debian/configure uspace
dpkg-checkbuilddeps
debuild -uc -us
cd ..
The .debs file can be also download from this link:
LinuxCNC_64bit.zip
Installing LinuxCNC:
cd ~/
wget ftp.it.debian.org/debian/pool/main/p/pyg...2_2.10.1-3_arm64.deb
sudo dpkg -i python-gtksourceview2_2.10.1-3_arm64.deb
sudo apt --fix-broken install
sudo gdebi linuxcnc-uspace_2.9.0~pre0_arm64.deb
sudo gdebi linuxcnc-uspace-dev_2.9.0~pre0_arm64.deb
sudo gdebi linuxcnc-doc-en_2.9.0~pre0_all.deb
This is latency test obtained from command:
latency-histogram --nobase --sbinsize 1000 --show
Attachments:
Last edit: 18 Mar 2021 22:34 by andypugh.
Please Log in or Create an account to join the conversation.
16 Aug 2020 04:57 #178351
by phillc54
Replied by phillc54 on topic RPI4 Raspbian 64 bit & LinuxCNC
Great work, I followed your instructions and used your LinuxCNC package and it worked a treat.
I also built a Run In Place LinuxCNC 2.8 install withoput issues.
It has better latency than my old 32 bit version which also needed isolcpus=3 plus a few tweaks in cmdline.txt to get a reasonable latency. It is also much more responsive than the 32 bit version.
Thanks again.
I also built a Run In Place LinuxCNC 2.8 install withoput issues.
It has better latency than my old 32 bit version which also needed isolcpus=3 plus a few tweaks in cmdline.txt to get a reasonable latency. It is also much more responsive than the 32 bit version.
Thanks again.
The following user(s) said Thank You: elovalvo
Please Log in or Create an account to join the conversation.
16 Aug 2020 15:33 #178411
by PCW
Replied by PCW on topic RPI4 Raspbian 64 bit & LinuxCNC
That's really good latency. If its reliable long term it would allow good step
generator/encoder performance using the RPI's GPIO.
generator/encoder performance using the RPI's GPIO.
Please Log in or Create an account to join the conversation.
17 Aug 2020 00:16 #178437
by AgentWD40
Replied by AgentWD40 on topic RPI4 Raspbian 64 bit & LinuxCNC
@phillc54, is it running plasmac?
Please Log in or Create an account to join the conversation.
17 Aug 2020 01:21 - 18 Aug 2020 03:13 #178446
by phillc54
The only issue is that you cannot use LinuxCNC 2.8 as it doesn't recognise the later PREEMPT_RT kernels.This is now fixed.
Replied by phillc54 on topic RPI4 Raspbian 64 bit & LinuxCNC
I have only tried this 64bit version on a sim so far. I did run PlasmaC on the Pi4 with the 32bit version and if performed reasonably well. I run it headless using SSH. From what I have seen of the 64bit version it should perform better than before. Hopefully I will get some time this week to give it a try.@phillc54, is it running plasmac?
Last edit: 18 Aug 2020 03:13 by phillc54.
Please Log in or Create an account to join the conversation.
17 Aug 2020 13:01 #178478
by bevins
Replied by bevins on topic RPI4 Raspbian 64 bit & LinuxCNC
Can we use this to connect to a 7i92/7i76?
And do a tool change with a remap of M6? possibly?
And do a tool change with a remap of M6? possibly?
Please Log in or Create an account to join the conversation.
17 Aug 2020 23:03 #178546
by phillc54
Replied by phillc54 on topic RPI4 Raspbian 64 bit & LinuxCNC
Attachments:
Please Log in or Create an account to join the conversation.
17 Aug 2020 23:43 #178555
by bevins
Replied by bevins on topic RPI4 Raspbian 64 bit & LinuxCNC
Right off the bat I got latency issues with the standard servo thread with a pncconf config. Tried dropping it and it got worse.
Thats with 7i92/7i76 connected and running.
Thats with 7i92/7i76 connected and running.
Please Log in or Create an account to join the conversation.
18 Aug 2020 03:16 #178564
by phillc54
Replied by phillc54 on topic RPI4 Raspbian 64 bit & LinuxCNC
Attachments:
Please Log in or Create an account to join the conversation.
10 Sep 2020 00:38 #181530
by AgentWD40
Replied by AgentWD40 on topic RPI4 Raspbian 64 bit & LinuxCNC
So is that good? Can I run a 7i96 with this?
Please Log in or Create an account to join the conversation.
Time to create page: 0.265 seconds