Last update of LinuxCNC Raspberry Pi4 USB does not work

More
5 years 9 months ago #195557 by pauluzs
It's been a long time since i used linuxcnc and now getting back at it while also trying a raspberry pi setup.

regarding the usb, faced the same problem on a 4 gb

This seem not to be fixed up to kernel 5.7 ( wiki.debian.org/RaspberryPi4#Raspberry_PI_4_8G )
Was wondering if anyone already tried using debian's own release from raspi.debian.net/ i
and the 5.9.15-1 rt kernel from : packages.debian.org/buster-backports/linux-image-rt-arm64

For now i'm using the raspberrypi iso from the linuxcnc site, this works as long as no updates are done.

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

More
5 years 9 months ago #195595 by andypugh
If you want to try to compile your own kernel then I recommend the repository that I am working with:

github.com/LinuxCNC/raspberrypi-linux

That is a recent clone of the main Pi repository, with the realtime patch and some tweaks for building a debian package for installing the kernel.

I have made several kernels with that repo that work for me, including with realtime and working LinuxCNC.

It might well work if you follow the instructions here: www.raspberrypi.org/documentation/linux/kernel/building.md

(As I think that the problems in the packages that I have put out might be in the packaging)

You probably need to "make menuconfig" before the the make stage, and ensure that General->preemption is set to "full preemption-RealTime" (Note, these options are not exactly that. But they are in General and about 7 options down)

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

More
5 years 9 months ago - 5 years 9 months ago #195611 by pauluzs
Have seen that repoitory only thing : Isn't the main Pi repository 32 bit?

The Pi4 is arm64 bits and i wanted to skip compiling a whole new kernel for that and rather take the shortcut.

To achive that i just download a tested (non-rt) arm64 bit image raspi.debian.net/verified/20201112_raspi_4.img.xz and flashed it to a SD:
uname -a
Linux rpi4-20201112 5.8.0-0.bpo.2-arm64 #1 SMP Debian 5.8.10-1~bpo10+1 (2020-09-26) aarch64 GNU/Linux

Then install the arm64 rt kernel:
apt-get update && apt-get upgrade
apt-get install wget
wget ftp.debian.org/debian/pool/main/l/linux-...-1~bpo10+1_arm64.deb
apt-get install ./linux-image-5.9.0-0.bpo.5-rt-arm64_5.9.15-1~bpo10+1_arm64.deb
systemctrl reboot

uname -a
Linux rpi4-20201112 5.9.0-0.bpo.5-rt-arm64 #1 SMP PREEMPT_RT Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64 GNU/Linux

Usb is working fine in this one even after apt-get update/grade,

Currently strugeling with display drivers stuck at 640 not sure if thats the kernel or hdmi>vga adapter

Could you tell some more about specific patches and settings like power-manegement locking cpu freq etc , necessary for linuxcnc?
Last edit: 5 years 9 months ago by pauluzs.

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

More
5 years 9 months ago #195657 by andypugh

pauluzs wrote: Have seen that repoitory only thing : Isn't the main Pi repository 32 bit?


The Pi repository can be compiled for any architecture (including RISC and MIPS). I compiled an arm64 kernel yesterday using it, but it won't install as even a Pi set up with a (stock) 64 bit kernel has a 32-bit userspace and rejects an arm64 kernel deb.

The Pi4 is arm64 bits and i wanted to skip compiling a whole new kernel for that and rather take the shortcut.


LinuxCNC does not really benefit from 8GB of memory. (And, as the LinuxCNC armhf image is 32 bits, couldn't use it anyway)

uname -a
Linux rpi4-20201112 5.9.0-0.bpo.5-rt-arm64 #1 SMP PREEMPT_RT Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64 GNU/Linux


Does Linuxcnc install and run (in realtime) on that system?

My understanding (possibly wrong) is that the Pi kernel has significant differences from a vanilla arm kernel, which is why we have been working with the forked Pi kernel sources.

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

More
5 years 9 months ago #195661 by pauluzs

andypugh wrote:

pauluzs wrote: Have seen that repoitory only thing : Isn't the main Pi repository 32 bit?


The Pi repository can be compiled for any architecture (including RISC and MIPS). I compiled an arm64 kernel yesterday using it, but it won't install as even a Pi set up with a (stock) 64 bit kernel has a 32-bit userspace and rejects an arm64 kernel deb.

tried that at first also with a fail, seems you need a running arm64 kernel to install the rt-kernel


The Pi4 is arm64 bits and i wanted to skip compiling a whole new kernel for that and rather take the shortcut.


LinuxCNC does not really benefit from 8GB of memory. (And, as the LinuxCNC armhf image is 32 bits, couldn't use it anyway)

uname -a
Linux rpi4-20201112 5.9.0-0.bpo.5-rt-arm64 #1 SMP PREEMPT_RT Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64 GNU/Linux


Does Linuxcnc install and run (in realtime) on that system?

yes i did manage to compile linuxcnc master from source and run it on that kernel
Haven't looked into latency that much but fixed that display problem first

Also tried to compile a new kernel with your recommended settings from menu-config but failed on dependencies
To be straight up i'm no genius at compiling new kernels so that will take some more tries




My understanding (possibly wrong) is that the Pi kernel has significant differences from a vanilla arm kernel, which is why we have been working with the forked Pi kernel sources.


These images seem to be as close to stock debian as can be with only the nessesary extra firmware, specific for the pi.

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

More
5 years 9 months ago - 5 years 9 months ago #195664 by andypugh

pauluzs wrote:

Does Linuxcnc install and run (in realtime) on that system?

yes i did manage to compile linuxcnc master from source and run it on that kernel


To be generally usable, the kernel needs to work with the LinuxCNC packages from the buildbot.

The point of making kernel and application packages is so that users don't have to compile from source.
Last edit: 5 years 9 months ago by andypugh.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum