blob: 9f7e52fe70b0d377b69255aa0788b22390f23db0 [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 \
9 pythonnative
Deepak Kodihallif98bd112017-03-24 07:44:16 -050010
11require ${PN}.inc
12
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050013SRC_URI += "file://occ-active.sh"
14do_install_append() {
15 install -d ${D}${bindir}
16 install -m 0755 ${WORKDIR}/occ-active.sh \
17 ${D}${bindir}/occ-active.sh
18}
19
Vishwanatha Subbanna5f74f132017-07-07 02:55:58 -050020DBUS_SERVICE_${PN} += "org.open_power.OCC.Control.service"
Vishwanatha Subbanna79bc0a42017-08-22 21:34:43 +053021SYSTEMD_SERVICE_${PN} += "op-occ-enable@.service"
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050022SYSTEMD_SERVICE_${PN} += "op-occ-disable@.service"
Deepak Kodihallif98bd112017-03-24 07:44:16 -050023
Vishwanatha Subbannafcf50762017-08-09 15:00:34 +053024DEPENDS += "virtual/${PN}-config-native"
Deepak Kodihallif98bd112017-03-24 07:44:16 -050025DEPENDS += " \
26 sdbusplus \
27 sdbusplus-native \
28 phosphor-logging \
29 openpower-dbus-interfaces \
Vishwanatha Subbanna5f74f132017-07-07 02:55:58 -050030 phosphor-dbus-interfaces \
Deepak Kodihallif98bd112017-03-24 07:44:16 -050031 openpower-dbus-interfaces-native \
32 autoconf-archive-native \
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050033 obmc-targets \
34 systemd \
Deepak Kodihallif98bd112017-03-24 07:44:16 -050035 "
36
37RDEPENDS_${PN} += " \
38 sdbusplus \
39 phosphor-logging \
40 openpower-dbus-interfaces \
Vishwanatha Subbanna5f74f132017-07-07 02:55:58 -050041 phosphor-dbus-interfaces \
Deepak Kodihallif98bd112017-03-24 07:44:16 -050042 "
43
Vishwanatha Subbannafcf50762017-08-09 15:00:34 +053044EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}"
Lei YU80caf062017-07-20 15:25:28 +080045EXTRA_OECONF_append = "${@bb.utils.contains('OBMC_MACHINE_FEATURES', 'i2c-occ', ' --enable-i2c-occ', '', d)}"
46
Vishwanatha Subbanna79bc0a42017-08-22 21:34:43 +053047OCC_ENABLE = "enable"
48OCC_DISABLE = "disable"
49HOST_START = "start"
50HOST_STOP = "stop"
51
52# Ensure host-stop and host-start targets require needed occ states
53OCC_TMPL = "op-occ-{0}@.service"
54HOST_TGTFMT = "obmc-host-{1}@{2}.target"
55OCC_INSTFMT = "op-occ-{0}@{2}.service"
56HOST_OCC_FMT = "../${OCC_TMPL}:${HOST_TGTFMT}.requires/${OCC_INSTFMT}"
57SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_ENABLE', 'HOST_START', 'OBMC_HOST_INSTANCES')}"
58SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_DISABLE', 'HOST_STOP', 'OBMC_HOST_INSTANCES')}"
Andrew Geissler4cd9d0a2017-08-15 14:04:51 -050059
Edward A. Jamesbb022b92017-11-01 16:26:54 -050060# Set the occ disable service to be executed on host error
61HOST_ERROR_TARGETS = "crash timeout"
62
63OCC_DISABLE_TMPL = "op-occ-disable@.service"
64HOST_ERROR_TGTFMT = "obmc-host-{0}@{1}.target"
65OCC_DISABLE_INSTFMT = "op-occ-disable@{1}.service"
66HOST_ERROR_FMT = "../${OCC_DISABLE_TMPL}:${HOST_ERROR_TGTFMT}.wants/${OCC_DISABLE_INSTFMT}"
67
68SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}"
69
Deepak Kodihallif98bd112017-03-24 07:44:16 -050070S = "${WORKDIR}/git"