首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >如何解决修补错误,hunk失败

如何解决修补错误,hunk失败
EN

Unix & Linux用户
提问于 2021-12-15 03:16:00
回答 1查看 6.7K关注 0票数 1

我试图添加一个关于最后一个内核的补丁,但不知道为什么不能工作。好主意?谢谢

代码语言:javascript
运行
复制
openwrtt$ patch -p1 < kernel.patch
patching file include/kernel-version.mk
Hunk #1 FAILED at 7.
1 out of 1 hunk FAILED -- saving rejects to file include/kernel-version.mk.rej
patching file target/linux/bcm27xx/patches-5.10/950-0139-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
patching file target/linux/bcm27xx/patches-5.10/950-0151-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
patching file target/linux/bcm27xx/patches-5.10/950-0249-kbuild-Disable-gcc-plugins.patch
patching file target/linux/bcm27xx/patches-5.10/950-0323-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch
patching file target/linux/bcm27xx/patches-5.10/950-0657-Documentation-devicetree-Add-documentation-for-imx37.patch
patching file target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch
Hunk #1 FAILED at 26.
1 out of 1 hunk FAILED -- saving rejects to file target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch.rej
patching file target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch
patching file target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
patching file target/linux/generic/pending-5.10/834-ledtrig-libata.patch
patching file target/linux/oxnas/patches-5.10/999-libata-hacks.patch
patching file target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2021-12-15 11:24:07

patch命令告诉您哪些文件已成功修补,哪些没有。例如,

修补程序-p1 < kernel.patch修补文件包含/内核-version.mkhunk #1在1次失败时失败-保存文件包含/内核-version.mk.rej

您需要查看拒绝的文件,在本例中是include/kernel-version.mk.rej,并尝试确定为什么不能将修补程序应用于文件include/kernel-version.mk。因为您没有使用-l (--ignore-whitespace)标志,所以可能是一些简单的东西,比如不同的间距。一旦您确定了问题,您需要应用修补程序,可能是手动的。

然后,对另一个失败的修补程序重复处理。

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

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

复制
相关文章

相似问题

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