Rt preempt Howto [dslab]

参考:    http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html#BUILDING //内核编译
    https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
我的配置: Fedora 13
     gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC)
     amd 64
2. 对源码打补丁
    # tar xfj linux-2.6.33.7.tar.bz2
    # cd linux-2.6.33.7
    # bzcat ../patch-2.6.33.7-rt29.bz2 | patch -p1
3. 配置内核
    # cp /boot/config-2.6.34.7-56.fc13.i686 .config //使用你使用的配置文件
    # make menuconfig
    确保以下选项设置如下:
    CONFIG_PREEMPT_RT yes
    High Resolution Timer Support yes
    high precision event timer HPET yes
    disabled all Power Management Options like ACPI or APM no
4. 编译
    # make -j 2
     drivers/pci/hotplug/ibmphp_hpc.c: In function ‘ibmphp_hpc_initvars’:
    drivers/pci/hotplug/ibmphp_hpc.c:135: error: implicit declaration of function ‘sema_init’
    drivers/pci/hotplug/ibmphp_hpc.c: In function ‘ibmphp_lock_operations’:
    drivers/pci/hotplug/ibmphp_hpc.c:797: error: implicit declaration of function ‘down’
    drivers/pci/hotplug/ibmphp_hpc.c: In function ‘ibmphp_unlock_operations’:
    drivers/pci/hotplug/ibmphp_hpc.c:807: error: implicit declaration of function ‘up’
    make[3]: *** [drivers/pci/hotplug/ibmphp_hpc.o] Error 1
    make[2]: *** [drivers/pci/hotplug] Error 2
    make[1]: *** [drivers/pci] Error 2
    make: *** [drivers] Error 2
   
    http://comments.gmane.org/gmane.linux.rt.user/5780 //参考
    CONFIG_STAGING:                                                                                                        │ 
  │                                                                                                                        │ 
  │ This option allows you to select a number of drivers that are                                                          │ 
  │ not of the "normal" Linux kernel quality level.  These drivers                                                         │ 
  │ are placed here in order to get a wider audience to make use of                                                        │ 
  │ them.  Please note that these drivers are under heavy                                                                  │ 
  │ development, may or may not work, and may contain userspace                                                            │ 
  │ interfaces that most likely will be changed in the near                                                                │ 
  │ future.                                                                                                                │ 
  │                                                                                                                        │ 
  │ Using any of these drivers will taint your kernel which might                                                          │ 
  │ affect support options from both the community, and various                                                            │ 
  │ commercial support organizations.                                                                                      │ 
  │                                                                                                                        │ 
  │ If you wish to work on these drivers, to help improve them, or                                                         │ 
  │ to report problems you have with them, please see the                                                                  │ 
  │ driver_name.README file in the drivers/staging/ directory to                                                           │ 
  │ see what needs to be worked on, and who to contact.                                                                    │ 
  │                                                                                                                        │ 
  │ If in doubt, say N here.
    # make clean
    # make menuconfig //重新配置,关掉 CONFIG_STAGING ,你可以 按下 / 键来搜索到此选项
    # make -j2  //我的是双核 -j2 这样编译的更快
drivers/pci/hotplug/ibmphp_hpc.c: In function ‘ibmphp_hpc_initvars’:
drivers/pci/hotplug/ibmphp_hpc.c:135: error: implicit declaration of function ‘sema_init’
drivers/pci/hotplug/ibmphp_hpc.c: In function ‘ibmphp_lock_operations’:
drivers/pci/hotplug/ibmphp_hpc.c:797: error: implicit declaration of function ‘down’
drivers/pci/hotplug/ibmphp_hpc.c: In function ‘ibmphp_unlock_operations’:
drivers/pci/hotplug/ibmphp_hpc.c:807: error: implicit declaration of function ‘up’
make[3]: *** [drivers/pci/hotplug/ibmphp_hpc.o] Error 1
make[2]: *** [drivers/pci/hotplug] Error 2
make[1]: *** [drivers/pci] Error 2
make[1]: *** Waiting for unfinished jobs....


# make menuconfig // 查找 PCI ,看到
Symbol: HOTPLUG_PCI_CPCI_GENERIC [=n]                                                                                  │ 
  │ Prompt: Generic port I/O CompactPCI Hotplug driver                                                                     │ 
  │   Defined at drivers/pci/hotplug/Kconfig:120                                                                           │ 
  │   Depends on: HOTPLUG_PCI [=y] && HOTPLUG_PCI_CPCI [=n] && X86 [=y]                                                    │ 
  │   Location:                                                                                                            │ 
  │     -> Bus options (PCI etc.)                                                                                          │ 
  │       -> Support for PCI Hotplug (HOTPLUG_PCI [=y])                                                                    │ 
  │         -> CompactPCI Hotplug driver (HOTPLUG_PCI_CPCI [=n])
把 HOTPLUG_PCI 改为 N
重试
# make -j2
# make modules_install  //The freshly baked modules will be copied into /lib/modules/KERNEL_VERSION
# make install  //系统将会把vmlinuz和System.map复制到/boot目录下同时修改grub
sh /home/Joseph/Desktop/wf/linux-2.6.33.7/arch/x86/boot/install.sh 2.6.33.7-rt29 arch/x86/boot/bzImage /
        System.map "/boot"
ERROR: modinfo: could not find module pata_acpi //没有影响,我不知到什么原因
# reboot
关于实时性能的测试见我的另一篇 ”cyclictest 的使用“

#cyclictest -t1 -p 80 -i 10000 -l 10000
WARNING: High resolution timers not available ///可能是没有禁用 Tickless System
policy: fifo: loadavg: 2.48 1.51 0.64 3/330 28124         

T: 0 (27748) P:80 I:10000 C:    522 Min:   1000 Act: 1000 Avg: 1000 Max:    1000

下面重新修改内核配置:Tickless System (Dynamic Ticks) no
结果还是不可以。。。。。why
CONFIG_HPET_TIMER (High Precision Event Timer) 打开
重试,一切OK

# chrt -f -p 70 2584
改变调度策略

 

我的配置文件 .config

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值