diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/flash')
9 files changed, 65 insertions, 14 deletions
diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb index fb1480fb1..503e836a8 100644 --- a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb @@ -4,9 +4,11 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda inherit systemd +SRC_URI += "file://noverify-bmc-update.service" SRC_URI += "file://noverify-bmc-verify.service" SRC_URI += "file://config-bmc.json" +SYSTEMD_SERVICE_${PN} += "noverify-bmc-update.service" SYSTEMD_SERVICE_${PN} += "noverify-bmc-verify.service" FILES_${PN} += "${datadir}/phosphor-ipmi-flash/config-bmc.json" @@ -15,5 +17,6 @@ do_install() { install -m 0644 ${WORKDIR}/config-bmc.json ${D}${datadir}/phosphor-ipmi-flash install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/noverify-bmc-update.service ${D}${systemd_system_unitdir} install -m 0644 ${WORKDIR}/noverify-bmc-verify.service ${D}${systemd_system_unitdir} } diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json index 86afb3ba3..31df4a1ef 100644 --- a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json @@ -14,7 +14,7 @@ }, "update": { "type": "systemd", - "unit": "reboot.target" + "unit": "noverify-bmc-update.service" } } }] diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service new file mode 100644 index 000000000..e30d64723 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service @@ -0,0 +1,9 @@ +[Unit] +Description=Commit image for update and reboot + +[Service] +Type=oneshot +ExecStart=/bin/mv /run/initramfs/bmc-image-verified /run/initramfs/image-bmc +# This command is intentionally blocking to ensure this unit doesn't complete +# before the BMC reboots. +ExecStart=/usr/bin/systemctl start --job-mode=replace-irreversibly reboot.target diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service index 50855b6b2..a535329fb 100644 --- a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service @@ -3,4 +3,4 @@ Description=Don't verify the image, just stage it for update [Service] Type=oneshot -ExecStart=/bin/mv /run/initramfs/bmc-image /run/initramfs/image-bmc +ExecStart=/bin/mv /run/initramfs/bmc-image /run/initramfs/bmc-image-verified diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-hostfw-image.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-hostfw-image.bb new file mode 100644 index 000000000..a9123b1b4 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-hostfw-image.bb @@ -0,0 +1,31 @@ +SUMMARY = "Provides a host firmware image" +DESCRIPTION = "Use a bbappend to add the image files" +PR = "r1" + +inherit allarch +inherit deploy + +HOSTFW_LICENSE ?= "Apache-2.0" +HOSTFW_LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +LICENSE = "${HOSTFW_LICENSE}" +LIC_FILES_CHKSUM = "${HOSTFW_LIC_FILES_CHKSUM}" + +do_compile() { + # The image directory can be used as the source to create a filesystem to + # add to the BMC image. + install -d ${B}/image + + # Install an image-hostfw file in the update directory to be included in + # the code update tarball. + install -d ${B}/update +} + +do_deploy() { + install -d ${DEPLOYDIR}/hostfw/image + install -d ${DEPLOYDIR}/hostfw/update + cp -R --no-dereference --preserve=mode,links ${B}/image/ ${DEPLOYDIR}/hostfw/ + cp -R --no-dereference --preserve=mode,links ${B}/update/ ${DEPLOYDIR}/hostfw/ +} + +addtask deploy before do_build after do_compile diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-logging-error-logs-native.bbappend b/meta-phosphor/recipes-phosphor/flash/phosphor-logging-error-logs-native.bbappend deleted file mode 100644 index beb70b0e6..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-logging-error-logs-native.bbappend +++ /dev/null @@ -1 +0,0 @@ -DEPENDS += "phosphor-software-manager-error-native" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb new file mode 100644 index 000000000..84450eb61 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb @@ -0,0 +1,10 @@ +SUMMARY = "phosphor-software-manager: install phosphor-logging yaml" +PR = "r1" +PV = "1.0+git${SRCPV}" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit phosphor-logging-yaml-provider +require phosphor-software-manager.inc + +S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc index 8bc566ff4..c941014d3 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt" -SRCREV = "0d7198f4eb6d36968e854b3246e6568305fdcc7b" +SRCREV = "62f3820b3197e9f4cef781411d7d2e2f8fc36f71" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb index d83945ea4..d561eba48 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb @@ -12,6 +12,7 @@ SOFTWARE_MGR_PACKAGES = " \ ${PN}-download-mgr \ ${PN}-updater \ ${PN}-updater-ubi \ + ${PN}-updater-mmc \ ${PN}-sync \ " PACKAGE_BEFORE_PN += "${SOFTWARE_MGR_PACKAGES}" @@ -23,18 +24,19 @@ DBUS_PACKAGES = "${SOFTWARE_MGR_PACKAGES}" # handles the rest. SYSTEMD_PACKAGES = "" -PACKAGECONFIG[verify_signature] = "--enable-verify_signature,--disable-verify_signature" -PACKAGECONFIG[sync_bmc_files] = "--enable-sync_bmc_files,--disable-sync_bmc_files" -PACKAGECONFIG[ubifs_layout] = "--enable-ubifs_layout" -PACKAGECONFIG[flash_bios] = "--enable-host_bios_upgrade" +PACKAGECONFIG[verify_signature] = "-Dverify-signature=enabled, -Dverify-signature=disabled" +PACKAGECONFIG[sync_bmc_files] = "-Dsync-bmc-files=enabled, -Dsync-bmc-files=disabled" +PACKAGECONFIG[ubifs_layout] = "-Dbmc-layout=ubi" +PACKAGECONFIG[mmc_layout] = "-Dbmc-layout=mmc" +PACKAGECONFIG[flash_bios] = "-Dhost-bios-upgrade=enabled, -Dhost-bios-upgrade=disabled" -inherit autotools pkgconfig +inherit meson pkgconfig inherit obmc-phosphor-dbus-service inherit python3native inherit ${@bb.utils.contains('DISTRO_FEATURES', 'obmc-ubi-fs', 'phosphor-software-manager-ubi-fs', '', d)} +inherit ${@bb.utils.contains('DISTRO_FEATURES', 'phosphor-mmc', 'phosphor-software-manager-mmc', '', d)} DEPENDS += " \ - autoconf-archive-native \ openssl \ phosphor-dbus-interfaces \ phosphor-logging \ @@ -45,10 +47,7 @@ DEPENDS += " \ RDEPENDS_${PN}-updater += " \ bash \ virtual-obmc-image-manager \ -" -EXTRA_OECONF += " \ - ACTIVE_BMC_MAX_ALLOWED=1 \ - MEDIA_DIR=/run/media \ + ${@bb.utils.contains('PACKAGECONFIG', 'verify_signature', 'phosphor-image-signing', '', d)} \ " RPROVIDES_${PN}-version += " \ |