[Home]BuildingUbuntuPackages

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

These instructions are mostly of historical interest. They describe building emc 2.0.x on the old version of ubuntu.

Rebuilding emc2 and emc2-axis debs

 $ sudo apt-get install emc2
[reboot to the 2.6.12-magma kernel if you're not running it already]
 $ sudo apt-get build-dep emc2 emc2-axis
 $ fakeroot apt-get -b source emc2 emc2-axis

Rebuilding emc2 and emc2-axis debs in pbuilder

Recently, attempting to build these packages in a 'pbuilder' chroot showed several problems. First, some dependencies were missing (e.g., rtai-modules-2.6.12-magma for emc2, and python2.4-tk and emc2 for emc2-axis). Additionally, the linux-image-2.6.12-magma package won't install in the pbuilder chroot unless the hook [D99kernel-img.conf] is used, and the actual running kernel must also be linux-image-2.6.12-magma. Patches to fix any of these problems are happily accepted.

Create the chroot like this (split across two lines for clarity):

 $ sudo pbuilder create --mirror http://us.archive.ubuntu.com/ubuntu --distribution breezy \
--othermirror "deb http://www.linuxcnc.org/emc2/ breezy emc2"

Get the emc2 and emc2-axis source like this:

 $ apt-get source emc2 emc2-axis

Run pbuilder:

 $  sudo pbuilder build --hookdir /home/jepler/pbuild-hook/ emc2_2.0.0.dsc 
(you'll need to modify the --hookdir value to match your system)

Rebuilding linux-image-2.6.12-magma and rtai-modules-2.6.12-magma

From: Chris Radek <chris@timeguy.com>
Subject: instructions for kernel/rtai build

I started these instructions a while back; I think they still reflect what I did to build kernel and rtai. I have no idea whether they're the "right" debian way. I think any hacked scripts make it into the src debs, but I haven't tested extensively. Especially suspicious are changes I've made to /usr/share/kernel-package, but those are mostly to silence scary warnings during kernel updates that I determined were not necessary (because I didn't change the list of modules). For the make-kpkg invocations --revision might not be necessary (I think it can get it from the changelog).

It's impossible to build a kernel right the first time. It's worth your time to install and configure ccache right now.

install and untar linux-source, patch it as required install and untar rtai-source (/usr/src/modules/rtai-3.3)

set in your environment:

 export CC=gcc-3.4
 export CXX=g++-3.4
 export CPP='gcc-3.4 -E'
 export CXXCPP='g++-3.4 -E'
 export MAKEFLAGS='CC=gcc-3.4 CXX=g++-3.4'
 export CONCURRENCY_LEVEL=3

check /etc/kernel-pkg.conf

use dch to edit /usr/share/kernel-package/changelog if necessary

check /usr/share/kernel-package/image.[post|pre]inst

 cd /usr/src/linux-source-2.6.12-magma
 cp /boot/config-2.6.12-magma .config
edit EXTRAVERSION in the Makefile
 make oldconfig
 make-kpkg clean
 make-kpkg --initrd --revision=xxxxx --stem=linux binary

install the resulting linux-headers package; rtai modules are built using it. this is important because we want users to be able to build realtime modules (emc) without requiring the full kernel source.

 cd /usr/src/modules/rtai-3.3
use dch to edit debian/changelog if necessary
 cp /usr/realtime-2.6.12-magma/share/rtai/config-rtai-3.3 .rtai_config
 make clean
 cd /usr/src/linux-headers-2.6.12-magma
 make-kpkg --initrd --revision=xxxxx --stem=linux modules_image

Preparing pbuilder on hardy

 $ sudo pbuilder --create --othermirror 'deb http://linuxcnc.org/hardy hardy base emc2.2' --components "main universe"

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited June 21, 2009 1:44 pm by JeffEpler (diff)
Search:
Published under a Creative Commons License