summaryrefslogtreecommitdiffstats
path: root/item_updater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'item_updater.cpp')
-rw-r--r--item_updater.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/item_updater.cpp b/item_updater.cpp
index df73fc5..03bc591 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -255,6 +255,8 @@ void ItemUpdater::processBMCImage()
log<level::ERR>(e.what());
}
}
+
+ mirrorUbootToAlt();
return;
}
@@ -640,6 +642,21 @@ void ItemUpdater::freeSpace()
}
}
+void ItemUpdater::mirrorUbootToAlt()
+{
+ auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
+ SYSTEMD_INTERFACE, "StartUnit");
+ auto mirrorUbootFile = "obmc-flash-bmc-mirroruboot.service";
+ method.append(mirrorUbootFile, "replace");
+ auto result = bus.call(method);
+
+ // Check that the bus call didn't result in an error
+ if (result.is_method_error())
+ {
+ log<level::ERR>("Failed to copy U-Boot to alternate chip");
+ }
+}
+
} // namespace updater
} // namespace software
} // namespace phosphor
OpenPOWER on IntegriCloud