diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2020-01-14 23:21:46 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2020-02-10 22:45:08 +0300 |
commit | 035b616e74ffafef314624d11331b61fef4e1fbb (patch) | |
tree | f98dc0dab1d963e1d9560bc18bbf762b0ce11403 /meta-ibm/meta-witherspoon/recipes-phosphor | |
parent | 447d890b5e232c91561ee08431ed8f31edcc23ff (diff) | |
download | openbmc-035b616e74ffafef314624d11331b61fef4e1fbb.tar.xz |
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 <msbarth@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-ibm/meta-witherspoon/recipes-phosphor')
3 files changed, 14 insertions, 55 deletions
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 8f2097cc1..9442477af 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 1c26fc21f..000000000 --- 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 243a02f1c..70bbc77d4 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" |