1 #include "config.h" 2 3 #include "item_updater_helper.hpp" 4 5 namespace phosphor 6 { 7 namespace software 8 { 9 namespace updater 10 { 11 // 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" 15 16 void Helper::setEntry(const std::string& /* entryId */, uint8_t /* value */) 17 { 18 // Empty 19 } 20 21 void Helper::clearEntry(const std::string& /* entryId */) 22 { 23 // Empty 24 } 25 26 void Helper::cleanup() 27 { 28 // Empty 29 } 30 31 void Helper::factoryReset() 32 { 33 // 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); 39 } 40 41 void Helper::removeVersion(const std::string& /* versionId */) 42 { 43 // Empty 44 } 45 46 void Helper::updateUbootVersionId(const std::string& /* versionId */) 47 { 48 // Empty 49 } 50 51 void Helper::mirrorAlt() 52 { 53 // Empty 54 } 55 56 } // namespace updater 57 } // namespace software 58 } // namespace phosphor 59