From 220e194628f8594587d11436b6486da8edeef4b6 Mon Sep 17 00:00:00 2001 From: Seires Li Date: Thu, 10 Jun 2021 02:11:11 +0800 Subject: 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 Change-Id: Iacfbe633befd3f50f5ea685fd234a49e0eeb7b6f --- .../recipes-phosphor/leds/phosphor-led-manager_git.bb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'meta-phosphor/recipes-phosphor/leds') 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 +} -- cgit v1.2.3