blob: ca856da994a1379e34495350601dcf8fc4f6e83d [file] [log] [blame]
vishwabmc1bf499d2015-10-09 15:51:50 +05301SUMMARY = "Phosphor OpenBMC IPMI daemon"
2DESCRIPTION = "Phosphor OpenBMC IPMI router and plugin libraries"
vishwabmc1bf499d2015-10-09 15:51:50 +05303PR = "r1"
4
Brad Bishop7ee71462016-08-19 09:02:54 -05005RRECOMMENDS_${PN} += "packagegroup-obmc-ipmid-providers-libs"
Chris Austen213cd2a2015-10-24 19:34:11 -05006
Matthew Barth302592f2016-08-16 16:51:35 -05007inherit autotools pkgconfig
vishwabmc1bf499d2015-10-09 15:51:50 +05308inherit obmc-phosphor-license
Patrick Williamsf7714062015-10-15 15:20:20 -05009inherit obmc-phosphor-sdbus-service
Tom Joseph40b4e3f2017-02-01 19:47:27 +053010inherit obmc-phosphor-ipmiprovider-symlink
Ratan Guptab92d0ec2017-03-06 17:05:11 +053011inherit phosphor-ipmi-host
12inherit pythonnative
Andrew Geisslerd40db752017-05-11 16:16:27 -050013inherit obmc-phosphor-systemd
vishwabmc1bf499d2015-10-09 15:51:50 +053014
Adriana Kobylak17885c22017-02-17 08:21:42 -060015DEPENDS += "phosphor-logging"
Brad Bishop1122eb02016-10-05 20:10:23 -040016DEPENDS += "phosphor-mapper"
Matthew Barth302592f2016-08-16 16:51:35 -050017DEPENDS += "autoconf-archive-native"
Tom Josephf07ae012017-02-20 12:01:43 +053018DEPENDS += "packagegroup-obmc-ipmid-providers"
Ratan Guptab92d0ec2017-03-06 17:05:11 +053019DEPENDS += "virtual/phosphor-ipmi-sensor-inventory"
Ratan Gupta8dc22a92017-03-20 18:20:47 +053020DEPENDS += "sdbusplus"
21DEPENDS += "phosphor-dbus-interfaces"
Andrew Geisslerd40db752017-05-11 16:16:27 -050022DEPENDS += "obmc-targets"
Tom Josephf2614f92017-05-08 11:49:10 +053023DEPENDS += "virtual/phosphor-ipmi-inventory-sel"
Marri Devender Rao5a0088c2017-07-26 02:11:32 -050024DEPENDS += "virtual/phosphor-ipmi-fru-merge-config"
Saqib Khan5ef4efb2017-11-15 05:31:12 -060025DEPENDS += "sdbus++-native"
Ratan Guptab92d0ec2017-03-06 17:05:11 +053026
Adriana Kobylak17885c22017-02-17 08:21:42 -060027RDEPENDS_${PN}-dev += "phosphor-logging"
Brad Bishop1122eb02016-10-05 20:10:23 -040028RDEPENDS_${PN}-dev += "phosphor-mapper-dev"
Milton D. Miller II611e3ff2016-03-04 15:29:29 -060029RDEPENDS_${PN} += "clear-once"
Adriana Kobylak8f2f3b32016-01-30 10:41:48 -060030RDEPENDS_${PN} += "network"
Brad Bishop9a701b42016-07-26 15:52:01 -040031RDEPENDS_${PN} += "libmapper"
Vishwanatha Subbanna78bc5422016-11-10 21:52:46 +053032RDEPENDS_${PN} += "phosphor-time-manager"
Ratan Gupta8dc22a92017-03-20 18:20:47 +053033RDEPENDS_${PN} += "sdbusplus phosphor-dbus-interfaces"
Vishwanatha Subbanna55c545a2017-06-12 13:09:10 +053034RDEPENDS_${PN} += "virtual/obmc-watchdog"
Ratan Gupta8dc22a92017-03-20 18:20:47 +053035
Vishwanatha Subbanna35318402017-03-31 14:41:11 +053036SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service phosphor-ipmi-host.service"
37
Adriana Kobylak79841ae2016-08-25 10:07:34 -050038RRECOMMENDS_${PN} += "virtual-obmc-settings-mgmt"
vishwabmc1bf499d2015-10-09 15:51:50 +053039
Marri Devender Rao52a9f2d2017-06-08 00:47:54 -050040require ${PN}.inc
Chris Austen213cd2a2015-10-24 19:34:11 -050041
Tom Josephf07ae012017-02-20 12:01:43 +053042# Setup IPMI Whitelist Conf files
43WHITELIST_CONF = " \
Patrick Williamsf11f0152017-02-24 13:04:06 -060044 ${STAGING_DATADIR_NATIVE}/phosphor-ipmi-host/*.conf \
Tom Josephf07ae012017-02-20 12:01:43 +053045 ${S}/host-ipmid-whitelist.conf \
46 "
47EXTRA_OECONF = " \
48 WHITELIST_CONF="${WHITELIST_CONF}" \
Ratan Guptab92d0ec2017-03-06 17:05:11 +053049 SENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/sensor.yaml \
Tom Josephf2614f92017-05-08 11:49:10 +053050 INVSENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/invsensor.yaml \
Marri Devender Rao5a0088c2017-07-26 02:11:32 -050051 FRU_YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/fru_config.yaml \
Tom Josephf07ae012017-02-20 12:01:43 +053052 "
53
vishwabmc1bf499d2015-10-09 15:51:50 +053054S = "${WORKDIR}/git"
55
Dhruvaraj Subhashchandran16d57052017-08-04 16:09:15 -050056SRC_URI += "file://merge_yamls.py"
57
Tom Joseph40b4e3f2017-02-01 19:47:27 +053058HOSTIPMI_PROVIDER_LIBRARY += "libapphandler.so"
Tom Joseph40b4e3f2017-02-01 19:47:27 +053059HOSTIPMI_PROVIDER_LIBRARY += "libsysintfcmds.so"
60
61NETIPMI_PROVIDER_LIBRARY += "libapphandler.so"
62
63FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
Matthew Barth302592f2016-08-16 16:51:35 -050064FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
Tom Joseph40b4e3f2017-02-01 19:47:27 +053065FILES_${PN}_append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
66FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
Brad Bishop3b524cf2016-09-06 13:03:39 -040067
Andrew Geisslerafc510f2017-01-04 11:11:50 -060068# Soft Power Off
69RDEPENDS_${PN} += "phosphor-mapper"
Andrew Geisslerd40db752017-05-11 16:16:27 -050070
71# install the soft power off service in the host shutdown target
72SOFT_SVC = "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
73SOFT_TGTFMT = "obmc-host-shutdown@{0}.target"
74SOFT_FMT = "../${SOFT_SVC}:${SOFT_TGTFMT}.requires/${SOFT_SVC}"
75SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'SOFT_FMT', 'OBMC_HOST_INSTANCES')}"
Dhruvaraj Subhashchandran16d57052017-08-04 16:09:15 -050076
77#Collect all hardcoded sensor yamls from different recipes and
78#merge all of them with sensor.yaml.
79python do_merge_sensors () {
80 import subprocess
81
82 # TODO: Perform the merge in a temporary directory?
83 workdir = d.getVar('WORKDIR', True)
84 nativedir = d.getVar('STAGING_DIR_NATIVE', True)
85 sensorsdir = d.getVar('sensor_datadir', True)
86 sensorsdir = sensorsdir[1:]
87 sensorsdir = os.path.join(nativedir, sensorsdir)
88 cmd = []
89 cmd.append(os.path.join(workdir, 'merge_yamls.py'))
90 cmd.append(os.path.join(sensorsdir, 'sensor.yaml'))
91
92 if os.stat(os.path.join(sensorsdir, 'sensor.yaml')).st_size == 0:
93 return
94 fetch = bb.fetch2.Fetch([], d)
Kun Yie6bd58c2017-10-09 23:17:08 -070095 override_urls = [url for url in fetch.urls if url.endswith('.hardcoded.yaml')]
Dhruvaraj Subhashchandran16d57052017-08-04 16:09:15 -050096 for url in override_urls:
97 bb.debug(2, 'Overriding with source: ' + url)
98 local_base = os.path.basename(fetch.localpath(url))
99 filename = os.path.join(workdir, local_base)
100 cmd.append(filename)
101
102 # Invoke the script and don't catch any resulting exception.
103 subprocess.check_call(cmd)
104}
105# python-pyyaml-native is installed by do_configure, so put this task after
106addtask merge_sensors after do_configure before do_compile