From 775cc0a9d27148bff5f25c00fe546483cb1a1f7f Mon Sep 17 00:00:00 2001 From: Lancelot Kao Date: Mon, 22 Feb 2021 22:48:15 -0600 Subject: meta-fii/meta-kudo: add misc configuration 1. add the hotswap-power-cycle 2. add the entity-association-map 3. add the phosphor-ipmi-blobs-binarystore Signed-off-by: Lancelot Kao Change-Id: Ieea8f21a35c81ed066eedab0c8264494b743f3bb Signed-off-by: Mohaimen Alsamarai --- .../files/hotswap-power-cycle.service | 15 ++++++++++ .../hotswap-power-cycle/hotswap-power-cycle.bb | 21 +++++++++++++ .../kudo-system/kudo-entity-association-map.bb | 16 ++++++++++ .../kudo_entity_association_map.json | 35 ++++++++++++++++++++++ .../packagegroups/packagegroup-kudo-apps.bb | 2 ++ .../image/obmc-phosphor-image.bbappend | 3 +- .../phosphor-ipmi-blobs-binarystore/config.json | 5 ++++ .../phosphor-ipmi-blobs-binarystore_%.bbappend | 8 +++++ 8 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service create mode 100644 meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb create mode 100644 meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb create mode 100644 meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json create mode 100644 meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json create mode 100644 meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend (limited to 'meta-fii') diff --git a/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service new file mode 100644 index 0000000000..f9f03e7c37 --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/files/hotswap-power-cycle.service @@ -0,0 +1,15 @@ +[Unit] +Description=Power Cycle by Hotswap Controller + +[Service] +Environment= PSU_HARDRESET_DELAY=1 +EnvironmentFile=-/run/psu_timedelay +ExecStartPre=sleep $PSU_HARDRESET_DELAY +ExecStart=gpioset 2 30=1 +Restart=no +Type=oneshot +RemainAfterExit=true +StandardOutput=syslog + +[Install] +WantedBy=gbmc-psu-hardreset.target diff --git a/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb new file mode 100644 index 0000000000..d01b898a9c --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/hotswap-power-cycle/hotswap-power-cycle.bb @@ -0,0 +1,21 @@ +SUMMARY = "Power Cycle by Hotswap Controller" +DESCRIPTION = "Power Cycle by Hotswap Controller Daemon" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit systemd + +DEPENDS += "systemd" +RDEPENDS_${PN} += "bash" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append_kudo = " file://hotswap-power-cycle.service" + +do_install() { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/hotswap-power-cycle.service ${D}${systemd_unitdir}/system/hotswap-power-cycle.service +} + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = " hotswap-power-cycle.service" diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb new file mode 100644 index 0000000000..85006dadc1 --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map.bb @@ -0,0 +1,16 @@ +UMMARY = "Kudo IPMI Entity association mapping." +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI += "file://kudo_entity_association_map.json" + +FILES_${PN} = " \ + ${datadir}/ipmi-entity-association/entity_association_map.json \ + " + +do_install() { + install -d ${D}${datadir}/ipmi-entity-association + install -m 0644 -D ${WORKDIR}/kudo_entity_association_map.json \ + ${D}${datadir}/ipmi-entity-association/entity_association_map.json +} diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json new file mode 100644 index 0000000000..2530684c03 --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-system/kudo-entity-association-map/kudo_entity_association_map.json @@ -0,0 +1,35 @@ +{ + "system_board": [ + {"instance": 1, "name": "/"} + ], + "system_internal_expansion_board": [ + {"instance": 1, "name": "/"} + ], + "power_system_board": [ + {"instance": 1, "name": "/"} + ], + "add_in_card": [ + {"instance": 0, "name": "/PE0"}, + {"instance": 1, "name": "/PE1"}, + {"instance": 2, "name": "/PE2"}, + {"instance": 3, "name": "/PE3"}, + {"instance": 4, "name": "/PE4"}, + {"instance": 5, "name": "/PE5"}, + {"instance": 6, "name": "/PE6"}, + {"instance": 7, "name": "/PE7"} + ], + "fan": [ + {"instance": 0, "name": "/fan0"}, + {"instance": 1, "name": "/fan1"}, + {"instance": 2, "name": "/fan2"}, + {"instance": 3, "name": "/fan3"}, + {"instance": 4, "name": "/fan4"}, + {"instance": 5, "name": "/fan5"} + ], + "cooling_unit": [ + {"instance": 0, "name": "/ZONE0"}, + {"instance": 1, "name": "/ZONE1"}, + {"instance": 2, "name": "/ZONE2"}, + {"instance": 3, "name": "/ZONE3"} + ] +} diff --git a/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb b/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb index f64373e896..af6d08085f 100644 --- a/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb +++ b/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb @@ -20,6 +20,8 @@ RDEPENDS_${PN}-kudo-system = " \ ethtool \ memtester \ loadsvf \ + kudo-entity-association-map \ + hotswap-power-cycle \ obmc-console \ usb-network \ ncsid \ diff --git a/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend b/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend index 588803b3ba..d6c5a5b3c4 100644 --- a/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend +++ b/meta-fii/meta-kudo/recipes-phosphor/image/obmc-phosphor-image.bbappend @@ -1,6 +1,5 @@ -OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " google-ipmi-sys" -OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " google-ipmi-i2c" OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-blobs" +OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-blobs-binarystore" OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-ethstats" OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " phosphor-ipmi-flash" OBMC_IMAGE_EXTRA_INSTALL_append_kudo = " usb-network" diff --git a/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json new file mode 100644 index 0000000000..461ad6d96a --- /dev/null +++ b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore/config.json @@ -0,0 +1,5 @@ +[{ + "blobBaseId": "/skm/hss/", + "sysFilePath": "/sys/bus/i2c/devices/i2c-4/i2c-25/25-0055/eeprom", + "offsetBytes": 0 +}] diff --git a/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend new file mode 100644 index 0000000000..f87ac040f9 --- /dev/null +++ b/meta-fii/meta-kudo/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:" +SRC_URI_append_kudo = " file://config.json" +FILES_${PN}_append_kudo = " ${datadir}/binaryblob/config.json" + +do_install_append_kudo() { + install -d ${D}${datadir}/binaryblob/ + install ${WORKDIR}/config.json ${D}${datadir}/binaryblob/config.json +} -- cgit v1.2.3