Xenomai安装方法
2013-01-28 00:00
411 查看
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
Download xenomai 2.4.4
Untar sources
Patch the kernel:
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.
and compile the kernel for version 2.4:
or compile the kernel for version 2.6:
copy the kernel image:
Create a xenomai group and add users to it:
Configure grub (or another bootloader). Also you may try using your UUID in place of /dev/XXX (if the later doesn't work):
reboot into your new xenomai kernel
Configure and compile xenomai:
Now xenomai is installed in /usr/xenomai, to use it, update the ld paths:
Now xenomai is ready for action, try an example program:
出现如下错误:#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
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 上提供大量的信息
相关文章推荐
- centos5 源码安装Nginx + mysql + apache + php的方法
- 声卡无法识别和安装的解决方法
- Android pm命令 以及在终端安装卸载安装包方法
- SQL Server 2008安装时出现不能在控件上调用 Invoke 或 BeginInvoke错误的方法,为sql server代理服务提供的凭据无效。若要继续操作
- MyEclipse中SVN的安装和使用方法
- windows10安装python出现错误2502/2503解决方法
- pip安装报错[SSL:CERTIFICATE_VERIFY_FAILED]解决方法
- MVC3 安装失败的一种处理方法
- 安装office2007时发生错误1706解决方法
- 多系统的安装方法
- Keil5安装库文件的正确简便方法
- Scrapy安装教程 pip 或 conda 两种安装方法.
- MySql “找不到请求的 .Net Framework 数据提供程序。可能没有安装。”解决方法
- 安装tinyos中遇到的问题及解决方法_转载
- 关于 Expression Blend 4安装是出现的“意见安排重启您的计算机”的解决方法
- yii框架简单安装方法
- FRDM_KL26 虚拟串口安装失败的解决方法
- Sublime Text 无法使用Package Control或插件安装失败的解决方法
- Ubuntu .deb包安装方法
- 在ubuntu10.04上 安装 QT5.1.1 后打不开qt creator (opensource)的解决方法