我正在尝试使用preempt-rt
修补Linux以获取软RTOS。
我已经安装了内核版本为5.0.0的Ubuntu19.04,并下载了版本为5.0.21的Linux源代码以及
的preempt-rt
补丁程序。
https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.0/
当我尝试修补Linux源代码时,遇到了一些hunk
错误,它们指出can't find file to patch at input line ****
。
我用来修补源代码的命令是
sudo xzcat ../patches-5.0.21-rt16.tar.xz | sudo patch -p1
我遇到的第一个错误如下:
patching file drivers/leds/trigger/Kconfig
patching file include/linux/list_bl.h
Hunk #1 FAILED at 43.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/list_bl.h.rej
patching file include/linux/list_bl.h
can't find file to patch at input line 22082
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|patches/locallock-provide-get-put-_locked_ptr-variants.patch000066400000000000000000000025161351134070600246360ustar00rootroot00000000000000From: Julia Cartwright <julia@ni.com>
|Date: Mon, 7 May 2018 08:58:56 -0500
|Subject: [PATCH] locallock: provide {get,put}_locked_ptr() variants
|
|Provide a set of locallocked accessors for pointers to per-CPU data;
|this is useful for dynamically-allocated per-CPU regions, for example.
|
|These are symmetric with the {get,put}_cpu_ptr() per-CPU accessor
|variants.
|
|Signed-off-by: Julia Cartwright <julia@ni.com>
|Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|---
| include/linux/locallock.h | 10 ++++++++++
| 1 file changed, 10 insertions(+)
|
|--- a/include/linux/locallock.h
|+++ b/include/linux/locallock.h
--------------------------
File to patch:
从错误消息中看,补丁似乎试图编辑一个不存在的文件/include/linux/locallock.h。