Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBMASK exclusion for rpi-config_%.bbappend should use override :append syntax #1101

Closed
jdiez17 opened this issue Feb 9, 2024 · 3 comments
Closed
Assignees

Comments

@jdiez17
Copy link
Contributor

jdiez17 commented Feb 9, 2024

Describe the bug
In my build (for a phyboard-pollux-imx8mp), I get the following build error:

ERROR: No recipes in default available for:
  /workdir/meta-ros/meta-ros-common/recipes-bsp/bootfiles/rpi-config_%.bbappend

This appears to be because the BBMASK append in meta-ros-common uses the += append syntax, and presumably the value of BBMASK is reset by something else in my build configuration.

Unfortunately, I cannot get the variable history with bitbake-getvar -r raccoon-image-minimal BBMASK because of the error above.

However, changing the above linked line in meta-ros-config to be an :append does cause the build to work correctly.

diff --git a/meta-ros/meta-ros-common/conf/ros-distro/ros-distro.conf b/meta-ros/meta-ros-common/conf/ros-distro/ros-distro.conf
index 8e38ab60034..8a264f0724b 100644
--- a/meta-ros/meta-ros-common/conf/ros-distro/ros-distro.conf
+++ b/meta-ros/meta-ros-common/conf/ros-distro/ros-distro.conf
@@ -47,7 +47,7 @@ ROS_EXTRA_BUILDCFG_VARS ?= "DISTRO_NAME ROS_DISTRO ROS_VERSION ROS_PYTHON_VERSIO
 BUILDCFG_VARS:append = " ${ROS_EXTRA_BUILDCFG_VARS}"

 # Ignore metadata that requires meta-raspberrypi if it's not present.
-BBMASK +=  "${@bb.utils.contains('BBFILE_COLLECTIONS', 'raspberrypi', '', 'recipes-bsp/bootfiles/rpi-config_%.bbappend', d)}"
+BBMASK:append =  " ${@bb.utils.contains('BBFILE_COLLECTIONS', 'raspberrypi', '', 'recipes-bsp/bootfiles/rpi-config_%.bbappend', d)}"

After the change, this is the variable history of BBMASK:

#
# $BBMASK [3 operations]
#   :append /workdir/meta-ros/meta-ros-common/conf/ros-distro/ros-distro.conf:50
#     " ${@bb.utils.contains('BBFILE_COLLECTIONS', 'raspberrypi', '', 'recipes-bsp/bootfiles/rpi-config_%.bbappend', d)}"
#   set /workdir/meta/conf/documentation.conf:93
#     [doc] "Prevents BitBake from processing specific recipes or recipe append files."
#   override[mx8m-nxp-bsp]::append /workdir/meta-phytec/conf/layer.conf:38
#     " meta-imx/meta-bsp/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb"
# pre-expansion value:
#   " meta-imx/meta-bsp/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb ${@bb.utils.contains('BBFILE_COLLECTIONS', 'raspberrypi', '', 'recipes-bsp/bootfiles/rpi-config_%.bbappend', d)}"
BBMASK=" meta-imx/meta-bsp/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb recipes-bsp/bootfiles/rpi-config_%.bbappend"

Line 38 of meta-phytec/conf/layer.conf is

BBMASK:mx8m-nxp-bsp:append = " meta-imx/meta-bsp/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb"

(I don't think this would resetting the variable value...)

Expected behavior
BBMASK contains recipes-bsp/bootfiles/rpi-config_%.bbappend.

If you need any more info, I'd be happy to answer.

@moto-timo
Copy link
Contributor

moto-timo commented Feb 9, 2024

You/We can add a dynamic-layers/raspberrypi directory and add
BBFILES_DYNAMIC += " \ raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bb \ raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bbappend \

and

LAYERRECOMMENDS = "raspberrypi"

to conf/layer.conf

Where raspberrypi is chosen because it is the BBFILE_COLLECTIONS value in meta-raspberrypi
https://github.com/agherzan/meta-raspberrypi/blob/master/conf/layer.conf#L8

@moto-timo
Copy link
Contributor

But probably you should just send a PR with the above _ to : change.

@robwoolley robwoolley self-assigned this Apr 13, 2024
@robwoolley
Copy link
Collaborator

This has been fixed on master and merged to other branches: 0766fc4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants