版本 c1f685a02d855191beafb3de09c242ce69cad39e
Xenomai
組員
Building an RPi Xenomai Kernel
- Install Cross complier
.. code-block:: c
cd <working dir>
wget https://github.com/raspberrypi/tools/archive/master.tar.gz
tar xzf master.tar.gz
Download source files and patches
- Download kernel
.. code-block:: c
git clone -b rpi-3.8.y --depth 1 git://github.com/raspberrypi/linux.git linux-rpi-3.8.y
- Download Xenomai
.. code-block:: c
git clone git://git.xenomai.org/xenomai-head.git xenomai-head
- Download minimal config
.. code-block:: c
wget https://www.dropbox.com/s/dcju74md5sz45at/rpi_xenomai_config
Apply patches
- Apply ipipe core pre-patch
.. code-block:: c
cd linux-rpi-3.8.y patch -Np1 < ../xenomai-head/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch
- Apply Xenomai ipipe core patch
.. code-block:: c
xenomai-head/scripts/prepare-kernel.sh –arch=arm –linux=linux-rpi-3.8.y –adeos=xenomai-head/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-3.patch
- Apply ipipe core post-patch
.. code-block:: c
cd linux-rpi-3.8.y patch -Np1 < ../xenomai-head/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch
Compile kernel
- Create build directory
.. code-block:: c
mkdir linux-rpi-3.8.y/build
- Configure kernel
.. code-block:: c
cp rpi_xenomai_config linux-rpi-3.8.y/build/.config cd linux-rpi-3.8.y make mrproper make ARCH=arm O=build oldconfig
- Compile
.. code-block:: c make ARCH=arm O=build CROSS_COMPILE=../../tools-master/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-
- Install modules
.. code-block:: c
make ARCH=arm O=build INSTALL_MOD_PATH=dist modules_install
- Install headers
.. code-block:: c
make ARCH=arm O=build INSTALL_HDR_PATH=dist headers_install find build/dist/include ( -name .install -o -name ..install.cmd ) -delete
作業系統架構
- 與 RT-PREEMPT 途徑的差異?
硬體驅動原理
- 硬體使用 Raspberry Pi
效能表現
Cyclictest<https://rt.wiki.kernel.org/index.php/Cyclictest>
_- Test case: POSIX interval timer, Interval 500 micro seconds,. 100000 loops, 100% load.
- Commandline: cyclictest -t1 -p 80 -i 500 -l 100000
- 使用 RT-PREEMPT
.. code-block:: prettyprint
Linux raspberrypi 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux
Min: 22 Act: 31 Avg: 32 Max: 169
- 使用 Xenomai
.. code-block:: prettyprint
Linux raspberrypi 3.8.13-core+ #1 Thu Feb 27 03:02:16 CST 2014 armv6l GNU/Linux
Min: 1 Act: 5 Avg: 6 Max: 41
討論用
https://embedded2014.hackpad.com/Xenomai-raspberry-note-XwJtuQn9nkD
參考資料
- https://code.google.com/p/picnc/wiki/RPiXenomaiKernel
- https://code.google.com/p/picnc/wiki/CreateRaspbianLinuxCNC
- http://www.camelsoftware.com/firetail/blog/raspberry-pi/real-time-operating-systems/
Quadruped Linux robot feels its way over obstacles<http://linuxgizmos.com/hyq-quadruped-robot-runs-real-time-linux/>
_Choosing between Xenomai and Linux for real-time applications<https://www.osadl.org/fileadmin/dam/rtlws/12/Brown.pdf>
_Real Time Systems<http://www.slideshare.net/anil_pugalia/real-time-systems>
_