LinuxCNC on Raspberry Pi 5

More
17 Nov 2023 15:25 #285747 by elovalvo
Replied by elovalvo on topic LinuxCNC on Raspberry Pi 5
For those who want to use the Raspberry Pi 5 with RaspiOS 64bit containing PREEMPT_RT, an image is available at this link: drive.google.com/file/d/16kKamxMKPdYAeJp...KLf/view?usp=sharing

On this image you can easily install a version of LinuxCNC with the installer script
www.linuxcnc.org/linuxcnc-install.sh
or by downloading the latest version 2.9.1 .deb packages from here
ftp.debian.org/debian/pool/main/l/linuxcnc/?C=M;O=D
Unfortunately, packages for bookworm and arm64 are not available at buildbot.linuxcnc.org/.

Finally you can create the latest version of LinuxCNC as reported here:
linuxcnc.org/docs/devel/html/code/building-linuxcnc.html
The following user(s) said Thank You: Calysto

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

More
17 Nov 2023 20:15 #285774 by rodw
Replied by rodw on topic LinuxCNC on Raspberry Pi 5
I reported on another thread.
Yesterday, I built a Pi5 version of the Official Linuxcnc image and shared it here
drive.google.com/file/d/1H_q0Ra-27ZDOhqu...x1f/view?usp=sharing
Upstream have included support for the pi5 but its untested due to lack hardware
Please give it a go and report back.
user = cnc 
password = cnc
run sudo menu-config to congigure wifi, locales, and user credentials
This time I added network-manager which should allow networks to be configured from the desktop

My concern here is I had to use the Raspberry 6.61 kernel to get Pi5 support but the latest RT patch is only for 6.54 so this could introduce bugs.

 

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

More
17 Nov 2023 20:46 - 17 Nov 2023 20:50 #285778 by cornholio
The patches haven't been causing any issues yet. My Pi has been on for hours at a time, compileda few kernels and did a 6 minute RIP build of Linuxcnc.
Once I sort the driver out I can run a few Configs. Sims seem to be ok.

Once I've sorted my issues out I'll test your image Rod. I'm not ignoring your efforts just need to sort things out at my end.
Last edit: 17 Nov 2023 20:50 by cornholio.
The following user(s) said Thank You: rodw

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

More
18 Nov 2023 08:46 #285802 by Calysto
Replied by Calysto on topic LinuxCNC on Raspberry Pi 5
I have a Mesa 7C80, I will test SPI. Are there certain test-commands?
My Pi5 will arrive soon. I hope the 7C80 will give enough power for it. Only 2.5A according to the manual, and there is an SSD connected to it.

And then there are the Elo Touch drivers, hope they work too....

I didn't make life easy by buying a 7C80............... but it looks cool :-)

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

More
18 Nov 2023 09:08 #285805 by cornholio
Going by my experience the Linuxcnc hm2_rpspi driver needs a rework. So far I haven't been able to get it to work. Hopefully it shouldn't be too much or require a major rewrite.

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

More
18 Nov 2023 10:06 - 18 Nov 2023 11:42 #285809 by Calysto
Replied by Calysto on topic LinuxCNC on Raspberry Pi 5
What's the difference between hm2_rpspi and hm2_spi? As far as I know I only use hm2_spi.

edit:
answer:"The hm2_rpspi HAL driver does not use /dev/spi, instead it enables and
talks to the SPI hardware directly, so it works even if the Linux kernel
doesn't know about the SPI hardware."

But why shouldn't you use the linux-kernel for talking to your mesa card? Speed?
Last edit: 18 Nov 2023 11:42 by Calysto.

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

More
18 Nov 2023 10:47 #285814 by cornholio
Neither does hm2_spi work.
alcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_spi spidev_path=/dev/spidev0.1 
probe 24000000
hm2/hm2_7i90.0: Low Level init 0.15
hm2/hm2_7i90.0: invalid IDROM PortWidth 0, this board has 24 pins per connector, aborting load
hm2/hm2_7i90.0: IDRom:
hm2/hm2_7i90.0:     IDRom Type: 0x9009374D
hm2/hm2_7i90.0:     Offset to Modules: 0x00184803
hm2/hm2_7i90.0:     Offset to Pin Description: 0x00400400
hm2/hm2_7i90.0:     Board Name: 
hm2/hm2_7i90.0:     FPGA Size: 0
hm2/hm2_7i90.0:     FPGA Pins: 0
hm2/hm2_7i90.0:     Port Width: 0
hm2/hm2_7i90.0:     IO Ports: 0
hm2/hm2_7i90.0:     IO Width: 0
hm2/hm2_7i90.0:     Clock Low: 0 Hz (0 KHz, 0 MHz)
hm2/hm2_7i90.0:     Clock High: 0 Hz (0 KHz, 0 MHz)
hm2/hm2_7i90.0:     Instance Stride 0: 0x00000000
hm2/hm2_7i90.0:     Instance Stride 1: 0x00000000
hm2/hm2_7i90.0:     Register Stride 0: 0x00000000
hm2/hm2_7i90.0:     Register Stride 1: 0x00000000
hm2_spi: rtapi_app_main: Invalid argument (-22)
<stdin>:2: waitpid failed /home/cnc/linuxcnc-dev/bin/rtapi_app hm2_spi
<stdin>:2: /home/cnc/linuxcnc-dev/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for hm2_spi failed, returned -1

I had to patch the mesaflash code to use 8 bit words to even get that to talk to a 7i90

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

More
18 Nov 2023 10:54 #285815 by cornholio
Update to forum.linuxcnc.org/9-installing-linuxcnc...pi-5?start=20#285814

patched hm2_spi to force 8 bit words and driver does load.

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

More
19 Nov 2023 18:16 #285932 by Calysto
Replied by Calysto on topic LinuxCNC on Raspberry Pi 5
Does that mean we can use a mesa-spi card together with a rpi5? Tomorrow I will try mine (7c80). The image rodw made, looks and works promising!
On a Rpi4 a could not make use of USB3 speed together with my SSD, now I can!

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

More
19 Nov 2023 21:51 #285958 by cornholio
Only by building Linuxcnc yourself and patching the code for the hm2_spi driver.
I think it’s going to be a low priority for the devs unless someone who’s name ain’t mud makes some noise about it.

So mate it looks like it’s going to be up to you.

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

Time to create page: 0.213 seconds
Powered by Kunena Forum