summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/flash
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/flash')
-rw-r--r--meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb3
-rw-r--r--meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json2
-rw-r--r--meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service9
-rw-r--r--meta-phosphor/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service2
4 files changed, 14 insertions, 2 deletions
diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb
index fb1480fb12..503e836a83 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 86afb3ba3b..31df4a1efc 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 0000000000..e30d647232
--- /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 50855b6b27..a535329fb0 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