machinekit / machinekit-cnc

CNC stack split out into a separate package
Other
60 stars 36 forks source link

Convert setup.sh to .bbio files #31

Open ArcEye opened 6 years ago

ArcEye commented 6 years ago

Issue by machinekoder Fri Nov 3 08:20:27 2017 Originally opened as https://github.com/machinekit/machinekit/issues/1310


Description

Early configurations used custom setup.sh bash scripts to configure pin muxing on the BBB. In the meantime, the BB universal IO has been introduced.

Unfortunately, the device tree overlay format has changed since the 3.8 kernel generation and all setup.sh files need to be modified. However, I sugged converting them to .bbio files so we don't face this problem again in the future.

In most cases, this is pretty much a copy and paste job and therefore great for beginners.

Example BBIO file: https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Fabrikator-Mini-CRAMPS/CRAMPS.bbio

Example setup.sh: https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Probotix/setup.sh

There is also a graphical BBIOConfig editor

Task

Find and convert setup.sh files in https://github.com/machinekit/machinekit/tree/master/configs/ARM/BeagleBone

ArcEye commented 6 years ago

Comment by JTrantow Wed Nov 8 22:37:06 2017


setup.sh also checks for PRU files. Is this redundant with run.py calling launcher.check_installation() in which case setup.sh could be removed?

ArcEye commented 6 years ago

Comment by JTrantow Thu Nov 9 16:27:01 2017


I looked at configs/ARM/BeagleBone/Fabrikator-Mini-CRAMPS/run.py which uses launcher.load_bbio_file('cramps2_cape.bbio'). This works fine if you are launching the GUI and using run.py but what about if someone wants to run the config from the command line or desktop? setup.sh gets called from .hal no matter how the config is started.

Can launcher.load_bbio_file() get moved inside the .hal? Seems like this is where it belongs.

ArcEye commented 6 years ago

Comment by machinekoder Fri Dec 8 08:19:29 2017


@JTrantow I think that's a good idea.

The right place would be hardware.py (cramps.py) for the Python-based configs.

For HAL language files you can use loadusr config-pin -f cramp.bbio at the beginning of the file.

Let me know if it works.