Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 1 | SUMMARY = "OpenPOWER OCC controller" |
Gunnar Mills | 8b8ba53 | 2018-06-13 15:54:55 -0500 | [diff] [blame] | 2 | DESCRIPTION = "Application to control the OpenPOWER On-Chip-Controller" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 3 | HOMEPAGE = "https://github.com/openbmc/openpower-occ-control" |
| 4 | PR = "r1" |
Patrick Venture | f30336b | 2018-10-17 07:51:18 -0700 | [diff] [blame] | 5 | PV = "1.0+git${SRCPV}" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 6 | |
Eddie James | 88f28f6 | 2021-10-20 16:41:29 -0500 | [diff] [blame] | 7 | inherit meson \ |
Deepak Kodihalli | 615bdc1 | 2017-04-06 23:50:34 -0500 | [diff] [blame] | 8 | pkgconfig \ |
Vishwanatha Subbanna | 359eee8 | 2017-05-04 09:45:29 -0500 | [diff] [blame] | 9 | obmc-phosphor-dbus-service \ |
Eddie James | 8b68ec7 | 2020-02-21 15:44:39 +0000 | [diff] [blame] | 10 | python3native \ |
Marri Devender Rao | bdaa6d2 | 2018-01-17 11:34:02 -0600 | [diff] [blame] | 11 | phosphor-dbus-yaml |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 12 | |
Patrick Williams | 6c9e014 | 2020-04-03 15:45:27 -0500 | [diff] [blame] | 13 | require ${BPN}.inc |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 14 | |
Patrick Williams | 57b7624 | 2021-08-11 15:27:06 -0500 | [diff] [blame] | 15 | DBUS_SERVICE:${PN} += "org.open_power.OCC.Control.service" |
Adriana Kobylak | 8c6707f | 2021-08-06 17:35:36 +0000 | [diff] [blame] | 16 | SYSTEMD_SERVICE:${PN} += "op-occ-enable@.service" |
| 17 | SYSTEMD_SERVICE:${PN} += "op-occ-disable@.service" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 18 | |
Vishwanatha Subbanna | fcf5076 | 2017-08-09 15:00:34 +0530 | [diff] [blame] | 19 | DEPENDS += "virtual/${PN}-config-native" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 20 | DEPENDS += " \ |
| 21 | sdbusplus \ |
Patrick Williams | ba5282b | 2020-03-31 16:43:15 -0500 | [diff] [blame] | 22 | ${PYTHON_PN}-sdbus++-native \ |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 23 | phosphor-logging \ |
Vishwanatha Subbanna | 5f74f13 | 2017-07-07 02:55:58 -0500 | [diff] [blame] | 24 | phosphor-dbus-interfaces \ |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 25 | systemd \ |
Eddie James | 64e2819 | 2020-03-05 09:28:18 -0600 | [diff] [blame] | 26 | ${PYTHON_PN}-native \ |
| 27 | ${PYTHON_PN}-pyyaml-native \ |
| 28 | ${PYTHON_PN}-setuptools-native \ |
| 29 | ${PYTHON_PN}-mako-native \ |
Eddie James | dd8f652 | 2022-12-09 09:45:25 -0600 | [diff] [blame] | 30 | nlohmann-json \ |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 31 | " |
| 32 | |
Adriana Kobylak | 8c6707f | 2021-08-06 17:35:36 +0000 | [diff] [blame] | 33 | RDEPENDS:${PN} += "phosphor-state-manager-obmc-targets" |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -0600 | [diff] [blame] | 34 | |
Eddie James | 88f28f6 | 2021-10-20 16:41:29 -0500 | [diff] [blame] | 35 | EXTRA_OEMESON = " \ |
| 36 | -Dyamldir=${STAGING_DATADIR_NATIVE}/${PN} \ |
| 37 | -Dps-derating-factor=${POWER_SUPPLY_DERATING_FACTOR} \ |
Nan Zhou | d6c0eef | 2022-07-27 02:26:22 +0000 | [diff] [blame] | 38 | -Dtests=disabled \ |
Matt Spinler | 25c9a63 | 2018-03-09 10:54:09 -0600 | [diff] [blame] | 39 | " |
Patrick Williams | 8c561ee | 2021-10-22 14:20:12 -0500 | [diff] [blame] | 40 | EXTRA_OEMESON:append = "${@bb.utils.contains('MACHINE_FEATURES', 'i2c-occ', ' -Di2c-occ=enabled', '', d)}" |
Lei YU | 80caf06 | 2017-07-20 15:25:28 +0800 | [diff] [blame] | 41 | |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 42 | OCC_ENABLE = "enable" |
| 43 | OCC_DISABLE = "disable" |
Andrew Geissler | 5c76e0c | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 44 | HOST_START = "startmin" |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 45 | HOST_STOP = "stop" |
| 46 | |
Andrew Geissler | 109ae01 | 2020-03-31 13:47:05 -0500 | [diff] [blame] | 47 | # Ensure host-stop and host-startmin targets wants needed occ states |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 48 | OCC_TMPL = "op-occ-{0}@.service" |
| 49 | HOST_TGTFMT = "obmc-host-{1}@{2}.target" |
| 50 | OCC_INSTFMT = "op-occ-{0}@{2}.service" |
Andrew Geissler | 109ae01 | 2020-03-31 13:47:05 -0500 | [diff] [blame] | 51 | HOST_OCC_FMT = "../${OCC_TMPL}:${HOST_TGTFMT}.wants/${OCC_INSTFMT}" |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 52 | SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_ENABLE', 'HOST_START', 'OBMC_HOST_INSTANCES')}" |
| 53 | SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_DISABLE', 'HOST_STOP', 'OBMC_HOST_INSTANCES')}" |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 54 | |
Edward A. James | bb022b9 | 2017-11-01 16:26:54 -0500 | [diff] [blame] | 55 | # Set the occ disable service to be executed on host error |
| 56 | HOST_ERROR_TARGETS = "crash timeout" |
| 57 | |
| 58 | OCC_DISABLE_TMPL = "op-occ-disable@.service" |
| 59 | HOST_ERROR_TGTFMT = "obmc-host-{0}@{1}.target" |
| 60 | OCC_DISABLE_INSTFMT = "op-occ-disable@{1}.service" |
| 61 | HOST_ERROR_FMT = "../${OCC_DISABLE_TMPL}:${HOST_ERROR_TGTFMT}.wants/${OCC_DISABLE_INSTFMT}" |
| 62 | |
Patrick Williams | e83c220 | 2021-09-01 16:17:33 -0500 | [diff] [blame] | 63 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" |
Edward A. James | bb022b9 | 2017-11-01 16:26:54 -0500 | [diff] [blame] | 64 | |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 65 | S = "${WORKDIR}/git" |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 66 | |
| 67 | # Remove packages not required for native build |
Adriana Kobylak | 8c6707f | 2021-08-06 17:35:36 +0000 | [diff] [blame] | 68 | DEPENDS:remove:class-native = " \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 69 | phosphor-logging \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 70 | systemd \ |
Patrick Williams | 1470846 | 2020-04-08 07:25:26 -0500 | [diff] [blame] | 71 | sdbusplus \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 72 | virtual/${PN}-config-native \ |
| 73 | " |
Patrick Williams | d5c716d | 2022-02-17 07:30:57 -0600 | [diff] [blame] | 74 | RDEPENDS:${PN}:remove:class-native = "phosphor-state-manager-obmc-targets" |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -0600 | [diff] [blame] | 75 | |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 76 | # Remove packages not required for native SDK build |
Adriana Kobylak | 8c6707f | 2021-08-06 17:35:36 +0000 | [diff] [blame] | 77 | DEPENDS:remove:class-nativesdk = " \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 78 | phosphor-logging \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 79 | systemd \ |
Patrick Williams | 1470846 | 2020-04-08 07:25:26 -0500 | [diff] [blame] | 80 | sdbusplus \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 81 | virtual/${PN}-config-native \ |
| 82 | " |
Patrick Williams | d5c716d | 2022-02-17 07:30:57 -0600 | [diff] [blame] | 83 | RDEPENDS:${PN}:remove:class-nativesdk = "phosphor-state-manager-obmc-targets" |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 84 | |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 85 | BBCLASSEXTEND += "native nativesdk" |