我有一个DTS补丁文件,用于将EEPROM添加到设备树中。我有一个.bbappend
包含以下几行简单代码的配方:
PATCHTOOL = "git"
SRC_URI += " \
file://0001-imx6dl-custom.dts.patch \
"
我启动了 bitbake,应用了补丁并生成了图像。
我调整了一些其他的东西。当我再次启动 bitbake 时,在步骤 1 中收到了一个错误do_patch
,内容如下:
NOTE: Executing Tasks
NOTE: Setscene tasks completed
ERROR: linux-custom-5.4-r0 do_patch: Applying '0001-imx6dl-custom.dts.patch' failed:
checking file arch/arm/boot/dts/imx6dl-custom.dts
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
ERROR: Logfile of failure stored in: /home/user/yocto/build/tmp/work/custom_imx6dl_r027-poky-linux-gnueabi/linux-custom/5.4-r0/temp/log.do_patch.19802
ERROR: Task (/home/user/yocto/sources/meta-custom/recipes-kernel/linux-mod/linux-custom_5.4.bb:do_patch) failed with exit code '1'
工作共享文件夹中的 dts 文件已应用补丁。如果我git log
在工作共享文件夹中执行 dts 命令,我会看到我的内核源代码的最后一次提交(其中 dts 文件尚未打补丁)以及一个oe.pathc@oe
应用补丁的额外提交。所以看起来一切正常。但是,我还是收到这个错误。
造成这种情况的原因是什么?
我做了一些额外的测试。我从内核配方中删除了补丁以及应用该补丁的 .bbappend 文件。奇怪的是,bitbake 似乎仍在尝试应用该补丁。当我运行 bitbake 时,我得到了
Loaded 4146 entries from dependency cache.
WARNING: /home/user/yocto/sources/meta-custom/recipes-kernel/linux/linux-custom_5.4.bb: Unable to get checksum for linux-custom SRC_URI entry 0001-imx6dl-custom.dts.patch: file could not be found
0001-imx6dl-custom.dts.patch
确实被删除了,但.bbappend
文件确实被删除了。为什么它还在寻找它?我尝试了各种清理命令(bitbake -c clean linux-custom
、bitbake -fc cleanall linux-custom
),但 bitbake 仍然在寻找补丁。而且我仍然收到“先前应用的”补丁错误!
我的 Yocto 工作流程中是否存在一些不会被删除的历史记录?我遗漏了什么?