Buildroot 补丁未应用于覆盖包?
Buildroot patches not applied for overriden package?
我正在使用 Buildroot(2017.02 版)中的补丁,但是当我覆盖 local.mk
中的包源时:
PACKAGENAME_OVERRIDE_SRCDIR = /...path_to_local_checkout
我看到 Buildroot 补丁没有应用到这个包。
仅当包未在 local.mk 中被覆盖时才应用它们。
这是预期的行为吗?
备注:
- 我没有在 Buildroot 手册中找到问题的答案:
https://buildroot.org/downloads/manual/manual.html#patch-apply-order
- 我正在测试的包是 Linux 内核,但我想它是无关的。
- 我把我的补丁放在全局补丁目录
board/company_name/common/patches/...
是的,这是预期的行为。如果您使用 <pkg>_OVERRIDE_SRCDIR
,则该包的源代码树在本地可用,因此您应该将补丁应用到您的源代码树。 Buildroot 无法知道您正在使用哪个版本的包,因此它在 package/<pkg>
中的补丁可能不适用,这就是为什么如您所见,补丁未应用于覆盖包的行为。
基本上,常规包的流程是:下载 -> 提取 -> 补丁 -> 配置 -> 构建 -> 安装。
覆盖包的流程是:rsync -> 配置 -> 构建 -> 安装。
此行为记录在 current version of the documentation:
When Buildroot finds that for a given package, an <pkg>_OVERRIDE_SRCDIR
has been defined, it will no longer attempt to download, extract and patch the package. Instead, it will directly use the source code available in the specified directory and make clean will not touch this directory. This allows to point Buildroot to your own directories, that can be managed by Git, Subversion, or any other version control system. To achieve this, Buildroot will use rsync to copy the source code of the component from the specified <pkg>_OVERRIDE_SRCDIR
to output/build/-custom/.
我会去将所有 Buildroot 补丁应用到包中并保持它们 git 跟踪。
他们中的大多数(TODO 全部?)似乎是从 master 的未来版本中挑选出来的,所以我会尽可能多地挑选它们。
如果 Buildroot 本身可以为每个包使用 git 子模块并将其保存在他们的分支下,那就太好了:github.com/buildroot/ 但可能存在技术限制这例如 Git 浅克隆烦恼。
我正在使用 Buildroot(2017.02 版)中的补丁,但是当我覆盖 local.mk
中的包源时:
PACKAGENAME_OVERRIDE_SRCDIR = /...path_to_local_checkout
我看到 Buildroot 补丁没有应用到这个包。
仅当包未在 local.mk 中被覆盖时才应用它们。
这是预期的行为吗?
备注:
- 我没有在 Buildroot 手册中找到问题的答案: https://buildroot.org/downloads/manual/manual.html#patch-apply-order
- 我正在测试的包是 Linux 内核,但我想它是无关的。
- 我把我的补丁放在全局补丁目录
board/company_name/common/patches/...
是的,这是预期的行为。如果您使用 <pkg>_OVERRIDE_SRCDIR
,则该包的源代码树在本地可用,因此您应该将补丁应用到您的源代码树。 Buildroot 无法知道您正在使用哪个版本的包,因此它在 package/<pkg>
中的补丁可能不适用,这就是为什么如您所见,补丁未应用于覆盖包的行为。
基本上,常规包的流程是:下载 -> 提取 -> 补丁 -> 配置 -> 构建 -> 安装。
覆盖包的流程是:rsync -> 配置 -> 构建 -> 安装。
此行为记录在 current version of the documentation:
When Buildroot finds that for a given package, an
<pkg>_OVERRIDE_SRCDIR
has been defined, it will no longer attempt to download, extract and patch the package. Instead, it will directly use the source code available in the specified directory and make clean will not touch this directory. This allows to point Buildroot to your own directories, that can be managed by Git, Subversion, or any other version control system. To achieve this, Buildroot will use rsync to copy the source code of the component from the specified<pkg>_OVERRIDE_SRCDIR
to output/build/-custom/.
我会去将所有 Buildroot 补丁应用到包中并保持它们 git 跟踪。
他们中的大多数(TODO 全部?)似乎是从 master 的未来版本中挑选出来的,所以我会尽可能多地挑选它们。
如果 Buildroot 本身可以为每个包使用 git 子模块并将其保存在他们的分支下,那就太好了:github.com/buildroot/ 但可能存在技术限制这例如 Git 浅克隆烦恼。