diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2023-09-29 17:24:51 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2023-10-04 23:49:00 +0300 |
commit | 4ce4be4016f7b3cce739df64687a538d5d08b855 (patch) | |
tree | 1d3bf1fdd732e28b01d27045006050d9c81f5836 /meta-ibm | |
parent | 70c5409b2be90926189e13483be26bbc2e6caa31 (diff) | |
download | openbmc-4ce4be4016f7b3cce739df64687a538d5d08b855.tar.xz |
meta-ibm: system1: enable and configure ipmi-fru
Utilize the ipmi-fru features to read the MAC address from the board VPD
and populate on d-bus for the networking code.
Tested:
- Confirmed MAC addresses were read from the seeprom and put on d-bus
Change-Id: Ia292b10b80539376639b444c44a49285cadff4c1
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-ibm')
5 files changed, 89 insertions, 0 deletions
diff --git a/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config.bb b/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config.bb new file mode 100644 index 0000000000..6e091dc5a7 --- /dev/null +++ b/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config.bb @@ -0,0 +1,27 @@ +SUMMARY = "YAML configuration for IBM System1" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch + +SRC_URI = " \ + file://system1-ipmi-fru.yaml \ + file://system1-ipmi-fru-properties.yaml \ + " + +S = "${WORKDIR}" + +do_install() { + install -m 0644 -D system1-ipmi-fru.yaml \ + ${D}${datadir}/${BPN}/ipmi-fru-read.yaml + install -m 0644 -D system1-ipmi-fru-properties.yaml \ + ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml +} + +FILES:${PN}-dev = " \ + ${datadir}/${BPN}/ipmi-fru-read.yaml \ + ${datadir}/${BPN}/ipmi-extra-properties.yaml \ + " + +ALLOW_EMPTY:${PN} = "1" diff --git a/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config/system1-ipmi-fru-properties.yaml b/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config/system1-ipmi-fru-properties.yaml new file mode 100644 index 0000000000..38ced0829f --- /dev/null +++ b/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config/system1-ipmi-fru-properties.yaml @@ -0,0 +1,15 @@ +/system/chassis/motherboard/bmc/ethernet0: + xyz.openbmc_project.Inventory.Decorator.Replaceable: + FieldReplaceable: 'false' + xyz.openbmc_project.Inventory.Decorator.Cacheable: + Cached: 'true' + xyz.openbmc_project.Inventory.Item: + Present: 'true' + +/system/chassis/motherboard/bmc/ethernet1: + xyz.openbmc_project.Inventory.Decorator.Replaceable: + FieldReplaceable: 'false' + xyz.openbmc_project.Inventory.Decorator.Cacheable: + Cached: 'true' + xyz.openbmc_project.Inventory.Item: + Present: 'true' diff --git a/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config/system1-ipmi-fru.yaml b/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config/system1-ipmi-fru.yaml new file mode 100644 index 0000000000..a48757cc5c --- /dev/null +++ b/meta-ibm/meta-system1/recipes-phosphor/configurations/system1-yaml-config/system1-ipmi-fru.yaml @@ -0,0 +1,20 @@ +0: + /system/chassis/motherboard/bmc/ethernet0: + entityID: 6 + entityInstance: 1 + interfaces: + xyz.openbmc_project.Inventory.Item.NetworkInterface: + MACAddress: + IPMIFruProperty: Custom Field 2 + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Ethernet: + /system/chassis/motherboard/bmc/ethernet1: + entityID: 6 + entityInstance: 2 + interfaces: + xyz.openbmc_project.Inventory.Item.NetworkInterface: + MACAddress: + IPMIFruProperty: Custom Field 3 + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Ethernet: + diff --git a/meta-ibm/meta-system1/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard b/meta-ibm/meta-system1/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard new file mode 100644 index 0000000000..da7f48ef86 --- /dev/null +++ b/meta-ibm/meta-system1/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard @@ -0,0 +1,2 @@ +SYSFS_PATH=/sys/bus/i2c/drivers/at24/0-0050/eeprom +FRUID=0 diff --git a/meta-ibm/meta-system1/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-ibm/meta-system1/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend new file mode 100644 index 0000000000..0ca1a4696d --- /dev/null +++ b/meta-ibm/meta-system1/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend @@ -0,0 +1,25 @@ +inherit obmc-phosphor-systemd + +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +DEPENDS:append = " system1-yaml-config" + +IPMI_FRU_YAML="${STAGING_DIR_HOST}${datadir}/system1-yaml-config/ipmi-fru-read.yaml" +IPMI_FRU_PROP_YAML="${STAGING_DIR_HOST}${datadir}/system1-yaml-config/ipmi-extra-properties.yaml" + +EEPROM_NAMES = "motherboard" + +EEPROMFMT = "system/chassis/{0}" +EEPROM_ESCAPEDFMT = "system-chassis-{0}" +EEPROMS = "${@compose_list(d, 'EEPROMFMT', 'EEPROM_NAMES')}" +EEPROMS_ESCAPED = "${@compose_list(d, 'EEPROM_ESCAPEDFMT', 'EEPROM_NAMES')}" + +ENVFMT = "obmc/eeproms/{0}" +SYSTEMD_ENVIRONMENT_FILE:${PN}:append := " ${@compose_list(d, 'ENVFMT', 'EEPROMS')}" + +TMPL = "obmc-read-eeprom@.service" +TGT = "${SYSTEMD_DEFAULT_TARGET}" +INSTFMT = "obmc-read-eeprom@{0}.service" +FMT = "../${TMPL}:${TGT}.wants/${INSTFMT}" + +SYSTEMD_LINK:${PN}:append := " ${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}" |