Brad Bishop | 6242f80 | 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 | |
| 9 | EXTRA_SRC_URI = "" |
| 10 | EXTRA_SRC_URI_witherspoon = " \ |
| 11 | file://ac922-ipmi-extra-hwmon-sensors.yaml \ |
| 12 | " |
| 13 | SRC_URI = " \ |
| 14 | file://acx22-ipmi-fru-bmc.yaml \ |
| 15 | file://acx22-ipmi-fru-not-sent-by-host.yaml \ |
| 16 | file://acx22-ipmi-hwmon-sensors.yaml \ |
| 17 | file://acx22-ipmi-inventory-sensors.yaml \ |
| 18 | file://acx22-ipmi-occ-sensors.yaml \ |
| 19 | file://acx22-ipmi-sensors-mrw.yaml \ |
| 20 | ${EXTRA_SRC_URI} \ |
| 21 | " |
| 22 | |
| 23 | DEPENDS = " \ |
| 24 | mrw-native \ |
| 25 | mrw-perl-tools-native \ |
| 26 | openpower-yaml-config \ |
| 27 | " |
| 28 | |
| 29 | S = "${WORKDIR}" |
| 30 | |
| 31 | ACx22_IPMI_EXTRA_FRU_READ_YAMLS = " \ |
| 32 | acx22-ipmi-fru-bmc.yaml \ |
| 33 | acx22-ipmi-fru-not-sent-by-host.yaml \ |
| 34 | " |
| 35 | ACx22_IPMI_EXTRA_MACHINE_SENSOR_YAMLS = "" |
| 36 | ACx22_IPMI_EXTRA_MACHINE_SENSOR_YAMLS_witherspoon = " \ |
| 37 | ac922-ipmi-extra-hwmon-sensors.yaml \ |
| 38 | " |
| 39 | ACx22_IPMI_EXTRA_SENSOR_YAMLS = " \ |
| 40 | acx22-ipmi-hwmon-sensors.yaml \ |
| 41 | acx22-ipmi-occ-sensors.yaml \ |
| 42 | ${ACx22_IPMI_EXTRA_MACHINE_SENSOR_YAMLS} \ |
| 43 | " |
| 44 | |
| 45 | do_install() { |
| 46 | perlbin="${STAGING_DIR_NATIVE}${bindir}/perl-native/perl" |
| 47 | scriptpath=${STAGING_DIR_NATIVE}${bindir} |
| 48 | mrw=${STAGING_DIR_NATIVE}${datadir}/obmc-mrw/${MRW_XML} |
| 49 | op_configpath=${STAGING_DIR_HOST}${datadir}/openpower-yaml-config |
| 50 | |
| 51 | # generate extra-properties.yaml from the MRW for ipmi-fru-parser |
| 52 | $perlbin $scriptpath/gen_fru_properties.pl -m $mrw \ |
| 53 | -c $op_configpath/ipmi-fru-properties-mrw.yaml \ |
| 54 | -o extra-properties.yaml |
| 55 | |
| 56 | # generate fru-read.yaml from the MRW, for ipmid and ipmi-fru-parser |
| 57 | $perlbin $scriptpath/gen_ipmi_fru.pl -i $mrw \ |
| 58 | -m $op_configpath/ipmi-hostboot-fru-mrw.yaml \ |
| 59 | -o fru-read-partial.yaml |
| 60 | cat fru-read-partial.yaml ${ACx22_IPMI_EXTRA_FRU_READ_YAMLS} \ |
| 61 | > fru-read.yaml |
| 62 | |
| 63 | # generate inventory-sensors.yaml from the MRW, for ipmid |
| 64 | $perlbin $scriptpath/gen_ipmi_sel.pl -i $mrw \ |
| 65 | -m acx22-ipmi-inventory-sensors.yaml -o inventory-sensors.yaml |
| 66 | |
| 67 | # generate sensors.yaml from the MRW, for ipmid |
| 68 | cat acx22-ipmi-sensors-mrw.yaml \ |
| 69 | $op_configpath/ipmi-hostboot-volatile-sensor-mrw.yaml \ |
| 70 | $op_configpath/ipmi-occ-active-sensor-mrw.yaml \ |
| 71 | > sensors-mrw.yaml |
| 72 | $perlbin $scriptpath/gen_ipmi_sensor.pl -i $mrw -m sensors-mrw.yaml \ |
| 73 | -o sensors-partial.yaml |
| 74 | cat sensors-partial.yaml ${ACx22_IPMI_EXTRA_SENSOR_YAMLS} \ |
| 75 | > sensors.yaml |
| 76 | |
| 77 | install -m 0644 -D extra-properties.yaml \ |
| 78 | ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml |
| 79 | install -m 0644 -D fru-read.yaml ${D}${datadir}/${BPN}/ipmi-fru-read.yaml |
| 80 | install -m 0644 -D inventory-sensors.yaml \ |
| 81 | ${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml |
| 82 | install -m 0644 -D sensors.yaml ${D}${datadir}/${BPN}/ipmi-sensors.yaml |
| 83 | } |
| 84 | |
| 85 | FILES_${PN}-dev = " \ |
| 86 | ${datadir}/${BPN}/ipmi-extra-properties.yaml \ |
| 87 | ${datadir}/${BPN}/ipmi-fru-read.yaml \ |
| 88 | ${datadir}/${BPN}/ipmi-inventory-sensors.yaml \ |
| 89 | ${datadir}/${BPN}/ipmi-sensors.yaml \ |
| 90 | " |
| 91 | |
| 92 | ALLOW_EMPTY_${PN} = "1" |