应用RT补丁时,“可以在输入行5中找到要修补文件的文件”。

发布于 2025-02-07 23:16:59 字数 2286 浏览 1 评论 0原文

我正在尝试将RT内核安装在我的Ubuntu 18笔记本电脑上以非常高的反馈率工作。这是我第一次尝试类似的事情,我不知道自己在做什么。 (对不起)

我正在按照在这里





我下载了这些文件:patches-5.4.193-rt74.tar.xzpatch-5.4.193-rt74.patch.xz
然后根据这样的说明打开包装patches-5.4.193-rt74.tar.xz

xz -cd patches-5.4.193-rt74.tar.xz | tar xvf -  

现在我的文件夹看起来像这样:

patch-5.4.193-rt74.patch.xz  patches  patches-5.4.193-rt74.tar.xz

我有文件夹patches包含许多文件使用扩展名为“ .patch”。根据指令,我应该导航到文件夹中:

cd patches  

最后,我尝试应用补丁:

xzcat ../patch-5.4.193-rt74.patch.xz | patch -p1

并获取以下消息:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html b/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
|index 57300db4b5ff..31c99382994e 100644
|--- a/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
|+++ b/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
--------------------------
File to patch:

我看到这个问题,但我不知道如何将其应用于我的案件。我尝试使用-p0而不是-p1,并尝试在没有选项的情况下运行命令,但这无济于事。我读了手册man patch,但是我也没有帮助我解决问题

,我也尝试了使用较旧版本的相同过程,唯一的区别是,有时它不是在寻找文档/rcu/design/expedited-grace-periods/expedited-grace-periods.html,但其他某些文件

请解释我在做什么,或将我引向我可以从

我不确定标签的 材料中我选择的是相关的,请随时纠正我,


所以我的文件夹看起来像这样:

  • rt_kernel_build
    • Patch-5.4.193-rt74.patch.xz
    • 补丁
      • 0001-lib-smp_processor_id-don-d-t-use-cpumask_equal.patch
      • ...
    • patches-5.4.193-rt74.tar.xz

i呼叫xzcat ../patch-5.4.193-rt74.patch.xz | xz |补丁-P1 in 补丁文件夹

I am trying to install RT kernel on my Ubuntu 18 laptop to work with very high feedback rate. This is my first time attempting something similar and I have no idea what I am doing. (Sorry)

I am following instructions from here
I dowloaded these files: patches-5.4.193-rt74.tar.xz and patch-5.4.193-rt74.patch.xz.
Then unpacked patches-5.4.193-rt74.tar.xz according to instructions like this:

xz -cd patches-5.4.193-rt74.tar.xz | tar xvf -  

Now my folder looks like this:

patch-5.4.193-rt74.patch.xz  patches  patches-5.4.193-rt74.tar.xz

I got folder patches which contains a lot of files with extension ".patch". According to the instruction I should navigate into the folder:

cd patches  

Finally, I attempt to apply patch:

xzcat ../patch-5.4.193-rt74.patch.xz | patch -p1

And get the following message:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html b/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
|index 57300db4b5ff..31c99382994e 100644
|--- a/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
|+++ b/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
--------------------------
File to patch:

I saw this issue, but I don't know how to apply it to my case. I tried to use -p0 instead of -p1 and tried to run the command without the option, but it doesn't help. I read the manual man patch, but it didn't help me to solve the issue

I also tried the same procedure with older versions, the only difference was that it sometimes was looking not for Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html but some other files

Please explain what I am doing wrong, or direct me to a material I can learn from

I am not sure if tags I chose are relevant, feel free to correct me


So in the end my folder looks like this:

  • rt_kernel_build
    • patch-5.4.193-rt74.patch.xz
    • patches
      • 0001-lib-smp_processor_id-Don-t-use-cpumask_equal.patch
      • ...
    • patches-5.4.193-rt74.tar.xz

I call xzcat ../patch-5.4.193-rt74.patch.xz | patch -p1 in patches folder

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文