Lei YU | 28b2ba4 | 2018-07-19 15:41:44 +0800 | [diff] [blame] | 1 | #include "config.h" |
Gunnar Mills | b0ce996 | 2018-09-07 13:39:10 -0500 | [diff] [blame] | 2 | |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 3 | #include "item_updater_helper.hpp" |
| 4 | |
| 5 | namespace phosphor |
| 6 | { |
| 7 | namespace software |
| 8 | { |
| 9 | namespace updater |
| 10 | { |
Lei YU | 28b2ba4 | 2018-07-19 15:41:44 +0800 | [diff] [blame] | 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" |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 15 | |
Adriana Kobylak | 292159f | 2020-05-05 09:25:55 -0500 | [diff] [blame] | 16 | void Helper::setEntry(const std::string& /* entryId */, uint8_t /* value */) |
Adriana Kobylak | bbcb7be | 2018-07-17 15:47:34 -0500 | [diff] [blame] | 17 | { |
| 18 | // Empty |
| 19 | } |
| 20 | |
Adriana Kobylak | 292159f | 2020-05-05 09:25:55 -0500 | [diff] [blame] | 21 | void Helper::clearEntry(const std::string& /* entryId */) |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 22 | { |
| 23 | // Empty |
| 24 | } |
| 25 | |
| 26 | void Helper::cleanup() |
| 27 | { |
| 28 | // Empty |
| 29 | } |
| 30 | |
| 31 | void Helper::factoryReset() |
| 32 | { |
Lei YU | 28b2ba4 | 2018-07-19 15:41:44 +0800 | [diff] [blame] | 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); |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 39 | } |
| 40 | |
Adriana Kobylak | 292159f | 2020-05-05 09:25:55 -0500 | [diff] [blame] | 41 | void Helper::removeVersion(const std::string& /* versionId */) |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 42 | { |
| 43 | // Empty |
| 44 | } |
| 45 | |
Adriana Kobylak | 292159f | 2020-05-05 09:25:55 -0500 | [diff] [blame] | 46 | void Helper::updateUbootVersionId(const std::string& /* versionId */) |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 47 | { |
| 48 | // Empty |
| 49 | } |
| 50 | |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 51 | void Helper::mirrorAlt() |
| 52 | { |
| 53 | // Empty |
| 54 | } |
| 55 | |
| 56 | } // namespace updater |
| 57 | } // namespace software |
| 58 | } // namespace phosphor |