From 035b616e74ffafef314624d11331b61fef4e1fbb Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Tue, 14 Jan 2020 14:21:46 -0600 Subject: meta-ibm/wspoon: Switch fan presence to JSON config Enable the use of JSON and install the fan presence JSON config file into the witherspoon image. The other fan applications will continue to use their respective YAML build time config file(s). Tested: Built witherspoon image, uses JSON config Built mihawk image, continues to use YAML (From meta-ibm rev: a6817ca6ca8c87a10eb325835ba4db59109f6101) Change-Id: I1b675e8a3b064b04007d7474d12e5d5ad2094dad Signed-off-by: Matthew Barth Signed-off-by: Brad Bishop --- .../fans/phosphor-fan-presence-config.bbappend | 10 ++++ .../witherspoon/config.yaml | 55 ---------------------- .../recipes-phosphor/fans/phosphor-fan_%.bbappend | 4 ++ 3 files changed, 14 insertions(+), 55 deletions(-) delete mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.yaml (limited to 'meta-ibm/meta-witherspoon') diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config.bbappend index 8f2097cc19..9442477af3 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config.bbappend +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config.bbappend @@ -1 +1,11 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_witherspoon = "file://config.json" + +do_install_witherspoon() { + install -d ${D}/${datadir}/phosphor-fan-presence/presence/ + install -m 0644 ${WORKDIR}/config.json ${D}/${datadir}/phosphor-fan-presence/presence/ +} + +FILES_${PN}_append_witherspoon = " ${datadir}/phosphor-fan-presence/presence/config.json" +FILES_${PN}_remove_witherspoon = "${presence_datadir}/config.yaml" diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.yaml b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.yaml deleted file mode 100644 index 1c26fc21f1..0000000000 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan-presence-config/witherspoon/config.yaml +++ /dev/null @@ -1,55 +0,0 @@ -- name: fan0 - path: /system/chassis/motherboard/fan0 - methods: - - type: gpio - key: 4 - physpath: /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060 - devpath: /dev/input/by-path/platform-gpio-keys-polled-event - - type: tach - sensors: - - fan0_0 - - fan0_1 - rpolicy: - type: anyof - -- name: fan1 - path: /system/chassis/motherboard/fan1 - methods: - - type: gpio - key: 5 - physpath: /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060 - devpath: /dev/input/by-path/platform-gpio-keys-polled-event - - type: tach - sensors: - - fan1_0 - - fan1_1 - rpolicy: - type: anyof - -- name: fan2 - path: /system/chassis/motherboard/fan2 - methods: - - type: gpio - key: 6 - physpath: /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060 - devpath: /dev/input/by-path/platform-gpio-keys-polled-event - - type: tach - sensors: - - fan2_0 - - fan2_1 - rpolicy: - type: anyof - -- name: fan3 - path: /system/chassis/motherboard/fan3 - methods: - - type: gpio - key: 7 - physpath: /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a100.i2c-bus/i2c-3/3-0060 - devpath: /dev/input/by-path/platform-gpio-keys-polled-event - - type: tach - sensors: - - fan3_0 - - fan3_1 - rpolicy: - type: anyof diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend index 243a02f1c5..70bbc77d46 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/fans/phosphor-fan_%.bbappend @@ -50,3 +50,7 @@ SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_STDBY # Link fan control service to also start at poweron FMT_CONTROL_PWRON_witherspoon = "../${TMPL_CONTROL}:${POWERON_TGT}.requires/${INSTFMT_CONTROL}" SYSTEMD_LINK_${PN}-control_witherspoon += "${@compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES')}" + +# Enable the use of JSON on the fan applications that support it +EXTRA_OECONF_append_witherspoon = " --enable-json" +RDEPENDS_${PN}-presence-tach_append_witherspoon = " phosphor-fan-presence-config" -- cgit v1.2.3