Xenomai安装方法

简介:
http://www.xenomai.org/index.php/Xenomai_quick_build_quide

This is a quick list of commands on compiling xenomai version 2.4.4 with linux kernel 2.6.25.11 under ubuntu.

  • Download kernel 2.6.25.11

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.11.tar.bz2


  • Download xenomai 2.4.4

wget http://download.gna.org/xenomai/stable/xenomai-2.4.4.tar.bz2


  • Untar sources

tar xfj xenomai-2.4.4.tar.bz2
tar xfj linux-2.6.25.11.tar.bz2


  • Patch the kernel:

cd /usr/src/xenomai-2.4.4
scripts/prepare-kernel.sh


  • Configure the kernel:

Since the initrd option is not used later on, compile your hard disk drivers not as a module, but compile it into the kernel itself.


cd /usr/src/linux-2.6.25.11
cp /boot/config-2.6.24-16-generic  .config
make menuconfig


  • and compile the kernel for version 2.4:

make
sudo make modules_install
make bzImage


  • or compile the kernel for version 2.6:

make
sudo make modules_install install
make bzImage


  • copy the kernel image:

sudo cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.25.11-xenomai-2.4.4


  • Create a xenomai group and add users to it:

sudo addgroup xenomai
sudo usermod -a -G xenomai YOURUSERNAME
sudo usermod -a -G xenomai USERY


  • Configure grub (or another bootloader). Also you may try using your UUID in place of /dev/XXX (if the later doesn't work):

sudo vim /boot/grub/menu.lst
title           kernel 2.6.25.11 with xenomai 2.4.4 and Ubuntu 8.04
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.25.11-xenomai-2.4.4 root=/dev/XXX ro xeno_nucleus.xenomai_gid=1001 << groupid of the xenomai group


  • reboot into your new xenomai kernel
  • Configure and compile xenomai:

cd /usr/src/xenomai-2.4.4
./configure  /*是否增加--enable-x86-sep --enable-x86-tsc需要查看cpu的信息:用命令cat /proc/cpuinfo,如果在cflag中出现则添加*/
make
sudo make install


  • Now xenomai is installed in /usr/xenomai, to use it, update the ld paths:

sudo cp /etc/ld.so.conf.d/libc.conf /etc/ld.so.conf.d/xenomai.conf
sudo vim /etc/ld.so.conf.d/xenomai.conf
# xenomai libs
/usr/local/lib
sudo ldconfig


  • Now xenomai is ready for action, try an example program:

cd /usr/src/xenomai-2.4.4/examples/native  
make
./trivial-periodic


出现如下错误:#error "CONFIG_NR_CPUS is too large, please lower it 时:
将内核源文件夹根目录下 .config文件的几个标志位作如下设置:
CONFIG_HPET_TIMER=n
CONFIG_HPET_EMULATE_RTC=n
CONFIG_SPARSE_IRQ=n
当出现"per_cpu__irq_stack_union" undeclared error,将CONFIG_CC_STACKPROTECTOR设置为n


> I have a  xenomai kernel running!
> 
> I have tested using the testsuit latency ./run program. initially I
> got this message
> 
> Xenomai: incompatible feature set.
> (required="sep tsc", present= "sep", missing="tsc")
方法1. To fix this, you need to select a x86 CPU supporting a timestamp counter 
when configuring your kernel, since by default, the configure script 
assumes --enable-x86-tsc.

方法2:The problem is that the TSC feature must be enabled in kernel-space if 
you want to enable it in user-space. So, you have two choices:
- either you enable the TSC in kernel-space by selecting the processor 
in kernel configuration which fits your processor (as suggested in 
Xenomai FAQ);
- either you disable usage of TSC in user-space by passing --disable-tsc to configure.

http://news.gmane.org/gmane.linux.real-time.xenomai.users 上提供大量的信息


目录
相关文章
EMQ
|
传感器 Serverless 开发者
开发者分享:利用 EMQX Cloud 与 ESP32 微控制器实现智能液冷散热系统
通过引入外部水冷系统、利用微控制器 ESP32、MQTT 服务器 EMQX Cloud Serverless 以及容器化的部署平台 Fly.io,EMQX Cloud 的开发者陶德坤设计一个智能的 DIY 液冷散热解决方案,希望能为其他物联网开发者带来灵感
EMQ
489 75
开发者分享:利用 EMQX Cloud 与 ESP32 微控制器实现智能液冷散热系统
|
Web App开发 JavaScript 前端开发
Python 自动化 - 浏览器chrome打开F12开发者工具自动Paused in debugger调试导致无法查看网站资源问题原因及解决方法,javascript反调试问题处理实例演示
Python 自动化 - 浏览器chrome打开F12开发者工具自动Paused in debugger调试导致无法查看网站资源问题原因及解决方法,javascript反调试问题处理实例演示
1064 0
Python 自动化 - 浏览器chrome打开F12开发者工具自动Paused in debugger调试导致无法查看网站资源问题原因及解决方法,javascript反调试问题处理实例演示
|
7月前
|
Cloud Native 关系型数据库 MySQL
华鼎冷链科技 × 阿里云瑶池数据库,打造全链路协同的智慧冷链新标杆
从 PolarDB 的高性能数据库服务到 AnalyticDB 的强大数据分析,阿里云提供的丰富产品矩阵为华鼎冷链科技构建了全面的解决方案,推动华鼎冷链科技从成本中心向效率中心转型。
|
5月前
|
人工智能 搜索推荐 数据安全/隐私保护
AI矩阵获客系统开发部署策略
在竞争激烈的市场中,企业亟需高效获客工具。AI矩阵获客系统基于人工智能技术,通过大数据分析和智能匹配,精准定位目标客户,降低营销成本,提升转化率。其自动化营销功能可显著减轻人工负担。随着市场需求增长和技术成熟,开发该系统具备较高投资回报率。然而,企业在开发时需关注功能完善、隐私保护及法规遵循,以确保系统稳定性和竞争力。总体而言,AI矩阵获客系统值得投入资源开发,助力企业抢占市场先机。
|
存储 Ubuntu Linux
xenomai3+linux构建linux实时操作系统-基于X86_64和arm
Xenomai是一个实时性解决方案,通过在Linux上添加实时内核Cobalt来增强实时性能。它有三个主要部分:libcobalt(用户空间实时库)、Cobalt(内核空间实时内核)和硬件架构特定层(ipipe-core或dovetail)。ipipe-core适用于Linux 5.4以下版本,而dovetail用于5.4及以上版本。本文介绍了在X86 Ubuntu环境下,如何编译Xenomai内核,搭建应用环境,包括配置、编译、安装和实时性测试。对于其他硬件架构,如ARM和ARM64,步骤类似。文章还提到了Xenomai与Linux内核版本的兼容性和实时性测试结果。
1616 0
xenomai3+linux构建linux实时操作系统-基于X86_64和arm
|
负载均衡 调度 芯片
SMP多核启动(一):spin-table
SMP多核启动(一):spin-table
593 0
|
Linux 芯片
一篇文章讲明白Linux内核态和用户态共享内存方式通信
一篇文章讲明白Linux内核态和用户态共享内存方式通信
246 0
|
数据采集 存储 搜索推荐
使用Python构建自定义搜索引擎:从数据抓取到索引与搜索
使用Python构建自定义搜索引擎:从数据抓取到索引与搜索
|
Linux
xenomai与VxWorks实时性对比(Jitter对比)
本文对比了VxWorks和xenomai的实时性,聚焦于Jitter这一关键指标。在特定的硬件环境下(双核Cortex-A15,2GB内存),VxWorks和xenomai的读取时间戳耗时分别为0.249和0.163微秒。在时钟中断Jitter方面,VxWorks各项测试平均值约为4.066微秒,而xenomai在空载和加载情况下的平均值分别为0.516和0.768微秒。任务Jitter上,VxWorks和xenomai内核态任务的平均Jitter接近,但xenomai用户态任务Jitter较高。
610 0
xenomai与VxWorks实时性对比(Jitter对比)
|
存储 算法 C++
c++string容器-字符串比较讲解
c++string容器-字符串比较讲解
880 1