0

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

pmod
  • 10,450
  • 1
  • 37
  • 50

1 Answers1

0

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)
pmod
  • 10,450
  • 1
  • 37
  • 50
  • Thanks! Let me give that a try. – Usha Srinivasan Nov 23 '20 at 14:36
  • So, I modified meson_options.txt with default false & modified meson.build to include com/ to selected_subdir if data_com_ is true. When I run meson builddir -Ddata_com_=true, I get a failure because the file gen/com//meson.build doesn't exist. The readme in gen directory indicates that the meson.build files are auto-generated. Do I manually create these files in gen? – Usha Srinivasan Nov 24 '20 at 19:52
  • Did you run cd <>/gen && ./meson-regenerate ? with yaml file put into root dir? – pmod Nov 24 '20 at 20:00
  • it looks I forgot to mention in numbered steps, updated now – pmod Nov 24 '20 at 20:03
  • Yep, through many rounds of trial and error I finally got the steps, directories, names correct. The meson files are now being generated & ninja in the builddir builds everything. – Usha Srinivasan Nov 25 '20 at 22:33
  • BTW, the major source of my confusion was 1)where to place the yaml files and 2)which yaml file to use as an example. 1) The correct place is phosphor-dbus-interfaces/com/. 2) As for the content of the yaml files, to start with I incorrectly followed the structure in the yaml files in openbmc/meta-ibm rather than phosphor-dbus-interfaces/com/ibm. They are totally different in format! Do you know what is used to process the yaml files in openbmc? – Usha Srinivasan Nov 25 '20 at 22:49