Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 1 | SUMMARY = "OpenPOWER OCC controller" |
| 2 | DESCRIPTION = "Application to contol the OpenPOWER On-Chip-Controller" |
| 3 | HOMEPAGE = "https://github.com/openbmc/openpower-occ-control" |
| 4 | PR = "r1" |
| 5 | |
Deepak Kodihalli | 615bdc1 | 2017-04-06 23:50:34 -0500 | [diff] [blame] | 6 | inherit autotools \ |
| 7 | pkgconfig \ |
Vishwanatha Subbanna | 359eee8 | 2017-05-04 09:45:29 -0500 | [diff] [blame] | 8 | obmc-phosphor-dbus-service \ |
Marri Devender Rao | bdaa6d2 | 2018-01-17 11:34:02 -0600 | [diff] [blame] | 9 | pythonnative \ |
| 10 | phosphor-dbus-yaml |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 11 | |
| 12 | require ${PN}.inc |
| 13 | |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 14 | SRC_URI += "file://occ-active.sh" |
| 15 | do_install_append() { |
| 16 | install -d ${D}${bindir} |
| 17 | install -m 0755 ${WORKDIR}/occ-active.sh \ |
| 18 | ${D}${bindir}/occ-active.sh |
| 19 | } |
| 20 | |
Vishwanatha Subbanna | 5f74f13 | 2017-07-07 02:55:58 -0500 | [diff] [blame] | 21 | DBUS_SERVICE_${PN} += "org.open_power.OCC.Control.service" |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 22 | SYSTEMD_SERVICE_${PN} += "op-occ-enable@.service" |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 23 | SYSTEMD_SERVICE_${PN} += "op-occ-disable@.service" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 24 | |
Vishwanatha Subbanna | fcf5076 | 2017-08-09 15:00:34 +0530 | [diff] [blame] | 25 | DEPENDS += "virtual/${PN}-config-native" |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 26 | DEPENDS += " \ |
| 27 | sdbusplus \ |
| 28 | sdbusplus-native \ |
| 29 | phosphor-logging \ |
| 30 | openpower-dbus-interfaces \ |
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 | openpower-dbus-interfaces-native \ |
| 33 | autoconf-archive-native \ |
Andrew Geissler | 4cd9d0a | 2017-08-15 14:04:51 -0500 | [diff] [blame] | 34 | obmc-targets \ |
| 35 | systemd \ |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 36 | " |
| 37 | |
| 38 | RDEPENDS_${PN} += " \ |
| 39 | sdbusplus \ |
| 40 | phosphor-logging \ |
| 41 | openpower-dbus-interfaces \ |
Vishwanatha Subbanna | 5f74f13 | 2017-07-07 02:55:58 -0500 | [diff] [blame] | 42 | phosphor-dbus-interfaces \ |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 43 | " |
| 44 | |
Vishwanatha Subbanna | fcf5076 | 2017-08-09 15:00:34 +0530 | [diff] [blame] | 45 | EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}" |
Lei YU | 80caf06 | 2017-07-20 15:25:28 +0800 | [diff] [blame] | 46 | EXTRA_OECONF_append = "${@bb.utils.contains('OBMC_MACHINE_FEATURES', 'i2c-occ', ' --enable-i2c-occ', '', d)}" |
| 47 | |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 48 | OCC_ENABLE = "enable" |
| 49 | OCC_DISABLE = "disable" |
| 50 | HOST_START = "start" |
| 51 | HOST_STOP = "stop" |
| 52 | |
| 53 | # Ensure host-stop and host-start targets require needed occ states |
| 54 | OCC_TMPL = "op-occ-{0}@.service" |
| 55 | HOST_TGTFMT = "obmc-host-{1}@{2}.target" |
| 56 | OCC_INSTFMT = "op-occ-{0}@{2}.service" |
| 57 | HOST_OCC_FMT = "../${OCC_TMPL}:${HOST_TGTFMT}.requires/${OCC_INSTFMT}" |
| 58 | SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_ENABLE', 'HOST_START', 'OBMC_HOST_INSTANCES')}" |
| 59 | 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] | 60 | |
Edward A. James | bb022b9 | 2017-11-01 16:26:54 -0500 | [diff] [blame] | 61 | # Set the occ disable service to be executed on host error |
| 62 | HOST_ERROR_TARGETS = "crash timeout" |
| 63 | |
| 64 | OCC_DISABLE_TMPL = "op-occ-disable@.service" |
| 65 | HOST_ERROR_TGTFMT = "obmc-host-{0}@{1}.target" |
| 66 | OCC_DISABLE_INSTFMT = "op-occ-disable@{1}.service" |
| 67 | HOST_ERROR_FMT = "../${OCC_DISABLE_TMPL}:${HOST_ERROR_TGTFMT}.wants/${OCC_DISABLE_INSTFMT}" |
| 68 | |
| 69 | SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}" |
| 70 | |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 71 | S = "${WORKDIR}/git" |