RT_PREEMPTの適用

RT_PREEMPTの適用

Lubuntu 16.04ディストリビューションにRT_PREEMPTパッチを含むカーネルをインストールしようとしていますが、どのように処理するのかわからないいくつかの問題が発生しました。カーネルv4.4.12(linux-4.4.12.tar.xz)のソースコードをカーネルからダウンロードし、適切であると思われるRT_PREEMPTパッチ(patches-4.4.12-rt20.tar.xz)をダウンロードしました。整理する。私はtar xf、 'dを使用してカーネルソースをcdディレクトリに抽出し、パッチを適用しようとしましたxzcat ../patches-4.4.12.tar.xz | patch -p1(ここで提案されているように:https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO)。このコマンドは、存在しないファイルに対するパッチ、以前に適用されたパッチ、失敗したパッチなどについて不平を言う多くのエラーを生成します。一部のパッチブロックは成功しているように見えましたが、多くのパッチブロックが失敗しました。

これはこのカーネルをパッチする正しい方法にはなりません。そうですか?私はどこに間違っているのを知っていますか?

編集:以下は、私が見ているエラーの種類を扱う例です。

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 <[email protected]>
|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 <[email protected]>
|Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
|---
| 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

ベストアンサー1

あなたはそれを取りたいと思うかもしれませんがpatch-4.4.12-rt20.patch.xz、そうではありませんpatches-4.4.12-rt20.tar.xz。拡張が示すように、後者は単一のパッチファイルではなくtarアーカイブです。明らかに、単一のファイルバージョンと同じパッチが含まれていますが、コミットメッセージなどが含まれています。

patch役に立たないもの(当然のことながらtarファイル構造など)を無視するのに十分賢くなければ、いくつかのパッチが機能します。しかし、コンポーネントのパッチが互いに依存していて、tarファイルの順序が間違っているため、完全に適用されない可能性があると思います。

おすすめ記事