| | 1 | = Install Barrett System with Ubuntu 10.04 and Xenomai 2.5.5.2 - __32-Bit External PC__ = |
| | 2 | |
| | 3 | '''Download and Install 64-bit Ubuntu 10.04 LTS Lucid Lynx from official image:'''[[BR]] |
| | 4 | [http://releases.ubuntu.com/lucid/ubuntu-10.04.4-desktop-i386.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-2.6.32-xenomai-2.5.5.2-ipipe.Custom_i386.deb |
| | 14 | sudo wget http://web.barrett.com/support/WAM_Installer/linux-headers-2.6.32-xenomai-2.5.5.2-ipipe.Custom_i386.deb |
| | 15 | |
| | 16 | #Install from Debian |
| | 17 | sudo dpkg -i linux-image-2.6.32-xenomai-2.5.5.2-ipipe.Custom_i386.deb |
| | 18 | sudo dpkg -i linux-headers-2.6.32-xenomai-2.5.5.2-ipipe.Custom_i386.deb |
| | 19 | |
| | 20 | #Cleanup |
| | 21 | sudo rm linux-image-2.6.32-xenomai-2.5.5.2-ipipe.Custom_i386.deb |
| | 22 | sudo rm linux-headers-2.6.32-xenomai-2.5.5.2-ipipe.Custom_i386.deb |
| | 23 | |
| | 24 | #Install Xenomai |
| | 25 | cd /usr/src |
| | 26 | sudo wget http://download.gna.org/xenomai/stable/xenomai-2.5.5.2.tar.bz2 |
| | 27 | sudo tar -xjf xenomai-2.5.5.2.tar.bz2 |
| | 28 | sudo rm xenomai-2.5.5.2.tar.bz2 |
| | 29 | |
| | 30 | |
| | 31 | #Some updating for GRUB |
| | 32 | sudo update-initramfs -c -k "2.6.32.59+drm33.24-xenomai-2.5.5.2-ipipe" |
| | 33 | }}} |
| | 34 | |
| | 35 | '''__Set up Xenomai Group Permissions and GRUB 2__''' |
| | 36 | {{{ |
| | 37 | sudo addgroup xenomai |
| | 38 | sudo usermod -aG xenomai robot |
| | 39 | |
| | 40 | # now use the following command to identify the xenomai group id number |
| | 41 | egrep -i "^xenomai" /etc/group |
| | 42 | #find the group number that corresponds to the xenomai group. Usually: 1001 - will be referred to as <gid> |
| | 43 | |
| | 44 | #Update rc.local |
| | 45 | sudo gedit /etc/rc.local |
| | 46 | #Copy the following as the last command before exit 0 |
| | 47 | /usr/xenomai/sbin/rtcanconfig rtcan0 -b 1000000 -c none start |
| | 48 | echo "<gid>" > /sys/module/xeno_nucleus/parameters/xenomai_gid |
| | 49 | #Save and close the updated file |
| | 50 | |
| | 51 | # Open the Grub2 file for editing |
| | 52 | sudo gedit /etc/default/grub |
| | 53 | |
| | 54 | # Find the line of text that looks similar to below. |
| | 55 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" |
| | 56 | |
| | 57 | # Add the kernel option "xeno_nucleus.xenomai_gid=<gid>". Make sure the use the correct groud id number! |
| | 58 | # The modified entry should look similar to: |
| | 59 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xeno_nucleus.xenomai_gid=1001" |
| | 60 | |
| | 61 | # Save and close the updated menu file |
| | 62 | |
| | 63 | # Finally, update your grub2 to reflect recent changes |
| | 64 | sudo update-grub |
| | 65 | }}} |
| | 66 | |
| | 67 | '''__Build the Xenomai userspace libs__''' |
| | 68 | {{{ |
| | 69 | cd /usr/src/xenomai-2.5.5.2 |
| | 70 | sudo ./configure --enable-dlopen-skins |
| | 71 | sudo make |
| | 72 | sudo make install |
| | 73 | sudo chgrp xenomai /dev/rtheap |
| | 74 | sudo chgrp xenomai /dev/rtp* |
| | 75 | }}} |
| | 76 | |
| | 77 | '''__Restart and Boot Your New RT Kernel__''' |
| | 78 | {{{ |
| | 79 | sudo shutdown -r now |
| | 80 | }}} |
| | 81 | |
| | 82 | '''__Test Your RT Kernel__''' |
| | 83 | {{{ |
| | 84 | bash /usr/xenomai/bin/xeno-test |
| | 85 | }}} |
| | 86 | |
| | 87 | '''__Install Barrett Technology Software__''' |
| | 88 | {{{ |
| | 89 | sudo apt-get update |
| | 90 | sudo apt-get install g++ cmake libncurses5-dev spell subversion ssh python-dev |
| | 91 | |
| | 92 | svn co http://web.barrett.com/svn/libbarrett/dependencies/ ~/dependencies |
| | 93 | cd ~/dependencies |
| | 94 | |
| | 95 | tar xjf eigen-2.0.12.tar.bz2 |
| | 96 | cd eigen |
| | 97 | cmake . && make && sudo make install |
| | 98 | cd .. |
| | 99 | |
| | 100 | tar xzf libconfig-1.4.5-PATCHED.tar.gz |
| | 101 | cd libconfig-1.4.5 |
| | 102 | ./configure && make && sudo make install |
| | 103 | cd .. |
| | 104 | |
| | 105 | tar xjf boost_1_46_1.tar.bz2 |
| | 106 | cd boost_1_46_1/ |
| | 107 | ./bootstrap.sh |
| | 108 | sudo ./bjam --with-program_options --with-python --with-thread --with-signals --with-math --with-regex --with-filesystem --with-date_time install |
| | 109 | cd .. |
| | 110 | |
| | 111 | tar xzf gsl-1.14.tar.gz |
| | 112 | cd gsl-1.14 |
| | 113 | ./configure && make && sudo make install |
| | 114 | cd .. |
| | 115 | |
| | 116 | cd .. |
| | 117 | sudo rm -Rf ~/dependencies |
| | 118 | |
| | 119 | sudo bash |
| | 120 | echo /usr/xenomai/lib/ | cat > /etc/ld.so.conf.d/xenomai.conf |
| | 121 | ldconfig |
| | 122 | exit |
| | 123 | |
| | 124 | #check out the latest version of libbarrett |
| | 125 | svn co http://web.barrett.com/svn/libbarrett/tages/libbarrett-1.0.0 ~/libbarrett-1.0.0 |
| | 126 | |
| | 127 | sudo mkdir /etc/barrett |
| | 128 | sudo chown -R robot:robot /etc/barrett/ |
| | 129 | |
| | 130 | cd ~/libbarrett-1.0.0 |
| | 131 | cmake . |
| | 132 | make |
| | 133 | sudo make install |
| | 134 | }}} |