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