I am currently learning openBMC by analyzing the bitbake build process. I have encountered a question about how bitbake connects image recipes and kernel recipes.
Using IBM Romulus as an example:
The PREFERRED_PROVIDER_virtual/kernel will be set "linux-aspeed" in the read configuration stage
Here is a simplified hierarchy of the configuration files:
conf/bitbake.conf
/home/leo/Documents/openbmc/meta-ibm/meta-romulus/conf/machine/romulus.conf
/home/leo/Documents/openbmc/meta-aspeed/conf/machine/include/ast2500.inc
/home/leo/Documents/openbmc/meta/conf/machine/include/soc-family.inc
/home/leo/Documents/openbmc/meta-aspeed/conf/machine/include/aspeed.inc
As far as I know, the purpose of PREFERRED_PROVIDER_virtual/kernel is to select a preferred kernel recipe when there are multiple providers. In the case of "linux-aspeed," the linux-aspeed.inc file indeed contains PROVIDES += "virtual/kernel".
However, these variables alone do not determine whether the build process should proceed directly.
When compiling with bitbake obmc-phosphor-image, the process goes through the following hierarchy:
obmc-phosphor-image.bb
obmc-phosphor-image.bbclass
core-image.bbclass
image.bbclass
For installing other recipes, the common method is to pass the package or recipe name to the PACKAGE_INSTALL variable. However, there is no information in these files about using FEATURE_PACKAGES to record dependencies like DEPENDS or RDEPENDS:${PN} = "virtual/kernel".
Or specify the recipe directly via OBMC_IMAGE_EXTRA_INSTALL.
In image.bbclass, there are sections like:
KERNELDEPMODDEPEND ?= "virtual/kernel:do_packagedata"
do_rootfs[depends] += " \
makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND} \
virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot \
${KERNELDEPMODDEPEND} \"
KERNEL_DEPLOY_DEPEND ?= "virtual/kernel:do_deploy"
do_build[depends] += "${KERNEL_DEPLOY_DEPEND}"
These sections might be relevant, but I'm not sure it's what I'm looking for. If anyone can give me some advice, very grateful.
I tried searching virtual/kernel.
openbmc\meta-openembedded\meta-oe\recipes-core\packagegroups\packagegroup-boot.bb is the one that most closely matches what I think I'm thinking of, but it seems that the core-image.bbclass uses the packagegroup-core-boot not packagegroup-boot.bb