buildroot --- BR2_EXTERNAL(添加外部 package,不改变 buildroot 任何内容)
步骤一
package 包含源代码和 Config.in、*.mk 两个文件
参考:https://www.cnblogs.com/god-of-death/p/18258675
步骤二
make -C $(buildroot 文件夹路径) BR2_EXTERNAL=$(BR2_EXTERNAL_XXX_PATH),可以不修改 buildroot/package 路径下的内容实现编译引用外部 package
BR2_EXTERNAL_XXX_PATH 路径下的文件夹需要包含如下三个文件:
external.desc external.mk Config.in
external.desc 包含描述信息,如:
name: REMO
desc: remo vendor-specific buildroot directory.
external.mk 包含所有 package 的 mk 文件,内容可为
include $(sort $(wildcard $(BR2_EXTERNAL_XXX_PATH)/package/*/*.mk))
Config.in 包含 package 的 Config.in,如:
source "$BR2_EXTERNAL_REMO_PATH/package/remo-sdk/Config.in" source "$BR2_EXTERNAL_REMO_PATH/package/thirdparty/Config.in.host" source "$BR2_EXTERNAL_REMO_PATH/package/thirdparty/Config.in" source "$BR2_EXTERNAL_REMO_PATH/package/tools/Config.in.host"