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 | |
Deepak Kodihalli | 615bdc1 | 2017-04-06 23:50:34 -0500 | [diff] [blame] | 7 | inherit autotools \ |
| 8 | pkgconfig \ |
Vishwanatha Subbanna | 359eee8 | 2017-05-04 09:45:29 -0500 | [diff] [blame] | 9 | obmc-phosphor-dbus-service \ |
Marri Devender Rao | bdaa6d2 | 2018-01-17 11:34:02 -0600 | [diff] [blame] | 10 | pythonnative \ |
| 11 | phosphor-dbus-yaml |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 12 | |
| 13 | require ${PN}.inc |
| 14 | |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 15 | SRC_URI += "file://occ-active.sh" |
| 16 | do_install_append() { |
| 17 | install -d ${D}${bindir} |
| 18 | install -m 0755 ${WORKDIR}/occ-active.sh \ |
| 19 | ${D}${bindir}/occ-active.sh |
| 20 | } |
| 21 | |
Vishwanatha Subbanna | 5f74f13 | 2017-07-07 02:55:58 -0500 | [diff] [blame] | 22 | DBUS_SERVICE_${PN} += "org.open_power.OCC.Control.service" |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 23 | SYSTEMD_SERVICE_${PN} += "op-occ-enable@.service" |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 24 | SYSTEMD_SERVICE_${PN} += "op-occ-disable@.service" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 25 | |
Vishwanatha Subbanna | fcf5076 | 2017-08-09 15:00:34 +0530 | [diff] [blame] | 26 | DEPENDS += "virtual/${PN}-config-native" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 27 | DEPENDS += " \ |
| 28 | sdbusplus \ |
| 29 | sdbusplus-native \ |
| 30 | phosphor-logging \ |
Vishwanatha Subbanna | 5f74f13 | 2017-07-07 02:55:58 -0500 | [diff] [blame] | 31 | phosphor-dbus-interfaces \ |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 32 | autoconf-archive-native \ |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 33 | systemd \ |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 34 | " |
| 35 | |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -0600 | [diff] [blame] | 36 | RDEPENDS_${PN} += "phosphor-state-manager-obmc-targets" |
| 37 | |
Matt Spinler | 25c9a63 | 2018-03-09 10:54:09 -0600 | [diff] [blame] | 38 | EXTRA_OECONF = " \ |
| 39 | YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN} \ |
| 40 | PS_DERATING_FACTOR=${POWER_SUPPLY_DERATING_FACTOR} \ |
| 41 | " |
Lei YU | 80caf06 | 2017-07-20 15:25:28 +0800 | [diff] [blame] | 42 | EXTRA_OECONF_append = "${@bb.utils.contains('OBMC_MACHINE_FEATURES', 'i2c-occ', ' --enable-i2c-occ', '', d)}" |
| 43 | |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 44 | OCC_ENABLE = "enable" |
| 45 | OCC_DISABLE = "disable" |
Andrew Geissler | 5c76e0c | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 46 | HOST_START = "startmin" |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 47 | HOST_STOP = "stop" |
| 48 | |
Andrew Geissler | 5c76e0c | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 49 | # Ensure host-stop and host-startmin targets require needed occ states |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 50 | OCC_TMPL = "op-occ-{0}@.service" |
| 51 | HOST_TGTFMT = "obmc-host-{1}@{2}.target" |
| 52 | OCC_INSTFMT = "op-occ-{0}@{2}.service" |
| 53 | HOST_OCC_FMT = "../${OCC_TMPL}:${HOST_TGTFMT}.requires/${OCC_INSTFMT}" |
| 54 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_ENABLE', 'HOST_START', 'OBMC_HOST_INSTANCES')}" |
| 55 | 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] | 56 | |
Edward A. James | bb022b9 | 2017-11-01 16:26:54 -0500 | [diff] [blame] | 57 | # Set the occ disable service to be executed on host error |
| 58 | HOST_ERROR_TARGETS = "crash timeout" |
| 59 | |
| 60 | OCC_DISABLE_TMPL = "op-occ-disable@.service" |
| 61 | HOST_ERROR_TGTFMT = "obmc-host-{0}@{1}.target" |
| 62 | OCC_DISABLE_INSTFMT = "op-occ-disable@{1}.service" |
| 63 | HOST_ERROR_FMT = "../${OCC_DISABLE_TMPL}:${HOST_ERROR_TGTFMT}.wants/${OCC_DISABLE_INSTFMT}" |
| 64 | |
| 65 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 66 | |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 67 | S = "${WORKDIR}/git" |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 68 | |
| 69 | # Remove packages not required for native build |
| 70 | DEPENDS_remove_class-native = " \ |
| 71 | phosphor-logging \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 72 | systemd \ |
| 73 | virtual/${PN}-config-native \ |
| 74 | " |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -0600 | [diff] [blame] | 75 | RDEPENDS_${PN}_remove_class-native += "phosphor-state-manager-obmc-targets" |
| 76 | |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 77 | # Remove packages not required for native SDK build |
| 78 | DEPENDS_remove_class-nativesdk = " \ |
| 79 | phosphor-logging \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 80 | systemd \ |
| 81 | virtual/${PN}-config-native \ |
| 82 | " |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -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 | |
| 85 | # Provide a means to enable/disable install_error_yaml feature |
| 86 | PACKAGECONFIG ??= "install_error_yaml" |
| 87 | PACKAGECONFIG[install_error_yaml] = "\ |
| 88 | --enable-install_error_yaml,\ |
| 89 | --disable-install_error_yaml,\ |
| 90 | ,\ |
| 91 | " |
| 92 | |
| 93 | # Enable install_error_yaml during native and native SDK build |
| 94 | PACKAGECONFIG_add_class-native = "install_error_yaml" |
| 95 | PACKAGECONFIG_add_class-nativesdk = "install_error_yaml" |
| 96 | |
| 97 | # Disable install_error_yaml during target build |
| 98 | PACKAGECONFIG_remove_class-target = "install_error_yaml" |
| 99 | |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 100 | BBCLASSEXTEND += "native nativesdk" |