A Linuxcnc configuration using the Panther cape (Necitec). Since this configuration relys on a new(er than Necitec's supported) Machinekit/Debian version, this notes also leave some hints on how to install the Debian image and compile Machinekit on the BBB.
Usage: Checkout the reposigory and start machinekit with the correct arguments, i.e.:
machinekit@beaglebone:~$ machinekit <repository-clone>/machinekit/configs/ARM.BeagleBone.Panther/Panther-3-axis.ini
For creating a bare debian image follow this steps.
Flash the eMMC contents back to the micro-SD card Insert a micro-SD into your BBB and run:
sudo /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh
Use/modify this uEnv.txt template.
install and setup machinekit-deban-stretch image
setup lightdm/xfce
setup autologin
Setup the Necitec Panther cape: The Panther overlay must be copied from the necitec provided image to our debian image on the BBB, otherwise this will fail. Optional use this files, or the compile and install script.
Manula way:
# optionally compile the source
sudo dtc -O dtb -o /lib/firmware/panther-00A0.dtbo -b 0 -@ /home/machinekit/machinekit/configs/ARM.BeagleBone.Panther/panther-00A0.dts
# copy the compiled file to the debian
/lib/firmware/panther-00A0.dtbo
# optionally add the overlay to /boot/uEnv.txt
uboot_overlay_addr4=/lib/firmware/panther-00A0.dtbo
compile on BBB as far as possible (Machinekit Developer Howto)
install prerequisites
configure
make
run machinekit
Since the compiling process requires more RAM memory as provided by the BBB, it cannot be completed using the BBB only. In this case we mount the build folder from the BBB via sshfs to a changeroot on a diffrerent machine.
This rules fail to compile on bbb:
make objects/emc/task/emctask.o
make objects/machinetalk/lib/mk_service.o
make objects/emc/task/emctaskmain.o
make objects/emc/task/taskmodule.o
objects/emc/task/taskclass.o
make and so on and so forth...
Note: An alternative is to swap on MicroSD (if available), which works fine.
The basic steps in a nutshell:
compile on BBB as far as possible (Machinekit Developer Howto)
install prerequisites
configure
make
compile the rest in a changeroot
download debian ARM image and changeroot as described in this repository
install prerequisites as done above
mount the BBB build folder to your changeroot
compile the rest
return to your BBB and run machinekit
on beaglebone black
clone repository
machinekit@beaglebone:~$ mkdir ~/git
machinekit@beaglebone:~/git$ cd ~/git
machinekit@beaglebone:~/git$ git clone https://github.com/machinekit/machinekit.git
Compile linuxcnc on BBB as far as possible, which means until the compiler crashes due to out of memory.
on a different machine
Download and prepare the changeroot as described here.
user@host:~/bone-debian-8.7-machinekit-armhf-chroot$ sshfs machinekit@<machinekit-ip>:~/<build-folder> ./home/machinekit/<build-folder>
root@host:~/bone-debian-8.7-machinekit-armhf-chroot$ sudo chroot <path-to-your-chroot> /bin/bash
root@host:/$ su - machinekit
(chroot)machinekit@host:~$ cd <build-folder>
(chroot)machinekit@host:~/git/machinekit$ make
Return to your BBB and proceed further as described in the Machinekit Developer Howto.