Friday, June 14, 2013

Machinekit Image Available

See the MachineKit page for the latest version and updates!

After spending some time struggling with the new Linux 3.8 kernel and device tree overlays, I now have a Linux 3.8 build working as well as the 3.2 build.  Even better, I spent quite a bit of time setting up automated builds, and can now generate a customized Debian install that runs LinuxCNC "out of the box".

The images are named "machinekit", and they are built from scratch using a modified version of Robert C Nelson's omap-image-builder scripts.  If you don't want to pull the build scripts and make your own image (warning: it takes quite a while), you can just download the pre-built image.  Since my images are just tweaked versions of the rcn Debian release, the instructions on apply.  For the impatient or link challenged:

tar xJf debian-7.0.0-machinekit-armhf-2013-06-14.tar.xz
cd debian-7.0.0-machinekit-armhf-2013-06-14
sudo ./ --mmc /dev/sdX --uboot bone_dtb

Username: linuxcnc
Password: linuxcnc

md5sum debian-7.0.0-machinekit-armhf-2013-06-14.tar.xz
305aeda1edd4637ea4b284f9e982fdb9  debian-7.0.0-machinekit-armhf-2013-06-14.tar.xz

When you first boot the image, be patient.  It regenerates ssh host keys on the first boot and it will take a moment to become visible via ssh.  Ideally, you should monitor for progress and errors via the serial port.

Once the image has booted, login via ssh with X11 forwarding enabled, or set an appropriate DISPLAY environment variable (pointing to an open remote X server) and run linuxcnc.  Select the BeagleBone -> BeBoPr configuration, and follow along with the video if you are unfamiliar with the LinuxCNC Axis interface.  If you don't have a BeBoPr board, you can still watch the step/dir lines toggle on an oscilloscope.

WARNING: While I have an analog input working and reading the thermistor, the temperature control logic is extremely crude.  I do NOT recommend connecting your hot-end heater and trying to print unless you REALLY know what you are doing and are prepared to manually disconnect your hot-end if something goes wrong.  Currently, the temperature logic is just trying to slave to an ADC value that is set in the BeBoPr.HAL file (but can be changed on the command line using halcmd or via a python HAL script if you know what you're doing).  I expect to get the conversion to actual temperature and the various temperature M1xx codes working before long...stay tuned.

Close up of the BeagleBone Black / Linux 3.8 print from the video:


  1. When booting this image, I see an endless stream of "C" on the serial port (it's been more than 10 minutes). I can't imagine it's doing useful stuff, when the eMMC boots it goes quick and I don't see any strangeness. Any thoughts?


    1. I have seen that, typically when booting without an SD card on the White or otherwise messing things up (I seem to have a habit of accidentally pressing the SD card so it pops partially out of the socket). Make sure the SD card is fully seated and press the reset button. If that doesn't work, verify the FAT partition is properly formatted and you can see the uboot files (MLO and uEnv.txt).

  2. errrmm...just a nitpick...that "cd debian-7.0.0-machinekit-armhf-2013-06-14.tar.xz" should be "cd debian-7.0.0-machinekit-armhf-2013-06-14"