0

我添加了 yaml 文件以添加新的 dbus 对象,并添加了 PHOSPHOR_MAPPER_SERVICE_append = "com/newCoName"(newCoName 是我公司的名称)

但是当我运行 bitbake 时,当将选项 -Ddata_com_newCoName 传递给介子时,phosphor_mapper 的 do_configure 会退出。以下自述文件说,当我添加新的 YAML 文件时,我需要从 gen 目录运行 ./regenerate_meson。但是我如何从配方文件中做到这一点? https://github.com/openbmc/phosphor-dbus-interfaces

4

1 回答 1

0

一种选择是在 ot yocto 环境之外生成这些文件(即不涉及 bitbake)。因此

  1. 克隆那个 git repo
  2. 将您的 yaml 文件放在您克隆 repo 的位置
  3. 按照自述文件的说明进行操作,即转到gen目录并执行meson-regenerate脚本
  4. 收集由脚本完成的更改并创建补丁
  5. 将补丁添加到您的图层并在 .bbappend 文件中引用它(meta-/recipes-phosper/dbus/phosphor-dbus-interfaces_git.bbappend)

另一种选择是将在 do_configure 之前运行的附加任务添加到 .bbappend 文件中 - 并从那里调用该脚本:

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

沿着这个 .bbappend 你应该添加你的 yaml 以便它在补丁的 gen 文件夹中或直接在你的层中(检查FILESEXTRAPATHS)。

在这两种情况下,您都需要修补 meson_options.txt:添加选项

option('data_com_newCoName', type: 'boolean', value: true)
于 2020-11-20T20:46:56.653 回答