RPI4 Raspbian 64 bit & LinuxCNC

More
15 Jul 2023 22:19 #275547 by rodw

This is now superceded as its in the 2.9 documents now.
Please refer to this link instead. linuxcnc.org/docs/2.9/html/getting-start...etting-linuxcnc.html

Following this recipe I have LinuxCNC running on a Pi.
However, this install does not appear to have access to the GPIO.

On Raspbian there is a file /dev/gpiomem but that isn't created on a normal Bookworm installation.

The hal_pi_gpio module uses this to access the gpio, and won't load without it.

Andy as you noted in the GitHub issue, the solution is to use gpiod and rewrite Linuxcnc to use it. In fact it probably should have been used with Linuxcnc 2.8 as the addition of gpiod to the kernel was done before the release of Debuan Buster.

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

More
15 Jul 2023 23:23 #275548 by andypugh

I have a problem with a new pi4b.
hal_pi_gpio refuses to load. It states Revision 7 is not supported.
Is there a solution for this?


Yes, but I don't know how to get the fix to you, unless you can build LinuxCNC from source?

If you can, then check out the andypugh/hal_pi_gpio branch and compile it. (I am working on it right now, currently adding missing docs)
The following user(s) said Thank You: elovalvo, itsme

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

More
16 Jul 2023 00:02 #275550 by rodw

If you can, then check out the andypugh/hal_pi_gpio branch and compile it. (I am working on it right now, currently adding missing docs)

Andy, I think your branch is on the wrong track. I don't think you should be parsing config files
Instead you should be using the gpiod.h API functions.
git.kernel.org/pub/scm/libs/libgpiod/lib...tree/include/gpiod.h

there are some examples here.
git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/examples

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

More
16 Jul 2023 00:09 #275552 by andypugh
Currently the fix is simply replacing the broken cpuinfo.c file with something more future-proof. This is likely to still be needed.

Yes, maybe someone should re-write the entire driver but there is no guarantee that gpiod is fast enough, and it's a bigger job than the simple bug-fix that I picked up from the issues list.

It would also be good to pick up the "reset" fixes that were posted here a while back too.

But, first, lets just make it work on the current Pi models then look at major re-writes later.
The following user(s) said Thank You: elovalvo, rodw, itsme

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

More
16 Jul 2023 15:19 - 16 Jul 2023 15:21 #275573 by elovalvo

I have a problem with a new pi4b.
hal_pi_gpio refuses to load. It states Revision 7 is not supported.
Is there a solution for this?


forum.linuxcnc.org/24-hal-components/495...by-hal-pi-gio#275572
Last edit: 16 Jul 2023 15:21 by elovalvo.

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

More
16 Jul 2023 15:39 #275574 by elovalvo

Some additional information:

I installed xrdp on the RPi.
The ifconfig terminal command outputs 3 sections; etho, lo and wlan0.
The eth0 section contains this line:

inet 192.168.0.111 netmask 255.255.255.0 broadcast 192.168.0.255

On my Windows machine I opened the Remote Desktop application, entered “192.168.0.111” in the PC name field, with username linuxcnc and password cnc.

But when I connect I only see a blue greenish empty screen.
After a couple of minutes it shows a "Connection Log" (first photo), when I click the Ok button it opens the "Login to raspberrypi" window (second photo), but entering my username/password brings me back to the empty screen for a couple of minutes, until the  "Connection Log" window appears again.

 


Rather than using the Windows Remote Desktop, I prefer to use MobaXterm
mobaxterm.mobatek.net/

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

More
16 Jul 2023 16:35 #275581 by itsme

I have a problem with a new pi4b.
hal_pi_gpio refuses to load. It states Revision 7 is not supported.
Is there a solution for this?

forum.linuxcnc.org/24-hal-components/495...by-hal-pi-gio#275572

I was able to resolve the issue with a workaround proposed by elovalvo in the other topic...

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

More
12 Aug 2023 21:58 - 12 Aug 2023 21:58 #277759 by techroo
Hiya all,
Im trying to modify a small milling machine to CNC using LinuxCnc and Rtelligent EtherCat Closed loop stepper drivers.
New to Linux and i am finding it out the hard way trying to get ethercat to work on my raspi 4B.

I tried following the Installation notes by Hakan ( forum.linuxcnc.org/ethercat/42048-notes-...at-on-raspberry-pi-4) but version 2.8.1 does not boot with the "start4.elf is not compatible. This board requires newer software" error.

It then tried the 2.9.0 image posted by elovalvo on page 16 of this thread. This one booted no problem.

The problem is the dkms_build failing and me not knowing what exactly goes wong.

If there is anyone who can spare an image of 2.9.0 with ethercat installed im really interested.
Last edit: 12 Aug 2023 21:58 by techroo.

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

More
13 Aug 2023 01:38 #277788 by rodw
Ok, so much has changed but the good thing is you have Linuxcnc installed on Bullseye.
There is an ethercat Deb for that
Can you follow these instructions I did here
forum.linuxcnc.org/ethercat/45336-etherc...step-by-step?start=0
Where I said Create an ethercat sources file can you change Debian_12 to Raspbian_11

Everything else should work.
Note this method has only been updated on 10 August (3 days ago) following final release of Deb files by the iGh EtherCAT team to their mainline repositories. Using it to run on a Pi is untested but from what I see, it should work.
Please report back on the thread I linked to with your feedback. Once its confirmed working, I will update the instructions.
Note in the instructions, there is a link to my git repo with a xml file for the rtelligent stepper drives you can use. There is also a hal file too.

Note that ethercat is very advanced and adds an order of complexity to a Linuxcnc config. Then to add a raspberry Pi into the mix adds a whole new level of complexity and likely disappointment into the mix.

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

More
13 Aug 2023 11:46 #277815 by techroo
Thank you for the quick response.

I am beginning to see the complexity of trying to use a pi and ethercat together.

I am running into trouble with the Raspbian_11 repositories only containing the armhf packages, not the arm64 ones. Debian_12 does have these but runs into libc6 version dependency issues.

I added deb debian12 repo to try and grab compatible versions but run into more dependency issues.

For now i will do my install on a spare PC.

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

Time to create page: 0.218 seconds
Powered by Kunena Forum