- Get source
- wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-3.18.20.tar.gz
- Unzip: tar xvf linux-3.18.20.tar.gz (file bz2: -jxvf)
- Rename to linux-3.18.20-xeno3
- git clone git://git.xenomai.org/xenomai-3.git
- Rename to xenomai-3-linux-3.18.20
- Prepare Cobalt: (depends on system architecture arm, x86, amdx64)
- cd xenomai-3-linux-3.18.20
- scripts/prepare-kernel.sh --linux=/home/presto/xeno/linux-3.18.20-xeno3 --ipipe=/home/presto/xeno/xenomai-3-linux-3.18.20/kernel/cobalt/arch/x86/patches/ipipe-core-3.18.20-x86-8.patch --arch=x86
- Patch kernel
- cd ../linux-3.18.20-xeno3
- ../xenomai-3-linux-3.18.20/scripts/prepare-kernel.sh --ipipe=/home/presto/xeno/xenomai-3-linux-3.18.20/kernel/cobalt/arch/x86/patches/ipipe-core-3.18.20-x86-8.patch --arch=x86
- Configure kernel
- make xconfig
- Required Options
- Real-time sub-system
- Xenomai : Enable
- Necleus: Enable
- Power management and ACPI options
- Run-time PM core functionality : Disable
- ACPI (Advanced Configuration and Power Interface) Support
- CPU Frequency scaling: Disable
- CPU Idle: Disable
- Processor type and features
- Processor famlily
- Core 2/newer Xeon: Check your system with cat /proc/cpuinfo | grep family if return 6 set as Generic
- Optional options
- General setup
- Local Version: append to kernel resase: -xenomai-2.6.2.1
- Timer subsystem:
- High Resolution Timer Support: ON
- Processor type and features
- Processor famlily
- SMT (Hyperthreading) scheduler support (Disable)
- Preemption Model
- Voluntary Kernel Preemption (Desktop)
- Build kernel
- sudo make-kpkg --rootcmd fakeroot --initrd kernel_image kernel_headers -j $(nproc)
- Install Xenomai
- Update grub
- sudo update-grub
- check kernel image at /boot directory
- Boot new kernel
- At Boot menu: Ubuntu * Advanced options for Ubuntu (Enter on it)
- Choose Xenomai 3
- Testing new kernel
- Install library
- Configure library
- sudo ./scripts/bootstrap (if there are errors, need to install some below packages)
- sudo apt-get install autoconf
- sudo apt-get install libtool
- Build x86_32 (depend on your target architecture more about configuration https://xenomai.org/installing-xenomai-3-x/#Configuring)
- mkdir lib-build (in xenomai-3 directory) and then cd lib-build/
- ../configure --with-core=cobalt --enable-smp --enable-pshared --host=i686-linux CFLAGS="-m32 -O2" LDFLAGS="-m32"
- sudo make install
- Test Xenomai runtime
- The xenomai directory will be created during install library at /usr/xenomai
- Test latency
- sudo /usr/xenomai/bin/latency
- Test example
- cd ../demo/posix/cyclictest/
0 Comments