【问题标题】:Yocto - applying a bbappend file to a recipe (from github)Yocto - 将 bbappend 文件应用于配方(来自 github)
【发布时间】:2022-01-14 22:51:25
【问题描述】:

我正在使用 Yocto 中的 meta-atmel 层为 SAMA5D4 板创建图像。

我已经创建了一个自定义层并且想用我创建的差异修补一个文件(特别是 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}"

如何正确地将我的补丁文件包含到我要修改的文件中?

非常感谢您的观看!

【问题讨论】:

    标签: yocto bitbake


    【解决方案1】:

    看来我可能已经解决了这个问题。

    我将我的 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 clone 则类似)。接下来我的 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 的团队!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-30
      • 1970-01-01
      • 1970-01-01
      • 2018-01-11
      • 1970-01-01
      • 2018-03-08
      • 1970-01-01
      • 2017-01-01
      相关资源
      最近更新 更多