diff options
author | Seires Li <seiresli@pcpartner.com> | 2021-06-09 21:11:11 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2021-06-29 22:19:28 +0300 |
commit | 220e194628f8594587d11436b6486da8edeef4b6 (patch) | |
tree | 0904595c7819d4f76c5b3cbce7f1776578c36749 /meta-phosphor | |
parent | a28e44d9491f9be185227cf5a57da54a44b0974c (diff) | |
download | openbmc-220e194628f8594587d11436b6486da8edeef4b6.tar.xz |
phosphor-led-manager: pass led yaml to build
phosphor-led-manager has migrated from autotools to meson, and it needs
to be built with the correct led.yaml.
This will check if there's a led.yaml in the order of:
1. where LED_YAML_PATH specifies
2. default path of virtual/phosphor-led-manager-config-native
3. where SRC_URI += puts files to
and copies it to the right location.
Tested:
devtool modify phosphor-led-manager and checked if led.yaml is the
right one.
devtool reset, built the image and checked if led-manager are hosting
the correct led groups on dbus.
tried five different scenarios:
1. don't use phosphor-led-manager at all: yosemitev2
2. use config-native: romulus
3. use config-mrw-native: witherspoon
4. overrides the native path: hr855xg2
5. puts led.yaml in SRC_URI: created a custom one and tested that
Signed-off-by: Seires Li <seiresli@pcpartner.com>
Change-Id: Iacfbe633befd3f50f5ea685fd234a49e0eeb7b6f
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb index 3167da695..7d4e3281d 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb @@ -52,3 +52,13 @@ SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'STATES')}" SYSTEMD_OVERRIDE_${PN} += "bmc_booted.conf:obmc-led-group-start@bmc_booted.service.d/bmc_booted.conf" EXTRA_OEMESON += "-Dtests=disabled" + +do_compile_prepend() { + if [ -f "${LED_YAML_PATH}/led.yaml" ]; then + cp "${LED_YAML_PATH}/led.yaml" "${S}/led.yaml" + elif [ -f "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" ]; then + cp "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" "${S}/led.yaml" + elif [ -f "${WORKDIR}/led.yaml" ]; then + cp "${WORKDIR}/led.yaml" "${S}/led.yaml" + fi +} |