Brad Bishop | 3cb4a62 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 1 | SUMMARY = "YAML configuration for ACx22 systems" |
| 2 | PR = "r1" |
| 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" |
| 5 | |
| 6 | inherit allarch |
| 7 | inherit mrw-xml |
| 8 | |
Brad Bishop | 3cb4a62 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 9 | SRC_URI = " \ |
| 10 | 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 Bishop | 3cb4a62 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 16 | " |
| 17 | |
| 18 | DEPENDS = " \ |
| 19 | mrw-native \ |
| 20 | mrw-perl-tools-native \ |
| 21 | openpower-yaml-config \ |
| 22 | " |
| 23 | |
| 24 | S = "${WORKDIR}" |
| 25 | |
| 26 | ACx22_IPMI_EXTRA_FRU_READ_YAMLS = " \ |
| 27 | acx22-ipmi-fru-bmc.yaml \ |
| 28 | acx22-ipmi-fru-not-sent-by-host.yaml \ |
| 29 | " |
Brad Bishop | 3cb4a62 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 30 | ACx22_IPMI_EXTRA_SENSOR_YAMLS = " \ |
| 31 | acx22-ipmi-hwmon-sensors.yaml \ |
| 32 | acx22-ipmi-occ-sensors.yaml \ |
Brad Bishop | 3cb4a62 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 33 | " |
| 34 | |
| 35 | do_install() { |
| 36 | perlbin="${STAGING_DIR_NATIVE}${bindir}/perl-native/perl" |
| 37 | scriptpath=${STAGING_DIR_NATIVE}${bindir} |
| 38 | mrw=${STAGING_DIR_NATIVE}${datadir}/obmc-mrw/${MRW_XML} |
| 39 | op_configpath=${STAGING_DIR_HOST}${datadir}/openpower-yaml-config |
| 40 | |
| 41 | # generate extra-properties.yaml from the MRW for ipmi-fru-parser |
| 42 | $perlbin $scriptpath/gen_fru_properties.pl -m $mrw \ |
| 43 | -c $op_configpath/ipmi-fru-properties-mrw.yaml \ |
| 44 | -o extra-properties.yaml |
| 45 | |
| 46 | # generate fru-read.yaml from the MRW, for ipmid and ipmi-fru-parser |
| 47 | $perlbin $scriptpath/gen_ipmi_fru.pl -i $mrw \ |
| 48 | -m $op_configpath/ipmi-hostboot-fru-mrw.yaml \ |
| 49 | -o fru-read-partial.yaml |
| 50 | cat fru-read-partial.yaml ${ACx22_IPMI_EXTRA_FRU_READ_YAMLS} \ |
| 51 | > fru-read.yaml |
| 52 | |
| 53 | # generate inventory-sensors.yaml from the MRW, for ipmid |
| 54 | $perlbin $scriptpath/gen_ipmi_sel.pl -i $mrw \ |
| 55 | -m acx22-ipmi-inventory-sensors.yaml -o inventory-sensors.yaml |
| 56 | |
| 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 \ |
| 63 | -o sensors-partial.yaml |
| 64 | 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 | |
| 75 | FILES_${PN}-dev = " \ |
| 76 | ${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 | |
| 82 | ALLOW_EMPTY_${PN} = "1" |