Usha Srinivasan
Usha Srinivasan

Reputation: 1

how to regenerate meson for newly added yaml files

I have added yaml files to add new dbus objects and I added PHOSPHOR_MAPPER_SERVICE_append = " com/newCoName" (newCoName is the name of my company)

But when I run bitbake, do_configure for phosphor_mapper bails when it passes the option -Ddata_com_newCoName to meson. The following readme says I need to run ./regenerate_meson from the gen directory when I add new YAML files. But how do I do that from a recipe file? https://github.com/openbmc/phosphor-dbus-interfaces

Upvotes: 0

Views: 1004

Answers (1)

pmod
pmod

Reputation: 11007

One option is to generate these files outside ot yocto environment (i.e. not involving bitbake). Thus

  1. clone that git repo
  2. place your yaml file where you cloned repo
  3. do what readme tells, i.e. go to gen directory and execute meson-regenerate script
  4. collect changes that are done by script and create patch
  5. add patch to your layer and reference it in .bbappend file (meta-/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bbappend)

Another option would be to add to .bbappend file additional task that runs before do_configure - and call that script from there:

do_configure_prepend() {
  cd ${S}/gen && ./meson-regenerate
}

Along this .bbappend you should add your yaml so that it lands inside gen folder in patch or directly in your layer (check FILESEXTRAPATHS).

In both cases you'll need to patch meson_options.txt: add option

option('data_com_newCoName', type: 'boolean', value: true)

Upvotes: 0

Related Questions