Skip to content

Installing Machinekit

kinsamanka edited this page Aug 15, 2014 · 2 revisions

Using Pre-built Image:

  • Download the minimal raspbian image at
  • Compare the md5sum of the downloaded file:
  • Install the image by following the instructions here
  • The first boot up will be a bit slow as the ssh keys are being generated
  • The default username is pi and the password is raspberry
  • Post install
    • Configure locale

      sudo dpkg-reconfigure locales
    • Configure timezone

      sudo dpkg-reconfigure tzdata

Installing from an Existing Raspbian image:

  • Login to the running RPi

  • Import GPG keys

    sudo apt-key adv --keyserver hkp:// --recv-key 49550439
  • Add RPi Machinekit repository

    sudo sh -c 'echo "deb wheezy main' > \
  • Update

    sudo apt-get update
  • Backup old kernel and install xenomai kernel

    sudo apt-get install linux-image-xenomai
    sudo mv /boot/kernel.img /boot/kernel.img.bck
    sudo cp /boot/vmlinuz* /boot/kernel.img
  • Install machinekit

    sudo apt-get install machinekit-xenomai
  • Modify user rights

    sudo usermod -a -G xenomai,kmem <username>
  • Configure udev rules

    sudo sh -c \
    'cat >/etc/udev/rules.d/xenomai.rules<<EOF
    # allow RW access to /dev/mem
    KERNEL=="mem", MODE="0660", GROUP="kmem" 
    # real-time heap device (Xenomai:rtheap)
    KERNEL=="rtheap", MODE="0660", GROUP="xenomai"
    # real-time pipe devices (Xenomai:rtpipe)
    KERNEL=="rtp[0-9]*", MODE="0660", GROUP="xenomai"
  • Reboot

    sudo reboot
  • Test if xenomai is working

NOTE: If cpufreq is running, make sure it is set to performance mode.
You can’t perform that action at this time.