我正在使用Yocto中的meta层为SAMA5D4板创建一个图像。
我已经创建了一个自定义层&希望用我创建的一个diff修补一个文件(特别是https://github.com/linux4sam/egt/blob/master/src/app.cpp):
index 869b1e2..c86ad1a 100644
--- a/app.cpp
+++ b/app.cpp.modified
@@ -342,8 +342,9 @@ void Application::setup_inputs()
}
}
+// Modify to force use of tslib
#ifdef HAVE_LIBINPUT
- m_inputs.push_back(std::make_unique<detail::InputLibInput>(*this));
+// m_inputs.push_back(std::make_unique<detail::InputLibInput>(*this));
#endif
}
我在自定义层中重新创建了目录结构,以匹配要更改的文件的位置:
yocto/meta-atmel/recipes-graphics/libegt/libegt_1.2.bb
yocto/meta-custom2/recipes-graphics/libegt/libegt_%.bbappend
我的bbappend文件是:
# Modify https://github.com/linux4sam/egt/src/app.cpp
# Issue with file path
SRC_URI += "file:0001-disable-libinput.patch"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PACKAGE_ARCH = "${MACHINE_ARCH}"
如何将我的补丁文件正确地包含到我想要修改的文件中?
非常感谢你的寻找!
发布于 2022-01-14 14:05:42
看来我已经解决了这个问题。
我将diff文件移到目录中:
yocto/meta-custom2/recipes-graphics/libegt/files
并纠正了一些错误:
差异应是:
diff --git a/src/app.cpp b/src/app.cpp
index 869b1e2..c86ad1a 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -342,8 +342,9 @@ void Application::setup_inputs()
}
}
+// Modify to force use of tslib
#ifdef HAVE_LIBINPUT
- m_inputs.push_back(std::make_unique<detail::InputLibInput>(*this));
+// m_inputs.push_back(std::make_unique<detail::InputLibInput>(*this));
#endif
}
其中'/src/app.cpp‘引用需要修补的文件的位置(例如,如果执行git克隆,则类似)。接下来,我的bbappend应该是:
# Modify https://github.com/linux4sam/egt/src/app.cpp
SRC_URI += "file://0001-disable-libinput.patch"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PACKAGE_ARCH = "${MACHINE_ARCH}"
希望这对其他人有帮助&感谢Yocto/ OE团队的努力!
https://stackoverflow.com/questions/70711184
复制相似问题