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" |
Brad Bishop | d77088a | 2019-09-13 13:06:15 -0400 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 5 | |
| 6 | inherit allarch |
| 7 | inherit mrw-xml |
| 8 | |
Ben_Pai | 89e6501 | 2019-08-21 18:04:55 +0800 | [diff] [blame] | 9 | SRC_URI_ibm-ac-server = " \ |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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 | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 16 | " |
Ben_Pai | 89e6501 | 2019-08-21 18:04:55 +0800 | [diff] [blame] | 17 | SRC_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 Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 24 | DEPENDS = " \ |
| 25 | mrw-native \ |
| 26 | mrw-perl-tools-native \ |
| 27 | openpower-yaml-config \ |
| 28 | " |
| 29 | |
| 30 | S = "${WORKDIR}" |
| 31 | |
Ben_Pai | 89e6501 | 2019-08-21 18:04:55 +0800 | [diff] [blame] | 32 | ACx22_IPMI_EXTRA_FRU_READ_YAMLS_ibm-ac-server = " \ |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 33 | acx22-ipmi-fru-bmc.yaml \ |
| 34 | acx22-ipmi-fru-not-sent-by-host.yaml \ |
| 35 | " |
Ben_Pai | 89e6501 | 2019-08-21 18:04:55 +0800 | [diff] [blame] | 36 | ACx22_IPMI_EXTRA_FRU_READ_YAMLS_mihawk = " \ |
| 37 | acx22-ipmi-fru-bmc.yaml \ |
| 38 | " |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 39 | ACx22_IPMI_EXTRA_SENSOR_YAMLS = " \ |
| 40 | acx22-ipmi-hwmon-sensors.yaml \ |
| 41 | acx22-ipmi-occ-sensors.yaml \ |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 42 | " |
| 43 | |
| 44 | do_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 | |
| 84 | FILES_${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 | |
| 91 | ALLOW_EMPTY_${PN} = "1" |