blob: 213da0563e78d7daf32376801e8873f264ee0291 [file] [log] [blame]
Lei YU28b2ba42018-07-19 15:41:44 +08001#include "config.h"
Gunnar Millsb0ce9962018-09-07 13:39:10 -05002
Lei YU56aaf452018-06-21 16:09:44 +08003#include "item_updater_helper.hpp"
4
5namespace phosphor
6{
7namespace software
8{
9namespace updater
10{
Lei YU28b2ba42018-07-19 15:41:44 +080011// openbmconce=clean-rwfs-filesystem factory-reset
12#define ENV_FACTORY_RESET "openbmconce\\x3dfactory\\x2dreset"
13#define SERVICE_FACTORY_RESET \
14 "obmc-flash-bmc-setenv@" ENV_FACTORY_RESET ".service"
Lei YU56aaf452018-06-21 16:09:44 +080015
Adriana Kobylak292159f2020-05-05 09:25:55 -050016void Helper::setEntry(const std::string& /* entryId */, uint8_t /* value */)
Adriana Kobylakbbcb7be2018-07-17 15:47:34 -050017{
18 // Empty
19}
20
Adriana Kobylak292159f2020-05-05 09:25:55 -050021void Helper::clearEntry(const std::string& /* entryId */)
Lei YU56aaf452018-06-21 16:09:44 +080022{
23 // Empty
24}
25
26void Helper::cleanup()
27{
28 // Empty
29}
30
31void Helper::factoryReset()
32{
Lei YU28b2ba42018-07-19 15:41:44 +080033 // Set openbmconce=factory-reset env in U-Boot.
34 // The init will cleanup rwfs during boot.
35 auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
36 SYSTEMD_INTERFACE, "StartUnit");
37 method.append(SERVICE_FACTORY_RESET, "replace");
38 bus.call_noreply(method);
Lei YU56aaf452018-06-21 16:09:44 +080039}
40
Adriana Kobylak292159f2020-05-05 09:25:55 -050041void Helper::removeVersion(const std::string& /* versionId */)
Lei YU56aaf452018-06-21 16:09:44 +080042{
43 // Empty
44}
45
Adriana Kobylak292159f2020-05-05 09:25:55 -050046void Helper::updateUbootVersionId(const std::string& /* versionId */)
Lei YU56aaf452018-06-21 16:09:44 +080047{
48 // Empty
49}
50
Lei YU56aaf452018-06-21 16:09:44 +080051void Helper::mirrorAlt()
52{
53 // Empty
54}
55
56} // namespace updater
57} // namespace software
58} // namespace phosphor