| 1 | = Install Barrett System to a PC = |
| 2 | |
| 3 | Install Ubuntu 9.10 from official image: http://releases.ubuntu.com/9.10/ubuntu-9.10-desktop-i386.iso |
| 4 | |
| 5 | User name: “robot” Password: “WAM” |
| 6 | |
| 7 | All other options default. |
| 8 | |
| 9 | Log in to your new system, open a terminal, and get new kernel |
| 10 | {{{ |
| 11 | cd / |
| 12 | sudo wget http://web.barrett.com/support/WAM_Installer/ubuntu910xen2552.tar.bz2 |
| 13 | sudo tar xvjf ubuntu910xen2552.tar.bz2 |
| 14 | sudo rm ubuntu910xen2552.tar.bz2 |
| 15 | }}} |
| 16 | |
| 17 | Make xenomai group |
| 18 | {{{ |
| 19 | sudo addgroup xenomai |
| 20 | sudo usermod -aG xenomai robot |
| 21 | }}} |
| 22 | |
| 23 | Downgrade from GRUB2 to GRUB |
| 24 | {{{ |
| 25 | sudo cp /etc/default/grub /etc/default/grub.old |
| 26 | sudo cp -R /etc/grub.d /etc/grub.d.old |
| 27 | sudo cp -R /boot/grub /boot/grub.old |
| 28 | sudo aptitude purge grub2 grub-pc |
| 29 | |
| 30 | # System is unbootable until the next 3 commands succeed!!! |
| 31 | sudo aptitude install grub |
| 32 | sudo update-grub |
| 33 | |
| 34 | # Select 'y' to generate new menu.lst |
| 35 | # Use your primary harddrive as the argument (probably "/dev/sda") |
| 36 | sudo grub-install /dev/sda |
| 37 | |
| 38 | # Open the Grub menu file for editing |
| 39 | gksudo gedit /boot/grub/menu.lst |
| 40 | |
| 41 | # Find the block of text that says "2.6.31.4-ipipe" (not "recovery mode"). Do NOT copy directly from this web site- your hard drive's UUID will be unique. |
| 42 | # It looks similar to: |
| 43 | |
| 44 | title Ubuntu 9.10, kernel 2.6.31.4-ipipe |
| 45 | uuid bbd03826-5ecd-4999-9a89-03846de55c0b |
| 46 | kernel /boot/vmlinuz-2.6.31.4-ipipe root=UUID=bbd03826-5ecd-4999-9a89-03846de55c0b ro quiet splash |
| 47 | initrd /boot/initrd.img-2.6.31.4-ipipe |
| 48 | |
| 49 | # Paste a copy of that block just above the line that reads "### BEGIN AUTOMAGIC KERNELS LIST" |
| 50 | |
| 51 | # Modify title of the copy to something distinct. |
| 52 | # Also, add the kernel option "xeno_nucleus.xenomai_gid=1001". |
| 53 | # The modified block should look similar to: |
| 54 | |
| 55 | title BARRETT DEFAULT: Ubuntu 9.10, kernel 2.6.31.4-ipipe |
| 56 | uuid bbd03826-5ecd-4999-9a89-03846de55c0b |
| 57 | kernel /boot/vmlinuz-2.6.31.4-ipipe root=UUID=bbd03826-5ecd-4999-9a89-03846de55c0b ro quiet splash xeno_nucleus.xenomai_gid=1001 |
| 58 | initrd /boot/initrd.img-2.6.31.4-ipipe |
| 59 | |
| 60 | # Save and close the updated menu file |
| 61 | |
| 62 | # Reboot the system |
| 63 | sudo shutdown -r now |
| 64 | }}} |
| 65 | |
| 66 | Build Xenomai |
| 67 | {{{ |
| 68 | cd /usr/src/xenomai |
| 69 | sudo ./configure |
| 70 | sudo make |
| 71 | sudo make install |
| 72 | sudo chgrp xenomai /dev/rtheap |
| 73 | sudo chgrp xenomai /dev/rtp* |
| 74 | bash /usr/xenomai/bin/xeno-test |
| 75 | |
| 76 | cd |
| 77 | wget http://web.barrett.com/support/WAM_Installer/rc.local.910 |
| 78 | sudo mv rc.local.910 /etc/rc.local |
| 79 | sudo chown root:root /etc/rc.local |
| 80 | sudo chmod 755 /etc/rc.local |
| 81 | sudo /etc/rc.local |
| 82 | }}} |
| 83 | |
| 84 | Install required software |
| 85 | {{{ |
| 86 | wget http://web.barrett.com/support/WAM_Installer/inputrc |
| 87 | mv inputrc ~/.inputrc |
| 88 | |
| 89 | sudo apt-get update |
| 90 | sudo apt-get install g++ cmake libncurses5-dev spell subversion ssh |
| 91 | |
| 92 | svn co http://web.barrett.com/svn/btclient/trunk ~/btclient |
| 93 | cd ~/btclient |
| 94 | wget http://web.barrett.com/support/WAM_Installer/config-xeno.mk |
| 95 | mv config-xeno.mk config.mk |
| 96 | sh makeall |
| 97 | |
| 98 | svn co http://web.barrett.com/svn/libbarrett/dependencies/ ~/dependencies |
| 99 | cd ~/dependencies |
| 100 | |
| 101 | tar xjf eigen-2.0.12.tar.bz2 |
| 102 | cd eigen |
| 103 | cmake . && make && sudo make install |
| 104 | cd .. |
| 105 | |
| 106 | tar xzf libconfig-1.4.5-PATCHED.tar.gz |
| 107 | cd libconfig-1.4.5 |
| 108 | ./configure && make && sudo make install |
| 109 | cd .. |
| 110 | |
| 111 | tar xjf boost_1_46_1.tar.bz2 |
| 112 | cd boost_1_46_1/ |
| 113 | ./bootstrap.sh |
| 114 | sudo ./bjam --with-python --with-thread install |
| 115 | cd .. |
| 116 | |
| 117 | tar xzf gsl-1.14.tar.gz |
| 118 | cd gsl-1.14 |
| 119 | ./configure && make && sudo make install |
| 120 | cd .. |
| 121 | |
| 122 | cd .. |
| 123 | sudo rm -Rf dependencies |
| 124 | |
| 125 | sudo bash |
| 126 | echo /usr/xenomai/lib/ | cat > /etc/ld.so.conf.d/xenomai.conf |
| 127 | ldconfig |
| 128 | exit |
| 129 | |
| 130 | svn co http://web.barrett.com/svn/libbarrett/trunk/ ~/libbarrett |
| 131 | |
| 132 | sudo mkdir /etc/barrett |
| 133 | sudo cp ~/libbarrett/config/* /etc/barrett/ |
| 134 | sudo chown -R robot:robot /etc/barrett/ |
| 135 | |
| 136 | cd ~/libbarrett/build |
| 137 | cmake .. |
| 138 | make |
| 139 | }}} |