| | 1 | = Install Barrett System with Ubuntu 12.04 LTS Precise Pangolin and Xenomai 2.6.1 - __64-Bit External PC__ = |
| | 2 | |
| | 3 | '''Download and Install 64-bit Ubuntu 12.04 LTS Precise Pangolin from official image:'''[[BR]] |
| | 4 | [http://releases.ubuntu.com/precise/ubuntu-12.04-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.2.21-xenomai-2.6.1.barrett_amd64.deb |
| | 14 | sudo wget http://web.barrett.com/support/WAM_Installer/linux-headers-3.2.21-xenomai-2.6.1.barrett_amd64.deb |
| | 15 | |
| | 16 | #Install from Debian |
| | 17 | sudo dpkg -i linux-image-3.2.21-xenomai-2.6.1.barrett_amd64.deb |
| | 18 | sudo dpkg -i linux-headers-3.2.21-xenomai-2.6.1.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.1.tar.bz2 |
| | 26 | sudo tar -xjf xenomai-2.6.1.tar.bz2 |
| | 27 | sudo rm xenomai-2.6.1.tar.bz2 |
| | 28 | |
| | 29 | |
| | 30 | #Some updating for GRUB |
| | 31 | sudo update-initramfs -c -k "3.2.21-xenomai-2.6.1" |
| | 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 | sudo 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 | #Save and close the updated file |
| | 48 | |
| | 49 | # Open the Grub2 file for editing |
| | 50 | sudo gedit /etc/default/grub |
| | 51 | |
| | 52 | # Find the line of text that looks similar to below. |
| | 53 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" |
| | 54 | |
| | 55 | # Add the kernel option "xeno_nucleus.xenomai_gid=<gid>". Make sure the use the correct groud id number! |
| | 56 | # The modified entry should look similar to: |
| | 57 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xeno_nucleus.xenomai_gid=1001" |
| | 58 | |
| | 59 | # Save and close the updated menu file |
| | 60 | |
| | 61 | # Update your grub2 to reflect recent changes |
| | 62 | sudo update-grub |
| | 63 | #Install Grub Customizer to graphically make our new kernel the default |
| | 64 | sudo add-apt-repository ppa:danielrichter2007/grub-customizer |
| | 65 | sudo apt-get update |
| | 66 | sudo apt-get install grub-customizer |
| | 67 | |
| | 68 | #Open the Grub 2 GUI |
| | 69 | grub-customizer |
| | 70 | |
| | 71 | #Click on entry Ubuntu, with Linux 2.6.32-xenomai-2.5.5.2-ipipe |
| | 72 | #Use the up arrow to move the entry as high as possible |
| | 73 | #Save and Exit |
| | 74 | |
| | 75 | #Reverts rsyslog to appropriate version for our kernel |
| | 76 | sudo gedit /etc/apt/sources.list |
| | 77 | }}} |
| | 78 | |
| | 79 | '''__Build the Xenomai userspace libs__''' |
| | 80 | {{{ |
| | 81 | cd /usr/src/xenomai-2.6.1 |
| | 82 | sudo ./configure --enable-dlopen-skins |
| | 83 | sudo make |
| | 84 | sudo make install |
| | 85 | sudo chgrp xenomai /dev/rtheap |
| | 86 | sudo chgrp xenomai /dev/rtp* |
| | 87 | }}} |
| | 88 | |
| | 89 | '''__Restart and Boot Your New RT Kernel__''' |
| | 90 | {{{ |
| | 91 | sudo shutdown -r now |
| | 92 | }}} |
| | 93 | |
| | 94 | '''__Install Barrett Technology Software__''' |
| | 95 | {{{ |
| | 96 | sudo apt-get update |
| | 97 | sudo apt-get install g++ cmake libncurses5-dev spell subversion ssh python-dev python-argparse |
| | 98 | |
| | 99 | |
| | 100 | sudo apt-get install libeigen2-dev libboost1.46-all-dev libgsl0-dev |
| | 101 | |
| | 102 | |
| | 103 | wget http://web.barrett.com/svn/libbarrett/dependencies/libconfig-1.4.5-PATCHED.tar.gz |
| | 104 | tar xzf libconfig-1.4.5-PATCHED.tar.gz |
| | 105 | cd libconfig-1.4.5 |
| | 106 | ./configure && make && sudo make install |
| | 107 | cd .. |
| | 108 | rm -rf libconfig-1.4.5 libconfig-1.4.5-PATCHED.tar.gz |
| | 109 | |
| | 110 | #Get the latest version of libbarrett |
| | 111 | svn co http://web.barrett.com/svn/libbarrett/tags/libbarrett-1.1.0 |
| | 112 | |
| | 113 | sudo mkdir /etc/barrett |
| | 114 | sudo chown -R robot:robot /etc/barrett/ |
| | 115 | |
| | 116 | cd ~/libbarrett-1.1.0 |
| | 117 | cmake . && make -j4 && sudo make install |
| | 118 | |
| | 119 | sudo bash |
| | 120 | echo /usr/xenomai/lib/ | cat > /etc/ld.so.conf.d/xenomai.conf |
| | 121 | ldconfig |
| | 122 | exit |
| | 123 | }}} |