blob: 3e5861225a4835e5506592e717492ba8af959c9b [file] [log] [blame]
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -05001#include "config.h"
2
3#include "item_updater_mmc.hpp"
4
5#include "activation_mmc.hpp"
6#include "version.hpp"
7
8namespace openpower
9{
10namespace software
11{
12namespace 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
20std::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
31std::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
Brad Bishopc8f22502020-11-06 14:42:09 -050045bool ItemUpdaterMMC::validateImage(const std::string&)
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -050046{
47 return true;
48}
49
50void ItemUpdaterMMC::processPNORImage()
Brad Bishop8facccf2020-11-04 09:44:58 -050051{}
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -050052
53void ItemUpdaterMMC::reset()
Brad Bishop8facccf2020-11-04 09:44:58 -050054{}
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -050055
56bool ItemUpdaterMMC::isVersionFunctional(const std::string& versionId)
57{
58 return versionId == functionalVersionId;
59}
60
Brad Bishopc8f22502020-11-06 14:42:09 -050061void ItemUpdaterMMC::freePriority(uint8_t, const std::string&)
Brad Bishop8facccf2020-11-04 09:44:58 -050062{}
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -050063
64void ItemUpdaterMMC::deleteAll()
Brad Bishop8facccf2020-11-04 09:44:58 -050065{}
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -050066
67bool ItemUpdaterMMC::freeSpace()
68{
69 return true;
70}
71
Brad Bishopc8f22502020-11-06 14:42:09 -050072void ItemUpdaterMMC::updateFunctionalAssociation(const std::string&)
Brad Bishop8facccf2020-11-04 09:44:58 -050073{}
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -050074
75void GardResetMMC::reset()
Brad Bishop8facccf2020-11-04 09:44:58 -050076{}
Adriana Kobylak8bc2ab42020-07-15 09:16:27 -050077
78} // namespace updater
79} // namespace software
80} // namespace openpower