RTAI installation for Ubuntu 14.04
2015-04-08 08:20
239 查看
It bothered me a lot ……. So I just post it up to help others.
It should appear 3.16.0-031600-generic. [Skip this step if it already is.]
General:
Rtai
scilab 5.5.0
qrtailab
patch for kernel
config
Set up the kernel settings as follows
build
install
modify grub config, set GRUB_CMDLINE_LINUX_DEFAULT as:
apply grub config
Now, reboot your system. choose the RTAI in GRUB boot menu.
it should show:
config RTAI
UPDATE the CPUs number according to your configuration.
build
install
add following line to your ~/.bashrc (if you use bash)
use new environment variable
Create a file /etc/ld.so.conf.d/rtai.conf with the content
run
Now, run latency test:
Preparation
if the kernel is not 3.16/14/12/8
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600_3.16.0-031600.201408031935_all.deb wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb sudo dpkg -i linux-headers-3.16*.deb linux-image-3.16*.deb sudo reboot uname -r
It should appear 3.16.0-031600-generic. [Skip this step if it already is.]
download and unzip
cd /usr/src curl -L https://www.rtai.org/userfiles/downloads/RTAI/rtai-4.1.tar.bz2 | tar xj curl -L https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.tar.xz | tar xJ curl -L http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb -o linux-image-3.16.0-generic-amd64.deb dpkg-deb -x linux-image-3.16.0-generic-amd64.deb linux-image-3.16.0-generic-amd64
link (optional)
ln -s linux-3.16 linux ln -s rtai-4.1 rtai
package requirement
update apt-get listapt-get update
General:
apt-get install cvs subversion build-essential git-core g++-multilib gcc-multilib
Rtai
apt-get install libtool automake libncurses5-dev kernel-package
scilab 5.5.0
apt-get install default-jre docbook-xsl fop javahelp2 libavalon-framework-java libbatik-java libfftw3-3 libflexdock-java libgfortran3 libhdf5-7 libjeuclid-core-java libjgoodies-looks-java libjgraphx-java libjhdf5-java libjlatexmath-fop-java libjlatexmath-java libjogl-java libjrosetta-java liblapack3gf libncurses5 libpcre3 libpvm3 libquadmath0 libsaxon-java libskinlf-java libstdc++6 libtinfo5 libxml2 tcl8.5 tk8.5 zlib1g libgcc1 libc6 libblas-dev libblas3gf libatlas3gf-base gfortran liblapack-dev
qrtailab
apt-get install libqt4-dev libqwt5-qt4-dev
compile RTAI Linux kernel
copy ubuntu kernel 3.16 original configcp /usr/src/linux-image-3.16.0-generic-amd64/boot/config-3.16.0-031600-generic /usr/src/linux/.config
patch for kernel
cd /usr/src/linux patch -p1 < /usr/src/rtai/base/arch/x86/patches/hal-linux-3.16-x86-3.patch
config
make menuconfig
Set up the kernel settings as follows
Processor type and features -> Processor family = Select yours -> Maximum number of CPUs (NR_CPUS) = Set your number (it's generally "4") -> SMT (Hyperthreading) scheduler support = DISABLE IT Power Management and ACPI options ACPI (Advanced Configuration and Power Interface) Support = DISABLE IT CPU idle PM support = DISABLE IT
build
make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-rtai
install
cd .. dpkg -i linux-image-3.16.0-rtai_3.16.0-rtai-1_amd64.deb dpkg -i linux-headers-3.16.0-rtai_3.16.0-rtai-1_amd64.deb
modify grub config, set GRUB_CMDLINE_LINUX_DEFAULT as:
vim /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="quiet splash lapic=notscdeadline" GRUB_DEFAULT="1>2"
apply grub config
update-grub
Now, reboot your system. choose the RTAI in GRUB boot menu.
RTAI installation
Now that the system has restarted, make sure you booted on your RTAI kerneluname -r
it should show:
3.16.0-rtai
config RTAI
cd /usr/src/rtai
make menuconfig
UPDATE the CPUs number according to your configuration.
build
make -j `getconf _NPROCESSORS_ONLN`
install
make install
add following line to your ~/.bashrc (if you use bash)
vim ~/.bashrc export PATH=/usr/realtime/bin:$PATH export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/realtime/lib
use new environment variable
source ~/.bashrc
Create a file /etc/ld.so.conf.d/rtai.conf with the content
vim /etc/ld.so.conf.d/rtai.conf /usr/realtime/lib
run
ldconfigin order to take it into account
ldconfig
Now, run latency test:
cd /usr/realtime/testsuite/kern/latency ./run
相关文章推荐
- RTAI installation for Ubuntu 14.04
- FFmpeg Installation for Ubuntu
- Package Repository for Ubuntu Offline Installation
- Wine's instruction,install and configure【For Ubuntu Feisty (7.04)】【WorldofWarcraft's installation】
- OpenCV installation for Ubuntu 12.04
- 在 Ubuntu 14.04 中安装 Pepper Flash Player For Chromium
- 转:Omnet++ 4.0 installation for Ubuntu
- opengl(mesa) for ubuntu14.04
- Install and Configure OpenStack Orchestration Service (Heat) for Ubuntu 14.04
- Install Configure OpenStack Network Service (Neutron) for Ubuntu 14.04
- Ubuntu 14.04 Eclipse for Android 集成离线安装
- bottle installation for Python in Ubuntu
- Install and Configure OpenStack Identity Service (Keystone) for Ubuntu 14.04
- BURG For Ubuntu 14.04 Trusty
- Install and Configure OpenStack Telemetry Metering Service (Ceilometer) for Ubuntu 14.04
- 在 Ubuntu 14.04 中安装 Pepper Flash Player For Chromium
- OpenCV installation for Ubuntu 12.04
- Install and Configure OpenStack Image Service (Glance) for Ubuntu 14.04
- Unity is broken after Parallels Tools installation in Ubuntu 14.04
- ubuntu 14.04 安装VMware-Workstation for linux