blob: f13805e7304e8ee8e04a17e1c1c6959fb3380cdc [file] [log] [blame]
Gunnar Mills35591d42017-01-27 13:13:24 -06001SUMMARY = "Phosphor Software Management"
2DESCRIPTION = "Phosphor Software Manager provides a set of system software \
3management daemons. It is suitable for use on a wide variety of OpenBMC \
4platforms."
5HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt"
6PR = "r1"
7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
9
10SOFTWARE_MGR_PACKAGES = " \
11 ${PN}-version \
Deepak Kodihalli60d1de52017-04-13 23:23:42 -050012 ${PN}-download-mgr \
Gunnar Mills30131f72017-05-15 15:40:58 -050013 ${PN}-updater \
Adriana Kobylakaabb95d2018-04-20 14:52:40 -050014 ${PN}-sync \
Gunnar Mills35591d42017-01-27 13:13:24 -060015"
Brad Bishop36a2dfb2018-04-11 11:42:17 -040016PACKAGE_BEFORE_PN += "${SOFTWARE_MGR_PACKAGES}"
17ALLOW_EMPTY_${PN} = "1"
Brad Bishop4c43bb52017-03-01 15:37:17 -050018
Gunnar Mills35591d42017-01-27 13:13:24 -060019DBUS_PACKAGES = "${SOFTWARE_MGR_PACKAGES}"
20
21# Set SYSTEMD_PACKAGES to empty because we do not want ${PN} and DBUS_PACKAGES
22# handles the rest.
23SYSTEMD_PACKAGES = ""
24
Adriana Kobylaka3641d72018-03-29 15:16:09 -050025PACKAGECONFIG[verify_signature] = "--enable-verify_signature,--disable-verify_signature"
Adriana Kobylakaabb95d2018-04-20 14:52:40 -050026PACKAGECONFIG[sync_bmc_files] = "--enable-sync_bmc_files,--disable-sync_bmc_files"
Adriana Kobylaka3641d72018-03-29 15:16:09 -050027
Gunnar Mills35591d42017-01-27 13:13:24 -060028inherit autotools pkgconfig
29inherit obmc-phosphor-dbus-service
Gunnar Millse0178ae2017-05-24 13:12:22 -050030inherit pythonnative
Gunnar Mills35591d42017-01-27 13:13:24 -060031
Deepak Kodihalli60d1de52017-04-13 23:23:42 -050032DEPENDS += " \
33 autoconf-archive-native \
34 sdbusplus \
35 phosphor-dbus-interfaces \
36 phosphor-logging \
Saqib Khan5ef4efb2017-11-15 05:31:12 -060037 sdbus++-native \
Deepak Kodihalli60d1de52017-04-13 23:23:42 -050038"
Gunnar Mills35591d42017-01-27 13:13:24 -060039
Deepak Kodihalli60d1de52017-04-13 23:23:42 -050040RDEPENDS_${PN}-version += " \
41 phosphor-logging \
42 phosphor-dbus-interfaces \
43 sdbusplus \
44"
45RDEPENDS_${PN}-download-mgr += " \
46 phosphor-logging \
47 phosphor-dbus-interfaces \
48 sdbusplus \
49"
Gunnar Mills30131f72017-05-15 15:40:58 -050050RDEPENDS_${PN}-updater += " \
51 phosphor-logging \
52 phosphor-dbus-interfaces \
53 sdbusplus \
Patrick Williams2182d312017-08-09 17:36:04 -050054 virtual-obmc-image-manager \
Brad Bishop72cd4a52018-03-01 10:29:24 -050055 bash \
Patrick Williams2182d312017-08-09 17:36:04 -050056"
Lei YUad84f762018-05-11 17:26:35 +080057RDEPENDS_${PN}-updater_append_df-obmc-ubi-fs = " \
58 mtd-utils-ubifs \
59"
Patrick Williams2182d312017-08-09 17:36:04 -050060
61RPROVIDES_${PN}-version += " \
62 virtual-obmc-image-manager \
Gunnar Mills30131f72017-05-15 15:40:58 -050063"
Gunnar Mills35591d42017-01-27 13:13:24 -060064
Brad Bishop33e5a8b2018-06-08 10:20:52 -040065FILES_${PN}-version += "${sbindir}/phosphor-version-software-manager ${exec_prefix}/lib/tmpfiles.d/software.conf"
Deepak Kodihalli60d1de52017-04-13 23:23:42 -050066FILES_${PN}-download-mgr += "${sbindir}/phosphor-download-manager"
Adriana Kobylaka290eff2017-06-27 09:39:57 -050067FILES_${PN}-updater += " \
68 ${sbindir}/phosphor-image-updater \
69 ${sbindir}/obmc-flash-bmc \
Saqib Khan7ec18712017-08-23 23:43:53 -050070 /usr/local \
Adriana Kobylaka290eff2017-06-27 09:39:57 -050071 "
Adriana Kobylaka420efc2018-05-22 12:33:45 -050072FILES_${PN}-sync += " \
73 ${sbindir}/phosphor-sync-software-manager \
74 ${sysconfdir}/synclist \
75 "
Gunnar Mills4a993b52017-05-11 08:27:12 -050076DBUS_SERVICE_${PN}-version += "xyz.openbmc_project.Software.Version.service"
Deepak Kodihalli60d1de52017-04-13 23:23:42 -050077DBUS_SERVICE_${PN}-download-mgr += "xyz.openbmc_project.Software.Download.service"
Gunnar Mills30131f72017-05-15 15:40:58 -050078DBUS_SERVICE_${PN}-updater += "xyz.openbmc_project.Software.BMC.Updater.service"
Adriana Kobylakaabb95d2018-04-20 14:52:40 -050079DBUS_SERVICE_${PN}-sync += "xyz.openbmc_project.Software.Sync.service"
Gunnar Mills35591d42017-01-27 13:13:24 -060080
Adriana Kobylaka290eff2017-06-27 09:39:57 -050081SYSTEMD_SERVICE_${PN}-updater += " \
82 obmc-flash-bmc-ubirw.service \
Adriana Kobylake9939492017-07-11 11:34:23 -050083 obmc-flash-bmc-ubiro@.service \
Michael Tritza694eed2017-07-13 16:26:15 -050084 obmc-flash-bmc-setenv@.service \
Leonel Gonzalez4aaad112017-07-21 12:54:55 -050085 obmc-flash-bmc-ubirw-remove.service \
86 obmc-flash-bmc-ubiro-remove@.service \
Adriana Kobylak97ea5ad2017-07-08 16:28:59 -050087 usr-local.mount \
Saqib Khanbb93e642017-08-10 11:24:38 -050088 obmc-flash-bmc-ubiremount.service \
Saqib Khan7e4a3f22017-09-12 09:23:28 -050089 obmc-flash-bmc-updateubootvars@.service \
Saqib Khandfc9b0c2017-09-08 10:10:08 -050090 reboot-guard-enable.service \
91 reboot-guard-disable.service \
Michael Tritz18781172017-09-21 00:41:15 -050092 obmc-flash-bmc-cleanup.service \
Eddie James63fa6112018-03-01 09:55:07 -060093 obmc-flash-bmc-mirroruboot.service \
Adriana Kobylaka290eff2017-06-27 09:39:57 -050094 "
95
96# Name of the mtd device where the ubi volumes should be created
Adriana Kobylak4de98a92017-08-17 21:36:43 -050097BMC_RW_MTD ??= "bmc"
98BMC_RO_MTD ??= "bmc"
99BMC_KERNEL_MTD ??= "bmc"
Adriana Kobylakb7059982018-02-14 16:35:30 -0600100BMC_RW_SIZE ??= "0x600000"
Adriana Kobylaka290eff2017-06-27 09:39:57 -0500101SYSTEMD_SUBSTITUTIONS += "RW_MTD:${BMC_RW_MTD}:obmc-flash-bmc-ubirw.service"
Adriana Kobylake9939492017-07-11 11:34:23 -0500102SYSTEMD_SUBSTITUTIONS += "RO_MTD:${BMC_RO_MTD}:obmc-flash-bmc-ubiro@.service"
103SYSTEMD_SUBSTITUTIONS += "KERNEL_MTD:${BMC_KERNEL_MTD}:obmc-flash-bmc-ubiro@.service"
Adriana Kobylakb7059982018-02-14 16:35:30 -0600104SYSTEMD_SUBSTITUTIONS += "RW_SIZE:${BMC_RW_SIZE}:obmc-flash-bmc-ubirw.service"
Adriana Kobylaka290eff2017-06-27 09:39:57 -0500105
106SRC_URI += "file://obmc-flash-bmc"
Adriana Kobylaka420efc2018-05-22 12:33:45 -0500107SRC_URI += "file://synclist"
Brad Bishop33e5a8b2018-06-08 10:20:52 -0400108SRC_URI += "file://software.conf"
109
Adriana Kobylaka290eff2017-06-27 09:39:57 -0500110do_install_append() {
111 install -d ${D}${sbindir}
112 install -m 0755 ${WORKDIR}/obmc-flash-bmc ${D}${sbindir}/obmc-flash-bmc
Saqib Khan7ec18712017-08-23 23:43:53 -0500113 install -d ${D}/usr/local
Adriana Kobylaka420efc2018-05-22 12:33:45 -0500114
115 if [ -f ${WORKDIR}/build/phosphor-sync-software-manager ]; then
116 install -d ${D}${sysconfdir}
117 install -m 0644 ${WORKDIR}/synclist ${D}${sysconfdir}/synclist
118 fi
Brad Bishop33e5a8b2018-06-08 10:20:52 -0400119
120 # /tmp/images is the software image upload directory.
121 # It should not be deleted since it is watched by the Image Manager
122 # for new images.
123
124 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
125 install -d ${D}${exec_prefix}/lib/tmpfiles.d
126 install -m 644 ${WORKDIR}/software.conf ${D}${exec_prefix}/lib/tmpfiles.d/
127 fi
Adriana Kobylaka290eff2017-06-27 09:39:57 -0500128}
129
Gunnar Mills35591d42017-01-27 13:13:24 -0600130SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt"
Andrew Geissler5c527b32018-06-15 11:35:04 -0500131SRCREV = "3ce563a0919a4c793894c324e355582db40dc6ce"
Gunnar Mills35591d42017-01-27 13:13:24 -0600132
133S = "${WORKDIR}/git"