搭建实时linux环境的方法和步骤(二)-- xenomai cobalt(dual kernel)

搭建xenomai的步骤比preempt rt patch要复杂一些,本节介绍xenomai的cobalt模式,既宏微内核。

1,分别下载

linux-4.4.43
ipipe-core-4.4.43-x86-6.patch
xenomai-3.0.3

2,给kernel打ipipe相关的patch

cd linux-4.4.43

patch:./xenomai-3.0.3/scripts/prepare-kernel.sh --linux=linux-4.4.43 --ipipe=ipipe-core-4.4.43-x86-6.patch --arch=x86_64

3, 配置内核:

cp /boot/config-4.4.189 .config

make menuconfig -- 做如下修改:

* General setup
  --> Local version - append to kernel release: -xenomai-3.0.5
  --> Timers subsystem
      --> High Resolution Timer Support (Enable)
* Xenomai/cobalt
  --> Sizes and static limits
    --> Number of registry slots (512 --> 4096)
    --> Size of system heap (Kb) (512 --> 4096)
    --> Size of private heap (Kb) (64 --> 256)
    --> Size of shared heap (Kb) (64 --> 256)
    --> Maximum number of POSIX timers per process (128 --> 512)
  --> Drivers
    --> RTnet
        --> RTnet, TCP/IP socket interface (Enable)
            --> Drivers
                --> New intel(R) PRO/1000 PCIe (Enable)
                --> Realtek 8169 (Enable)
                --> Loopback (Enable)
        --> Add-Ons
            --> Real-Time Capturing Support (Enable)
* Power management and ACPI options
  --> CPU Frequency scaling
      --> CPU Frequency scaling (Disable)
  --> ACPI (Advanced Configuration and Power Interface) Support
      --> Processor (Disable)
  --> CPU Idle
      --> CPU idle PM support (Disable)
* Pocessor type and features
  --> Enable maximum number of SMP processors and NUMA nodes (Disable)
  // Ref : http://xenomai.org/pipermail/xenomai/2017-September/037718.html
  --> Processor family
      --> Core 2/newer Xeon (if "cat /proc/cpuinfo | grep family" returns 6, set as Generic otherwise)
  // Xenomai will issue a warning about CONFIG_MIGRATION, disable those in this order
  --> Transparent Hugepage Support (Disable)
  --> Allow for memory compaction (Disable)
  --> Contiguous Memory Allocation (Disable)
  --> Allow for memory compaction
    --> Page Migration (Disable)
* Device Drivers
  --> Staging drivers
      --> Unisys SPAR driver support
         --> Unisys visorbus driver (Disable)

 

4,编译内核:

make

sudo make modules_install
sudo make install
sudo update-grub

5,配置和编译xenomai

./configure --with-core=cobalt --enable-smp --enable-pshared

sudo make install

note:--with-core应该选cobalt

6,重启,选新编好的xenomai内核

7,测试

一下两种工具都可以使用。

1)cyclictest

2) /usr/xenomai/bin/latency

参考:https://blog.csdn.net/whatamadman/article/details/75676334

   https://gitlab.denx.de/Xenomai/xenomai/wikis/Installing_Xenomai_3

   http://rtlinux.com.cn/

   https://stackoverflow.com/questions/41949678/installation-steps-for-xenomai-3-on-ubuntu-16-04

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值