Lei YU | 28b2ba4 | 2018-07-19 15:41:44 +0800 | [diff] [blame^] | 1 | #include "config.h" |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 2 | #include "item_updater_helper.hpp" |
| 3 | |
| 4 | namespace phosphor |
| 5 | { |
| 6 | namespace software |
| 7 | { |
| 8 | namespace updater |
| 9 | { |
Lei YU | 28b2ba4 | 2018-07-19 15:41:44 +0800 | [diff] [blame^] | 10 | // openbmconce=clean-rwfs-filesystem factory-reset |
| 11 | #define ENV_FACTORY_RESET "openbmconce\\x3dfactory\\x2dreset" |
| 12 | #define SERVICE_FACTORY_RESET \ |
| 13 | "obmc-flash-bmc-setenv@" ENV_FACTORY_RESET ".service" |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 14 | |
Adriana Kobylak | bbcb7be | 2018-07-17 15:47:34 -0500 | [diff] [blame] | 15 | void Helper::setEntry(const std::string& entryId, uint8_t value) |
| 16 | { |
| 17 | // Empty |
| 18 | } |
| 19 | |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 20 | void Helper::clearEntry(const std::string& entryId) |
| 21 | { |
| 22 | // Empty |
| 23 | } |
| 24 | |
| 25 | void Helper::cleanup() |
| 26 | { |
| 27 | // Empty |
| 28 | } |
| 29 | |
| 30 | void Helper::factoryReset() |
| 31 | { |
Lei YU | 28b2ba4 | 2018-07-19 15:41:44 +0800 | [diff] [blame^] | 32 | // Set openbmconce=factory-reset env in U-Boot. |
| 33 | // The init will cleanup rwfs during boot. |
| 34 | auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH, |
| 35 | SYSTEMD_INTERFACE, "StartUnit"); |
| 36 | method.append(SERVICE_FACTORY_RESET, "replace"); |
| 37 | bus.call_noreply(method); |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | void Helper::removeVersion(const std::string& versionId) |
| 41 | { |
| 42 | // Empty |
| 43 | } |
| 44 | |
| 45 | void Helper::updateUbootVersionId(const std::string& versionId) |
| 46 | { |
| 47 | // Empty |
| 48 | } |
| 49 | |
| 50 | void Helper::enableFieldMode() |
| 51 | { |
| 52 | // TODO |
| 53 | } |
| 54 | |
| 55 | void Helper::mirrorAlt() |
| 56 | { |
| 57 | // Empty |
| 58 | } |
| 59 | |
| 60 | } // namespace updater |
| 61 | } // namespace software |
| 62 | } // namespace phosphor |