Create SetupComputer
243
SetupComputer.md
Normal file
243
SetupComputer.md
Normal file
@@ -0,0 +1,243 @@
|
||||
**Prepare Computer**
|
||||
|
||||
- Install a basic Ubuntu 12.04 LTS Desktop 32 Bit http://www.ubuntu.com/download/desktop ,username: control with sudo permissions
|
||||
- Add various packages:
|
||||
|
||||
```
|
||||
sudo apt-get install fakeroot build-essential cvs linux-source crash kexec-tools makedumpfile kernel-wedge git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev kernel-package libncurses5 libncurses5-dev automake autoconf libtool flex bison imagemagick openssh-server libqt4-dev geany synaptic joe jed libxerces-c2-dev libboost-all-dev openjdk-7-jre jed subversion liblog4cpp5-dev libreadline-dev autoconf-archive libzmq-dev libqwt-dev libqwtplot3d-qt4-dev gcc-multilib libusb-dev cmake
|
||||
```
|
||||
|
||||
- get the software form the repository, including the System Installation files:
|
||||
|
||||
```
|
||||
cd
|
||||
mkdir work
|
||||
cd work
|
||||
svn co https://svn.semafor.ch/stxm/trunk stxm
|
||||
```
|
||||
Compile Epics
|
||||
|
||||
```
|
||||
cd /usr/local/
|
||||
sudo mkdir epics
|
||||
cd epics/
|
||||
sudo chown control .
|
||||
tar xfvz ~/work/stxm/SystemInstall/baseR3.14.12.4.tar.gz
|
||||
cd base-3.14.12.4
|
||||
make
|
||||
|
||||
edit /etc/environmet:
|
||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/epics/base-3.14.12.4/bin/linux-x86/"
|
||||
|
||||
sudo cp ~/work/stxm/SystemInstall/epics.conf /etc/ld.so.conf.d
|
||||
sudo ldconfig
|
||||
```
|
||||
|
||||
|
||||
Compile HDF5
|
||||
|
||||
```
|
||||
mkdir ~/BaseSystem
|
||||
cd BaseSystem/
|
||||
mkdir Nexus
|
||||
cd Nexus
|
||||
tar xfvz ~/work/stxm/SystemInstall/hdf5-1.8.12.tar.gz
|
||||
cd hdf5-1.8.12
|
||||
./configure --prefix=/usr/local --enable-cxx
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Compile Nexus Library
|
||||
|
||||
```
|
||||
cd ..
|
||||
# get latest Version of Nexus
|
||||
wget https://github.com/nexusformat/code/archive/master.zip
|
||||
unzip master.zip
|
||||
mv code-master nexus
|
||||
cd nexus
|
||||
cmake -DENABLE_CXX=1 .
|
||||
make
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
```
|
||||
|
||||
Install intens
|
||||
|
||||
```
|
||||
#get lastest zmq from http://zeromq.org
|
||||
cd ~/BaseSystem/
|
||||
tar xfvz ../Downloads/zeromq-4.1.5.tar.gz
|
||||
cd zeromq-4.1.5
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
cd /usr/local
|
||||
## sudo tar xfvz ~/work/stxm/SystemInstall/intens-4.4.9.tar.gz
|
||||
sudo mkdir intens
|
||||
cd intens
|
||||
sudo tar xfvz ~/work/stxm/SystemInstall/intens-4.4.14-snapshot.tar.gz
|
||||
```
|
||||
|
||||
Install PI libs
|
||||
|
||||
```
|
||||
sudo cp -a ~/work/stxm/StxmController/PI/lib/* /usr/local/lib
|
||||
```
|
||||
|
||||
|
||||
Compile RT Kernel and untar RTAI
|
||||
|
||||
```
|
||||
cd BaseSystem/
|
||||
tar xfvj ../work/stxm/SystemInstall/linux-3.4.67.tar.bz2
|
||||
tar xfvj ../work/stxm/SystemInstall/rtai-4.0.tar.bz2
|
||||
cd linux-3.4.67
|
||||
patch -p1 < ../rtai-4.0/base/arch/x86/patches/hal-linux-3.4.67-x86-4.patch
|
||||
cp ~/work/stxm/SystemInstall/linux-config-3.4.67rt .config
|
||||
fakeroot make-kpkg --initrd --append-to-version=rt kernel_image kernel_headers kernel_source
|
||||
cd ..
|
||||
dpkg -i *.deb
|
||||
sudo dpkg -r linux-image-generic-lts-quantal linux-headers-generic-lts-quantal linux-generic-lts-quantal linux-source
|
||||
sudo dpkg -r linux-headers-3.5.0-23 linux-headers-3.5.0-23-generic linux-headers-3.5.0-45 linux-headers-3.5.0-45-generic linux-image-3.5.0-23-generic linux-image-3.5.0-45-generic linux-source-3.2.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
Compile RTAI
|
||||
|
||||
```
|
||||
cd ~/BaseSystem/rtai-4.0
|
||||
cp ~/work/stxm/SystemInstall/rtai_config-1st-run .rtai_config
|
||||
make
|
||||
#- check that numer of CPU (in Machine (x86)) matches your computer
|
||||
#- check, that Net RPC is disabled (Base System -> Supported Services)
|
||||
#- check eager inlining (General)
|
||||
sudo make install
|
||||
#- to test installation
|
||||
cd /usr/realtime/testsuite/kern/latency/
|
||||
./run
|
||||
```
|
||||
|
||||
|
||||
|
||||
Compile Comedi
|
||||
|
||||
```
|
||||
cd ~/BaseSystem
|
||||
tar xfvz ~/work/stxm/SystemInstall/comedi-HEAD-0509a32.tar.gz
|
||||
mv comedi-HEAD-0509a32/ comedi
|
||||
tar xfvz ~/work/stxm/SystemInstall/comedilib-HEAD-f55d303.tar.gz
|
||||
mv comedilib-HEAD-f55d303/ comedilib
|
||||
cd comedi
|
||||
patch -p1 < ~/work/stxm/SystemInstall/comedi.patch
|
||||
./autogen.sh
|
||||
./configure --with-linuxdir=/usr/src/linux-headers-3.4.67rt --with-rtaidir=/usr/realtime
|
||||
make
|
||||
sudo make install
|
||||
sudo depmod -a
|
||||
cd ../comedilib
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
|
||||
|
||||
Compile RTAI 2nd run
|
||||
|
||||
```
|
||||
cd ~/BaseSystem/rtai-4.0/
|
||||
cp ~/work/stxm/SystemInstall/rtai_config-2nd-run .rtai_config
|
||||
make clean
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
|
||||
|
||||
Compile Orchestra
|
||||
|
||||
```
|
||||
## if not existing...
|
||||
sudo mkdir /usr/local/include/linux
|
||||
sudo cp /home/sxm/BaseSystem/comedi/include/linux/comedilib.h /usr/local/include/linux/sudo cp /home/sxm/BaseSystem/comedi/include/linux/comedi.h /usr/local/include/linux/
|
||||
|
||||
cd ~/BaseSystem
|
||||
tar xfvz ~/work/stxm/SystemInstall/OrchestraCore-3.6.tar.gz
|
||||
cd Orchestra-3.6/
|
||||
patch -p1 < ~/work/stxm/SystemInstall/orchestra.patch
|
||||
cd src
|
||||
cd OrchestraCoreLib
|
||||
make clean
|
||||
make
|
||||
sudo make install
|
||||
|
||||
cd ../OrchestraHostSupervisor/
|
||||
make clean
|
||||
make
|
||||
sudo make install
|
||||
|
||||
cd ../OrchestraCore
|
||||
make clean
|
||||
make
|
||||
sudo make install
|
||||
|
||||
cd /usr/local/Orchestra/
|
||||
sudo cp -a ~/BaseSystem/Orchestra-3.6/HMI/ .
|
||||
cd ../bin
|
||||
sudo ln -s /usr/local/src/orchestra/Orchestra-3.6/HMI/OrchestraHMI .
|
||||
edit /usr/local/Orchestra/HMI/OrchestraHMI
|
||||
modify as follows
|
||||
ORCHESTRAHMIDIR="/usr/local/Orchestra/HMI"
|
||||
```
|
||||
|
||||
Load Comedi driver and configure cards
|
||||
|
||||
```
|
||||
sudo cp ~/work/stxm/SystemInstall/ComediLoadModules /etc/init.d
|
||||
cd /etc/rc2.d
|
||||
sudo ln -s ../init.d/ComediLoadModules S98ComediLoadModules
|
||||
|
||||
sudo cp ~/work/stxm/SystemInstall/comedi.conf /etc/modprobe.d
|
||||
```
|
||||
|
||||
Compile STXM Software
|
||||
|
||||
```
|
||||
cd ~/work/stxm/
|
||||
export INTENS_HOME=/usr/local/intens/4.4.14-snapshot
|
||||
autoreconf -i
|
||||
mkdir build
|
||||
cd build
|
||||
../configure
|
||||
make
|
||||
```
|
||||
|
||||
Adapt configuration
|
||||
|
||||
```
|
||||
edit /etc/security/limits.conf
|
||||
add at the end:
|
||||
control soft memlock 200000
|
||||
control hard memlock 200000
|
||||
```
|
||||
|
||||
Update of Libraries
|
||||
|
||||
```
|
||||
cd ~/BaseSystem
|
||||
unzip ~/work/stxm/SystemInstall/qwt-6.1.3.zip
|
||||
cd qwt-6.1.3
|
||||
qmake qwt.pro
|
||||
make
|
||||
sudo make install
|
||||
|
||||
/usr/local$ sudo ln -s qwt-6.1.3 qwt6
|
||||
/usr/local/qwt-6.1.3/include$ sudo ln -s . qwt
|
||||
/usr/local/qwt-6.1.3/lib$ sudo ln -s libqwt.so.6.1.3 libqwt6.so
|
||||
```
|
||||
Reference in New Issue
Block a user