hzeller / beagleg

G-code interpreter and stepmotor controller for crazy fast coordinated moves of up to 8 steppers. Uses the Programmable Realtime Unit (PRU) of the Beaglebone.
http://beagleg.org/
GNU General Public License v3.0
122 stars 51 forks source link

'/sys/devices/bone_capemgr.*/slots': No such file or directory #48

Open monomente opened 2 years ago

monomente commented 2 years ago

I am trying to get started with the CRAMPS tree overlay. My kernel version from /boot/uEnv.txt is uname_r=4.19.94-ti-r42

When I run sudo./start-devicetree-overlay.sh CRAMPS/BeagleG-CRAMPS.dts I get the following output:

`make: 'CRAMPS/BeagleG-CRAMPS-00A0.dtbo' is up to date.

Adding BeagleG-CRAMPS overlay
./start-devicetree-overlay.sh: line 69: /sys/devices/bone_capemgr.*/slots: No such file or directory
cat: '/sys/devices/bone_capemgr.*/slots': No such file or directory`

It seems that the bone_capemgr directory is no longer present. It seems that for newer kernel versions the we might not compile and load the device tree overlays in this way. I will try to read more to understand how this updated process works but wondering if someone else has had this issue.

hzeller commented 2 years ago

Yes, the Beaglebone has changed these things around a little in recent years; also the software interface to the PRU needs to be adapted.

I kept the operating system version on my 'production' BeagleG CNC machines so things might be a bit 'crusty' depending on older Kernels.. In paritcular I found that at some point the whole software interface to the PRU (formly uio_pruss) just got more compilcated than needed so I didn't bother chasing the interface change.

Having said that, getting BeagleG working on a modern kernel on a Beaglebone would be highly appreciated, and we're ready to accept a pull request for that. Possibly the folks over at https://forum.beagleboard.org/ might be able to give a hand. Jason Kridner @jadonk (say hi!) might know someone who can help converting old cape definitions and PRU PRUSS interface to whatever is current today.

(Currently I am working on some more platform independent version of BeagleG that will also run on other platforms).

jadonk commented 2 years ago

Yeah, I'd love to answer a few questions to help this along!

hzeller commented 2 years ago

Thanks for chiming in Jason!

As you know, BeagleG is a few years old now, and I have it running on my home CNC machines (and soon also my laser cutter), but the kernel interfaces to the hardware changed over time and while I was waiting for things to settle, I just pinned some older version on my Beagleboards. Bringing this up to a state that it is usable for a current operating system would be the goal.

There are mostly two toplevel questions (at this point):

monomente commented 2 years ago

Thanks for your reply! Even though it is a few years old, I think BeagleG is still quite relevant in terms of what is available for open-source CNC applications. I was able to clone the repo and compile successfully, but ran into issues with the device overlay script and not understanding how to properly edit the /boot/uEnv.txt to accept the CRAMPS .dtbo file that I compile myself.

I am not using a cape at the moment. I wanted to use existing device tree overlay for use with my external DM542 NEMA23 drivers (wired via a level shifter IC). I think it could be a common use-case that people to want to use these bigger drivers for CNC, not necessarily using a cape.

I just got a copy of Derek Molloy's book on the Beaglebone as I'm pretty new to embedded linux. I think I can make some progress on getting the device tree overlay process updated, particularly if I ask on the Beaglebone forum. Not so sure on the PRU interface however or how much of the code needs to be modified.

hzeller commented 2 years ago

Yes, I have heard from people using BeagleG successfully with a Xylotex db25 cape that plugs on a Beaglebone and outputs a level-shifted signal on a DB25 connector, often used in CNC machines, but I am not sure if they still sell it. But something like that is quick to make.

hzeller commented 2 years ago

Hey @jadonk - do you know someone who can help with these questions ?

jadonk commented 2 years ago

What is your objective? Can I help you get to a newer baseline?

hzeller commented 2 years ago

Objective is to get BeagleG running on a fresh operating sytem install on a Beaglebone. It uses the UIO interface with the PRU, but these days, things are done with remoteproc. That probably needs to be converted. Also, the cape manager does seem to be different these days (see title of this issue).

So my personal objective is to get this going on a current operating system while avoiding pitfalls due to finding conflicting old and new information on the 'net by asking someone who knows the current state of the art who can guide or provide pull requests to get this to the latest state.

hzeller commented 2 years ago

So there are two parts to this

hzeller commented 2 years ago

I've ordered a CRAMPS board, so that I can test with it.

jadonk commented 2 years ago

Cool. If you want to get on the latest images, come on to the Slack (bbb.io/gsocmeet) and work with rcn-ee and myself. Also, we have a 3d printing channel that is just getting started.

hzeller commented 2 years ago

Good news:

Getting closer.