| 1 | = Install Barrett System under Ubuntu 14.04.1 LTS with Xenomai 2.6.4 = |
| 2 | |
| 3 | == Notice - Pre-release instructions == |
| 4 | This software has not been fully tested. It is meant for use with external PC's only (not the WAM's internal PC/104). We recommend using a standard OS and Kernel that ship with Barrett's products. |
| 5 | |
| 6 | == Install kernel from Debian == |
| 7 | {{{ |
| 8 | sudo dpkg -i linux-image-3.14.17-xenomai-2.6.4.barrett_amd64.deb |
| 9 | sudo dpkg -i linux-headers-3.14.17-xenomai-2.6.4.barrett_amd64.deb |
| 10 | }}} |
| 11 | |
| 12 | Install Xenomai |
| 13 | {{{ |
| 14 | cd /usr/src |
| 15 | sudo wget http://download.gna.org/xenomai/stable/xenomai-2.6.4.tar.bz2 |
| 16 | sudo tar -xjf xenomai-2.6.4.tar.bz2 |
| 17 | sudo rm xenomai-2.6.4.tar.bz2 |
| 18 | }}} |
| 19 | |
| 20 | Some updating for GRUB |
| 21 | {{{ |
| 22 | sudo update-initramfs -c -k "3.14.17-xenomai-2.6.4" |
| 23 | }}} |
| 24 | |
| 25 | == Set up Xenomai == |
| 26 | |
| 27 | {{{ |
| 28 | sudo addgroup xenomai |
| 29 | sudo usermod -aG xenomai robot |
| 30 | }}} |
| 31 | |
| 32 | Use the following command to identify the xenomai group id number |
| 33 | {{{ |
| 34 | XENGRPNUM=$(egrep -i "^xenomai" /etc/group | cut -d':' -f 3) |
| 35 | }}} |
| 36 | |
| 37 | Add kernel option with group id |
| 38 | {{{ |
| 39 | sudo sed -i "s/quiet\ splash/quiet\ splash\ xeno_nucleus.xenomai_gid=$XENGRPNUM/" /etc/default/grub |
| 40 | }}} |
| 41 | |
| 42 | Update rc.local |
| 43 | {{{ |
| 44 | sudo sed -i '/exit\ 0/ i\/usr/xenomai/sbin/rtcanconfig\ rtcan0\ -b\ 1000000\ -c\ none\ start' /etc/rc.local |
| 45 | sudo sed -i '/exit\ 0/ i\/usr/xenomai/sbin/rtcanconfig\ rtcan1\ -b\ 1000000\ -c\ none\ start' /etc/rc.local |
| 46 | }}} |
| 47 | |
| 48 | Update your grub2 to reflect recent changes |
| 49 | {{{ |
| 50 | sudo update-grub |
| 51 | #Install Grub Customizer to graphically make our new kernel the default |
| 52 | sudo add-apt-repository ppa:danielrichter2007/grub-customizer |
| 53 | sudo apt-get update |
| 54 | sudo apt-get install grub-customizer |
| 55 | }}} |
| 56 | |
| 57 | Open the Grub 2 GUI |
| 58 | {{{ |
| 59 | echo "Please move kernel 3.14.17-xenomai-2.6.4 to the top of the list and save the configuration." |
| 60 | read -n1 -r -p "Press any key to continue..." key |
| 61 | sudo grub-customizer |
| 62 | }}} |
| 63 | |
| 64 | == Build Xenomai userspace libs == |
| 65 | |
| 66 | {{{ |
| 67 | cd /usr/src/xenomai-2.6.4 |
| 68 | sudo ./configure --enable-dlopen-skins |
| 69 | sudo make |
| 70 | sudo make install |
| 71 | sudo chgrp xenomai /dev/rtheap |
| 72 | sudo chgrp xenomai /dev/rtp* |
| 73 | }}} |
| 74 | |
| 75 | == Restart your PC to complete Xenomai Setup == |
| 76 | |
| 77 | {{{ |
| 78 | sudo shutdown -r now |
| 79 | }}} |
| 80 | |
| 81 | == Install Barrett Technology software == |
| 82 | |
| 83 | {{{ |
| 84 | sudo apt-get update |
| 85 | sudo apt-get install g++ cmake libncurses5-dev spell subversion ssh python-dev python-argparse libeigen2-dev libboost1.46 libgsl0-dev libxenomai-dev libboost-thread-dev libboost-python-dev python-visual libgtkglextmm-x11-1.2-dev git |
| 86 | |
| 87 | wget http://web.barrett.com/support/WAM_Installer/libconfig-barrett_1.4.5-1_amd64.deb |
| 88 | sudo dpkg -i libconfig-barrett_1.4.5-1_amd64.deb |
| 89 | |
| 90 | |
| 91 | #Get the latest version of libbarrett |
| 92 | git clone https://github.com/BarrettTechnology/libbarrett.git |
| 93 | cd libbarrett |
| 94 | cmake . |
| 95 | make |
| 96 | sudo make install |
| 97 | mv .bash_aliases ../ |
| 98 | cd |
| 99 | . ~/.bashrc |
| 100 | |
| 101 | sudo bash |
| 102 | echo /usr/xenomai/lib/ | cat > /etc/ld.so.conf.d/xenomai.conf |
| 103 | ldconfig |
| 104 | exit |
| 105 | |
| 106 | #Install Xenomai 2.6.4 version of btclient and bash aliases |
| 107 | git clone -b proficio_p3-svn https://git.barrett.com/software/btclient.git ~/btclient |
| 108 | cd ~/btclient |
| 109 | sh makeall |
| 110 | mv .bash_aliases ../ |
| 111 | cd |
| 112 | . ~/.bashrc |
| 113 | }}} |