| 1 | = Install Barrett System with Ubuntu 12.04.5 LTS Precise Pangolin and Xenomai 2.6.4 - __64-Bit External PC__ = |
| 2 | |
| 3 | '''Download and Install 64-bit Ubuntu 12.04.5 LTS Precise Pangolin from official image:'''[[BR]] |
| 4 | [http://releases.ubuntu.com/12.04/ubuntu-12.04.5-desktop-amd64.iso][[BR]] |
| 5 | '''With Username: ''' robot[[br]] |
| 6 | '''Password: ''' WAM[[br]] |
| 7 | All other options default. |
| 8 | |
| 9 | '''__Install your new kernel from debian__'''[[br]] |
| 10 | Log in to your new system, open a terminal, and get new kernel |
| 11 | {{{ |
| 12 | cd ~/ |
| 13 | sudo wget http://web.barrett.com/support/WAM_Installer/linux-image-3.10.32-xenomai-2.6.4.barrett_amd64.deb |
| 14 | sudo wget http://web.barrett.com/support/WAM_Installer/linux-headers-3.10.32-xenomai-2.6.4.barrett_amd64.deb |
| 15 | |
| 16 | #Install from Debian |
| 17 | sudo dpkg -i linux-image-3.10.32-xenomai-2.6.4.barrett_amd64.deb |
| 18 | sudo dpkg -i linux-headers-3.10.32-xenomai-2.6.4.barrett_amd64.deb |
| 19 | |
| 20 | #Cleanup |
| 21 | sudo rm *.barrett_amd64.deb |
| 22 | |
| 23 | #Install Xenomai |
| 24 | cd /usr/src |
| 25 | sudo wget http://download.gna.org/xenomai/stable/xenomai-2.6.4.tar.bz2 |
| 26 | sudo tar -xjf xenomai-2.6.4.tar.bz2 |
| 27 | sudo rm xenomai-2.6.4.tar.bz2 |
| 28 | |
| 29 | |
| 30 | #Some updating for GRUB |
| 31 | sudo update-initramfs -c -k "3.10.32-xenomai-2.6.4" |
| 32 | }}} |
| 33 | |
| 34 | '''__Set up Xenomai Group Permissions and GRUB 2__''' |
| 35 | {{{ |
| 36 | sudo addgroup xenomai |
| 37 | sudo usermod -aG xenomai robot |
| 38 | |
| 39 | # now use the following command to identify the xenomai group id number |
| 40 | egrep -i "^xenomai" /etc/group |
| 41 | #find the group number that corresponds to the xenomai group. Usually: 1001 - will be referred to as <gid> |
| 42 | |
| 43 | #Update rc.local |
| 44 | gksudo gedit /etc/rc.local |
| 45 | #Copy the following as the last command before exit 0 |
| 46 | /usr/xenomai/sbin/rtcanconfig rtcan0 -b 1000000 -c none start |
| 47 | /usr/xenomai/sbin/rtcanconfig rtcan1 -b 1000000 -c none start |
| 48 | #Save and close the updated file |
| 49 | |
| 50 | # Open the Grub2 file for editing |
| 51 | gksudo gedit /etc/default/grub |
| 52 | |
| 53 | # Find the line of text that looks similar to below. |
| 54 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" |
| 55 | |
| 56 | # Add the kernel option "xeno_nucleus.xenomai_gid=<gid>". Make sure the use the correct groud id number! |
| 57 | # The modified entry should look similar to: |
| 58 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xeno_nucleus.xenomai_gid=1001" |
| 59 | |
| 60 | # Save and close the updated menu file |
| 61 | |
| 62 | # Update your grub2 to reflect recent changes |
| 63 | sudo update-grub |
| 64 | #Install Grub Customizer to graphically make our new kernel the default |
| 65 | sudo add-apt-repository ppa:danielrichter2007/grub-customizer |
| 66 | sudo apt-get update |
| 67 | sudo apt-get install grub-customizer |
| 68 | |
| 69 | #Open the Grub 2 GUI |
| 70 | grub-customizer |
| 71 | |
| 72 | #Click on entry Ubuntu, with Linux 3.2.32-xenomai-2.6.4 |
| 73 | #Use the up arrow to move the entry as high as possible |
| 74 | #Save and Exit |
| 75 | |
| 76 | }}} |
| 77 | |
| 78 | '''__Build the Xenomai userspace libs__''' |
| 79 | {{{ |
| 80 | cd /usr/src/xenomai-2.6.4 |
| 81 | sudo ./configure --enable-dlopen-skins |
| 82 | sudo make |
| 83 | sudo make install |
| 84 | sudo chgrp xenomai /dev/rtheap |
| 85 | sudo chgrp xenomai /dev/rtp* |
| 86 | }}} |
| 87 | |
| 88 | '''__Restart and Boot Your New RT Kernel__''' |
| 89 | {{{ |
| 90 | sudo shutdown -r now |
| 91 | }}} |
| 92 | |
| 93 | '''__Install Barrett Technology Software__''' |
| 94 | {{{ |
| 95 | sudo apt-get update |
| 96 | sudo apt-get install g++ cmake libncurses5-dev spell subversion ssh python-dev python-argparse libeigen2-dev libboost1.46-all-dev libgsl0-dev libxenomai-dev libboost-thread-dev libboost-python-dev |
| 97 | |
| 98 | sudo apt-get install python-visual |
| 99 | sudo apt-get install libgtkglextmm-x11-1.2-dev |
| 100 | sudo apt-get install git |
| 101 | |
| 102 | wget http://web.barrett.com/support/WAM_Installer/libconfig-barrett_1.4.5-1_amd64.deb |
| 103 | sudo dpkg -i libconfig-barrett_1.4.5-1_amd64.deb |
| 104 | |
| 105 | #Get the latest version of libbarrett |
| 106 | git clone https://github.com/BarrettTechnology/libbarrett.git |
| 107 | cd libbarrett |
| 108 | cmake . |
| 109 | make |
| 110 | sudo make install |
| 111 | mv .bash_aliases ../ |
| 112 | cd |
| 113 | . ~/.bashrc |
| 114 | |
| 115 | sudo bash |
| 116 | echo /usr/xenomai/lib/ | cat > /etc/ld.so.conf.d/xenomai.conf |
| 117 | ldconfig |
| 118 | exit |
| 119 | |
| 120 | #Install btclient |
| 121 | svn co http://web.barrett.com/svn/btclient/trunk ~/btclient |
| 122 | cd ~/btclient |
| 123 | wget http://web.barrett.com/support/WAM_Installer/config-xeno.mk |
| 124 | mv config-xeno.mk config.mk |
| 125 | sh makeall |
| 126 | |
| 127 | }}} |