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&) 46 { 47 return true; 48 } 49 50 void ItemUpdaterMMC::processPNORImage() 51 {} 52 53 void ItemUpdaterMMC::reset() 54 {} 55 56 bool ItemUpdaterMMC::isVersionFunctional(const std::string& versionId) 57 { 58 return versionId == functionalVersionId; 59 } 60 61 void ItemUpdaterMMC::freePriority(uint8_t, const std::string&) 62 {} 63 64 void ItemUpdaterMMC::deleteAll() 65 {} 66 67 bool ItemUpdaterMMC::freeSpace() 68 { 69 return true; 70 } 71 72 void ItemUpdaterMMC::updateFunctionalAssociation(const std::string&) 73 {} 74 75 void GardResetMMC::reset() 76 {} 77 78 } // namespace updater 79 } // namespace software 80 } // namespace openpower 81