首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >应用RT_PREEMPT

应用RT_PREEMPT
EN

Unix & Linux用户
提问于 2016-07-14 20:04:44
回答 1查看 841关注 0票数 2

我试图在Lubuntu16.04发行版上安装一个带有RT_PREEMPT补丁的内核,并遇到一些我不知道该如何处理的问题。我已经从kernel.org下载了内核v4.4.12 (Linux4.4.12.tar.xz)的源代码和我认为合适的kernel.org修补程序(补丁-4.12-rt20.tar.xz)。我已经将tar xfcdd的内核源代码提取到目录中,然后尝试使用xzcat ../patches-4.4.12.tar.xz | patch -p1应用修补程序(这里的建议是:https://rt.wiki.kernel.org/index.php/RT_抢占_何图)。这个命令只会产生一系列错误,抱怨不存在的文件的补丁、以前应用的修补程序、失败的块等等。一些补丁程序看起来成功了,但是很多补丁都失败了。

这不可能是修补这个内核的正确方法,对吗?知道我哪里出问题了吗?

编辑:下面是一个包含我所看到的错误类型的示例:

代码语言:javascript
复制
rush@lubuntuvm:~/preempt-rt/linux-4.4.12$ xzcat ../patches-4.4.12-rt20.tar.xz | patch -p1
patching file arch/x86/kernel/nmi.c
Hunk #1 FAILED at 231.
Hunk #2 FAILED at 256.
Hunk #3 FAILED at 305.
3 out of 3 hunks FAILED -- saving rejects to file arch/x86/kernel/nmi.c.rej
patching file arch/x86/kernel/reboot.c
patching file include/linux/kernel.h
Hunk #1 succeeded at 255 (offset -4 lines).
Hunk #2 FAILED at 460.
1 out of 2 hunks FAILED -- saving rejects to file include/linux/kernel.h.rej
patching file kernel/panic.c
Hunk #1 FAILED at 61.
1 out of 1 hunk FAILED -- saving rejects to file kernel/panic.c.rej
patching file kernel/watchdog.c
Hunk #1 FAILED at 361.
1 out of 1 hunk FAILED -- saving rejects to file kernel/watchdog.c.rej
patching file kernel/stop_machine.c
Hunk #12 succeeded at 482 (offset -10 lines).
Hunk #13 succeeded at 544 (offset -10 lines).
Hunk #14 succeeded at 648 (offset -10 lines).
patching file block/blk-mq.c
Reversed (or previously applied) patch detected!  Assume -R? [n] n
Apply anyway? [n] 
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file block/blk-mq.c.rej
patching file block/blk-mq.h
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file block/blk-mq.h.rej
patching file net/core/dev.c
Hunk #1 succeeded at 3542 (offset -3 lines).
Hunk #2 succeeded at 3552 (offset -3 lines).
patching file arch/arm64/Kconfig
patching file arch/arm64/include/asm/thread_info.h
patching file arch/arm64/kernel/asm-offsets.c
patching file arch/arm64/kernel/entry.S
can't find file to patch at input line 794
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|2.8.1
|
|patches/0026-hwlat-detector-Use-trace_clock_local-if-available.patch0000644001303100130310000000625512741715155025466 0ustar  rostedtrostedtFrom c184dd4a4a5d88b3223704297a42d1aaab973811 Mon Sep 17 00:00:00 2001
|From: Steven Rostedt <rostedt@goodmis.org>
|Date: Mon, 19 Aug 2013 17:33:26 -0400
|Subject: [PATCH 026/351] hwlat-detector: Use trace_clock_local if available
|
|As ktime_get() calls into the timing code which does a read_seq(), it
|may be affected by other CPUS that touch that lock. To remove this
|dependency, use the trace_clock_local() which is already exported
|for module use. If CONFIG_TRACING is enabled, use that as the clock,
|otherwise use ktime_get().
|
|Signed-off-by: Steven Rostedt <srostedt@redhat.com>
|Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|---
| drivers/misc/hwlat_detector.c | 34 +++++++++++++++++++++++++---------
| 1 file changed, 25 insertions(+), 9 deletions(-)
|
|diff --git a/drivers/misc/hwlat_detector.c b/drivers/misc/hwlat_detector.c
|index c07e85932cbf..0fcc0e38df42 100644
|--- a/drivers/misc/hwlat_detector.c
|+++ b/drivers/misc/hwlat_detector.c
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2016-07-14 21:45:48

你可能想要patch-4.4.12-rt20.patch.xz,而不是patches-4.4.12-rt20.tar.xz。正如扩展提示的那样,后者是一个tar存档,而不是一个补丁文件。显然,它包含与单文件版本相同的补丁,但包含提交消息等。

patch足够聪明,可以忽略无用的东西(显然是tar文件结构),所以有些补丁可以工作。但是,我认为组件补丁可能相互依赖,并且在tar文件中排序错误,因此它不能很好地应用。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/295961

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档