blob: 8abb14d38d48b10b23e6fdc4f34aadea1d7e8ff8 [file] [log] [blame]
Brad Bishop6242f802019-06-09 16:02:49 -04001SUMMARY = "YAML configuration for ACx22 systems"
2PR = "r1"
3LICENSE = "Apache-2.0"
Brad Bishopd77088a2019-09-13 13:06:15 -04004LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Brad Bishop6242f802019-06-09 16:02:49 -04005
6inherit allarch
7inherit mrw-xml
8
Adriana Kobylakb96c7502021-08-06 16:25:30 +00009SRC_URI:ibm-ac-server = " \
Brad Bishop6242f802019-06-09 16:02:49 -040010 file://acx22-ipmi-fru-bmc.yaml \
11 file://acx22-ipmi-fru-not-sent-by-host.yaml \
12 file://acx22-ipmi-hwmon-sensors.yaml \
13 file://acx22-ipmi-inventory-sensors.yaml \
14 file://acx22-ipmi-occ-sensors.yaml \
15 file://acx22-ipmi-sensors-mrw.yaml \
Brad Bishop6242f802019-06-09 16:02:49 -040016 "
Brad Bishop6242f802019-06-09 16:02:49 -040017DEPENDS = " \
18 mrw-native \
19 mrw-perl-tools-native \
20 openpower-yaml-config \
21 "
22
23S = "${WORKDIR}"
24
Adriana Kobylakb96c7502021-08-06 16:25:30 +000025ACx22_IPMI_EXTRA_FRU_READ_YAMLS:ibm-ac-server = " \
Brad Bishop6242f802019-06-09 16:02:49 -040026 acx22-ipmi-fru-bmc.yaml \
27 acx22-ipmi-fru-not-sent-by-host.yaml \
28 "
Brad Bishop6242f802019-06-09 16:02:49 -040029ACx22_IPMI_EXTRA_SENSOR_YAMLS = " \
30 acx22-ipmi-hwmon-sensors.yaml \
31 acx22-ipmi-occ-sensors.yaml \
Brad Bishop6242f802019-06-09 16:02:49 -040032 "
33
34do_install() {
35 perlbin="${STAGING_DIR_NATIVE}${bindir}/perl-native/perl"
36 scriptpath=${STAGING_DIR_NATIVE}${bindir}
37 mrw=${STAGING_DIR_NATIVE}${datadir}/obmc-mrw/${MRW_XML}
38 op_configpath=${STAGING_DIR_HOST}${datadir}/openpower-yaml-config
39
40 # generate extra-properties.yaml from the MRW for ipmi-fru-parser
41 $perlbin $scriptpath/gen_fru_properties.pl -m $mrw \
42 -c $op_configpath/ipmi-fru-properties-mrw.yaml \
Santosh Puranik87d92e52019-10-11 12:54:52 -050043 -o extra-properties.yaml ${EXTRA_MRW_SCRIPT_ARGS}
Brad Bishop6242f802019-06-09 16:02:49 -040044
45 # generate fru-read.yaml from the MRW, for ipmid and ipmi-fru-parser
46 $perlbin $scriptpath/gen_ipmi_fru.pl -i $mrw \
47 -m $op_configpath/ipmi-hostboot-fru-mrw.yaml \
Santosh Puranik87d92e52019-10-11 12:54:52 -050048 -o fru-read-partial.yaml ${EXTRA_MRW_SCRIPT_ARGS}
Brad Bishop6242f802019-06-09 16:02:49 -040049 cat fru-read-partial.yaml ${ACx22_IPMI_EXTRA_FRU_READ_YAMLS} \
50 > fru-read.yaml
51
52 # generate inventory-sensors.yaml from the MRW, for ipmid
53 $perlbin $scriptpath/gen_ipmi_sel.pl -i $mrw \
Santosh Puranik87d92e52019-10-11 12:54:52 -050054 -m acx22-ipmi-inventory-sensors.yaml -o inventory-sensors.yaml \
55 ${EXTRA_MRW_SCRIPT_ARGS}
Brad Bishop6242f802019-06-09 16:02:49 -040056
57 # generate sensors.yaml from the MRW, for ipmid
58 cat acx22-ipmi-sensors-mrw.yaml \
59 $op_configpath/ipmi-hostboot-volatile-sensor-mrw.yaml \
60 $op_configpath/ipmi-occ-active-sensor-mrw.yaml \
61 > sensors-mrw.yaml
62 $perlbin $scriptpath/gen_ipmi_sensor.pl -i $mrw -m sensors-mrw.yaml \
Santosh Puranik87d92e52019-10-11 12:54:52 -050063 -o sensors-partial.yaml ${EXTRA_MRW_SCRIPT_ARGS}
Brad Bishop6242f802019-06-09 16:02:49 -040064 cat sensors-partial.yaml ${ACx22_IPMI_EXTRA_SENSOR_YAMLS} \
65 > sensors.yaml
66
67 install -m 0644 -D extra-properties.yaml \
68 ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
69 install -m 0644 -D fru-read.yaml ${D}${datadir}/${BPN}/ipmi-fru-read.yaml
70 install -m 0644 -D inventory-sensors.yaml \
71 ${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml
72 install -m 0644 -D sensors.yaml ${D}${datadir}/${BPN}/ipmi-sensors.yaml
73}
74
Adriana Kobylakb96c7502021-08-06 16:25:30 +000075FILES:${PN}-dev = " \
Brad Bishop6242f802019-06-09 16:02:49 -040076 ${datadir}/${BPN}/ipmi-extra-properties.yaml \
77 ${datadir}/${BPN}/ipmi-fru-read.yaml \
78 ${datadir}/${BPN}/ipmi-inventory-sensors.yaml \
79 ${datadir}/${BPN}/ipmi-sensors.yaml \
80 "
81
Adriana Kobylakb96c7502021-08-06 16:25:30 +000082ALLOW_EMPTY:${PN} = "1"