1 #include "config.h"
2 
3 #include "item_updater_mmc.hpp"
4 
5 #include "activation_mmc.hpp"
6 #include "version.hpp"
7 
8 namespace openpower
9 {
10 namespace software
11 {
12 namespace updater
13 {
14 
15 // These functions are just a stub (empty) because the current eMMC
16 // implementation uses the BMC updater (repo phosphor-bmc-code-mgmt) to write
17 // the new host FW to flash since it's delivered as a "System" image in the
18 // same BMC tarball as the BMC image.
19 
20 std::unique_ptr<Activation> ItemUpdaterMMC::createActivationObject(
21     const std::string& path, const std::string& versionId,
22     const std::string& extVersion,
23     sdbusplus::xyz::openbmc_project::Software::server::Activation::Activations
24         activationStatus,
25     AssociationList& assocs)
26 {
27     return std::make_unique<ActivationMMC>(
28         bus, path, *this, versionId, extVersion, activationStatus, assocs);
29 }
30 
31 std::unique_ptr<Version> ItemUpdaterMMC::createVersionObject(
32     const std::string& objPath, const std::string& versionId,
33     const std::string& versionString,
34     sdbusplus::xyz::openbmc_project::Software::server::Version::VersionPurpose
35         versionPurpose,
36     const std::string& filePath)
37 {
38     auto version = std::make_unique<Version>(
39         bus, objPath, *this, versionId, versionString, versionPurpose, filePath,
40         std::bind(&ItemUpdaterMMC::erase, this, std::placeholders::_1));
41     version->deleteObject = std::make_unique<Delete>(bus, objPath, *version);
42     return version;
43 }
44 
45 bool ItemUpdaterMMC::validateImage(const std::string& path)
46 {
47     return true;
48 }
49 
50 void ItemUpdaterMMC::processPNORImage()
51 {
52 }
53 
54 void ItemUpdaterMMC::reset()
55 {
56 }
57 
58 bool ItemUpdaterMMC::isVersionFunctional(const std::string& versionId)
59 {
60     return versionId == functionalVersionId;
61 }
62 
63 void ItemUpdaterMMC::freePriority(uint8_t value, const std::string& versionId)
64 {
65 }
66 
67 void ItemUpdaterMMC::deleteAll()
68 {
69 }
70 
71 bool ItemUpdaterMMC::freeSpace()
72 {
73     return true;
74 }
75 
76 void ItemUpdaterMMC::updateFunctionalAssociation(const std::string& versionId)
77 {
78 }
79 
80 void GardResetMMC::reset()
81 {
82 }
83 
84 } // namespace updater
85 } // namespace software
86 } // namespace openpower
87