Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 1 | SUMMARY = "Phosphor Software Management" |
| 2 | DESCRIPTION = "Phosphor Software Manager provides a set of system software \ |
| 3 | management daemons. It is suitable for use on a wide variety of OpenBMC \ |
| 4 | platforms." |
| 5 | HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt" |
| 6 | PR = "r1" |
| 7 | LICENSE = "Apache-2.0" |
| 8 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
| 9 | |
| 10 | SOFTWARE_MGR_PACKAGES = " \ |
| 11 | ${PN}-version \ |
Deepak Kodihalli | 60d1de5 | 2017-04-13 23:23:42 -0500 | [diff] [blame] | 12 | ${PN}-download-mgr \ |
Gunnar Mills | 30131f7 | 2017-05-15 15:40:58 -0500 | [diff] [blame] | 13 | ${PN}-updater \ |
Adriana Kobylak | aabb95d | 2018-04-20 14:52:40 -0500 | [diff] [blame] | 14 | ${PN}-sync \ |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 15 | " |
Brad Bishop | 36a2dfb | 2018-04-11 11:42:17 -0400 | [diff] [blame] | 16 | PACKAGE_BEFORE_PN += "${SOFTWARE_MGR_PACKAGES}" |
| 17 | ALLOW_EMPTY_${PN} = "1" |
Brad Bishop | 4c43bb5 | 2017-03-01 15:37:17 -0500 | [diff] [blame] | 18 | |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 19 | DBUS_PACKAGES = "${SOFTWARE_MGR_PACKAGES}" |
| 20 | |
| 21 | # Set SYSTEMD_PACKAGES to empty because we do not want ${PN} and DBUS_PACKAGES |
| 22 | # handles the rest. |
| 23 | SYSTEMD_PACKAGES = "" |
| 24 | |
Adriana Kobylak | a3641d7 | 2018-03-29 15:16:09 -0500 | [diff] [blame] | 25 | PACKAGECONFIG[verify_signature] = "--enable-verify_signature,--disable-verify_signature" |
Adriana Kobylak | aabb95d | 2018-04-20 14:52:40 -0500 | [diff] [blame] | 26 | PACKAGECONFIG[sync_bmc_files] = "--enable-sync_bmc_files,--disable-sync_bmc_files" |
Adriana Kobylak | a3641d7 | 2018-03-29 15:16:09 -0500 | [diff] [blame] | 27 | |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 28 | inherit autotools pkgconfig |
| 29 | inherit obmc-phosphor-dbus-service |
Gunnar Mills | e0178ae | 2017-05-24 13:12:22 -0500 | [diff] [blame] | 30 | inherit pythonnative |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 31 | |
Deepak Kodihalli | 60d1de5 | 2017-04-13 23:23:42 -0500 | [diff] [blame] | 32 | DEPENDS += " \ |
| 33 | autoconf-archive-native \ |
| 34 | sdbusplus \ |
| 35 | phosphor-dbus-interfaces \ |
| 36 | phosphor-logging \ |
Saqib Khan | 5ef4efb | 2017-11-15 05:31:12 -0600 | [diff] [blame] | 37 | sdbus++-native \ |
Deepak Kodihalli | 60d1de5 | 2017-04-13 23:23:42 -0500 | [diff] [blame] | 38 | " |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 39 | |
Deepak Kodihalli | 60d1de5 | 2017-04-13 23:23:42 -0500 | [diff] [blame] | 40 | RDEPENDS_${PN}-version += " \ |
| 41 | phosphor-logging \ |
| 42 | phosphor-dbus-interfaces \ |
| 43 | sdbusplus \ |
| 44 | " |
| 45 | RDEPENDS_${PN}-download-mgr += " \ |
| 46 | phosphor-logging \ |
| 47 | phosphor-dbus-interfaces \ |
| 48 | sdbusplus \ |
| 49 | " |
Gunnar Mills | 30131f7 | 2017-05-15 15:40:58 -0500 | [diff] [blame] | 50 | RDEPENDS_${PN}-updater += " \ |
| 51 | phosphor-logging \ |
| 52 | phosphor-dbus-interfaces \ |
| 53 | sdbusplus \ |
Patrick Williams | 2182d31 | 2017-08-09 17:36:04 -0500 | [diff] [blame] | 54 | virtual-obmc-image-manager \ |
Brad Bishop | 72cd4a5 | 2018-03-01 10:29:24 -0500 | [diff] [blame] | 55 | bash \ |
Patrick Williams | 2182d31 | 2017-08-09 17:36:04 -0500 | [diff] [blame] | 56 | " |
Lei YU | ad84f76 | 2018-05-11 17:26:35 +0800 | [diff] [blame] | 57 | RDEPENDS_${PN}-updater_append_df-obmc-ubi-fs = " \ |
| 58 | mtd-utils-ubifs \ |
| 59 | " |
Patrick Williams | 2182d31 | 2017-08-09 17:36:04 -0500 | [diff] [blame] | 60 | |
| 61 | RPROVIDES_${PN}-version += " \ |
| 62 | virtual-obmc-image-manager \ |
Gunnar Mills | 30131f7 | 2017-05-15 15:40:58 -0500 | [diff] [blame] | 63 | " |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 64 | |
Brad Bishop | 33e5a8b | 2018-06-08 10:20:52 -0400 | [diff] [blame] | 65 | FILES_${PN}-version += "${sbindir}/phosphor-version-software-manager ${exec_prefix}/lib/tmpfiles.d/software.conf" |
Deepak Kodihalli | 60d1de5 | 2017-04-13 23:23:42 -0500 | [diff] [blame] | 66 | FILES_${PN}-download-mgr += "${sbindir}/phosphor-download-manager" |
Adriana Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 67 | FILES_${PN}-updater += " \ |
| 68 | ${sbindir}/phosphor-image-updater \ |
| 69 | ${sbindir}/obmc-flash-bmc \ |
Saqib Khan | 7ec1871 | 2017-08-23 23:43:53 -0500 | [diff] [blame] | 70 | /usr/local \ |
Adriana Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 71 | " |
Adriana Kobylak | a420efc | 2018-05-22 12:33:45 -0500 | [diff] [blame] | 72 | FILES_${PN}-sync += " \ |
| 73 | ${sbindir}/phosphor-sync-software-manager \ |
| 74 | ${sysconfdir}/synclist \ |
| 75 | " |
Gunnar Mills | 4a993b5 | 2017-05-11 08:27:12 -0500 | [diff] [blame] | 76 | DBUS_SERVICE_${PN}-version += "xyz.openbmc_project.Software.Version.service" |
Deepak Kodihalli | 60d1de5 | 2017-04-13 23:23:42 -0500 | [diff] [blame] | 77 | DBUS_SERVICE_${PN}-download-mgr += "xyz.openbmc_project.Software.Download.service" |
Gunnar Mills | 30131f7 | 2017-05-15 15:40:58 -0500 | [diff] [blame] | 78 | DBUS_SERVICE_${PN}-updater += "xyz.openbmc_project.Software.BMC.Updater.service" |
Adriana Kobylak | aabb95d | 2018-04-20 14:52:40 -0500 | [diff] [blame] | 79 | DBUS_SERVICE_${PN}-sync += "xyz.openbmc_project.Software.Sync.service" |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 80 | |
Adriana Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 81 | SYSTEMD_SERVICE_${PN}-updater += " \ |
| 82 | obmc-flash-bmc-ubirw.service \ |
Adriana Kobylak | e993949 | 2017-07-11 11:34:23 -0500 | [diff] [blame] | 83 | obmc-flash-bmc-ubiro@.service \ |
Michael Tritz | a694eed | 2017-07-13 16:26:15 -0500 | [diff] [blame] | 84 | obmc-flash-bmc-setenv@.service \ |
Leonel Gonzalez | 4aaad11 | 2017-07-21 12:54:55 -0500 | [diff] [blame] | 85 | obmc-flash-bmc-ubirw-remove.service \ |
| 86 | obmc-flash-bmc-ubiro-remove@.service \ |
Adriana Kobylak | 97ea5ad | 2017-07-08 16:28:59 -0500 | [diff] [blame] | 87 | usr-local.mount \ |
Saqib Khan | bb93e64 | 2017-08-10 11:24:38 -0500 | [diff] [blame] | 88 | obmc-flash-bmc-ubiremount.service \ |
Saqib Khan | 7e4a3f2 | 2017-09-12 09:23:28 -0500 | [diff] [blame] | 89 | obmc-flash-bmc-updateubootvars@.service \ |
Saqib Khan | dfc9b0c | 2017-09-08 10:10:08 -0500 | [diff] [blame] | 90 | reboot-guard-enable.service \ |
| 91 | reboot-guard-disable.service \ |
Michael Tritz | 1878117 | 2017-09-21 00:41:15 -0500 | [diff] [blame] | 92 | obmc-flash-bmc-cleanup.service \ |
Eddie James | 63fa611 | 2018-03-01 09:55:07 -0600 | [diff] [blame] | 93 | obmc-flash-bmc-mirroruboot.service \ |
Adriana Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 94 | " |
| 95 | |
| 96 | # Name of the mtd device where the ubi volumes should be created |
Adriana Kobylak | 4de98a9 | 2017-08-17 21:36:43 -0500 | [diff] [blame] | 97 | BMC_RW_MTD ??= "bmc" |
| 98 | BMC_RO_MTD ??= "bmc" |
| 99 | BMC_KERNEL_MTD ??= "bmc" |
Adriana Kobylak | b705998 | 2018-02-14 16:35:30 -0600 | [diff] [blame] | 100 | BMC_RW_SIZE ??= "0x600000" |
Adriana Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 101 | SYSTEMD_SUBSTITUTIONS += "RW_MTD:${BMC_RW_MTD}:obmc-flash-bmc-ubirw.service" |
Adriana Kobylak | e993949 | 2017-07-11 11:34:23 -0500 | [diff] [blame] | 102 | SYSTEMD_SUBSTITUTIONS += "RO_MTD:${BMC_RO_MTD}:obmc-flash-bmc-ubiro@.service" |
| 103 | SYSTEMD_SUBSTITUTIONS += "KERNEL_MTD:${BMC_KERNEL_MTD}:obmc-flash-bmc-ubiro@.service" |
Adriana Kobylak | b705998 | 2018-02-14 16:35:30 -0600 | [diff] [blame] | 104 | SYSTEMD_SUBSTITUTIONS += "RW_SIZE:${BMC_RW_SIZE}:obmc-flash-bmc-ubirw.service" |
Adriana Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 105 | |
| 106 | SRC_URI += "file://obmc-flash-bmc" |
Adriana Kobylak | a420efc | 2018-05-22 12:33:45 -0500 | [diff] [blame] | 107 | SRC_URI += "file://synclist" |
Brad Bishop | 33e5a8b | 2018-06-08 10:20:52 -0400 | [diff] [blame] | 108 | SRC_URI += "file://software.conf" |
| 109 | |
Adriana Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 110 | do_install_append() { |
| 111 | install -d ${D}${sbindir} |
| 112 | install -m 0755 ${WORKDIR}/obmc-flash-bmc ${D}${sbindir}/obmc-flash-bmc |
Saqib Khan | 7ec1871 | 2017-08-23 23:43:53 -0500 | [diff] [blame] | 113 | install -d ${D}/usr/local |
Adriana Kobylak | a420efc | 2018-05-22 12:33:45 -0500 | [diff] [blame] | 114 | |
| 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 Bishop | 33e5a8b | 2018-06-08 10:20:52 -0400 | [diff] [blame] | 119 | |
| 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 Kobylak | a290eff | 2017-06-27 09:39:57 -0500 | [diff] [blame] | 128 | } |
| 129 | |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 130 | SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt" |
Andrew Geissler | 4499a18 | 2018-07-12 08:35:04 -0500 | [diff] [blame] | 131 | SRCREV = "aea48f27e46be9454e79a77e3594e021464ec903" |
Gunnar Mills | 35591d4 | 2017-01-27 13:13:24 -0600 | [diff] [blame] | 132 | |
| 133 | S = "${WORKDIR}/git" |