在Yocto中激活发行层



在Yocto中使用发行版层需要哪些步骤?

目前,我有以下设置:

meta-my-distro-layer/conf/发行版/mydistro.conf:

DISTROOVERRIDES =. "poky:"
require conf/distro/poky.conf
DISTRO = "mydistro"
DISTRO_NAME = "MyDistro"
DISTRO_VERSION = "1.0"
DISTRO_CODENAME = "one"
INIT_MANAGER = "systemd"

meta-my-distro-layer/conf/layer.conf

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb 
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-my-distro-layer"
BBFILE_PATTERN_meta-my-distro-layer = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-my-distro-layer = "6"
LAYERDEPENDS_meta-my-distro-layer = "core"
LAYERSERIES_COMPAT_meta-my-distro-layer = "kirkstone"

meta-my-distro-layer/recipes-core/图片/console-image.bb

DESCRIPTION = "A console-only image"
IMAGE_FEATURES += "ssh-server-openssh"
IMAGE_INSTALL = "
packagegroup-core-boot 
packagegroup-core-full-cmdline 
${CORE_IMAGE_EXTRA_INSTALL} 
"
inherit core-image
IMAGE_INSTALL += "curl"

构建/conf/bblayers.conf:

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " 
/my-work-dir/poky/meta 
/my-work-dir/poky/meta-poky 
/my-work-dir/poky/meta-yocto-bsp 
/my-work-dir/poky/meta-my-distro-layer 
"

我可以构建在该层中定义的控制台映像,但mydistro.conf中的设置似乎对bitbake没有任何影响。根据bitbake -e, DISTRO和INIT_MANAGER永远不会被设置为我的值,(因此)尝试将INIT_MANAGER设置为systemd永远不会生效。我可以在conf/local.conf中设置INIT_MANAGER,然后它就会生效,但我想在发行版层中这样做。

需要将"local.conf"中的"DISTRO"设置为"mydistro">