Behaviour of .bbappend when default script is not present


Beek, Léon van de
 

Dear all,

 

My situation is as follows:

 

  • Using Kas container to build and enable easy CI, I have 2 .yaml files creating my 2 builds for 2 different machines: RaspberryPi and Qemu.
  • Qemu yaml file does not contain meta-raspberrypi repo
  • Custom distro that extends poky has a script rpi-cmdline.bbappend that appends script with the same name from meta-raspberrypi
  • Rpi-cmdline.bbappend is used to simply add 2 kernel commands to cmdline.txt
  • Rpi-cmdline.bbappend contains line on top with: COMPATIBLE_MACHINE = "^rpi$"

 

When running the Qemu build, Bitbake will say that the default .bb file is not present for the rpi-cmdline.bbappend script, which of course is true, but I don’t want to include the meta-raspberrypi repo in my sources for this build as well.

It seems like the “COMPATIBLE_MACHINE = "^rpi$"” is only regarded after parsing the script, which still requires the default script to be present.

 

I’ve searched the internet but have not found a way of achieving my goal so far, so my question is:

Is there any way of having this .bbappend file present without the default .bb file there? Or maybe there is a better solution to add kernel command parameters to cmdline without using this rpi only script?

 

Thanks in advance.

 

Kind regards,

Léon van de Beek

 


Konrad Weihmann <kweihmann@...>
 

You can either use BBMASK in your local.conf to remove the bbappend from the parsing tree or set BB_DANGLINGAPPENDS_WARNONLY in your specific build.

both can be added to your specific kas yaml without any issues

[1] https://docs.yoctoproject.org/ref-manual/variables.html#term-BB_DANGLINGAPPENDS_WARNONLY

On 08.12.21 10:26, Beek, Léon van de wrote:
Dear all,
My situation is as follows:
* Using Kas container to build and enable easy CI, I have 2 .yaml
files creating my 2 builds for 2 different machines: RaspberryPi and
Qemu.
* Qemu yaml file does not contain meta-raspberrypi repo
* Custom distro that extends poky has a script rpi-cmdline.bbappend
that appends script with the same name from meta-raspberrypi
* Rpi-cmdline.bbappend is used to simply add 2 kernel commands to
cmdline.txt
* Rpi-cmdline.bbappend contains line on top with: COMPATIBLE_MACHINE =
"^rpi$"
When running the Qemu build, Bitbake will say that the default .bb file is not present for the rpi-cmdline.bbappend script, which of course is true, but I don’t want to include the meta-raspberrypi repo in my sources for this build as well.
It seems like the “COMPATIBLE_MACHINE = "^rpi$"” is only regarded after parsing the script, which still requires the default script to be present.
I’ve searched the internet but have not found a way of achieving my goal so far, so my question is:
Is there any way of having this .bbappend file present without the default .bb file there? Or maybe there is a better solution to add kernel command parameters to cmdline without using this rpi only script?
Thanks in advance.
Kind regards,
Léon van de Beek


tomzy
 

Hi,

You could also consider using the `BBFILES_DYNAMIC`[1] variable, this way your bbappend
would only apply when there is `meta-raspberrypi` in the build configuration. Your bbappend
could be placed in custom layer under
`dynamic-layers/raspberrypi/recipes-bsp/bootfiles/
rpi-cmdline.bbappend` path and than in its
layer.conf file add

BBFILES_DYNAMIC += " \
    raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/recipes-*/*/*.bbappend \
"

Looks like the best option to add kernel command parameters is to use `
rpi-cmdline.bbappend`
with dynamic-layers as mentioned above. You should add changes to CMDLINE[2] variable

[1]https://docs.yoctoproject.org/ref-manual/variables.html#term-BBFILES_DYNAMIC
[2]https://github.com/agherzan/meta-raspberrypi/blob/master/recipes-bsp/bootfiles/rpi-cmdline.bb#L39

Regards
--
Tomasz Żyjewski
Embedded Systems Engineer
GPG: 5C495EA3EBEECA59
https://3mdeb.com | @3mdeb_com