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 \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 53 | -o extra-properties.yaml ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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 \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 58 | -o fru-read-partial.yaml ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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 \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 64 | -m acx22-ipmi-inventory-sensors.yaml -o inventory-sensors.yaml \ |
| 65 | ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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 \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 73 | -o sensors-partial.yaml ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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" |