blob: ff42d60d1f08377ce817c08ff998839025940112 [file] [log] [blame]
Deepak Kodihallif98bd112017-03-24 07:44:16 -05001SUMMARY = "OpenPOWER OCC controller"
2DESCRIPTION = "Application to contol the OpenPOWER On-Chip-Controller"
3HOMEPAGE = "https://github.com/openbmc/openpower-occ-control"
4PR = "r1"
5
Deepak Kodihalli615bdc12017-04-06 23:50:34 -05006inherit autotools \
7 pkgconfig \
Vishwanatha Subbanna359eee82017-05-04 09:45:29 -05008 obmc-phosphor-dbus-service \
Marri Devender Raobdaa6d22018-01-17 11:34:02 -06009 pythonnative \
10 phosphor-dbus-yaml
Deepak Kodihallif98bd112017-03-24 07:44:16 -050011
12require ${PN}.inc
13
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050014SRC_URI += "file://occ-active.sh"
15do_install_append() {
16 install -d ${D}${bindir}
17 install -m 0755 ${WORKDIR}/occ-active.sh \
18 ${D}${bindir}/occ-active.sh
19}
20
Vishwanatha Subbanna5f74f132017-07-07 02:55:58 -050021DBUS_SERVICE_${PN} += "org.open_power.OCC.Control.service"
Vishwanatha Subbanna79bc0a42017-08-22 21:34:43 +053022SYSTEMD_SERVICE_${PN} += "op-occ-enable@.service"
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050023SYSTEMD_SERVICE_${PN} += "op-occ-disable@.service"
Deepak Kodihallif98bd112017-03-24 07:44:16 -050024
Vishwanatha Subbannafcf50762017-08-09 15:00:34 +053025DEPENDS += "virtual/${PN}-config-native"
Deepak Kodihallif98bd112017-03-24 07:44:16 -050026DEPENDS += " \
27 sdbusplus \
28 sdbusplus-native \
29 phosphor-logging \
30 openpower-dbus-interfaces \
Vishwanatha Subbanna5f74f132017-07-07 02:55:58 -050031 phosphor-dbus-interfaces \
Deepak Kodihallif98bd112017-03-24 07:44:16 -050032 openpower-dbus-interfaces-native \
33 autoconf-archive-native \
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050034 obmc-targets \
35 systemd \
Deepak Kodihallif98bd112017-03-24 07:44:16 -050036 "
37
38RDEPENDS_${PN} += " \
39 sdbusplus \
40 phosphor-logging \
41 openpower-dbus-interfaces \
Vishwanatha Subbanna5f74f132017-07-07 02:55:58 -050042 phosphor-dbus-interfaces \
Deepak Kodihallif98bd112017-03-24 07:44:16 -050043 "
44
Vishwanatha Subbannafcf50762017-08-09 15:00:34 +053045EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}"
Lei YU80caf062017-07-20 15:25:28 +080046EXTRA_OECONF_append = "${@bb.utils.contains('OBMC_MACHINE_FEATURES', 'i2c-occ', ' --enable-i2c-occ', '', d)}"
47
Vishwanatha Subbanna79bc0a42017-08-22 21:34:43 +053048OCC_ENABLE = "enable"
49OCC_DISABLE = "disable"
50HOST_START = "start"
51HOST_STOP = "stop"
52
53# Ensure host-stop and host-start targets require needed occ states
54OCC_TMPL = "op-occ-{0}@.service"
55HOST_TGTFMT = "obmc-host-{1}@{2}.target"
56OCC_INSTFMT = "op-occ-{0}@{2}.service"
57HOST_OCC_FMT = "../${OCC_TMPL}:${HOST_TGTFMT}.requires/${OCC_INSTFMT}"
58SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_ENABLE', 'HOST_START', 'OBMC_HOST_INSTANCES')}"
59SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_DISABLE', 'HOST_STOP', 'OBMC_HOST_INSTANCES')}"
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050060
Edward A. Jamesbb022b92017-11-01 16:26:54 -050061# Set the occ disable service to be executed on host error
62HOST_ERROR_TARGETS = "crash timeout"
63
64OCC_DISABLE_TMPL = "op-occ-disable@.service"
65HOST_ERROR_TGTFMT = "obmc-host-{0}@{1}.target"
66OCC_DISABLE_INSTFMT = "op-occ-disable@{1}.service"
67HOST_ERROR_FMT = "../${OCC_DISABLE_TMPL}:${HOST_ERROR_TGTFMT}.wants/${OCC_DISABLE_INSTFMT}"
68
69SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}"
70
Deepak Kodihallif98bd112017-03-24 07:44:16 -050071S = "${WORKDIR}/git"