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 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [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 | " |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 17 | DEPENDS = " \ |
| 18 | mrw-native \ |
| 19 | mrw-perl-tools-native \ |
| 20 | openpower-yaml-config \ |
| 21 | " |
| 22 | |
| 23 | S = "${WORKDIR}" |
| 24 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 25 | ACx22_IPMI_EXTRA_FRU_READ_YAMLS:ibm-ac-server = " \ |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 26 | acx22-ipmi-fru-bmc.yaml \ |
| 27 | acx22-ipmi-fru-not-sent-by-host.yaml \ |
| 28 | " |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 29 | ACx22_IPMI_EXTRA_SENSOR_YAMLS = " \ |
| 30 | acx22-ipmi-hwmon-sensors.yaml \ |
| 31 | acx22-ipmi-occ-sensors.yaml \ |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 32 | " |
| 33 | |
| 34 | do_install() { |
| 35 | perlbin="${STAGING_DIR_NATIVE}${bindir}/perl-native/perl" |
| 36 | scriptpath=${STAGING_DIR_NATIVE}${bindir} |
| 37 | mrw=${STAGING_DIR_NATIVE}${datadir}/obmc-mrw/${MRW_XML} |
| 38 | op_configpath=${STAGING_DIR_HOST}${datadir}/openpower-yaml-config |
| 39 | |
| 40 | # generate extra-properties.yaml from the MRW for ipmi-fru-parser |
| 41 | $perlbin $scriptpath/gen_fru_properties.pl -m $mrw \ |
| 42 | -c $op_configpath/ipmi-fru-properties-mrw.yaml \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 43 | -o extra-properties.yaml ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 44 | |
| 45 | # generate fru-read.yaml from the MRW, for ipmid and ipmi-fru-parser |
| 46 | $perlbin $scriptpath/gen_ipmi_fru.pl -i $mrw \ |
| 47 | -m $op_configpath/ipmi-hostboot-fru-mrw.yaml \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 48 | -o fru-read-partial.yaml ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 49 | cat fru-read-partial.yaml ${ACx22_IPMI_EXTRA_FRU_READ_YAMLS} \ |
| 50 | > fru-read.yaml |
| 51 | |
| 52 | # generate inventory-sensors.yaml from the MRW, for ipmid |
| 53 | $perlbin $scriptpath/gen_ipmi_sel.pl -i $mrw \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 54 | -m acx22-ipmi-inventory-sensors.yaml -o inventory-sensors.yaml \ |
| 55 | ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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 \ |
Santosh Puranik | 87d92e5 | 2019-10-11 12:54:52 -0500 | [diff] [blame] | 63 | -o sensors-partial.yaml ${EXTRA_MRW_SCRIPT_ARGS} |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 75 | FILES:${PN}-dev = " \ |
Brad Bishop | 6242f80 | 2019-06-09 16:02:49 -0400 | [diff] [blame] | 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 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 82 | ALLOW_EMPTY:${PN} = "1" |