特定于计算机的版本中的通配符



假设我有这些机器:

  • 机器1A
  • 机器1b
  • 机器2

有没有办法一次响应所有机器1?

例如,在 *.bbappend 文件中:

SRC_URI_machine1* += "file://file/for/machines/of/type/1"

而不是:

SRC_URI_machine1a += "file://file/for/machines/of/type/1"
SRC_URI_machine1b += "file://file/for/machines/of/type/1"

不,通配符不能以这种方式使用。

您可以通过多种不同的方式处理它。一种方法是为设备系列添加通用计算机覆盖。

执行此操作的一种简单方法是将以下内容添加到 machine1a 和 machine1b 的计算机配置(或通用包含文件)中。

SOC_FAMILY = "machine1-common"
include conf/machine/include/soc-family.inc

通过这样做,你可以写

SRC_URI_machine1-common += "file://file/for/machines/of/type/1"

这将适用于机器1a和机器1b。

soc-family.inc所做的是

# Add SOC_FAMILY to machine overrides so we get access to e.g. 'omap3' and 'ti335x'
SOC_FAMILY ??= ""
MACHINEOVERRIDES =. "${@['', '${SOC_FAMILY}:']['${SOC_FAMILY}' != '']}"

如果您已经在使用 SoC,其 BSP 已使用 SOC_FAMILY ,则可以改为将以下行添加到 machine1a.confmachine1b.conf

MACHINEOVERRIDES =. "machine1-common:"

最新更新