From c763ceb45a0012c46345090690f018c1e8d8d7f5 Mon Sep 17 00:00:00 2001 From: Adriana Kobylak Date: Mon, 4 Jun 2018 13:06:52 -0500 Subject: phosphor-software-manager: Create new UBI bbclass Remove from the base phosphor-software-manager recipe everything that is conditional in the ubi-fs distro feature and put it in its own class. This allows for the base recipe to be cleaner and for future specific packages to be added conditionally. Tested: Built witherspoon and romulus and verified only witherspoon contained the UBI-specific files. Booted a witherspoon and a romulus qemu. Change-Id: I2a783abc6152aadcf212a35f0060409f8dac2241 Signed-off-by: Adriana Kobylak --- .../phosphor-software-manager-ubi-fs.bbclass | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass (limited to 'meta-phosphor/classes') diff --git a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass new file mode 100644 index 000000000..0e62023da --- /dev/null +++ b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass @@ -0,0 +1,49 @@ +# UBI-specific configuration for the phosphor-manager-software package + +RDEPENDS_phosphor-software-manager-updater-ubi += " \ + bash \ + mtd-utils-ubifs \ +" + +FILES_${PN}-updater-ubi += " \ + ${sbindir}/obmc-flash-bmc \ + /usr/local \ + " + +SYSTEMD_SERVICE_phosphor-software-manager-updater-ubi += " \ + obmc-flash-bmc-ubirw.service \ + obmc-flash-bmc-ubiro@.service \ + obmc-flash-bmc-setenv@.service \ + obmc-flash-bmc-ubirw-remove.service \ + obmc-flash-bmc-ubiro-remove@.service \ + obmc-flash-bmc-ubiremount.service \ + obmc-flash-bmc-updateubootvars@.service \ + obmc-flash-bmc-cleanup.service \ + obmc-flash-bmc-mirroruboot.service \ + reboot-guard-enable.service \ + reboot-guard-disable.service \ + usr-local.mount \ +" + +# Name of the mtd device where the ubi volumes should be created +BMC_RW_MTD ??= "bmc" +BMC_RO_MTD ??= "bmc" +BMC_KERNEL_MTD ??= "bmc" +BMC_RW_SIZE ??= "0x600000" +SYSTEMD_SUBSTITUTIONS += "RW_MTD:${BMC_RW_MTD}:obmc-flash-bmc-ubirw.service" +SYSTEMD_SUBSTITUTIONS += "RO_MTD:${BMC_RO_MTD}:obmc-flash-bmc-ubiro@.service" +SYSTEMD_SUBSTITUTIONS += "KERNEL_MTD:${BMC_KERNEL_MTD}:obmc-flash-bmc-ubiro@.service" +SYSTEMD_SUBSTITUTIONS += "RW_SIZE:${BMC_RW_SIZE}:obmc-flash-bmc-ubirw.service" + +SRC_URI += "file://obmc-flash-bmc" +SRC_URI += "file://synclist" +do_install_append() { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/obmc-flash-bmc ${D}${sbindir}/obmc-flash-bmc + install -d ${D}/usr/local + + if [ -f ${WORKDIR}/build/phosphor-sync-software-manager ]; then + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/synclist ${D}${sysconfdir}/synclist + fi +} -- cgit v1.2.1