meta-ampere: mtjade: support FRU inventory
Support to parse the Mt.Jade FRU device, map FRU data with inventory
information and report FRU content via IPMI.
Tested:
1. Run IPMI fru print command:
root@mtjade:~# ipmitool fru print
FRU Device Description : Builtin FRU Device (ID 0)
Chassis Type : Rack Mount Chassis
Chassis Serial : A1A1-A000-0000000000123
Board Mfg Date : Fri Feb 5 00:00:00 2021 UTC
Board Mfg : WIWYNN
Board Product : Mt.Jade Motherboard
Board Serial : B8103010002500900019J0LB
Board Part Number : B81.03010.0026
Product Manufacturer : WIWYNN
Product Name : Mt.Jade Server System
Product Part Number : B81.03001.0009
Product Version : EVT2
Product Serial : B810300100050130002DN0SD
2. Check FRU inventory reoirt from REST
/xyz/openbmc_project/inventory/system/chassis/motherboard
Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I231d5766b2f89a535d850eb437d63a9db84fb846
diff --git a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config.bb b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config.bb
new file mode 100644
index 0000000..66238dc
--- /dev/null
+++ b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config.bb
@@ -0,0 +1,27 @@
+SUMMARY = "YAML configuration for Mt.Jade"
+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://mtjade-ipmi-fru.yaml \
+ file://mtjade-ipmi-fru-properties.yaml \
+ "
+
+S = "${WORKDIR}"
+
+do_install() {
+ cat mtjade-ipmi-fru.yaml > fru-read.yaml
+ install -m 0644 -D mtjade-ipmi-fru-properties.yaml \
+ ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
+ install -m 0644 -D fru-read.yaml \
+ ${D}${datadir}/${BPN}/ipmi-fru-read.yaml
+}
+
+FILES_${PN}-dev = " \
+ ${datadir}/${BPN}/ipmi-extra-properties.yaml \
+ ${datadir}/${BPN}/ipmi-fru-read.yaml \
+ "
+
+ALLOW_EMPTY_${PN} = "1"