summaryrefslogtreecommitdiffstats
path: root/ubi
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2018-07-17 15:47:34 -0500
committerAdriana Kobylak <anoo@us.ibm.com>2018-07-19 08:08:50 -0500
commitbbcb7be18c21da6c5d82be7f744b777aea610f24 (patch)
treee08882fbc06b6a9f8a4896f3e3792019901b5a5a /ubi
parent56aaf454adef04bd4c1d45870cd86dc2de0a880a (diff)
downloadphosphor-bmc-code-mgmt-bbcb7be18c21da6c5d82be7f744b777aea610f24.tar.gz
phosphor-bmc-code-mgmt-bbcb7be18c21da6c5d82be7f744b777aea610f24.zip
Move setting the priority U-Boot variable to ubi
The service that sets the priority value is unique to the ubi layout because there is only one version at a time on the static layout. Move the calling of the service to the ubi implementation. Tested: - Witherspoon: Priorities are still set. - Romulus: The BMC.Updater app does not core dump with the latest sdbusplus changes due to calling a non-existent service. Change-Id: Ica1c68f00d5cb43c51ee09c5a3851613edf941d5 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'ubi')
-rw-r--r--ubi/item_updater_helper.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/ubi/item_updater_helper.cpp b/ubi/item_updater_helper.cpp
index 6704c21..b05291e 100644
--- a/ubi/item_updater_helper.cpp
+++ b/ubi/item_updater_helper.cpp
@@ -11,6 +11,17 @@ namespace updater
{
using namespace phosphor::logging;
+
+void Helper::setEntry(const std::string& entryId, uint8_t value)
+{
+ std::string serviceFile = "obmc-flash-bmc-setenv@" + entryId + "\\x3d" +
+ std::to_string(value) + ".service";
+ auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
+ SYSTEMD_INTERFACE, "StartUnit");
+ method.append(serviceFile, "replace");
+ bus.call_noreply(method);
+}
+
void Helper::clearEntry(const std::string& entryId)
{
// Remove the priority environment variable.
OpenPOWER on IntegriCloud