summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch31
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch70
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch36
3 files changed, 39 insertions, 98 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch
index cfaa077eb..0a47e3278 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch
@@ -1,4 +1,4 @@
-From df1281792f6886b41c99919e8197c2c2d369d0ca Mon Sep 17 00:00:00 2001
+From 6ce336adafd723319befc4ce918ba67a0ad3492c Mon Sep 17 00:00:00 2001
From: Jennifer Lee <jennifer1.lee@intel.com>
Date: Mon, 10 Dec 2018 10:36:44 -0800
Subject: [PATCH] Modified firmware activation to launch fwupd.sh through
@@ -12,19 +12,19 @@ Signed-off-by: Jennifer Lee <jennifer1.lee@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
---
activation.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++-
- meson.build | 1 +
+ meson.build | 2 ++
meson_options.txt | 3 +++
static/flash.cpp | 42 ++++++++++++++++++++++++++++++++++++++++--
ubi/flash.cpp | 9 +++------
- 5 files changed, 91 insertions(+), 9 deletions(-)
+ 5 files changed, 92 insertions(+), 9 deletions(-)
diff --git a/activation.cpp b/activation.cpp
-index eb57587..901caf3 100644
+index c82e297..d690a39 100644
--- a/activation.cpp
+++ b/activation.cpp
-@@ -92,7 +92,50 @@ auto Activation::activation(Activations value) -> Activations
- value ==
- softwareServer::Activation::Activations::ActivatingAsStandbySpare)
+@@ -88,7 +88,50 @@ auto Activation::activation(Activations value) -> Activations
+
+ if (value == softwareServer::Activation::Activations::Activating)
{
+#ifdef FWUPD_SCRIPT
+ if (!activationProgress)
@@ -53,7 +53,7 @@ index eb57587..901caf3 100644
+ }
+ else if (activationProgress->progress() == 100)
+ {
-+ log<level::ERR>("[Jennifer] progress == 100...");
++ log<level::ERR>("progress == 100...");
+ if (!redundancyPriority)
+ {
+ redundancyPriority =
@@ -73,7 +73,7 @@ index eb57587..901caf3 100644
#ifdef HOST_BIOS_UPGRADE
auto purpose = parent.versions.find(versionId)->second->purpose();
if (purpose == VersionPurpose::Host)
-@@ -115,7 +158,6 @@ auto Activation::activation(Activations value) -> Activations
+@@ -111,7 +154,6 @@ auto Activation::activation(Activations value) -> Activations
return softwareServer::Activation::activation(value);
}
#endif
@@ -81,7 +81,7 @@ index eb57587..901caf3 100644
auto versionStr = parent.versions.find(versionId)->second->version();
if (!minimum_ship_level::verify(versionStr))
-@@ -179,6 +221,7 @@ auto Activation::activation(Activations value) -> Activations
+@@ -175,6 +217,7 @@ auto Activation::activation(Activations value) -> Activations
return softwareServer::Activation::activation(
softwareServer::Activation::Activations::Active);
#endif
@@ -90,19 +90,20 @@ index eb57587..901caf3 100644
else
{
diff --git a/meson.build b/meson.build
-index 0a7a6a6..5990168 100644
+index a6ebcc4..5c79009 100644
--- a/meson.build
+++ b/meson.build
-@@ -57,6 +57,7 @@ conf.set('WANT_SIGNATURE_VERIFY', \
- get_option('verify-signature').enabled() or \
+@@ -59,6 +59,8 @@ conf.set('WANT_SIGNATURE_VERIFY', \
get_option('verify-full-signature').enabled())
conf.set('WANT_SIGNATURE_FULL_VERIFY', get_option('verify-full-signature').enabled())
-+conf.set('FWUPD_SCRIPT', get_option('fwupd-script').enabled())
++conf.set('FWUPD_SCRIPT', get_option('fwupd-script').enabled())
++
# Configurable variables
conf.set('ACTIVE_BMC_MAX_ALLOWED', get_option('active-bmc-max-allowed'))
+ conf.set_quoted('HASH_FILE_NAME', get_option('hash-file-name'))
diff --git a/meson_options.txt b/meson_options.txt
-index 355773c..f0c8730 100644
+index 0877798..da257b7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -25,6 +25,9 @@ option('verify-signature', type: 'feature',
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch
index 49bdc138f..e1a7f1746 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-PFR-images-support.patch
@@ -1,4 +1,4 @@
-From 030f918b90ea45104bccf68082c2d634c6694238 Mon Sep 17 00:00:00 2001
+From 51fd06346ff492d5d4862886cb34e024d05edb45 Mon Sep 17 00:00:00 2001
From: Vikram Bodireddy <vikram.bodireddy@intel.com>
Date: Tue, 13 Aug 2019 22:43:12 +0530
Subject: [PATCH] PFR images support in phosphor-software-manager
@@ -12,34 +12,20 @@ tested PFR image uploads and updates
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
---
- activation.cpp | 2 +-
item_updater.cpp | 7 +-
- meson.build | 7 +-
+ meson.build | 8 +-
meson_options.txt | 3 +
- pfr_image_manager.cpp | 217 ++++++++++++++++++++++++++++++++++++++++++
- pfr_image_manager.hpp | 75 +++++++++++++++
- 6 files changed, 306 insertions(+), 5 deletions(-)
+ pfr_image_manager.cpp | 218 ++++++++++++++++++++++++++++++++++++++++++
+ pfr_image_manager.hpp | 76 +++++++++++++++
+ 5 files changed, 308 insertions(+), 4 deletions(-)
create mode 100644 pfr_image_manager.cpp
create mode 100644 pfr_image_manager.hpp
-diff --git a/activation.cpp b/activation.cpp
-index bad17b8..3363230 100644
---- a/activation.cpp
-+++ b/activation.cpp
-@@ -119,7 +119,7 @@ auto Activation::activation(Activations value) -> Activations
- }
- else if (activationProgress->progress() == 100)
- {
-- log<level::ERR>("[Jennifer] progress == 100...");
-+ log<level::INFO>("progress == 100...");
- if (!redundancyPriority)
- {
- redundancyPriority =
diff --git a/item_updater.cpp b/item_updater.cpp
-index df8595c..694975f 100644
+index 81fc01f..60e7d23 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
-@@ -64,10 +64,10 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg)
+@@ -65,10 +65,10 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg)
auto value = SVersion::convertVersionPurposeFromString(
std::get<std::string>(property.second));
if (value == VersionPurpose::BMC ||
@@ -52,7 +38,7 @@ index df8595c..694975f 100644
{
purpose = value;
}
-@@ -399,6 +399,7 @@ void ItemUpdater::deleteAll()
+@@ -414,6 +414,7 @@ void ItemUpdater::deleteAll()
ItemUpdater::ActivationStatus
ItemUpdater::validateSquashFSImage(const std::string& filePath)
{
@@ -60,7 +46,7 @@ index df8595c..694975f 100644
bool valid = true;
// Record the images which are being updated
-@@ -416,7 +417,7 @@ ItemUpdater::ActivationStatus
+@@ -431,7 +432,7 @@ ItemUpdater::ActivationStatus
return ItemUpdater::ActivationStatus::invalid;
}
}
@@ -69,37 +55,27 @@ index df8595c..694975f 100644
return ItemUpdater::ActivationStatus::ready;
}
-@@ -690,8 +691,8 @@ void ItemUpdater::freeSpace(Activation& caller)
- // Failed activations don't have priority, assign them a large value
- // for sorting purposes.
- auto priority = 999;
-- if ((iter.second.get()->activation() ==
-- server::Activation::Activations::Active)&&
-+ if ((iter.second.get()->activation() ==
-+ server::Activation::Activations::Active) &&
- iter.second->redundancyPriority.get())
- {
- priority = iter.second->redundancyPriority.get()->priority();
diff --git a/meson.build b/meson.build
-index 08d6f71..c61d59f 100644
+index 5c79009..e33998d 100644
--- a/meson.build
+++ b/meson.build
-@@ -55,6 +55,7 @@ conf.set('MMC_LAYOUT', get_option('bmc-layout').contains('mmc'))
- conf.set('HOST_BIOS_UPGRADE', get_option('host-bios-upgrade').enabled())
- conf.set('WANT_SIGNATURE_VERIFY', get_option('verify-signature').enabled())
+@@ -60,6 +60,7 @@ conf.set('WANT_SIGNATURE_VERIFY', \
+ conf.set('WANT_SIGNATURE_FULL_VERIFY', get_option('verify-full-signature').enabled())
+
conf.set('FWUPD_SCRIPT', get_option('fwupd-script').enabled())
+conf.set('PFR_UPDATE', get_option('pfr-update').enabled())
-
+
# Configurable variables
conf.set('ACTIVE_BMC_MAX_ALLOWED', get_option('active-bmc-max-allowed'))
-@@ -195,12 +196,16 @@ executable(
+@@ -205,12 +206,17 @@ executable(
install: true
)
-
+
+image_manager_source = files('image_manager.cpp')
+if get_option('pfr-update').enabled()
+ image_manager_source = files('pfr_image_manager.cpp')
+endif
++
executable(
'phosphor-version-software-manager',
image_error_cpp,
@@ -111,22 +87,22 @@ index 08d6f71..c61d59f 100644
'watch.cpp',
dependencies: [deps, ssl],
diff --git a/meson_options.txt b/meson_options.txt
-index 4f7e62a..1593502 100644
+index da257b7..2204e04 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -25,6 +25,9 @@ option('verify-signature', type: 'feature',
+@@ -28,6 +28,9 @@ option('verify-full-signature', type: 'feature',
option('fwupd-script', type: 'feature',
description: 'Enable fwupd script support.')
-
+
+option('pfr-update', type: 'feature',
-+ description: 'Enable fwupd script support.')
++ description: 'Enable PFR image support.')
+
# Variables
option(
'active-bmc-max-allowed', type: 'integer',
diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp
new file mode 100644
-index 0000000..242a6ca
+index 0000000..fec1e94
--- /dev/null
+++ b/pfr_image_manager.cpp
@@ -0,0 +1,218 @@
@@ -350,7 +326,7 @@ index 0000000..242a6ca
+} // namespace phosphor
diff --git a/pfr_image_manager.hpp b/pfr_image_manager.hpp
new file mode 100644
-index 0000000..c6ee6a4
+index 0000000..b9a5822
--- /dev/null
+++ b/pfr_image_manager.hpp
@@ -0,0 +1,76 @@
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch
deleted file mode 100644
index 156e6fe7c..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0011-Fix-for-RedudancyPriority-in-item_updater.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From f6022e25d0b47af502522913773e589fcdd1568e Mon Sep 17 00:00:00 2001
-From: Vikram Bodireddy <vikram.bodireddy@intel.com>
-Date: Sun, 5 Jul 2020 00:54:57 +0530
-Subject: [PATCH] Fix for RedudancyPriority in item_updater
-
-This fixes accessing RedudancyPriority property for the
-activated image in item_updater. The downloaded image object
-is not actually associated with RedudancyPriority before and
-after activation. There exists no RedundancyPriority property
-for downloaded image, accessing it causing a crash in
-item_updater.
-
-Tested: Tested for coredumps during Seamless firmware update.
-
-Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
-
----
- item_updater.cpp | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/item_updater.cpp b/item_updater.cpp
-index c3a846d..b299b4d 100644
---- a/item_updater.cpp
-+++ b/item_updater.cpp
-@@ -690,8 +690,9 @@ void ItemUpdater::freeSpace(Activation& caller)
- // Failed activations don't have priority, assign them a large value
- // for sorting purposes.
- auto priority = 999;
-- if (iter.second.get()->activation() ==
-- server::Activation::Activations::Active)
-+ if ((iter.second.get()->activation() ==
-+ server::Activation::Activations::Active)&&
-+ iter.second->redundancyPriority.get())
- {
- priority = iter.second->redundancyPriority.get()->priority();
- }