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