/ Notes
Notes
  1  
  2  https://github.com/ShabbyX/RTAI.git
  3  master branch
  4  
  5  
  6  make a workspace:
  7  
  8      mkdir linux-rtai
  9      cd linux-rtai
 10  
 11  
 12  RTAI setup:
 13  
 14      check out the rtai git repo (https://github.com/ShabbyX/RTAI.git)
 15  
 16      add a remote for my old git repo (git@github.com:SebKuzminsky/rtai.git)
 17  
 18      make a new branch called prerelease-5 based on origin/master
 19  
 20      cherry-pick the deb stuff from my prerelease-4 branch
 21  
 22  
 23  clone the linux-stable git repo
 24  
 25      git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
 26  
 27  
 28  Create a branch in the linux tree based on the base version of the rtai patch you want to use:
 29  
 30      cd linux-stable
 31      git branch linux-3.4-rtai v3.4.53
 32      git checkout linux-3.4-rtai
 33  
 34  
 35  Apply the RTAI kernel patch:
 36  
 37      (paolo's kernel patches applied with git, memleak's apply with patch)
 38  
 39      patch -p1 < ../rtai-shabby-memleak.git/base/arch/x86/patches/hal-linux-3.4.53-x86-1.patch
 40  
 41      # git add all the new files
 42      git commit -m 'applied the rtai patch'
 43  
 44      Hey, the rtai patch is a git patch!  Where's the rtai git repo?
 45  
 46  
 47  Configure the kernel and build a deb:
 48  
 49      memleak's kernel config: rtai-shabby-memleak.git/base/arch/x86/configs/rtai_32_defconfig .config
 50  
 51      # build this kernel and make a deb
 52      # use make-kpkg, but there's also linux's "make deb-pkg"
 53      # the linux tree must be clean, and HEAD must have an annotated tag, or
 54      # the linux build system will mess up the version string:
 55      # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648535
 56  
 57      LINUX_VERSION=3.4.55
 58      DEB_VERSION=-rtai-2
 59      PACKAGE_VERSION=1
 60  
 61      git clean -fdx .
 62      cp linuxcnc-rtai-config .config
 63      git tag -m 'dummy annotation to make the version right' v${LINUX_VERSION}${DEB_VERSION}
 64      fakeroot make-kpkg --revision $PACKAGE_VERSION --append-to-version ${DEB_VERSION} --initrd -j 2 --rootcmd fakeroot --us --uc --bzimage binary
 65  
 66      "dpkg -i" all the debs except linux-firmware
 67  
 68      reboot to the new kernel
 69  
 70  
 71  build rtai:
 72  
 73      After rebooting to the new kernel, cd into the rtai repo.
 74  
 75      git clean -fdx
 76      # update debian/control
 77      # update debian/changelog (dch -v $VERSION)
 78      fakeroot debian/rules binary
 79  
 80  old obsolete note:
 81  
 82      With paolo's repo i used the ubuntu config: for linux 3.5 for x86
 83      (not x86-64).  Download the linux-image deb for the latest ubuntu
 84      version of the right kernel version from the PPA:
 85  
 86          https://launchpad.net/~canonical-kernel-team/+archive/ppa/+packages
 87  
 88      Unpack the .deb:
 89  
 90          dpkg-deb -x linux-image-3.5.0-23-generic_3.5.0-23.35_i386.deb linux-image
 91  
 92      # start with a config that's close to what you want:
 93      cp linux-image/boot/config-* linux-stable/.config
 94  
 95      make oldconfig
 96  
 97  
 98  
 99  also: 
100  
101      https://www.rtai.org/RTAICONTRIB/RTAI_Installation_Guide.pdf
102