使用BR2_EXTERNAL修改Buildroot源码包的自动工具选项的正确方法是什么? [英] What is the proper method to modify the autotools options of a Buildroot source package using BR2_EXTERNAL?

查看:743
本文介绍了使用BR2_EXTERNAL修改Buildroot源码包的自动工具选项的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改Buildroot中包含的软件包的<PKG>_CONF_OPTS配置选项,而不更改基线<pkg>.mk文件.根据我正在阅读的内容,不必使用BR2_PACKAGE_OVERRIDE_FILE完全覆盖该软件包,因为我不想更改源代码或其他重要内容.

I want to change the <PKG>_CONF_OPTS config options for a package included in Buildroot without altering the baseline <pkg>.mk file. Based on what I'm reading, it shouldn't be necessary to completely override the package using the BR2_PACKAGE_OVERRIDE_FILE as I don't want to change the source or anything else significant.

已建议可以使用BR2_EXTERNALexternal.mk完成此操作,但是我找不到任何示例,并且我的尝试失败了.就我所知,Buildroot文档对这个主题没有任何提及,只是解释了新软件包的创建,而不是对包含软件包的构建自定义.

It has been suggested that this can be done using BR2_EXTERNAL and external.mk, but I cannot find any examples and my attempts have failed. The Buildroot documentation is quite silent on this topic, as near as I can tell, and instead only explains the creation of new packages rather than the build customization of included packages.

我已经尝试像在<PKG>_CONF_OPTS += --new-option中一样直接在external.mk中添加行,但这没有效果.我还尝试过在package/<pkg>/<pkg>.mk中创建补充的makefile,并在Config.in文件中为新"程序包填充所需的信息,但这也失败了.

I have tried adding lines to external.mk directly as in <PKG>_CONF_OPTS += --new-option but this has no effect. I have also tried creating a supplementary makefile in package/<pkg>/<pkg>.mk and filling in the needed information in the Config.in files for a "new" package but this has also failed.

我引用了一些相关的问题,但没有给出完整的答案,因此我希望在这里找到常规方法并进行记录.

I have referenced a couple of related questions that do not have complete answers given, so I am hoping to discover the general method and document it here.

如何传递额外的自定义./configure autotools options到Buildroot包?

Buildroot :仅将一个程序包构建为共享库和静态库,所有其他程序仅共享

希望有几个提示,我们可以弄清楚这个问题,然后为其他人记录下来.

Hopefully with a couple hints we can get this figured out and then documented for others.

对此进行了大量测试,并且有趣的是,即使直接在现有软件包中对_CONF_OPTS进行更改的健全性检查"案例也没有达到预期的效果.在我的情况下(尝试对一个特定程序包进行静态链接构建,同时使其他所有内容保持动态),我发现_defconfig中存在或不存在BR2_STATIC_LIBS取决于最终的构建命令,尽管存在相反的认识,但它控制着一切.所有的构建日志.

Done quite a bit of testing with this, and it's interesting to note that even the "sanity check" case of making the changes to _CONF_OPTS directly in the existing package is not having the desired effect. In my case (trying to do a static linkage build of one particular package while leaving everything else dynamic) I find that the presence or absence of BR2_STATIC_LIBS in the _defconfig controls everything when it comes down to the final build command, despite acknowledgement to the contrary all throughout the build logs.

推荐答案

似乎没有令人满意的方法来完成此任务.经过更详细的制作过程后,我发现顶级defconfig BR2_选项将覆盖各个软件包选项(例如,就我而言,是否存在BR2_STATIC_LIBS).

It would appear that there is no satisfactory way to accomplish this. After going through the make process in more detail, I find that the top level defconfig BR2_ options override the individual package options (such as, in my case, the presence or absence of BR2_STATIC_LIBS).

这篇关于使用BR2_EXTERNAL修改Buildroot源码包的自动工具选项的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆