blob: 5371c3a0962844fe3c6b533c7cf77383593feba0 [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
Ben_Pai89e65012019-08-21 18:04:55 +08009SRC_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 "
Ben_Pai89e65012019-08-21 18:04:55 +080017SRC_URI_mihawk = " \
18 file://acx22-ipmi-fru-bmc.yaml \
19 file://acx22-ipmi-hwmon-sensors.yaml \
20 file://acx22-ipmi-inventory-sensors.yaml \
21 file://acx22-ipmi-occ-sensors.yaml \
22 file://acx22-ipmi-sensors-mrw.yaml \
23 "
Brad Bishop6242f802019-06-09 16:02:49 -040024DEPENDS = " \
25 mrw-native \
26 mrw-perl-tools-native \
27 openpower-yaml-config \
28 "
29
30S = "${WORKDIR}"
31
Ben_Pai89e65012019-08-21 18:04:55 +080032ACx22_IPMI_EXTRA_FRU_READ_YAMLS_ibm-ac-server = " \
Brad Bishop6242f802019-06-09 16:02:49 -040033 acx22-ipmi-fru-bmc.yaml \
34 acx22-ipmi-fru-not-sent-by-host.yaml \
35 "
Ben_Pai89e65012019-08-21 18:04:55 +080036ACx22_IPMI_EXTRA_FRU_READ_YAMLS_mihawk = " \
37 acx22-ipmi-fru-bmc.yaml \
38 "
Brad Bishop6242f802019-06-09 16:02:49 -040039ACx22_IPMI_EXTRA_SENSOR_YAMLS = " \
40 acx22-ipmi-hwmon-sensors.yaml \
41 acx22-ipmi-occ-sensors.yaml \
Brad Bishop6242f802019-06-09 16:02:49 -040042 "
43
44do_install() {
45 perlbin="${STAGING_DIR_NATIVE}${bindir}/perl-native/perl"
46 scriptpath=${STAGING_DIR_NATIVE}${bindir}
47 mrw=${STAGING_DIR_NATIVE}${datadir}/obmc-mrw/${MRW_XML}
48 op_configpath=${STAGING_DIR_HOST}${datadir}/openpower-yaml-config
49
50 # generate extra-properties.yaml from the MRW for ipmi-fru-parser
51 $perlbin $scriptpath/gen_fru_properties.pl -m $mrw \
52 -c $op_configpath/ipmi-fru-properties-mrw.yaml \
53 -o extra-properties.yaml
54
55 # generate fru-read.yaml from the MRW, for ipmid and ipmi-fru-parser
56 $perlbin $scriptpath/gen_ipmi_fru.pl -i $mrw \
57 -m $op_configpath/ipmi-hostboot-fru-mrw.yaml \
58 -o fru-read-partial.yaml
59 cat fru-read-partial.yaml ${ACx22_IPMI_EXTRA_FRU_READ_YAMLS} \
60 > fru-read.yaml
61
62 # generate inventory-sensors.yaml from the MRW, for ipmid
63 $perlbin $scriptpath/gen_ipmi_sel.pl -i $mrw \
64 -m acx22-ipmi-inventory-sensors.yaml -o inventory-sensors.yaml
65
66 # generate sensors.yaml from the MRW, for ipmid
67 cat acx22-ipmi-sensors-mrw.yaml \
68 $op_configpath/ipmi-hostboot-volatile-sensor-mrw.yaml \
69 $op_configpath/ipmi-occ-active-sensor-mrw.yaml \
70 > sensors-mrw.yaml
71 $perlbin $scriptpath/gen_ipmi_sensor.pl -i $mrw -m sensors-mrw.yaml \
72 -o sensors-partial.yaml
73 cat sensors-partial.yaml ${ACx22_IPMI_EXTRA_SENSOR_YAMLS} \
74 > sensors.yaml
75
76 install -m 0644 -D extra-properties.yaml \
77 ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
78 install -m 0644 -D fru-read.yaml ${D}${datadir}/${BPN}/ipmi-fru-read.yaml
79 install -m 0644 -D inventory-sensors.yaml \
80 ${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml
81 install -m 0644 -D sensors.yaml ${D}${datadir}/${BPN}/ipmi-sensors.yaml
82}
83
84FILES_${PN}-dev = " \
85 ${datadir}/${BPN}/ipmi-extra-properties.yaml \
86 ${datadir}/${BPN}/ipmi-fru-read.yaml \
87 ${datadir}/${BPN}/ipmi-inventory-sensors.yaml \
88 ${datadir}/${BPN}/ipmi-sensors.yaml \
89 "
90
91ALLOW_EMPTY_${PN} = "1"