c++ - Applying patch to a package outside of buildroot directory
问题描述
I am trying to apply a patch to a package that is not located within buildroot/package
but elsewhere.
I have added to my buildroot .config the following
BR2_GLOBAL_PATCH_DIR="absolute/path/to/folder"
The folder is correct because if the path wasn't correct, buildroot would error out. So the path to the directory is good.
Using the instructions here and here. I've added a subdirectory with the name that matches the package and adding the patch to that subdirectory but nothing happens.
Buildroot never outputs it's trying to apply patches which leads me to believe buildroot isn't even looking in the BR2_GLOBAL_PATCH_DIR
or calling the apply-patches.sh
in buildroot/support/scripts/
.
Why isn't buildroot trying to apply the patch to my package?
解决方案
Buildroot applies patches only to packages with downloaded source code. In other words, it doesn't apply patches to packages that are taken locally with FOO_SITE_METHOD = local
or with FOO_OVERRIDE_SRCDIR = /path/to/foo
.
If you see output like this:
>>> foo custom Syncing from source dir /path/to/foo
you are in this situation.
-EDIT-
Applying patches in this case is not supported by Buildroot. However, you can work around it with something like this:
define FOO_APPLY_PATCHES
$(APPLY_PATCHES) $(@D) $(addsuffix /$(RAWNAME),$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \*.patch
endef
FOO_POST_RSYNC_HOOKS += FOO_APPLY_PATCHES
推荐阅读
- python - 基于两个数据帧中的多列将值从一个映射到另一个df
- javascript - 如何使用 querySelectorAll 中的变量来选择直接子级
- reactjs - FCM 通知在前台和后台接收两次
- python - 根据特定条件通过 cumsum() (或任何其他此类函数)评估 df['column'] 的总和。熊猫
- java - 为什么当我在 Android 中强制删除暗模式时,我的登录 Activity 会弹出错误
- configuration - 任何用于管理外部配置数据的 GUI?
- reactjs - 反应路由器 v6 嵌套路由不显示子元素
- javascript - 无法使在 reactjs 中工作的 nextjs 中的包运行
- node.js - PM2 生态系统配置的最佳选择是什么
- python - 如何不切割 matplotlib 图