Yocto 应用并提交bitbake recipe中的修补程序

Yocto 应用并提交bitbake recipe中的修补程序,yocto,bitbake,openembedded,texas-instruments,Yocto,Bitbake,Openembedded,Texas Instruments,我注意到yocto构建系统只是在应用我的补丁,而不是在克隆的git repo上应用和提交补丁 原始bitbake(u-boot-ti-staging_2018.01.bb)文件 修改了bitbake文件,向文件中添加了SRC_URI require u-boot-ti.inc PR = "r19" BRANCH = "ti-u-boot-2018.01" SRCREV = "8b2f1df4b55bc0797399a21d42ac191d44f99227" SRC_URI += "fil

我注意到yocto构建系统只是在应用我的补丁,而不是在克隆的git repo上应用和提交补丁

原始bitbake(u-boot-ti-staging_2018.01.bb)文件

修改了bitbake文件,向文件中添加了SRC_URI

require u-boot-ti.inc

PR = "r19"

BRANCH = "ti-u-boot-2018.01"

SRCREV = "8b2f1df4b55bc0797399a21d42ac191d44f99227"

SRC_URI += "file://0001-Stopping-DHCP-server-giving-new-serverip.patch \
        "
我在files目录下添加了一个补丁文件。修补程序(0001停止DHCP服务器提供新的serverip.patch)文件的内容如下所示

From cf97b6053f00afd496d01a892599cd8f4b254087 Mon Sep 17 00:00:00 2001
From: Sunny Shukla <sunny.shukla@xyz.com>
Date: Wed, 19 Sep 2018 18:23:49 +0530
Subject: [PATCH] Stopping DHCP server giving new serverip

Added CONFIG_BOOTP_SERVERIP in the config file, this
stops the DHCP server gives new "serverip" address and 
overrides the current one.
---
 include/configs/am335x_evm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 01f0277..4b3047d 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -18,6 +18,8 @@

 #include <configs/ti_am335x_common.h>

+#define CONFIG_BOOTP_SERVERIP
+
 #ifndef CONFIG_SPL_BUILD
 # define CONFIG_TIMESTAMP
 #endif
-- 
2.7.4
来自cf97b6053f00afd496d01a892599cd8f4b254087 2001年9月17日星期一00:00:00
发件人:Sunny Shukla
日期:2018年9月19日星期三18:23:49+0530
主题:[修补程序]正在停止提供新serverip的DHCP服务器
在配置文件中添加了CONFIG_BOOTP_SERVERIP,如下所示
停止DHCP服务器并提供新的“serverip”地址和
覆盖当前的。
---
包括/配置/am335x|evm.h|2++
1个文件已更改,2个插入(+)
diff—git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
索引01f0277..4b3047d 100644
---a/include/configs/am335x_evm.h
+++b/include/configs/am335x_evm.h
@@ -18,6 +18,8 @@
#包括
+#定义配置\u引导\u服务器IP
+
#ifndef配置\u SPL\u构建
#定义配置时间戳
#恩迪夫
-- 
2.7.4
该修补程序正在应用,就像有人在克隆的git repo上执行“git apply 0001 Stopping DHCP server git new serverip.patch”命令一样,如下所示。但是,我希望必须像有人在克隆的git repo上执行“git am 0001 Stopping DHCP server to new serverip.patch”命令一样应用补丁

git状态

On branch ti-u-boot-2018.01
Your branch is behind 'origin/ti-u-boot-2018.01' by 23 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   include/configs/am335x_evm.h

no changes added to commit (use "git add" and/or "git commit -a") 
分支机构ti-u-boot-2018.01上的

您的分支机构落后于'origin/ti-u-boot-2018.01'23次提交,可以快速转发。
(使用“git pull”更新您的本地分支)
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git签出--…”放弃工作目录中的更改)
修改:include/configs/am335x_evm.h
未向提交添加任何更改(使用“git add”和/或“git commit-a”)

我希望在克隆的git repo之上应用并提交此修补程序。如何在bitbake文件下实现这一点?

默认情况下,当未指定修补工具时,Yocto使用
缝合线。您可以指定

PATCHTOOL = "git"
在您的配方中,以便Yocto使用“git am”自动应用它

有关更多详细信息,请参阅

注意:此功能将开始在修补程序的描述中添加一行额外内容,如“应用修补程序时,%%原始修补程序:0001停止DHCP服务器提供新的serverip.patch”。要删除它,请在“oe-core/meta/lib/oe/patch.py”文件下的下面一行添加注释


Yocto在默认情况下,在未指定修补工具的情况下使用
Cutter
。您可以指定

PATCHTOOL = "git"
在您的配方中,以便Yocto使用“git am”自动应用它

有关更多详细信息,请参阅

注意:此功能将开始在修补程序的描述中添加一行额外内容,如“应用修补程序时,%%原始修补程序:0001停止DHCP服务器提供新的serverip.patch”。要删除它,请在“oe-core/meta/lib/oe/patch.py”文件下的下面一行添加注释


No没有像“git am”那样做,它仍然在做“git apply”。我更改了do_patch_prepend()函数下的PATCHTOOL=“git”。变量的作用域将在
prepend
后丢失并销毁。所以你需要定义外部,比如说
SRC_URI
你能解释一下怎么做吗,我对yocto很不熟悉。这很有效。我只是把PATCHTOOL=“git”放在SRC_URI上面,它就像一个champ。谢谢,如果答案能回答你的问题,请接受。谢谢。没有做过像“git am”这样的事情,它还在做“git apply”。我更改了do_patch_prepend()函数下的PATCHTOOL=“git”。变量的作用域将在
prepend
后丢失并销毁。所以你需要定义外部,比如说
SRC_URI
你能解释一下怎么做吗,我对yocto很不熟悉。这很有效。我只是把PATCHTOOL=“git”放在SRC_URI上面,它就像一个champ。谢谢,如果答案能回答你的问题,请接受。谢谢