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 \ |
Eddie James | 64e2819 | 2020-03-05 09:28:18 -0600 | [diff] [blame^] | 34 | ${PYTHON_PN}-native \ |
| 35 | ${PYTHON_PN}-pyyaml-native \ |
| 36 | ${PYTHON_PN}-setuptools-native \ |
| 37 | ${PYTHON_PN}-mako-native \ |
Deepak Kodihalli | f98bd11 | 2017-03-24 07:44:16 -0500 | [diff] [blame] | 38 | " |
| 39 | |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -0600 | [diff] [blame] | 40 | RDEPENDS_${PN} += "phosphor-state-manager-obmc-targets" |
| 41 | |
Matt Spinler | 25c9a63 | 2018-03-09 10:54:09 -0600 | [diff] [blame] | 42 | EXTRA_OECONF = " \ |
| 43 | YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN} \ |
| 44 | PS_DERATING_FACTOR=${POWER_SUPPLY_DERATING_FACTOR} \ |
| 45 | " |
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" |
Andrew Geissler | 5c76e0c | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 50 | HOST_START = "startmin" |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 51 | HOST_STOP = "stop" |
| 52 | |
Andrew Geissler | 5c76e0c | 2018-03-27 13:56:26 -0700 | [diff] [blame] | 53 | # Ensure host-stop and host-startmin targets require needed occ states |
Vishwanatha Subbanna | 79bc0a4 | 2017-08-22 21:34:43 +0530 | [diff] [blame] | 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" |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 72 | |
| 73 | # Remove packages not required for native build |
| 74 | DEPENDS_remove_class-native = " \ |
| 75 | phosphor-logging \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 76 | systemd \ |
| 77 | virtual/${PN}-config-native \ |
| 78 | " |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -0600 | [diff] [blame] | 79 | RDEPENDS_${PN}_remove_class-native += "phosphor-state-manager-obmc-targets" |
| 80 | |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 81 | # Remove packages not required for native SDK build |
| 82 | DEPENDS_remove_class-nativesdk = " \ |
| 83 | phosphor-logging \ |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 84 | systemd \ |
| 85 | virtual/${PN}-config-native \ |
| 86 | " |
Andrew Geissler | 5c45985 | 2020-02-10 08:19:46 -0600 | [diff] [blame] | 87 | RDEPENDS_${PN}_remove_class-nativesdk += "phosphor-state-manager-obmc-targets" |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 88 | |
| 89 | # Provide a means to enable/disable install_error_yaml feature |
| 90 | PACKAGECONFIG ??= "install_error_yaml" |
| 91 | PACKAGECONFIG[install_error_yaml] = "\ |
| 92 | --enable-install_error_yaml,\ |
| 93 | --disable-install_error_yaml,\ |
| 94 | ,\ |
| 95 | " |
| 96 | |
| 97 | # Enable install_error_yaml during native and native SDK build |
| 98 | PACKAGECONFIG_add_class-native = "install_error_yaml" |
| 99 | PACKAGECONFIG_add_class-nativesdk = "install_error_yaml" |
| 100 | |
| 101 | # Disable install_error_yaml during target build |
| 102 | PACKAGECONFIG_remove_class-target = "install_error_yaml" |
| 103 | |
Marri Devender Rao | b867da7 | 2017-12-29 06:01:11 -0600 | [diff] [blame] | 104 | BBCLASSEXTEND += "native nativesdk" |