0% found this document useful (0 votes)
105 views2 pages

Installing Machinekit Kinsamanka - PICnc-V2 Wiki GitHub

This document provides instructions for installing Machinekit on a Raspberry Pi using either a pre-built image or an existing Raspbian image. The instructions for the pre-built image involve downloading the image, installing it, and configuring locale and timezone settings. The instructions for an existing Raspbian image involve adding GPG keys, adding the Machinekit repository, updating packages, backing up and replacing the kernel, installing Machinekit and modifying user rights and udev rules, and then rebooting to test the Xenomai installation.

Uploaded by

Maruf Wahyu P
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views2 pages

Installing Machinekit Kinsamanka - PICnc-V2 Wiki GitHub

This document provides instructions for installing Machinekit on a Raspberry Pi using either a pre-built image or an existing Raspbian image. The instructions for the pre-built image involve downloading the image, installing it, and configuring locale and timezone settings. The instructions for an existing Raspbian image involve adding GPG keys, adding the Machinekit repository, updating packages, backing up and replacing the kernel, installing Machinekit and modifying user rights and udev rules, and then rebooting to test the Xenomai installation.

Uploaded by

Maruf Wahyu P
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

7/3/2018 Installing Machinekit · kinsamanka/PICnc-V2 Wiki · GitHub

kinsamanka / PICnc-V2

Dismiss
Join GitHub today
GitHub is home to over 28 million developers working together to host
and review code, manage projects, and build software together.

Sign up

Installing Machinekit
kinsamanka edited this page on Aug 15, 2014 · 2 revisions

Using Pre-built Image: Pages 7

Download the minimal raspbian image at http://0ptr.link/files/ Home


Compare the md5sum of the downloaded file: http://0ptr.link/files/MD5SUMS
Compiling HAL component
Install the image by following the instructions here
Compiling the Firmware
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 Installing Machinekit

Post install OpenOCD PIC32 Programmer

Sample configuration
Configure locale
Testing
sudo dpkg-reconfigure locales

Clone this wiki locally


Configure timezone https://github.com/kinsaman

sudo dpkg-reconfigure tzdata Clone in Desktop

Installing from an Existing Raspbian image:

Login to the running RPi

Import GPG keys

sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 49550439

Add RPi Machinekit repository

sudo sh -c 'echo "deb http://0ptr.link/raspbian wheezy main' > \


/etc/apt/sources.list.d/rpi-machinekit.list"

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

https://github.com/kinsamanka/PICnc-V2/wiki/Installing-Machinekit 1/2
7/3/2018 Installing Machinekit · kinsamanka/PICnc-V2 Wiki · GitHub

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"
EOF
'

Reboot

sudo reboot

Test if xenomai is working

latency-test

NOTE: If cpufreq is running, make sure it is set to performance mode.

https://github.com/kinsamanka/PICnc-V2/wiki/Installing-Machinekit 2/2

You might also like