summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch131
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch18
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch42
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch31
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch723
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch19
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch41
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch42
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch20
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch420
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch20
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch)2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch)11
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch132
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch313
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch168
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch)0
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-event-service-fix-added-Context-field-to-response.patch (renamed from meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch)0
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch93
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README28
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch25
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend27
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch25
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch51
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend27
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch55
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch27
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch147
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend11
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch45
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend4
82 files changed, 1444 insertions, 1505 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb
index 1bf81d953..a82a64f80 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe
S = "${WORKDIR}"
-SYSTEMD_SERVICE_${PN} = "beepcode-mgr.service"
+SYSTEMD_SERVICE:${PN} = "beepcode-mgr.service"
inherit cmake
inherit obmc-phosphor-systemd
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb
index 7426dc6de..53ba2eeac 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb
@@ -10,9 +10,9 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe
inherit meson systemd
SRC_URI = "git://github.com/openbmc/bios-settings-mgr.git"
-SRCREV = "5e2cb7206e695662f09c7cb4e0c73ba11686acaa"
+SRCREV = "b5984b87eb93f57f8bc2c123717527076a560753"
-SYSTEMD_SERVICE_${PN} += " \
+SYSTEMD_SERVICE:${PN} += " \
xyz.openbmc_project.biosconfig_manager.service \
xyz.openbmc_project.biosconfig_password.service \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch
new file mode 100644
index 000000000..ac0995614
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch
@@ -0,0 +1,131 @@
+From aada39602a21e83d7e8c39c39fb8c5c32122863c Mon Sep 17 00:00:00 2001
+From: AKSHAY RAVEENDRAN K <akshay.raveendran.k@intel.com>
+Date: Thu, 2 Sep 2021 11:11:40 +0000
+Subject: [PATCH] Allow MUX idle state to be configured as DISCONNECT
+
+The existing Linux behavior is to leave the Mux status as it is after
+an operation. In HSBP and in other places we have more than one MUX
+parallel in same root bus. The existing behavior will result in reading
+multiple buses of different MUXes at the same time and causes bad read.
+In this fix, we can configure "MuxIdleMode" as "Disconnect" in
+configuration file as shown below
+
+{
+ "Address": "0x70",
+ "Bus": "$bus",
+ "ChannelNames": [
+ "Drive_1",
+ "Drive_2",
+ "Drive_3",
+ "Drive_4"
+ ],
+ "MuxIdleMode": "Disconnect",
+ "Name": "Drive Mux 1",
+ "Type": "PCA9546Mux"
+
+Tested:
+Set the MUX idle mode to Disconnect in MUXes present in HSBP board and
+only one channel is read at a time.
+
+Change-Id: I6d29cd3be350682c386bd3072e76b930a7d45587
+Signed-off-by: AKSHAY RAVEENDRAN K <akshay.raveendran.k@intel.com>
+---
+ src/Overlay.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 52 insertions(+), 3 deletions(-)
+
+diff --git a/src/Overlay.cpp b/src/Overlay.cpp
+index 4454423..2843c31 100644
+--- a/src/Overlay.cpp
++++ b/src/Overlay.cpp
+@@ -38,11 +38,46 @@ constexpr const char* outputDir = "/tmp/overlays";
+ constexpr const char* templateChar = "$";
+ constexpr const char* i2CDevsDir = "/sys/bus/i2c/devices";
+ constexpr const char* muxSymlinkDir = "/dev/i2c-mux";
++constexpr const char* idleModeAsIs = "-1";
++constexpr const char* idleModeDisconnect = "-2";
+
+ constexpr const bool debug = false;
+
+ std::regex illegalNameRegex("[^A-Za-z0-9_]");
+
++void setIdleMode(const std::string& muxName, size_t busIndex, size_t address,
++ const std::string& idleMode)
++{
++ std::error_code ec;
++
++ std::ostringstream hexAddress;
++ hexAddress << std::hex << std::setfill('0') << std::setw(4) << address;
++
++ std::filesystem::path idlePath(i2CDevsDir);
++ idlePath /=
++ std::to_string(busIndex) + "-" + hexAddress.str() + "/idle_state";
++
++ std::string modeData =
++ (idleMode == "Disconnect") ? idleModeDisconnect : idleModeAsIs;
++
++ if (debug)
++ {
++ std::cerr << "Setting " << muxName << " idle state to " << modeData
++ << " in " << idlePath << "\n";
++ }
++
++ std::ofstream idleFile(idlePath);
++ if (!idleFile.good())
++ {
++ std::cerr << "Can't set idle mode in " << idlePath << " for " << muxName
++ << "\n";
++ }
++ else
++ {
++ idleFile << modeData;
++ }
++}
++
+ // helper function to make json types into string
+ std::string jsonToString(const nlohmann::json& in)
+ {
+@@ -285,6 +320,7 @@ void exportDevice(const std::string& type,
+ std::shared_ptr<uint64_t> bus = nullptr;
+ std::shared_ptr<uint64_t> address = nullptr;
+ const nlohmann::json::array_t* channels = nullptr;
++ std::string idleMode;
+
+ for (auto keyPair = configuration.begin(); keyPair != configuration.end();
+ keyPair++)
+@@ -318,6 +354,11 @@ void exportDevice(const std::string& type,
+ channels =
+ keyPair.value().get_ptr<const nlohmann::json::array_t*>();
+ }
++ else if (keyPair.key() == "MuxIdleMode")
++ {
++ idleMode = keyPair.value().get<std::string>();
++ }
++
+ boost::replace_all(parameters, templateChar + keyPair.key(),
+ subsituteString);
+ boost::replace_all(devicePath, templateChar + keyPair.key(),
+@@ -327,10 +368,18 @@ void exportDevice(const std::string& type,
+ int err = buildDevice(devicePath, parameters, bus, address, constructor,
+ destructor, createsHWMon);
+
+- if (!err && boost::ends_with(type, "Mux") && bus && address && channels)
++ if (!err && boost::ends_with(type, "Mux") && bus && address)
+ {
+- linkMux(name, static_cast<size_t>(*bus), static_cast<size_t>(*address),
+- *channels);
++ if (channels)
++ {
++ linkMux(name, static_cast<size_t>(*bus),
++ static_cast<size_t>(*address), *channels);
++ }
++ if (!idleMode.empty())
++ {
++ setIdleMode(name, static_cast<size_t>(*bus),
++ static_cast<size_t>(*address), idleMode);
++ }
+ }
+ }
+
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
index 3c9b75210..ff23c5831 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -1,11 +1,12 @@
# this is here just to bump faster than upstream
# SRC_URI = "git://github.com/openbmc/entity-manager.git"
-SRCREV = "ee70147add704c40e1999900ec8e67d1213729cc"
+SRCREV = "e7ac9c9eb1d2e4b052d7f9b082ab4642eab304e9"
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://0002-Entity-manager-Add-support-to-update-assetTag.patch \
file://0003-Add-logs-to-fwVersionIsSame.patch \
file://0004-Adding-MUX-and-Drives-present-in-HSBP-in-json-config.patch \
+ file://0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
index 09510fec8..9a0eae176 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
@@ -1,15 +1,15 @@
-FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
OBMC_CONSOLE_HOST_TTY = "ttyS2"
SRC_URI += "file://sol-option-check.sh \
file://obmc-console@.service \
"
inherit obmc-phosphor-systemd
-SYSTEMD_SERVICE_${PN} += " \
+SYSTEMD_SERVICE:${PN} += " \
${PN}@${OBMC_CONSOLE_HOST_TTY}.service \
"
-do_install_append() {
+do_install:append() {
rm -rf ${D}${base_libdir}/udev/rules.d/80-obmc-console-uart.rules
install -m 0644 ${WORKDIR}/${PN}@.service ${D}${systemd_system_unitdir}
install -d ${D}${bindir}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb
index 089aaf59f..24e3700a6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe
S = "${WORKDIR}"
-SYSTEMD_SERVICE_${PN} = "pch-time-sync.service"
+SYSTEMD_SERVICE:${PN} = "pch-time-sync.service"
inherit cmake
inherit obmc-phosphor-systemd
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend
index 18780dfdd..4d6031b03 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend
@@ -1,2 +1,2 @@
-RDEPENDS_${PN}_remove = "phosphor-settings-manager"
-RDEPENDS_${PN} += " settings"
+RDEPENDS:${PN}:remove = "phosphor-settings-manager"
+RDEPENDS:${PN} += " settings"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
index 6e5d21ad4..aa0a08f0b 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -1,9 +1,9 @@
# Keep this as a comment to enable the auto-bump script without
# stomping on SRC_URI from previous .bbappend files
#SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git"
-SRCREV = "5795dacbc5763a0f1d1e1ac59d73baf4ca2ae616"
+SRCREV = "6b50623459b54af222cb9a79c5a0c7912c92da41"
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0007-ipmi-set-BIOS-id.patch \
file://0010-Increase-the-default-watchdog-timeout-value.patch \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend
index 72d991c7e..4fc41d058 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend
@@ -1 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
index f72287bc3..5da365c02 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -1,7 +1,7 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
inherit obmc-phosphor-systemd
-SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service"
+SYSTEMD_SERVICE:${PN} = "phosphor-pid-control.service"
EXTRA_OECONF = "--enable-configure-dbus=yes"
SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git"
@@ -11,4 +11,4 @@ SRC_URI += "\
file://0001-allow-dbus-sensors-without-thresholds.patch \
"
-FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor"
+FILES:${PN} = "${bindir}/swampd ${bindir}/setsensor"
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 b8df3e07c..fcdc75f8f 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
@@ -62,7 +62,7 @@ index 5490cd9974b3..e43959d78ed2 100644
+ }
+ else if (activationProgress->progress() == 100)
+ {
-+ log<level::ERR>("progress == 100...");
++ error("progress == 100...");
+ if (!redundancyPriority)
+ {
+ redundancyPriority =
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch
index d5d0f513e..6bbd59918 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch
@@ -1,4 +1,4 @@
-From ae3a9616b44677f20b4ca534c3f55ccb478fdf55 Mon Sep 17 00:00:00 2001
+From 0628db177655e6f890c4da8c7de7c3cd7487d528 Mon Sep 17 00:00:00 2001
From: Vernon Mauery <vernon.mauery@intel.com>
Date: Thu, 16 Jul 2020 14:16:28 -0700
Subject: [PATCH] remove image file on pre-script failures
@@ -19,22 +19,22 @@ Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
1 file changed, 9 insertions(+)
diff --git a/watch.cpp b/watch.cpp
-index ccdf594..c738945 100644
+index d6c09a946fd0..5d70edbf52b4 100644
--- a/watch.cpp
+++ b/watch.cpp
-@@ -106,6 +106,15 @@ int Watch::callback(sd_event_source* /* s */, int fd, uint32_t revents,
+@@ -106,6 +106,12 @@ int Watch::callback(sd_event_source* /* s */, int fd, uint32_t revents,
{
- log<level::ERR>("Error processing image",
- entry("IMAGE=%s", tarballPath.c_str()));
+ error("Error ({RC}) processing image {IMAGE}", "RC", rc,
+ "IMAGE", tarballPath);
+ std::error_code ec{};
+ fs::remove_all(tarballPath, ec);
+ if (!ec)
+ {
-+ log<level::ERR>(
-+ "Unable to remove image on processing failure",
-+ entry("ERROR=%s", ec.message().c_str()),
-+ entry("IMAGE=%s", tarballPath.c_str()));
++ error("Unable to remove image on processing failure");
+ }
}
}
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch
index eb5a40fbf..0b2026c92 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch
@@ -1,7 +1,7 @@
-From 19661c1173d9d82dfbb879f8cc89c05a0883dffa Mon Sep 17 00:00:00 2001
+From 77b861136b6780ce4eabfe9589a0b584e6ed2b43 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Wed, 21 Apr 2021 21:16:47 +0000
-Subject: [PATCH] Fix delete image by ID and inhibit removal of bmc_active
+Subject: [PATCH] Fix delete image by ID and inhibit removal of bmc_active
Delete image by ID was broken because when hitting the delete dbus
interface, it recalculated the ID from the parent version, which then
@@ -20,17 +20,17 @@ Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
image_manager.cpp | 2 +-
- item_updater.cpp | 20 +++++++++++++-------
+ item_updater.cpp | 16 +++++++++++-----
pfr_image_manager.cpp | 2 +-
version.cpp | 2 +-
version.hpp | 19 +++++++++++++++----
- 5 files changed, 31 insertions(+), 14 deletions(-)
+ 5 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/image_manager.cpp b/image_manager.cpp
-index 4be357f..311a63f 100644
+index 6334704cd980..4fefd221e6d2 100644
--- a/image_manager.cpp
+++ b/image_manager.cpp
-@@ -219,7 +219,7 @@ int Manager::processImage(const std::string& tarFilePath)
+@@ -221,7 +221,7 @@ int Manager::processImage(const std::string& tarFilePath)
{
// Create Version object
auto versionPtr = std::make_unique<Version>(
@@ -40,7 +40,7 @@ index 4be357f..311a63f 100644
std::bind(&Manager::erase, this, std::placeholders::_1));
versionPtr->deleteObject =
diff --git a/item_updater.cpp b/item_updater.cpp
-index 6efd519..6685bf5 100644
+index 26b52b3f7846..3f64feb43c55 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -145,7 +145,7 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg)
@@ -52,7 +52,7 @@ index 6efd519..6685bf5 100644
std::bind(&ItemUpdater::erase, this, std::placeholders::_1));
versionPtr->deleteObject =
std::make_unique<phosphor::software::manager::Delete>(bus, path,
-@@ -263,7 +263,7 @@ void ItemUpdater::processBMCImage()
+@@ -260,7 +260,7 @@ void ItemUpdater::processBMCImage()
// Create Version instance for this version.
auto versionPtr = std::make_unique<VersionClass>(
@@ -61,23 +61,19 @@ index 6efd519..6685bf5 100644
std::bind(&ItemUpdater::erase, this, std::placeholders::_1));
auto isVersionFunctional = versionPtr->isFunctional();
if (!isVersionFunctional)
-@@ -338,11 +338,11 @@ void ItemUpdater::erase(std::string entryId)
+@@ -336,9 +336,9 @@ void ItemUpdater::erase(std::string entryId)
auto it = versions.find(entryId);
if (it != versions.end())
{
- if (it->second->isFunctional() && ACTIVE_BMC_MAX_ALLOWED > 1)
+ if (it->second->isFunctional())
{
-- log<level::ERR>("Error: Version is currently running on the BMC. "
-- "Unable to remove.",
-- entry("VERSIONID=%s", entryId.c_str()));
-+ log<level::INFO>("Error: Version is currently running on the BMC. "
-+ "Unable to remove.",
-+ entry("VERSIONID=%s", entryId.c_str()));
+- error(
++ info(
+ "Version ({VERSIONID}) is currently running on the BMC; unable to remove.",
+ "VERSIONID", entryId);
return;
- }
- }
-@@ -681,6 +681,12 @@ void ItemUpdater::freeSpace(Activation& caller)
+@@ -679,6 +679,12 @@ void ItemUpdater::freeSpace(Activation& caller)
std::size_t count = 0;
for (const auto& iter : activations)
{
@@ -90,7 +86,7 @@ index 6efd519..6685bf5 100644
if ((iter.second.get()->activation() ==
server::Activation::Activations::Active) ||
(iter.second.get()->activation() ==
-@@ -775,7 +781,7 @@ void ItemUpdater::createBIOSObject()
+@@ -772,7 +778,7 @@ void ItemUpdater::createBIOSObject()
// Do nothing;
};
biosVersion = std::make_unique<VersionClass>(
@@ -100,7 +96,7 @@ index 6efd519..6685bf5 100644
biosVersion->deleteObject =
std::make_unique<phosphor::software::manager::Delete>(bus, path,
diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp
-index 55ad21f..e2dcc80 100644
+index 80db63ca4d85..03bc34a3a78b 100644
--- a/pfr_image_manager.cpp
+++ b/pfr_image_manager.cpp
@@ -399,7 +399,7 @@ int Manager::processImage(const std::string& imgFilePath)
@@ -113,10 +109,10 @@ index 55ad21f..e2dcc80 100644
versionPtr->deleteObject =
std::make_unique<phosphor::software::manager::Delete>(bus, objPath,
diff --git a/version.cpp b/version.cpp
-index 04f40c4..44ef571 100644
+index 97f3be94b4aa..5410c38887f8 100644
--- a/version.cpp
+++ b/version.cpp
-@@ -206,7 +206,7 @@ void Delete::delete_()
+@@ -208,7 +208,7 @@ void Delete::delete_()
{
if (parent.eraseCallback)
{
@@ -126,7 +122,7 @@ index 04f40c4..44ef571 100644
}
diff --git a/version.hpp b/version.hpp
-index 8a68cb5..afc589c 100644
+index 8a68cb5f7b1f..afc589c0226c 100644
--- a/version.hpp
+++ b/version.hpp
@@ -77,11 +77,11 @@ class Version : public VersionInherit
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
index decea878f..5745cb87c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
@@ -1,7 +1,7 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
EXTRA_OEMESON += "-Dfwupd-script=enabled"
-SYSTEMD_SERVICE_${PN}-updater += "fwupd@.service"
+SYSTEMD_SERVICE:${PN}-updater += "fwupd@.service"
EXTRA_OEMESON += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-Dpfr-update=enabled', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb
index da8fc846e..b113547da 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb
@@ -4,7 +4,7 @@ DESCRIPTION = "Builds a default FRU file at runtime based on board ID"
inherit systemd
inherit cmake
-SYSTEMD_SERVICE_${PN} = "SetBaseboardFru.service"
+SYSTEMD_SERVICE:${PN} = "SetBaseboardFru.service"
S = "${WORKDIR}"
SRC_URI = "file://checkFru.sh \
@@ -20,9 +20,9 @@ LIC_FILES_CHKSUM = "\
file://mkfru.cpp;beginline=2;endline=14;md5=c451359f18a13ee69602afce1588c01a \
"
-RDEPENDS_${PN} = "bash"
+RDEPENDS:${PN} = "bash"
-do_install_append() {
+do_install:append() {
install -d ${D}${bindir}
install -m 0755 ${S}/checkFru.sh ${D}/${bindir}/checkFru.sh
install -m 0755 ${S}/decodeBoardID.sh ${D}/${bindir}/decodeBoardID.sh
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend
index 5326680f6..c6ba3929c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend
@@ -1,6 +1,6 @@
-SYSTEMD_LINK_${PN}_remove += "../op-start-host@.service:obmc-host-startmin@0.target.requires/op-start-host@0.service"
-SYSTEMD_LINK_${PN}_remove += "../op-init-pnor@.service:obmc-host-startmin@0.target.requires/op-init-pnor@0.service"
+SYSTEMD_LINK_${PN}:remove += "../op-start-host@.service:obmc-host-startmin@0.target.requires/op-start-host@0.service"
+SYSTEMD_LINK_${PN}:remove += "../op-init-pnor@.service:obmc-host-startmin@0.target.requires/op-init-pnor@0.service"
-FILES_${PN}_remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires"
-FILES_${PN}_remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-start-host@0.service"
-FILES_${PN}_remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-init-pnor@0.service" \ No newline at end of file
+FILES:${PN}:remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires"
+FILES:${PN}:remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-start-host@0.service"
+FILES:${PN}:remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-init-pnor@0.service" \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch
index e52dff3f4..f41e6f994 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch
@@ -65,6 +65,24 @@ Response:
},
"UpperThresholdCritical": 115.0,
"UpperThresholdNonCritical": 110.0
+},
+{
+ @odata.id": "/redfish/v1/Chassis/F2U8X25_HSBP_2/Thermal#/Temperatures/0",
+ @odata.type": "#Thermal.v1_3_0.Temperature",
+ LowerThresholdCritical": 7.0,
+ LowerThresholdNonCritical": 12.0,
+ MaxReadingRangeTemp": 127.0,
+ MemberId": "HSBP2_Temp",
+ MinReadingRangeTemp": -128.0,
+ Name": "HSBP2 Temp",
+ PhysicalContext": "Backplane",
+ ReadingCelsius": 21.437,
+ Status": {
+ "Health": "OK",
+ "State": "Enabled"
+ },
+ UpperThresholdCritical": 57.0,
+ UpperThresholdNonCritical": 52.0
}
3. GET - https://<bmc.ip>/redfish/v1/Chassis/<Board>/Power
Response:
@@ -103,15 +121,16 @@ Response:
}
}
Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com>
+Signed-off-by: sunitakx <sunitax.kumari@linux.intel.com>
---
- redfish-core/lib/sensors.hpp | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
+ redfish-core/lib/sensors.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
-index 9f06d2f..40fcdf8 100644
+index 5d27577..d51d09f 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
-@@ -964,6 +964,18 @@ inline void objectInterfacesToJson(
+@@ -973,6 +973,22 @@ inline void objectInterfacesToJson(
{
unit = "/ReadingCelsius"_json_pointer;
sensorJson["@odata.type"] = "#Thermal.v1_3_0.Temperature";
@@ -123,6 +142,10 @@ index 9f06d2f..40fcdf8 100644
+ {
+ sensorJson["PhysicalContext"] = "Intake";
+ }
++ else if (sensorName.find("HSBP") != std::string::npos)
++ {
++ sensorJson["PhysicalContext"] = "Backplane";
++ }
+ else
+ {
+ sensorJson["PhysicalContext"] = "SystemBoard";
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch
deleted file mode 100644
index e0664a350..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch
+++ /dev/null
@@ -1,723 +0,0 @@
-From c6ed122a09b1e41b9eab0032ff428b8b1a999534 Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
-Date: Wed, 4 Aug 2021 15:50:34 -0700
-Subject: [PATCH] Revert "Support new boot override setting design"
-
-This reverts commit c21865c469cfc9dffdc15d87710293115cf6d9e4.
-
-Change-Id: Icfd03551dd9ea2fb216519d8ab05b92521838542
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
----
- redfish-core/lib/systems.hpp | 493 +++++++++++++++++------------------
- 1 file changed, 245 insertions(+), 248 deletions(-)
-
-diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
-index fc6e2c78fd1f..5ad065b3518a 100644
---- a/redfish-core/lib/systems.hpp
-+++ b/redfish-core/lib/systems.hpp
-@@ -769,8 +769,11 @@ inline int assignBootParameters(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- const std::string& rfSource,
- std::string& bootSource, std::string& bootMode)
- {
-- bootSource = "xyz.openbmc_project.Control.Boot.Source.Sources.Default";
-- bootMode = "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular";
-+ // The caller has initialized the bootSource and bootMode to:
-+ // bootMode = "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular";
-+ // bootSource = "xyz.openbmc_project.Control.Boot.Source.Sources.Default";
-+ // Only modify the bootSource/bootMode variable needed to achieve the
-+ // desired boot action.
-
- if (rfSource == "None")
- {
-@@ -917,14 +920,45 @@ inline void getBootProgress(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
- }
-
- /**
-- * @brief Retrieves boot override type over DBUS and fills out the response
-+ * @brief Checks if the current boot override state can be considered as
-+ * Disabled
- *
- * @param[in] aResp Shared pointer for generating response message.
- *
- * @return None.
- */
-+inline void
-+ checkIfOverrideIsDisabled(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
-+{
-+ // If the BootSourceOverrideTarget is still "None" at the end,
-+ // reset the BootSourceOverrideEnabled to indicate that
-+ // overrides are disabled
-+ if (aResp->res.jsonValue["Boot"]["BootSourceOverrideTarget"] == "None")
-+ {
-+ // If the BootSourceOverrideMode is supported we should
-+ // check if it is still "UEFI" too
-+ if (aResp->res.jsonValue["Boot"].contains("BootSourceOverrideMode"))
-+ {
-+ if (aResp->res.jsonValue["Boot"]["BootSourceOverrideMode"] !=
-+ "UEFI")
-+ {
-+ return;
-+ }
-+ }
-+ aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] = "Disabled";
-+ }
-+}
-
--inline void getBootOverrideType(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
-+/**
-+ * @brief Retrieves boot type over DBUS and fills out the response
-+ *
-+ * @param[in] aResp Shared pointer for generating response message.
-+ * @param[in] bootDbusObj The dbus object to query for boot properties.
-+ *
-+ * @return None.
-+ */
-+inline void getBootType(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-+ const std::string& bootDbusObj)
- {
- crow::connections::systemBus->async_method_call(
- [aResp](const boost::system::error_code ec,
-@@ -932,6 +966,12 @@ inline void getBootOverrideType(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
- if (ec)
- {
- // not an error, don't have to have the interface
-+
-+ // Support Disabled override state in a way:
-+ // "BootSourceOverrideEnabled=Disabled" =
-+ // "BootSourceOverrideMode=UEFI" +
-+ // "BootSourceOverrideTarget=None"
-+ checkIfOverrideIsDisabled(aResp);
- return;
- }
-
-@@ -958,26 +998,31 @@ inline void getBootOverrideType(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
- }
-
- aResp->res.jsonValue["Boot"]["BootSourceOverrideMode"] = rfType;
-+
-+ // Support Disabled override state in a way:
-+ // "BootSourceOverrideEnabled=Disabled" =
-+ // "BootSourceOverrideMode=UEFI" + "BootSourceOverrideTarget=None"
-+ checkIfOverrideIsDisabled(aResp);
- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-+ "xyz.openbmc_project.Settings", bootDbusObj,
- "org.freedesktop.DBus.Properties", "Get",
- "xyz.openbmc_project.Control.Boot.Type", "BootType");
- }
-
- /**
-- * @brief Retrieves boot override mode over DBUS and fills out the response
-+ * @brief Retrieves boot mode over DBUS and fills out the response
- *
- * @param[in] aResp Shared pointer for generating response message.
-+ * @param[in] bootDbusObj The dbus object to query for boot properties.
- *
- * @return None.
- */
--
--inline void getBootOverrideMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
-+inline void getBootMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-+ const std::string& bootDbusObj)
- {
- crow::connections::systemBus->async_method_call(
-- [aResp](const boost::system::error_code ec,
-- const std::variant<std::string>& bootMode) {
-+ [aResp, bootDbusObj](const boost::system::error_code ec,
-+ const std::variant<std::string>& bootMode) {
- if (ec)
- {
- BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-@@ -1010,27 +1055,39 @@ inline void getBootOverrideMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
- rfMode;
- }
- }
-+
-+ // Get BootType inside this async call as we need all of the
-+ // BootSource/BootMode/BootType to support
-+ // "BootSourceOverrideEnabled"="Disabled" state.
-+ getBootType(aResp, bootDbusObj);
- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-+ "xyz.openbmc_project.Settings", bootDbusObj,
- "org.freedesktop.DBus.Properties", "Get",
- "xyz.openbmc_project.Control.Boot.Mode", "BootMode");
- }
-
- /**
-- * @brief Retrieves boot override source over DBUS
-+ * @brief Retrieves boot source over DBUS
- *
- * @param[in] aResp Shared pointer for generating response message.
-+ * @param[in] oneTimeEnable Boolean to indicate boot properties are one-time.
- *
- * @return None.
- */
--
--inline void
-- getBootOverrideSource(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
-+inline void getBootSource(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-+ bool oneTimeEnabled)
- {
-+ std::string bootDbusObj =
-+ oneTimeEnabled ? "/xyz/openbmc_project/control/host0/boot/one_time"
-+ : "/xyz/openbmc_project/control/host0/boot";
-+
-+ BMCWEB_LOG_DEBUG << "Is one time: " << oneTimeEnabled;
-+ aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] =
-+ (oneTimeEnabled) ? "Once" : "Continuous";
-+
- crow::connections::systemBus->async_method_call(
-- [aResp](const boost::system::error_code ec,
-- const std::variant<std::string>& bootSource) {
-+ [aResp, bootDbusObj](const boost::system::error_code ec,
-+ const std::variant<std::string>& bootSource) {
- if (ec)
- {
- BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-@@ -1057,43 +1114,32 @@ inline void
-
- // Get BootMode as BootSourceOverrideTarget is constructed
- // from both BootSource and BootMode
-- getBootOverrideMode(aResp);
-+ getBootMode(aResp, bootDbusObj);
- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-+ "xyz.openbmc_project.Settings", bootDbusObj,
- "org.freedesktop.DBus.Properties", "Get",
- "xyz.openbmc_project.Control.Boot.Source", "BootSource");
- }
-
- /**
-- * @brief This functions abstracts all the logic behind getting a
-- * "BootSourceOverrideEnabled" property from an overall boot override enable
-- * state
-+ * @brief Retrieves "One time" enabled setting over DBUS and calls function to
-+ * get boot source and boot mode.
- *
- * @param[in] aResp Shared pointer for generating response message.
- *
- * @return None.
- */
--
--inline void
-- processBootOverrideEnable(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-- const bool bootOverrideEnableSetting)
-+inline void getBootProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
- {
-- if (!bootOverrideEnableSetting)
-- {
-- aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] = "Disabled";
-- return;
-- }
-+ BMCWEB_LOG_DEBUG << "Get boot information.";
-
-- // If boot source override is enabled, we need to check 'one_time'
-- // property to set a correct value for the "BootSourceOverrideEnabled"
- crow::connections::systemBus->async_method_call(
- [aResp](const boost::system::error_code ec,
- const std::variant<bool>& oneTime) {
- if (ec)
- {
- BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-- messages::internalError(aResp->res);
-+ // not an error, don't have to have the interface
- return;
- }
-
-@@ -1104,19 +1150,7 @@ inline void
- messages::internalError(aResp->res);
- return;
- }
--
-- bool oneTimeSetting = *oneTimePtr;
--
-- if (oneTimeSetting)
-- {
-- aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] =
-- "Once";
-- }
-- else
-- {
-- aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] =
-- "Continuous";
-- }
-+ getBootSource(aResp, *oneTimePtr);
- },
- "xyz.openbmc_project.Settings",
- "/xyz/openbmc_project/control/host0/boot/one_time",
-@@ -1124,60 +1158,6 @@ inline void
- "xyz.openbmc_project.Object.Enable", "Enabled");
- }
-
--/**
-- * @brief Retrieves boot override enable over DBUS
-- *
-- * @param[in] aResp Shared pointer for generating response message.
-- *
-- * @return None.
-- */
--
--inline void
-- getBootOverrideEnable(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
--{
-- crow::connections::systemBus->async_method_call(
-- [aResp](const boost::system::error_code ec,
-- const std::variant<bool>& bootOverrideEnable) {
-- if (ec)
-- {
-- BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-- messages::internalError(aResp->res);
-- return;
-- }
--
-- const bool* bootOverrideEnablePtr =
-- std::get_if<bool>(&bootOverrideEnable);
--
-- if (!bootOverrideEnablePtr)
-- {
-- messages::internalError(aResp->res);
-- return;
-- }
--
-- processBootOverrideEnable(aResp, *bootOverrideEnablePtr);
-- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-- "org.freedesktop.DBus.Properties", "Get",
-- "xyz.openbmc_project.Object.Enable", "Enabled");
--}
--
--/**
-- * @brief Retrieves boot source override properties
-- *
-- * @param[in] aResp Shared pointer for generating response message.
-- *
-- * @return None.
-- */
--inline void getBootProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
--{
-- BMCWEB_LOG_DEBUG << "Get boot information.";
--
-- getBootOverrideSource(aResp);
-- getBootOverrideType(aResp);
-- getBootOverrideEnable(aResp);
--}
--
- /**
- * @brief Retrieves the Last Reset Time
- *
-@@ -1479,47 +1459,59 @@ inline void getTrustedModuleRequiredToBoot(
- * @brief Sets boot properties into DBUS object(s).
- *
- * @param[in] aResp Shared pointer for generating response message.
-+ * @param[in] overrideEnabled The source override "enable".
-+ * @param[in] bootObj Path to the DBUS object.
- * @param[in] bootType The boot type to set.
- * @return Integer error code.
- */
- inline void setBootType(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-+ const bool overrideEnabled, const std::string& bootObj,
- const std::optional<std::string>& bootType)
- {
-- std::string bootTypeStr;
--
-- if (!bootType)
-- {
-- return;
-- }
-+ std::string bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.EFI";
-
-- // Source target specified
-- BMCWEB_LOG_DEBUG << "Boot type: " << *bootType;
-- // Figure out which DBUS interface and property to use
-- if (*bootType == "Legacy")
-- {
-- bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.Legacy";
-- }
-- else if (*bootType == "UEFI")
-+ if (bootType && overrideEnabled)
- {
-- bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.EFI";
-- }
-- else
-- {
-- BMCWEB_LOG_DEBUG << "Invalid property value for "
-- "BootSourceOverrideMode: "
-- << *bootType;
-- messages::propertyValueNotInList(aResp->res, *bootType,
-- "BootSourceOverrideMode");
-- return;
-+ // Source target specified
-+ BMCWEB_LOG_DEBUG << "Boot type: " << *bootType;
-+ // Figure out which DBUS interface and property to use
-+ if (*bootType == "Legacy")
-+ {
-+ bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.Legacy";
-+ }
-+ else if (*bootType == "UEFI")
-+ {
-+ bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.EFI";
-+ }
-+ else
-+ {
-+ BMCWEB_LOG_DEBUG << "Invalid property value for "
-+ "BootSourceOverrideMode: "
-+ << *bootType;
-+ messages::propertyValueNotInList(aResp->res, *bootType,
-+ "BootSourceOverrideMode");
-+ return;
-+ }
- }
-
- // Act on validated parameters
- BMCWEB_LOG_DEBUG << "DBUS boot type: " << bootTypeStr;
-
- crow::connections::systemBus->async_method_call(
-- [aResp](const boost::system::error_code ec) {
-+ [aResp, bootType](const boost::system::error_code ec) {
- if (ec)
- {
-+ if (!bootType)
-+ {
-+ // If bootType wasn't explicitly present in the incoming
-+ // message don't output error. The error could come from a
-+ // fact that the BootType interface may be not present in
-+ // the settings object. It could happen because this
-+ // interface is not relevant for some Host architectures
-+ // (for example POWER).
-+ return;
-+ }
-+
- BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
- if (ec.value() == boost::asio::error::host_unreachable)
- {
-@@ -1531,8 +1523,7 @@ inline void setBootType(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- }
- BMCWEB_LOG_DEBUG << "Boot type update done.";
- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-+ "xyz.openbmc_project.Settings", bootObj,
- "org.freedesktop.DBus.Properties", "Set",
- "xyz.openbmc_project.Control.Boot.Type", "BootType",
- std::variant<std::string>(bootTypeStr));
-@@ -1542,48 +1533,42 @@ inline void setBootType(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- * @brief Sets boot properties into DBUS object(s).
- *
- * @param[in] aResp Shared pointer for generating response message.
-- * @param[in] bootType The boot type to set.
-+ * @param[in] overrideEnabled The source override "enable".
-+ * @param[in] bootObj Path to the DBUS object.
-+ * @param[in] bootSource The boot source to set.
-+ *
- * @return Integer error code.
- */
--inline void setBootEnable(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-- const std::optional<std::string>& bootEnable)
-+inline void setBootModeOrSource(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-+ const bool overrideEnabled,
-+ const std::string& bootObj,
-+ const std::optional<std::string>& bootSource)
- {
-- if (!bootEnable)
-- {
-- return;
-- }
-- // Source target specified
-- BMCWEB_LOG_DEBUG << "Boot enable: " << *bootEnable;
-+ std::string bootSourceStr =
-+ "xyz.openbmc_project.Control.Boot.Source.Sources.Default";
-+ std::string bootModeStr =
-+ "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular";
-
-- bool bootOverrideEnable = false;
-- bool bootOverridePersistent = false;
-- // Figure out which DBUS interface and property to use
-- if (*bootEnable == "Disabled")
-- {
-- bootOverrideEnable = false;
-- }
-- else if (*bootEnable == "Once")
-- {
-- bootOverrideEnable = true;
-- bootOverridePersistent = false;
-- }
-- else if (*bootEnable == "Continuous")
-+ if (bootSource && overrideEnabled)
- {
-- bootOverrideEnable = true;
-- bootOverridePersistent = true;
-- }
-- else
-- {
-- BMCWEB_LOG_DEBUG << "Invalid property value for "
-- "BootSourceOverrideEnabled: "
-- << *bootEnable;
-- messages::propertyValueNotInList(aResp->res, *bootEnable,
-- "BootSourceOverrideEnabled");
-- return;
-+ // Source target specified
-+ BMCWEB_LOG_DEBUG << "Boot source: " << *bootSource;
-+ // Figure out which DBUS interface and property to use
-+ if (assignBootParameters(aResp, *bootSource, bootSourceStr,
-+ bootModeStr))
-+ {
-+ BMCWEB_LOG_DEBUG
-+ << "Invalid property value for BootSourceOverrideTarget: "
-+ << *bootSource;
-+ messages::propertyValueNotInList(aResp->res, *bootSource,
-+ "BootSourceTargetOverride");
-+ return;
-+ }
- }
-
- // Act on validated parameters
-- BMCWEB_LOG_DEBUG << "DBUS boot override enable: " << bootOverrideEnable;
-+ BMCWEB_LOG_DEBUG << "DBUS boot source: " << bootSourceStr;
-+ BMCWEB_LOG_DEBUG << "DBUS boot mode: " << bootModeStr;
-
- crow::connections::systemBus->async_method_call(
- [aResp](const boost::system::error_code ec) {
-@@ -1593,23 +1578,12 @@ inline void setBootEnable(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- messages::internalError(aResp->res);
- return;
- }
-- BMCWEB_LOG_DEBUG << "Boot override enable update done.";
-+ BMCWEB_LOG_DEBUG << "Boot source update done.";
- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-+ "xyz.openbmc_project.Settings", bootObj,
- "org.freedesktop.DBus.Properties", "Set",
-- "xyz.openbmc_project.Object.Enable", "Enabled",
-- std::variant<bool>(bootOverrideEnable));
--
-- if (!bootOverrideEnable)
-- {
-- return;
-- }
--
-- // In case boot override is enabled we need to set correct value for the
-- // 'one_time' enable DBus interface
-- BMCWEB_LOG_DEBUG << "DBUS boot override persistent: "
-- << bootOverridePersistent;
-+ "xyz.openbmc_project.Control.Boot.Source", "BootSource",
-+ std::variant<std::string>(bootSourceStr));
-
- crow::connections::systemBus->async_method_call(
- [aResp](const boost::system::error_code ec) {
-@@ -1619,86 +1593,45 @@ inline void setBootEnable(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- messages::internalError(aResp->res);
- return;
- }
-- BMCWEB_LOG_DEBUG << "Boot one_time update done.";
-+ BMCWEB_LOG_DEBUG << "Boot mode update done.";
- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot/one_time",
-+ "xyz.openbmc_project.Settings", bootObj,
- "org.freedesktop.DBus.Properties", "Set",
-- "xyz.openbmc_project.Object.Enable", "Enabled",
-- std::variant<bool>(!bootOverridePersistent));
-+ "xyz.openbmc_project.Control.Boot.Mode", "BootMode",
-+ std::variant<std::string>(bootModeStr));
- }
-
- /**
-- * @brief Sets boot properties into DBUS object(s).
-+ * @brief Sets "One time" enabled setting into DBUS object
- *
-- * @param[in] aResp Shared pointer for generating response message.
-- * @param[in] bootSource The boot source to set.
-+ * @param[in] aResp Shared pointer for generating response message.
-+ * @param[in] oneTime Enable property for one-time object
- *
- * @return Integer error code.
- */
--inline void setBootModeOrSource(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-- const std::optional<std::string>& bootSource)
-+inline void setOneTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-+ bool oneTime)
- {
-- std::string bootSourceStr;
-- std::string bootModeStr;
--
-- if (!bootSource)
-- {
-- return;
-- }
--
-- // Source target specified
-- BMCWEB_LOG_DEBUG << "Boot source: " << *bootSource;
-- // Figure out which DBUS interface and property to use
-- if (assignBootParameters(aResp, *bootSource, bootSourceStr, bootModeStr))
-- {
-- BMCWEB_LOG_DEBUG
-- << "Invalid property value for BootSourceOverrideTarget: "
-- << *bootSource;
-- messages::propertyValueNotInList(aResp->res, *bootSource,
-- "BootSourceTargetOverride");
-- return;
-- }
--
-- // Act on validated parameters
-- BMCWEB_LOG_DEBUG << "DBUS boot source: " << bootSourceStr;
-- BMCWEB_LOG_DEBUG << "DBUS boot mode: " << bootModeStr;
--
- crow::connections::systemBus->async_method_call(
-- [aResp](const boost::system::error_code ec) {
-+ [aResp{aResp}](const boost::system::error_code ec) {
- if (ec)
- {
- BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
- messages::internalError(aResp->res);
- return;
- }
-- BMCWEB_LOG_DEBUG << "Boot source update done.";
-+ BMCWEB_LOG_DEBUG << "Boot enable update done.";
- },
- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-- "org.freedesktop.DBus.Properties", "Set",
-- "xyz.openbmc_project.Control.Boot.Source", "BootSource",
-- std::variant<std::string>(bootSourceStr));
--
-- crow::connections::systemBus->async_method_call(
-- [aResp](const boost::system::error_code ec) {
-- if (ec)
-- {
-- BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-- messages::internalError(aResp->res);
-- return;
-- }
-- BMCWEB_LOG_DEBUG << "Boot mode update done.";
-- },
-- "xyz.openbmc_project.Settings",
-- "/xyz/openbmc_project/control/host0/boot",
-+ "/xyz/openbmc_project/control/host0/boot/one_time",
- "org.freedesktop.DBus.Properties", "Set",
-- "xyz.openbmc_project.Control.Boot.Mode", "BootMode",
-- std::variant<std::string>(bootModeStr));
-+ "xyz.openbmc_project.Object.Enable", "Enabled",
-+ std::variant<bool>(oneTime));
- }
-
- /**
-- * @brief Sets Boot source override properties.
-+ * @brief Retrieves "One time" enabled setting over DBUS and calls function to
-+ * set boot source/boot mode properties.
- *
- * @param[in] aResp Shared pointer for generating response message.
- * @param[in] bootSource The boot source from incoming RF request.
-@@ -1707,17 +1640,81 @@ inline void setBootModeOrSource(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- *
- * @return Integer error code.
- */
--
--inline void setBootProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-- const std::optional<std::string>& bootSource,
-- const std::optional<std::string>& bootType,
-- const std::optional<std::string>& bootEnable)
-+inline void
-+ setBootSourceProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
-+ std::optional<std::string> bootSource,
-+ std::optional<std::string> bootType,
-+ std::optional<std::string> bootEnable)
- {
- BMCWEB_LOG_DEBUG << "Set boot information.";
-
-- setBootModeOrSource(aResp, bootSource);
-- setBootType(aResp, bootType);
-- setBootEnable(aResp, bootEnable);
-+ crow::connections::systemBus->async_method_call(
-+ [aResp, bootSource{std::move(bootSource)},
-+ bootType{std::move(bootType)},
-+ bootEnable{std::move(bootEnable)}](const boost::system::error_code ec,
-+ const std::variant<bool>& oneTime) {
-+ if (ec)
-+ {
-+ BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-+ messages::internalError(aResp->res);
-+ return;
-+ }
-+
-+ const bool* oneTimePtr = std::get_if<bool>(&oneTime);
-+
-+ if (!oneTimePtr)
-+ {
-+ messages::internalError(aResp->res);
-+ return;
-+ }
-+
-+ BMCWEB_LOG_DEBUG << "Got one time: " << *oneTimePtr;
-+
-+ bool oneTimeSetting = *oneTimePtr;
-+ bool overrideEnabled = true;
-+
-+ // Validate incoming parameters
-+ if (bootEnable)
-+ {
-+ if (*bootEnable == "Once")
-+ {
-+ oneTimeSetting = true;
-+ }
-+ else if (*bootEnable == "Continuous")
-+ {
-+ oneTimeSetting = false;
-+ }
-+ else if (*bootEnable == "Disabled")
-+ {
-+ BMCWEB_LOG_DEBUG << "Boot source override will be disabled";
-+ oneTimeSetting = false;
-+ overrideEnabled = false;
-+ }
-+ else
-+ {
-+ BMCWEB_LOG_DEBUG << "Unsupported value for "
-+ "BootSourceOverrideEnabled: "
-+ << *bootEnable;
-+ messages::propertyValueNotInList(
-+ aResp->res, *bootEnable, "BootSourceOverrideEnabled");
-+ return;
-+ }
-+ }
-+
-+ std::string bootObj = "/xyz/openbmc_project/control/host0/boot";
-+ if (oneTimeSetting)
-+ {
-+ bootObj += "/one_time";
-+ }
-+
-+ setBootModeOrSource(aResp, overrideEnabled, bootObj, bootSource);
-+ setBootType(aResp, overrideEnabled, bootObj, bootType);
-+ setOneTime(aResp, oneTimeSetting);
-+ },
-+ "xyz.openbmc_project.Settings",
-+ "/xyz/openbmc_project/control/host0/boot/one_time",
-+ "org.freedesktop.DBus.Properties", "Get",
-+ "xyz.openbmc_project.Object.Enable", "Enabled");
- }
-
- /**
-@@ -2806,11 +2803,11 @@ inline void requestRoutesSystems(App& app)
- {
- return;
- }
--
- if (bootSource || bootType || bootEnable)
- {
-- setBootProperties(asyncResp, bootSource, bootType,
-- bootEnable);
-+ setBootSourceProperties(
-+ asyncResp, std::move(bootSource),
-+ std::move(bootType), std::move(bootEnable));
- }
- if (automaticRetryConfig)
- {
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch
index 028d09e74..a5c55afd1 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch
@@ -1,31 +1,25 @@
-From 02e44acef17a2b0681fe019e090d09015f9412e0 Mon Sep 17 00:00:00 2001
-From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
-Date: Wed, 30 Jun 2021 15:27:16 +0000
-Subject: [PATCH 3/5] Add support to ResetBios action
+From 415b5079ff45c1dabad15e0f751001a6265412e4 Mon Sep 17 00:00:00 2001
+From: AppaRao Puli <apparao.puli@linux.intel.com>
+Date: Fri, 27 Aug 2021 13:02:20 +0000
+Subject: [PATCH] Add support to ResetBios action
Tested:
Bios reset flag can be modified throw redfish
POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios
-Change-Id: I5e5fbdd70d4a3ce3b976cc2eb0a7d9a2a3adb124
+Change-Id: Ic719c55705e5f634539b3dd858b60922e505a8d0
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
+Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
- redfish-core/lib/bios.hpp | 18 +++++++++++-------
- 1 file changed, 11 insertions(+), 7 deletions(-)
+ redfish-core/lib/bios.hpp | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
-index 14d2171..49c0fd0 100644
+index 85ccaaa..360a749 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
-@@ -665,24 +665,28 @@ inline void requestRoutesBiosAttributeRegistry(App& app)
- inline void requestRoutesBiosReset(App& app)
- {
- BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios/")
-- // Incorrect Privilege; Should be ConfigureComponents
-- //.privileges(redfish::privileges::postBios)
-- .privileges({{"ConfigureManager"}})
-+ .privileges(redfish::privileges::postBios)
+@@ -737,18 +737,24 @@ inline void requestRoutesBiosReset(App& app)
.methods(boost::beast::http::verb::post)(
[](const crow::Request&,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch
index 64948ca0c..da281467e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch
@@ -1,4 +1,4 @@
-From 882dc7755083eea32f3d14f7e6c7330d5a9ac66f Mon Sep 17 00:00:00 2001
+From 54bdd897bd416fef4c043224b398b1b6d47fd271 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Fri, 12 Mar 2021 18:53:25 +0000
Subject: [PATCH] Add Server-Sent-Events support
@@ -30,10 +30,10 @@ Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
create mode 100644 http/server_sent_event.hpp
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
-index fb64014..45b1a68 100644
+index a1a7045..90535c5 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
-@@ -326,7 +326,7 @@ class Connection :
+@@ -331,7 +331,7 @@ class Connection :
BMCWEB_LOG_INFO << "Request: "
<< " " << this << " HTTP/" << req->version() / 10 << "."
<< req->version() % 10 << ' ' << req->methodString()
@@ -42,10 +42,10 @@ index fb64014..45b1a68 100644
needToCallAfterHandlers = false;
-@@ -345,11 +345,15 @@ class Connection :
+@@ -350,11 +350,15 @@ class Connection :
boost::asio::post(self->adaptor.get_executor(),
[self] { self->completeRequest(); });
- };
+ });
- if (req->isUpgrade() &&
- boost::iequals(
- req->getHeaderValue(boost::beast::http::field::upgrade),
@@ -63,7 +63,7 @@ index fb64014..45b1a68 100644
// delete lambda with self shared_ptr
// to enable connection destruction
diff --git a/http/http_response.hpp b/http/http_response.hpp
-index 72ff9e9..6bb3aa5 100644
+index a983d4a..07b0265 100644
--- a/http/http_response.hpp
+++ b/http/http_response.hpp
@@ -15,10 +15,15 @@ namespace crow
@@ -82,7 +82,7 @@ index 72ff9e9..6bb3aa5 100644
using response_type =
boost::beast::http::response<boost::beast::http::string_body>;
-@@ -138,8 +143,8 @@ struct Response
+@@ -143,8 +148,8 @@ struct Response
private:
bool completed{};
@@ -93,7 +93,7 @@ index 72ff9e9..6bb3aa5 100644
// In case of a JSON object, set the Content-Type header
void jsonMode()
diff --git a/http/routing.hpp b/http/routing.hpp
-index af6269e..318fcfe 100644
+index d2a10b2..25e4ce8 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -6,6 +6,7 @@
@@ -474,4 +474,5 @@ index 0000000..41d18ed
+};
+} // namespace crow
--
-2.25.1
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
index 78b52eea1..42a1ebbf0 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch
@@ -1,4 +1,4 @@
-From a9d994919b677a2650b80fb449cf96baad4f04dd Mon Sep 17 00:00:00 2001
+From 36c1391749e19e4a25ca6e57d369457f48e6bb11 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Tue, 16 Mar 2021 15:37:24 +0000
Subject: [PATCH] Add SSE style subscription support to eventservice
@@ -19,23 +19,24 @@ Tested:
- Ran RedfishValidation and its passed.
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
+Signed-off-by: Nitin Wankhade <nitinx.arunrao.wankhade@intel.com>
Change-Id: I7f4b7a34974080739c4ba968ed570489af0474de
---
http/http_connection.hpp | 2 +-
include/eventservice_sse.hpp | 75 +++++
- .../include/event_service_manager.hpp | 109 +++++--
+ .../include/event_service_manager.hpp | 111 +++++--
redfish-core/include/server_sent_events.hpp | 290 ------------------
redfish-core/lib/event_service.hpp | 8 +-
src/webserver_main.cpp | 2 +
- 6 files changed, 164 insertions(+), 322 deletions(-)
+ 6 files changed, 165 insertions(+), 323 deletions(-)
create mode 100644 include/eventservice_sse.hpp
delete mode 100644 redfish-core/include/server_sent_events.hpp
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
-index 45b1a68bf015..ccc2d6a753b7 100644
+index 90535c5..37c0a0b 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
-@@ -350,7 +350,7 @@ class Connection :
+@@ -355,7 +355,7 @@ class Connection :
boost::iequals(req->getHeaderValue(
boost::beast::http::field::upgrade),
"websocket")) ||
@@ -46,7 +47,7 @@ index 45b1a68bf015..ccc2d6a753b7 100644
<< " is getting upgraded";
diff --git a/include/eventservice_sse.hpp b/include/eventservice_sse.hpp
new file mode 100644
-index 000000000000..14daf00852f5
+index 0000000..14daf00
--- /dev/null
+++ b/include/eventservice_sse.hpp
@@ -0,0 +1,75 @@
@@ -126,7 +127,7 @@ index 000000000000..14daf00852f5
+} // namespace eventservice_sse
+} // namespace redfish
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index ca46aa7dc62f..098134a3a259 100644
+index ca46aa7..9397271 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -22,15 +22,17 @@
@@ -216,23 +217,23 @@ index ca46aa7dc62f..098134a3a259 100644
~Subscription() = default;
-@@ -417,7 +417,7 @@ class Subscription : public persistent_data::UserSubscription
+@@ -412,13 +412,14 @@ class Subscription : public persistent_data::UserSubscription
+ }
+ conn->addHeaders(reqHeaders);
+ conn->sendData(msg);
+- this->eventSeqNum++;
+ }
if (sseConn != nullptr)
{
- sseConn->sendData(eventSeqNum, msg);
+ sseConn->sendEvent(std::to_string(eventSeqNum), msg);
}
- }
-
-@@ -508,6 +508,7 @@ class Subscription : public persistent_data::UserSubscription
-
- this->sendEvent(
- msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
++
+ this->eventSeqNum++;
}
- #endif
+ void sendTestEventLog()
@@ -578,14 +579,39 @@ class Subscription : public persistent_data::UserSubscription
return eventSeqNum;
}
@@ -326,7 +327,7 @@ index ca46aa7dc62f..098134a3a259 100644
std::vector<std::string> idList;
diff --git a/redfish-core/include/server_sent_events.hpp b/redfish-core/include/server_sent_events.hpp
deleted file mode 100644
-index 7613d7ba6427..000000000000
+index 7613d7b..0000000
--- a/redfish-core/include/server_sent_events.hpp
+++ /dev/null
@@ -1,290 +0,0 @@
@@ -621,7 +622,7 @@ index 7613d7ba6427..000000000000
-
-} // namespace crow
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
-index f1d6f5007d79..4a2d58a2f1dd 100644
+index 67ad014..f8a2dac 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -37,8 +37,6 @@ static constexpr const std::array<const char*, 1> supportedResourceTypes = {
@@ -654,7 +655,7 @@ index f1d6f5007d79..4a2d58a2f1dd 100644
std::optional<uint32_t> retryAttemps;
std::optional<uint32_t> retryInterval;
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
-index c01accd2e93e..363005105d18 100644
+index bf98aae..53745d8 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -6,6 +6,7 @@
@@ -662,10 +663,10 @@ index c01accd2e93e..363005105d18 100644
#include <dbus_monitor.hpp>
#include <dbus_singleton.hpp>
+#include <eventservice_sse.hpp>
+ #include <google/google_service_root.hpp>
#include <hostname_monitor.hpp>
#include <ibm/management_console_rest.hpp>
- #include <image_upload.hpp>
-@@ -82,6 +83,7 @@ int main(int /*argc*/, char** /*argv*/)
+@@ -83,6 +84,7 @@ int main(int /*argc*/, char** /*argv*/)
#endif
#ifdef BMCWEB_ENABLE_REDFISH
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch
index 79b6e42d7..9043bd0b9 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch
@@ -1,4 +1,4 @@
-From e8bf93f1cc374a986896174489719065d0cc49a0 Mon Sep 17 00:00:00 2001
+From 22c6b6cfb468f8de9ff3ea051dffdba05778645e Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Wed, 17 Mar 2021 01:16:50 +0000
Subject: [PATCH] Add EventService SSE filter support
@@ -223,10 +223,10 @@ index 10567d1..f29e326 100644
} // namespace redfish
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 098134a..c8fcb33 100644
+index 5886d81..c3e7f61 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
-@@ -55,6 +55,11 @@ static constexpr const char* eventServiceFile =
+@@ -56,6 +56,11 @@ static constexpr const char* eventServiceFile =
static constexpr const uint8_t maxNoOfSubscriptions = 20;
static constexpr const uint8_t maxNoOfSSESubscriptions = 10;
@@ -239,10 +239,10 @@ index 098134a..c8fcb33 100644
static std::optional<boost::asio::posix::stream_descriptor> inotifyConn;
static constexpr const char* redfishEventLogDir = "/var/log";
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
-index 4a2d58a..67abb95 100644
+index 2e7c3f3..9def549 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
-@@ -21,11 +21,6 @@
+@@ -25,11 +25,6 @@
namespace redfish
{
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch
index 7749ddb72..3be65ee2a 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch
@@ -1,6 +1,6 @@
-From dad35d6e6736f1c4ab6d739c62b22923ad749ad7 Mon Sep 17 00:00:00 2001
-From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
-Date: Tue, 13 Jul 2021 12:30:08 +0000
+From b8eb53886106e44e3668857b13f8642d2ad3cfbf Mon Sep 17 00:00:00 2001
+From: AppaRao Puli <apparao.puli@linux.intel.com>
+Date: Fri, 27 Aug 2021 16:02:01 +0000
Subject: [PATCH] EventService: Log events for subscription actions
Log redfish event for below 3 actions
@@ -18,7 +18,7 @@ Tested:
- Performed all the above actions and verified the redfish event
messages are logged.
-Change-Id: I528293e55b1f3401bc2bb09c11c63ae985fbfedb
+Change-Id: I3745fa6357bd215379781a9818d9acc02a853d79
Signed-off-by: AppaRao Puli <apparao.puli@intel.com>
Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
---
@@ -27,10 +27,10 @@ Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
2 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index a5b37e5..75f5615 100644
+index c3e7f61..e9bdbfa 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
-@@ -20,6 +20,7 @@
+@@ -21,6 +21,7 @@
#include "registries/task_event_message_registry.hpp"
#include <sys/inotify.h>
@@ -38,16 +38,16 @@ index a5b37e5..75f5615 100644
#include <boost/asio/io_context.hpp>
#include <boost/beast/core/span.hpp>
-@@ -813,7 +814,7 @@ class EventServiceManager
- return;
+@@ -788,7 +789,7 @@ class EventServiceManager
+ }
}
- void updateSubscriptionData()
+ void persistSubscriptionData()
{
- // Persist the config and subscription data.
- nlohmann::json jsonData;
-@@ -910,7 +911,7 @@ class EventServiceManager
+ persistent_data::EventServiceStore::getInstance()
+ .eventServiceConfig.enabled = serviceEnabled;
+@@ -835,7 +836,7 @@ class EventServiceManager
if (updateConfig)
{
@@ -56,7 +56,7 @@ index a5b37e5..75f5615 100644
}
if (updateRetryCfg)
-@@ -1005,7 +1006,7 @@ class EventServiceManager
+@@ -947,7 +948,7 @@ class EventServiceManager
if (updateFile)
{
@@ -65,7 +65,7 @@ index a5b37e5..75f5615 100644
}
#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
-@@ -1020,6 +1021,13 @@ class EventServiceManager
+@@ -962,6 +963,13 @@ class EventServiceManager
// Set Subscription ID for back trace
subValue->setSubscriptionId(id);
@@ -79,9 +79,9 @@ index a5b37e5..75f5615 100644
return id;
}
-@@ -1040,7 +1048,14 @@ class EventServiceManager
- {
- subscriptionsMap.erase(obj);
+@@ -986,7 +994,14 @@ class EventServiceManager
+ persistent_data::EventServiceStore::getInstance()
+ .subscriptionsConfigMap.erase(obj2);
updateNoOfSubscribersCount();
- updateSubscriptionData();
+
@@ -95,7 +95,7 @@ index a5b37e5..75f5615 100644
}
}
-@@ -1062,6 +1077,18 @@ class EventServiceManager
+@@ -1008,6 +1023,18 @@ class EventServiceManager
}
}
@@ -115,10 +115,10 @@ index a5b37e5..75f5615 100644
{
return subscriptionsMap.size();
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
-index 53a60d3..435c93d 100644
+index 9def549..6a8421f 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
-@@ -579,7 +579,7 @@ inline void requestRoutesEventDestination(App& app)
+@@ -617,7 +617,7 @@ inline void requestRoutesEventDestination(App& app)
subValue->updateRetryPolicy();
}
@@ -126,7 +126,7 @@ index 53a60d3..435c93d 100644
+ EventServiceManager::getInstance().updateSubscription(param);
});
BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
- .privileges({{"ConfigureManager"}})
+ // The below privilege is wrong, it should be ConfigureManager OR
--
-2.25.1
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch
index 6e635a828..d1fe475f5 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch
@@ -1,4 +1,4 @@
-From 7f45c83c0b3acb08461461c23e0d7add46d9191c Mon Sep 17 00:00:00 2001
+From 542505dff60e3921b00b51acae882e207d46f1a6 Mon Sep 17 00:00:00 2001
From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Date: Wed, 14 Jul 2021 14:13:11 +0000
Subject: [PATCH] Restructure Redfish EventLog Transmit code flow
@@ -35,10 +35,10 @@ Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
1 file changed, 76 insertions(+), 32 deletions(-)
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 430767a..53ed3f6 100644
+index e9bdbfa..5c4de70 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
-@@ -133,15 +133,10 @@ static const Message* formatMessage(const std::string_view& messageID)
+@@ -134,15 +134,10 @@ static const Message* formatMessage(const std::string_view& messageID)
namespace event_log
{
@@ -55,7 +55,7 @@ index 430767a..53ed3f6 100644
// Get the entry timestamp
std::time_t curTs = 0;
-@@ -639,6 +634,7 @@ class EventServiceManager
+@@ -621,6 +616,7 @@ class EventServiceManager
}
std::string lastEventTStr;
@@ -63,7 +63,7 @@ index 430767a..53ed3f6 100644
size_t noOfEventLogSubscribers{0};
size_t noOfMetricReportSubscribers{0};
std::shared_ptr<sdbusplus::bus::match::match> matchTelemetryMonitor;
-@@ -1204,7 +1200,22 @@ class EventServiceManager
+@@ -1163,7 +1159,22 @@ class EventServiceManager
#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
void cacheLastEventTimestamp()
{
@@ -87,7 +87,7 @@ index 430767a..53ed3f6 100644
std::ifstream logStream(redfishEventLogFile);
if (!logStream.good())
{
-@@ -1212,27 +1223,44 @@ class EventServiceManager
+@@ -1171,27 +1182,44 @@ class EventServiceManager
return;
}
std::string logEntry;
@@ -143,7 +143,7 @@ index 430767a..53ed3f6 100644
std::ifstream logStream(redfishEventLogFile);
if (!logStream.good())
{
-@@ -1242,27 +1270,21 @@ class EventServiceManager
+@@ -1201,27 +1229,21 @@ class EventServiceManager
std::vector<EventLogObjectsType> eventRecords;
@@ -178,7 +178,7 @@ index 430767a..53ed3f6 100644
std::string timestamp;
std::string messageID;
-@@ -1274,6 +1296,16 @@ class EventServiceManager
+@@ -1233,6 +1255,16 @@ class EventServiceManager
continue;
}
@@ -195,7 +195,7 @@ index 430767a..53ed3f6 100644
std::string registryName;
std::string messageKey;
event_log::getRegistryAndMessageKey(messageID, registryName,
-@@ -1283,11 +1315,23 @@ class EventServiceManager
+@@ -1242,11 +1274,23 @@ class EventServiceManager
continue;
}
@@ -221,5 +221,5 @@ index 430767a..53ed3f6 100644
{
std::shared_ptr<Subscription> entry = it.second;
--
-2.25.1
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch
index f53b7013f..c19691cdc 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch
@@ -1,12 +1,20 @@
-From e37e30943fcb1ba504658ed07d69f950ccf44585 Mon Sep 17 00:00:00 2001
+From 80608f0d72da62426bb00e03a42fbf5daed931c9 Mon Sep 17 00:00:00 2001
From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Date: Tue, 13 Apr 2021 13:00:18 +0000
Subject: [PATCH] Add support for MetricDefinition scheme
Added MetricDefinition node to Redfish code. Now user is able to list
all available metrics in OpenBMC that are supported by Telemetry
-service. Metrics are grouped by following categories: temperature,
-power, voltage, current, fan_tach, fan_pwm, utilization.
+service. Metrics are grouped by reading type.
+
+MetricDefinitions contains all physical sensors supported by redfish,
+algorithm iterates through all chassis and collects results for each
+node available in that chassis (Power, Thermal, Sensors).
+
+When https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/40169 will
+be merge it will be possible to optimize this algorithm to only get
+sensors from Sensors node. Currently Sensors node doesn't contain all
+available sensors.
Tested:
- MetricDefinitions response is filled with existing sensors, it works
@@ -14,18 +22,98 @@ Tested:
- Validated a presence of MetricDefinition members and its attributes
- Successfully passed RedfishServiceValidator.py using witherspoon
image on QEMU
+ - Tested using following GET,POST requests
+
+GET /redfish/v1/TelemetryService/MetricDefinitions
+{
+ "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions",
+ "@odata.type": "#MetricDefinitionCollection.MetricDefinitionCollection",
+ "Members": [
+ {
+ "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Rotational"
+ },
+ {
+ "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Percent"
+ },
+ {
+ "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Temperature"
+ },
+ {
+ "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Power"
+ },
+ {
+ "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/AirFlow"
+ }
+ ],
+ "Members@odata.count": 5,
+ "Name": "Metric Definition Collection"
+}
+
+GET /redfish/v1/TelemetryService/MetricDefinitions/Rotational
+{
+ "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Rotational",
+ "@odata.type": "#MetricDefinition.v1_0_3.MetricDefinition",
+ "Id": "Rotational",
+ "Implementation": "PhysicalSensor",
+ "IsLinear": true,
+ "MetricDataType": "Decimal",
+ "MetricProperties": [
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/0/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/1/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/2/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/4/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/5/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/6/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/7/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/8/Reading",
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/9/Reading"
+ ],
+ "MetricType": "Numeric",
+ "Name": "Rotational",
+ "Units": "RPM"
+}
+
+POST redfish/v1/TelemetryService/MetricReportDefinitions, body:
+{
+ "Id": "TestReport",
+ "Metrics": [
+ {
+ "MetricId": "TestMetric",
+ "MetricProperties": [
+ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading",
+ ]
+ }
+ ],
+ "MetricReportDefinitionType": "OnRequest",
+ "ReportActions": [
+ "RedfishEvent",
+ "LogToMetricReportsCollection"
+ ]
+}
+{
+ "@Message.ExtendedInfo": [
+ {
+ "@odata.type": "#Message.v1_1_1.Message",
+ "Message": "The resource has been created successfully",
+ "MessageArgs": [],
+ "MessageId": "Base.1.8.1.Created",
+ "MessageSeverity": "OK",
+ "Resolution": "None"
+ }
+ ]
+}
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00
---
redfish-core/include/redfish.hpp | 3 +
- .../include/utils/get_chassis_names.hpp | 58 +++++
+ .../include/utils/get_chassis_names.hpp | 58 ++++
.../include/utils/telemetry_utils.hpp | 2 +
- redfish-core/lib/metric_definition.hpp | 242 ++++++++++++++++++
- redfish-core/lib/sensors.hpp | 25 +-
+ redfish-core/lib/metric_definition.hpp | 258 ++++++++++++++++++
redfish-core/lib/telemetry_service.hpp | 2 +
- 6 files changed, 320 insertions(+), 12 deletions(-)
+ 5 files changed, 323 insertions(+)
create mode 100644 redfish-core/include/utils/get_chassis_names.hpp
create mode 100644 redfish-core/lib/metric_definition.hpp
@@ -129,10 +217,10 @@ index 5872350..1b4f75d 100644
constexpr const char* metricReportUri =
diff --git a/redfish-core/lib/metric_definition.hpp b/redfish-core/lib/metric_definition.hpp
new file mode 100644
-index 0000000..2443996
+index 0000000..019168b
--- /dev/null
+++ b/redfish-core/lib/metric_definition.hpp
-@@ -0,0 +1,242 @@
+@@ -0,0 +1,258 @@
+#pragma once
+
+#include "async_resp.hpp"
@@ -140,12 +228,34 @@ index 0000000..2443996
+#include "utils/get_chassis_names.hpp"
+#include "utils/telemetry_utils.hpp"
+
++#include <registries/privilege_registry.hpp>
++
+namespace redfish
+{
+
+namespace telemetry
+{
+
++bool containsOdata(const nlohmann::json& json, const std::string& odataId)
++{
++ const auto it = std::find_if(
++ json.begin(), json.end(), [&odataId](const nlohmann::json& item) {
++ auto kt = item.find("@odata.id");
++ if (kt == item.end())
++ {
++ return false;
++ }
++ const std::string* value = kt->get_ptr<const std::string*>();
++ if (!value)
++ {
++ return false;
++ }
++ return *value == odataId;
++ });
++
++ return it != json.end();
++}
++
+void addMembers(crow::Response& res,
+ const boost::container::flat_map<std::string, std::string>& el)
+{
@@ -168,23 +278,7 @@ index 0000000..2443996
+ std::string(telemetry::metricDefinitionUri) +
+ sensors::toReadingType(type);
+
-+ const auto it = std::find_if(members.begin(), members.end(),
-+ [&odataId](const nlohmann::json& item) {
-+ auto kt = item.find("@odata.id");
-+ if (kt == item.end())
-+ {
-+ return false;
-+ }
-+ const std::string* value =
-+ kt->get_ptr<const std::string*>();
-+ if (!value)
-+ {
-+ return false;
-+ }
-+ return *value == odataId;
-+ });
-+
-+ if (it == members.end())
++ if (!containsOdata(members, odataId))
+ {
+ members.push_back({{"@odata.id", odataId}});
+ }
@@ -193,15 +287,76 @@ index 0000000..2443996
+ }
+}
+
++template <class Callback>
++inline void mapRedfishUriToDbusPath(Callback&& callback)
++{
++ utils::getChassisNames([callback = std::move(callback)](
++ boost::system::error_code ec,
++ const std::vector<std::string>& chassisNames) {
++ if (ec)
++ {
++ BMCWEB_LOG_ERROR << "getChassisNames error: " << ec.value();
++ callback(ec, {});
++ return;
++ }
++
++ auto handleRetrieveUriToDbusMap =
++ [callback = std::move(callback)](
++ const boost::beast::http::status status,
++ const boost::container::flat_map<std::string, std::string>&
++ uriToDbus) {
++ if (status != boost::beast::http::status::ok)
++ {
++ BMCWEB_LOG_ERROR << "Failed to retrieve URI to dbus "
++ "sensors map with err "
++ << static_cast<unsigned>(status);
++ callback(boost::system::errc::make_error_code(
++ boost::system::errc::io_error),
++ {});
++ return;
++ }
++
++ callback(boost::system::errc::make_error_code(
++ boost::system::errc::success),
++ uriToDbus);
++ };
++
++ for (const std::string& chassisName : chassisNames)
++ {
++ for (const auto& [sensorNode, dbusPaths] : sensors::dbus::paths)
++ {
++ retrieveUriToDbusMap(chassisName, sensorNode.data(),
++ handleRetrieveUriToDbusMap);
++ }
++ }
++ });
++}
++
+} // namespace telemetry
+
+inline void requestRoutesMetricDefinitionCollection(App& app)
+{
+ BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/MetricDefinitions/")
-+ .privileges({{"Login"}})
++ .privileges(privileges::getTelemetryService)
+ .methods(boost::beast::http::verb::get)(
+ [](const crow::Request&,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
++ telemetry::mapRedfishUriToDbusPath(
++ [asyncResp](boost::system::error_code ec,
++ const boost::container::flat_map<
++ std::string, std::string>& uriToDbus) {
++ if (ec)
++ {
++ messages::internalError(asyncResp->res);
++ BMCWEB_LOG_ERROR
++ << "mapRedfishUriToDbusPath error: "
++ << ec.value();
++ return;
++ }
++
++ telemetry::addMembers(asyncResp->res, uriToDbus);
++ });
++
+ asyncResp->res.jsonValue["@odata.type"] =
+ "#MetricDefinitionCollection."
+ "MetricDefinitionCollection";
@@ -211,49 +366,6 @@ index 0000000..2443996
+ "Metric Definition Collection";
+ asyncResp->res.jsonValue["Members"] = nlohmann::json::array();
+ asyncResp->res.jsonValue["Members@odata.count"] = 0;
-+
-+ utils::getChassisNames(
-+ [asyncResp](boost::system::error_code ec,
-+ const std::vector<std::string>& chassisNames) {
-+ if (ec)
-+ {
-+ messages::internalError(asyncResp->res);
-+ BMCWEB_LOG_ERROR << "getChassisNames error: "
-+ << ec.value();
-+ return;
-+ }
-+
-+ auto handleRetrieveUriToDbusMap =
-+ [asyncResp](
-+ const boost::beast::http::status status,
-+ const boost::container::flat_map<
-+ std::string, std::string>& uriToDbus) {
-+ if (status != boost::beast::http::status::ok)
-+ {
-+ BMCWEB_LOG_ERROR
-+ << "Failed to retrieve URI to dbus "
-+ "sensors map with err "
-+ << static_cast<unsigned>(status);
-+ messages::internalError(asyncResp->res);
-+ return;
-+ }
-+ telemetry::addMembers(asyncResp->res,
-+ uriToDbus);
-+ };
-+
-+ for (const std::string& chassisName : chassisNames)
-+ {
-+ for (const auto& [sensorNode, _] :
-+ sensors::dbus::paths)
-+ {
-+ BMCWEB_LOG_DEBUG << "Chassis: " << chassisName
-+ << " sensor: " << sensorNode;
-+ retrieveUriToDbusMap(
-+ chassisName, sensorNode.data(),
-+ handleRetrieveUriToDbusMap);
-+ }
-+ }
-+ });
+ });
+}
+
@@ -298,12 +410,29 @@ index 0000000..2443996
+ }
+}
+
++inline const char* readingTypeToReadingUnits(const std::string& readingType)
++{
++ for (const auto& [node, paths] : sensors::dbus::paths)
++ {
++ for (const char* path : paths)
++ {
++ const sdbusplus::message::object_path sensorPath =
++ sdbusplus::message::object_path(path);
++ if (sensors::toReadingType(sensorPath.filename()) == readingType)
++ {
++ return sensors::toReadingUnits(sensorPath.filename());
++ }
++ }
++ }
++ return "";
++}
++
+} // namespace telemetry
+
+inline void requestRoutesMetricDefinition(App& app)
+{
+ BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/MetricDefinitions/<str>/")
-+ .privileges({{"Login"}})
++ .privileges(privileges::getTelemetryService)
+ .methods(boost::beast::http::verb::get)(
+ [](const crow::Request&,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -315,142 +444,41 @@ index 0000000..2443996
+ return;
+ }
+
-+ asyncResp->res.jsonValue["MetricProperties"] =
-+ nlohmann::json::array();
-+ asyncResp->res.jsonValue["Id"] = readingType;
-+ asyncResp->res.jsonValue["Name"] = readingType;
-+ asyncResp->res.jsonValue["@odata.id"] =
-+ telemetry::metricDefinitionUri + readingType;
-+ asyncResp->res.jsonValue["@odata.type"] =
-+ "#MetricDefinition.v1_0_3.MetricDefinition";
-+ asyncResp->res.jsonValue["MetricDataType"] = "Decimal";
-+ asyncResp->res.jsonValue["MetricType"] = "Numeric";
-+ asyncResp->res.jsonValue["IsLinear"] = true;
-+ asyncResp->res.jsonValue["Implementation"] = "PhysicalSensor";
-+ asyncResp->res.jsonValue["Units"] =
-+ sensors::toReadingUnits(readingType);
-+
-+ utils::getChassisNames(
-+ [asyncResp, readingType](
-+ boost::system::error_code ec,
-+ const std::vector<std::string>& chassisNames) {
++ telemetry::mapRedfishUriToDbusPath(
++ [asyncResp,
++ readingType](boost::system::error_code ec,
++ const boost::container::flat_map<
++ std::string, std::string>& uriToDbus) {
+ if (ec)
+ {
+ messages::internalError(asyncResp->res);
-+ BMCWEB_LOG_ERROR << "getChassisNames error: "
-+ << ec.value();
++ BMCWEB_LOG_ERROR
++ << "mapRedfishUriToDbusPath error: "
++ << ec.value();
+ return;
+ }
+
-+ auto handleRetrieveUriToDbusMap =
-+ [asyncResp, readingType](
-+ const boost::beast::http::status status,
-+ const boost::container::flat_map<
-+ std::string, std::string>& uriToDbus) {
-+ if (status != boost::beast::http::status::ok)
-+ {
-+ BMCWEB_LOG_ERROR
-+ << "Failed to retrieve URI to dbus "
-+ "sensors map with err "
-+ << static_cast<unsigned>(status);
-+ messages::internalError(asyncResp->res);
-+ return;
-+ }
-+ telemetry::addMetricProperty(
-+ *asyncResp, readingType, uriToDbus);
-+ };
-+
-+ for (const std::string& chassisName : chassisNames)
-+ {
-+ for (const auto& [sensorNode, dbusPaths] :
-+ sensors::dbus::paths)
-+ {
-+ retrieveUriToDbusMap(
-+ chassisName, sensorNode.data(),
-+ handleRetrieveUriToDbusMap);
-+ }
-+ }
++ asyncResp->res.jsonValue["Id"] = readingType;
++ asyncResp->res.jsonValue["Name"] = readingType;
++ asyncResp->res.jsonValue["@odata.id"] =
++ telemetry::metricDefinitionUri + readingType;
++ asyncResp->res.jsonValue["@odata.type"] =
++ "#MetricDefinition.v1_0_3.MetricDefinition";
++ asyncResp->res.jsonValue["MetricDataType"] = "Decimal";
++ asyncResp->res.jsonValue["MetricType"] = "Numeric";
++ asyncResp->res.jsonValue["IsLinear"] = true;
++ asyncResp->res.jsonValue["Implementation"] =
++ "PhysicalSensor";
++ asyncResp->res.jsonValue["Units"] =
++ telemetry::readingTypeToReadingUnits(readingType);
++
++ telemetry::addMetricProperty(*asyncResp, readingType,
++ uriToDbus);
+ });
+ });
+}
+
+} // namespace redfish
-diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
-index d986565..bccbb94 100644
---- a/redfish-core/lib/sensors.hpp
-+++ b/redfish-core/lib/sensors.hpp
-@@ -111,46 +111,47 @@ inline const char* toReadingType(const std::string& sensorType)
- return "";
- }
-
--inline const char* toReadingUnits(const std::string& sensorType)
-+inline const char* toReadingUnits(const std::string& readingType)
- {
-- if (sensorType == "voltage")
-+ if (readingType == "Voltage")
- {
- return "V";
- }
-- if (sensorType == "power")
-+ if (readingType == "Power")
- {
- return "W";
- }
-- if (sensorType == "current")
-+ if (readingType == "Current")
- {
- return "A";
- }
-- if (sensorType == "fan_tach")
-+ if (readingType == "Rotational")
- {
- return "RPM";
- }
-- if (sensorType == "temperature")
-+ if (readingType == "Temperature")
- {
- return "Cel";
- }
-- if (sensorType == "fan_pwm" || sensorType == "utilization")
-+ if (readingType == "Percent")
- {
- return "%";
- }
-- if (sensorType == "altitude")
-+ if (readingType == "Altitude")
- {
- return "m";
- }
-- if (sensorType == "airflow")
-+ if (readingType == "AirFlow")
- {
- return "cft_i/min";
- }
-- if (sensorType == "energy")
-+ if (readingType == "EnergyJoules")
- {
- return "J";
- }
- return "";
- }
-+
- } // namespace sensors
-
- /**
-@@ -953,11 +954,11 @@ inline void objectInterfacesToJson(
- sensorJson["ReadingType"] = readingType;
- }
-
-- const std::string& readingUnits = sensors::toReadingUnits(sensorType);
-+ const std::string& readingUnits = sensors::toReadingUnits(readingType);
- if (readingUnits.empty())
- {
- BMCWEB_LOG_ERROR << "Redfish cannot map reading unit for "
-- << sensorType;
-+ << readingType;
- }
- else
- {
diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp
index ad86d5c..c4962e9 100644
--- a/redfish-core/lib/telemetry_service.hpp
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch
index 0ca58a114..d32c85356 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch
@@ -1,4 +1,4 @@
-From 277d261ef3b1723c9d198baf4b84d2e01a7460b8 Mon Sep 17 00:00:00 2001
+From 77e8a0b5037a555b1520823b667595ac8780c675 Mon Sep 17 00:00:00 2001
From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
Date: Tue, 15 Dec 2020 12:30:31 +0100
Subject: [PATCH] Sync Telmetry service with EventService
@@ -22,7 +22,7 @@ Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
2 files changed, 69 insertions(+), 115 deletions(-)
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 11190ef..ffe9435 100644
+index d89b789..4faaddd 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -14,6 +14,7 @@
@@ -33,7 +33,7 @@ index 11190ef..ffe9435 100644
#include "registries.hpp"
#include "registries/base_message_registry.hpp"
#include "registries/openbmc_message_registry.hpp"
-@@ -522,47 +523,32 @@ class Subscription
+@@ -511,47 +512,32 @@ class Subscription : public persistent_data::UserSubscription
}
#endif
@@ -92,7 +92,7 @@ index 11190ef..ffe9435 100644
this->sendEvent(
msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
}
-@@ -1358,75 +1344,6 @@ class EventServiceManager
+@@ -1317,75 +1303,6 @@ class EventServiceManager
}
#endif
@@ -168,7 +168,7 @@ index 11190ef..ffe9435 100644
void unregisterMetricReportSignal()
{
if (matchTelemetryMonitor)
-@@ -1446,9 +1363,11 @@ class EventServiceManager
+@@ -1405,9 +1322,11 @@ class EventServiceManager
}
BMCWEB_LOG_DEBUG << "Metrics report signal - Register";
@@ -183,7 +183,7 @@ index 11190ef..ffe9435 100644
matchTelemetryMonitor = std::make_shared<sdbusplus::bus::match::match>(
*crow::connections::systemBus, matchStr,
-@@ -1459,10 +1378,43 @@ class EventServiceManager
+@@ -1418,10 +1337,43 @@ class EventServiceManager
return;
}
@@ -232,10 +232,10 @@ index 11190ef..ffe9435 100644
}
diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp
-index 66f4f93..a43f6a6 100644
+index 63c8c19..7fe281d 100644
--- a/redfish-core/lib/metric_report.hpp
+++ b/redfish-core/lib/metric_report.hpp
-@@ -32,16 +32,14 @@ inline nlohmann::json toMetricValues(const Readings& readings)
+@@ -33,16 +33,14 @@ inline nlohmann::json toMetricValues(const Readings& readings)
return metricValues;
}
@@ -258,7 +258,7 @@ index 66f4f93..a43f6a6 100644
telemetry::metricReportDefinitionUri + id;
const TimestampReadings* timestampReadings =
-@@ -49,14 +47,14 @@ inline void fillReport(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+@@ -50,14 +48,14 @@ inline void fillReport(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
if (!timestampReadings)
{
BMCWEB_LOG_ERROR << "Property type mismatch or property is missing";
@@ -277,7 +277,7 @@ index 66f4f93..a43f6a6 100644
}
} // namespace telemetry
-@@ -117,7 +115,11 @@ inline void requestRoutesMetricReport(App& app)
+@@ -118,7 +116,11 @@ inline void requestRoutesMetricReport(App& app)
return;
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch
index 4e326ff88..20bcbabfa 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch
@@ -1,4 +1,4 @@
-From 51869fd549cd826981ad30c6cdea4c4e94a972db Mon Sep 17 00:00:00 2001
+From fca6f5b951a363916a83a25f6578f95a6cf32a3e Mon Sep 17 00:00:00 2001
From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Date: Thu, 17 Jun 2021 13:37:57 +0000
Subject: [PATCH] Switched bmcweb to use new telemetry service API
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch
index d3a7c0a35..3d60ae293 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch
@@ -1,4 +1,4 @@
-From d37ba16f837380ea5fbd7fae2d0f2e229c601754 Mon Sep 17 00:00:00 2001
+From 79b3d35b864a2b545b4c9b2ac9390ea5dec169f5 Mon Sep 17 00:00:00 2001
From: Szymon Dompke <szymon.dompke@intel.com>
Date: Mon, 28 Jun 2021 11:10:23 +0200
Subject: [PATCH] Add support for MetricDefinition property in MetricReport
@@ -73,10 +73,10 @@ Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
4 files changed, 95 insertions(+), 15 deletions(-)
diff --git a/meson.build b/meson.build
-index bdc514b..aadfd7d 100644
+index f6a66f1..6b5d9af 100644
--- a/meson.build
+++ b/meson.build
-@@ -354,6 +354,8 @@ srcfiles_unittest = ['include/ut/dbus_utility_test.cpp',
+@@ -355,6 +355,8 @@ srcfiles_unittest = ['include/ut/dbus_utility_test.cpp',
'redfish-core/ut/time_utils_test.cpp',
'http/ut/utility_test.cpp']
@@ -85,7 +85,7 @@ index bdc514b..aadfd7d 100644
# Gather the Configuration data
conf_data = configuration_data()
-@@ -411,7 +413,7 @@ executable('bmcweb',srcfiles_bmcweb,
+@@ -412,7 +414,7 @@ executable('bmcweb',srcfiles_bmcweb,
if(get_option('tests').enabled())
foreach src_test : srcfiles_unittest
testname = src_test.split('/')[-1].split('.')[0]
@@ -251,7 +251,7 @@ index 7fe281d..13bf792 100644
}
} // namespace telemetry
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
-index bccbb94..3e1d003 100644
+index cb7ea15..44c2129 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -21,6 +21,8 @@
@@ -265,4 +265,3 @@ index bccbb94..3e1d003 100644
--
2.25.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch
new file mode 100644
index 000000000..aabe500f5
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch
@@ -0,0 +1,132 @@
+From 4cf883dba6e16c56d04dbd092d30c9a13d5a5eb4 Mon Sep 17 00:00:00 2001
+From: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
+Date: Fri, 6 Aug 2021 15:15:17 +0200
+Subject: [PATCH] Add DELETE method for MetricReport
+
+Added DELETE method for removing Reports by using MetricReports uri;
+metric_report.hpp and metric_report_definition.hpp files are sharing
+now common lambda function for DELETE operations
+
+Tested on QEMU:
+- Added Reports and requested from bmcweb to delete them via
+ /redfish/v1/TelemetryService/MetricReports/<reportname> or via
+ /redfish/v1/TelemetryService/MetricReportDefinitions/<reportname>
+- Added two different reports via POST, deleted first of them via
+ MetricReports DELETE, checked by MetricReports GET if list of reports
+ contain only second report, deleted second report via MetricReports
+ DELETE and checked by MetricReports GET if list of reports is empty
+- Same as one above but using MetricReportDefinitions DELETE and GET
+
+Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
+Change-Id: I151bad363dcabd57246eb10b501abd24107b937e
+---
+ .../include/utils/telemetry_utils.hpp | 35 +++++++++++++++++++
+ redfish-core/lib/metric_report.hpp | 4 +++
+ redfish-core/lib/metric_report_definition.hpp | 34 +-----------------
+ 3 files changed, 40 insertions(+), 33 deletions(-)
+
+diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
+index 5872350..743585f 100644
+--- a/redfish-core/include/utils/telemetry_utils.hpp
++++ b/redfish-core/include/utils/telemetry_utils.hpp
+@@ -70,5 +70,40 @@ inline std::string getDbusReportPath(const std::string& id)
+ return path;
+ }
+
++inline std::function<void(const crow::Request&,
++ const std::shared_ptr<bmcweb::AsyncResp>&,
++ const std::string&)>
++ getMetricReportDeleteHandler(const std::string& type)
++{
++ return [type](const crow::Request&,
++ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const std::string& id) {
++ const std::string reportPath = getDbusReportPath(id);
++
++ crow::connections::systemBus->async_method_call(
++ [asyncResp, type, id](const boost::system::error_code ec) {
++ /*
++ * boost::system::errc and std::errc are missing value
++ * for EBADR error that is defined in Linux.
++ */
++ if (ec.value() == EBADR)
++ {
++ messages::resourceNotFound(asyncResp->res, type, id);
++ return;
++ }
++
++ if (ec)
++ {
++ BMCWEB_LOG_ERROR << "respHandler DBus error " << ec;
++ messages::internalError(asyncResp->res);
++ return;
++ }
++
++ asyncResp->res.result(boost::beast::http::status::no_content);
++ },
++ service, reportPath, "xyz.openbmc_project.Object.Delete", "Delete");
++ };
++}
++
+ } // namespace telemetry
+ } // namespace redfish
+diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp
+index 63c8c19..60ce74e 100644
+--- a/redfish-core/lib/metric_report.hpp
++++ b/redfish-core/lib/metric_report.hpp
+@@ -127,5 +127,9 @@ inline void requestRoutesMetricReport(App& app)
+ telemetry::service, reportPath, telemetry::reportInterface,
+ "Update");
+ });
++ BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/MetricReports/<str>/")
++ .privileges(redfish::privileges::deleteMetricReport)
++ .methods(boost::beast::http::verb::delete_)(
++ telemetry::getMetricReportDeleteHandler("MetricReports"));
+ }
+ } // namespace redfish
+diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
+index a0c4f1d..e0505e5 100644
+--- a/redfish-core/lib/metric_report_definition.hpp
++++ b/redfish-core/lib/metric_report_definition.hpp
+@@ -450,38 +450,6 @@ inline void requestRoutesMetricReportDefinition(App& app)
+ "/redfish/v1/TelemetryService/MetricReportDefinitions/<str>/")
+ .privileges(redfish::privileges::deleteMetricReportDefinitionCollection)
+ .methods(boost::beast::http::verb::delete_)(
+- [](const crow::Request&,
+- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+- const std::string& id)
+-
+- {
+- const std::string reportPath = telemetry::getDbusReportPath(id);
+-
+- crow::connections::systemBus->async_method_call(
+- [asyncResp, id](const boost::system::error_code ec) {
+- /*
+- * boost::system::errc and std::errc are missing value
+- * for EBADR error that is defined in Linux.
+- */
+- if (ec.value() == EBADR)
+- {
+- messages::resourceNotFound(
+- asyncResp->res, "MetricReportDefinition", id);
+- return;
+- }
+-
+- if (ec)
+- {
+- BMCWEB_LOG_ERROR << "respHandler DBus error " << ec;
+- messages::internalError(asyncResp->res);
+- return;
+- }
+-
+- asyncResp->res.result(
+- boost::beast::http::status::no_content);
+- },
+- telemetry::service, reportPath,
+- "xyz.openbmc_project.Object.Delete", "Delete");
+- });
++ telemetry::getMetricReportDeleteHandler("MetricReportDefinition"));
+ }
+ } // namespace redfish
+--
+2.25.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch
new file mode 100644
index 000000000..0646aba5c
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch
@@ -0,0 +1,313 @@
+From a1e89d356ba5ed594a1494efe8257946e1062396 Mon Sep 17 00:00:00 2001
+From: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
+Date: Tue, 31 Aug 2021 14:35:31 +0200
+Subject: [PATCH] Add GET method for TriggerCollection
+
+Added GET method for retrieving list of Triggers from Telemetry service
+
+Tested:
+- Added single Trigger and requested result from bmcweb via
+ /redfish/v1/TelemetryService/Triggers
+- Added multiple Triggers numeric and discrete, and requested results
+ from bmcweb via /redfish/v1/TelemetryService/Triggers
+- Verified uri /redfish/v1/TelemetryService/Triggers by using
+ Redfish-Service-Validator (all passed)
+
+Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
+Change-Id: Ide00eb44901ea1b97b80fc5c5ddfd97e393d4a04
+---
+ redfish-core/include/redfish.hpp | 2 +
+ .../include/utils/telemetry_utils.hpp | 40 ++++++++---
+ redfish-core/lib/metric_report.hpp | 6 +-
+ redfish-core/lib/metric_report_definition.hpp | 6 +-
+ redfish-core/lib/trigger.hpp | 31 ++++++++
+ scripts/update_schemas.py | 1 +
+ static/redfish/v1/$metadata/index.xml | 3 +
+ .../v1/schema/TriggersCollection_v1.xml | 70 +++++++++++++++++++
+ 8 files changed, 144 insertions(+), 15 deletions(-)
+ create mode 100644 redfish-core/lib/trigger.hpp
+ create mode 100644 static/redfish/v1/schema/TriggersCollection_v1.xml
+
+diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
+index 9fb0ffe..99b3fe6 100644
+--- a/redfish-core/include/redfish.hpp
++++ b/redfish-core/include/redfish.hpp
+@@ -42,6 +42,7 @@
+ #include "../lib/task.hpp"
+ #include "../lib/telemetry_service.hpp"
+ #include "../lib/thermal.hpp"
++#include "../lib/trigger.hpp"
+ #include "../lib/update_service.hpp"
+ #include "../lib/virtual_media.hpp"
+
+@@ -197,6 +198,7 @@ class RedfishService
+
+ hypervisor::requestRoutesHypervisorSystems(app);
+
++ requestRoutesTriggerCollection(app);
+ requestRoutesTelemetryService(app);
+ requestRoutesMetricReportDefinitionCollection(app);
+ requestRoutesMetricReportDefinition(app);
+diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
+index c0c5ba3..df1aa68 100644
+--- a/redfish-core/include/utils/telemetry_utils.hpp
++++ b/redfish-core/include/utils/telemetry_utils.hpp
+@@ -9,6 +9,8 @@ namespace telemetry
+ {
+
+ constexpr const char* service = "xyz.openbmc_project.Telemetry";
++constexpr const char* reportSubtree =
++ "/xyz/openbmc_project/Telemetry/Reports/TelemetryService";
+ constexpr const char* reportInterface = "xyz.openbmc_project.Telemetry.Report";
+ constexpr const char* metricDefinitionUri =
+ "/redfish/v1/TelemetryService/MetricDefinitions/";
+@@ -16,6 +18,11 @@ constexpr const char* metricReportDefinitionUri =
+ "/redfish/v1/TelemetryService/MetricReportDefinitions/";
+ constexpr const char* metricReportUri =
+ "/redfish/v1/TelemetryService/MetricReports/";
++constexpr const char* triggerSubtree =
++ "/xyz/openbmc_project/Telemetry/Triggers/TelemetryService";
++constexpr const char* triggerInterface =
++ "xyz.openbmc_project.Telemetry.Trigger";
++constexpr const char* triggerUri = "/redfish/v1/TelemetryService/Triggers/";
+
+ inline std::optional<nlohmann::json>
+ getMetadataJson(const std::string& metadataStr)
+@@ -57,15 +64,27 @@ inline std::optional<std::string>
+ return res;
+ }
+
+-inline void
+- getReportCollection(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+- const std::string& uri)
++struct CollectionParams
+ {
+- const std::array<const char*, 1> interfaces = {reportInterface};
++ const char* subtree;
++ int depth;
++ std::array<const char*, 1> interfaces;
+
++ CollectionParams() = delete;
++ CollectionParams(const char* st, int dp,
++ const std::array<const char*, 1>& ifaces) :
++ subtree{st},
++ depth{dp}, interfaces{ifaces}
++ {}
++};
++
++inline void getCollection(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
++ const std::string& uri,
++ const CollectionParams& params)
++{
+ crow::connections::systemBus->async_method_call(
+ [asyncResp, uri](const boost::system::error_code ec,
+- const std::vector<std::string>& reports) {
++ const std::vector<std::string>& items) {
+ if (ec == boost::system::errc::io_error)
+ {
+ asyncResp->res.jsonValue["Members"] = nlohmann::json::array();
+@@ -82,13 +101,13 @@ inline void
+ nlohmann::json& members = asyncResp->res.jsonValue["Members"];
+ members = nlohmann::json::array();
+
+- for (const std::string& report : reports)
++ for (const std::string& item : items)
+ {
+- sdbusplus::message::object_path path(report);
++ sdbusplus::message::object_path path(item);
+ std::string name = path.filename();
+ if (name.empty())
+ {
+- BMCWEB_LOG_ERROR << "Received invalid path: " << report;
++ BMCWEB_LOG_ERROR << "Received invalid path: " << item;
+ messages::internalError(asyncResp->res);
+ return;
+ }
+@@ -99,9 +118,8 @@ inline void
+ },
+ "xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+- "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths",
+- "/xyz/openbmc_project/Telemetry/Reports/TelemetryService", 1,
+- interfaces);
++ "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", params.subtree,
++ params.depth, params.interfaces);
+ }
+
+ inline std::string getDbusReportPath(const std::string& id)
+diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp
+index 13bf792..ea4cd62 100644
+--- a/redfish-core/lib/metric_report.hpp
++++ b/redfish-core/lib/metric_report.hpp
+@@ -108,8 +108,10 @@ inline void requestRoutesMetricReportCollection(App& app)
+ "/redfish/v1/TelemetryService/MetricReports";
+ asyncResp->res.jsonValue["Name"] = "Metric Report Collection";
+
+- telemetry::getReportCollection(asyncResp,
+- telemetry::metricReportUri);
++ telemetry::getCollection(
++ asyncResp, telemetry::metricReportUri,
++ telemetry::CollectionParams(telemetry::reportSubtree, 1,
++ {telemetry::reportInterface}));
+ });
+ }
+
+diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
+index 7c26787..c97a1df 100644
+--- a/redfish-core/lib/metric_report_definition.hpp
++++ b/redfish-core/lib/metric_report_definition.hpp
+@@ -377,8 +377,10 @@ inline void requestRoutesMetricReportDefinitionCollection(App& app)
+ asyncResp->res.jsonValue["Name"] =
+ "Metric Definition Collection";
+
+- telemetry::getReportCollection(
+- asyncResp, telemetry::metricReportDefinitionUri);
++ telemetry::getCollection(
++ asyncResp, telemetry::metricReportDefinitionUri,
++ telemetry::CollectionParams(telemetry::reportSubtree, 1,
++ {telemetry::reportInterface}));
+ });
+
+ BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/MetricReportDefinitions/")
+diff --git a/redfish-core/lib/trigger.hpp b/redfish-core/lib/trigger.hpp
+new file mode 100644
+index 0000000..681b3b4
+--- /dev/null
++++ b/redfish-core/lib/trigger.hpp
+@@ -0,0 +1,31 @@
++#pragma once
++
++#include "utils/telemetry_utils.hpp"
++
++#include <app.hpp>
++#include <registries/privilege_registry.hpp>
++
++namespace redfish
++{
++
++inline void requestRoutesTriggerCollection(App& app)
++{
++ BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/Triggers/")
++ .privileges(redfish::privileges::getTriggersCollection)
++ .methods(boost::beast::http::verb::get)(
++ [](const crow::Request&,
++ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
++ asyncResp->res.jsonValue["@odata.type"] =
++ "#TriggersCollection.TriggersCollection";
++ asyncResp->res.jsonValue["@odata.id"] =
++ "/redfish/v1/TelemetryService/Triggers";
++ asyncResp->res.jsonValue["Name"] = "Triggers Collection";
++
++ telemetry::getCollection(
++ asyncResp, telemetry::triggerUri,
++ telemetry::CollectionParams(telemetry::triggerSubtree, 1,
++ {telemetry::triggerInterface}));
++ });
++}
++
++} // namespace redfish
+diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
+index dd39278..d66a59a 100755
+--- a/scripts/update_schemas.py
++++ b/scripts/update_schemas.py
+@@ -93,6 +93,7 @@ include_list = [
+ 'TaskService',
+ 'TelemetryService',
+ 'Thermal',
++ 'TriggersCollection',
+ 'UpdateService',
+ 'VLanNetworkInterfaceCollection',
+ 'VLanNetworkInterface',
+diff --git a/static/redfish/v1/$metadata/index.xml b/static/redfish/v1/$metadata/index.xml
+index 876ebfb..75e3dd4 100644
+--- a/static/redfish/v1/$metadata/index.xml
++++ b/static/redfish/v1/$metadata/index.xml
+@@ -2215,6 +2215,9 @@
+ <edmx:Include Namespace="Thermal.v1_7_0"/>
+ <edmx:Include Namespace="Thermal.v1_7_1"/>
+ </edmx:Reference>
++ <edmx:Reference Uri="/redfish/v1/schema/TriggersCollection_v1.xml">
++ <edmx:Include Namespace="TriggersCollection"/>
++ </edmx:Reference>
+ <edmx:Reference Uri="/redfish/v1/schema/UpdateService_v1.xml">
+ <edmx:Include Namespace="UpdateService"/>
+ <edmx:Include Namespace="UpdateService.v1_0_0"/>
+diff --git a/static/redfish/v1/schema/TriggersCollection_v1.xml b/static/redfish/v1/schema/TriggersCollection_v1.xml
+new file mode 100644
+index 0000000..399bebd
+--- /dev/null
++++ b/static/redfish/v1/schema/TriggersCollection_v1.xml
+@@ -0,0 +1,70 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!---->
++<!--################################################################################ -->
++<!--# Redfish Schema: TriggerSetCollection -->
++<!--# -->
++<!--# For a detailed change log, see the README file contained in the DSP8010 bundle, -->
++<!--# available at http://www.dmtf.org/standards/redfish -->
++<!--# Copyright 2014-2021 DMTF. -->
++<!--# For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright -->
++<!--################################################################################ -->
++<!---->
++<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
++
++ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml">
++ <edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Capabilities.V1.xml">
++ <edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
++ <edmx:Include Namespace="Resource.v1_0_0"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
++ <edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Triggers_v1.xml">
++ <edmx:Include Namespace="Triggers"/>
++ </edmx:Reference>
++
++ <edmx:DataServices>
++
++ <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="TriggersCollection">
++ <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
++
++ <EntityType Name="TriggersCollection" BaseType="Resource.v1_0_0.ResourceCollection">
++ <Annotation Term="OData.Description" String="The collection of Triggers resource instances."/>
++ <Annotation Term="OData.LongDescription" String="This resource shall represent a resource collection of Triggers instances for a Redfish implementation."/>
++ <Annotation Term="Capabilities.InsertRestrictions">
++ <Record>
++ <PropertyValue Property="Insertable" Bool="true"/>
++ <Annotation Term="OData.Description" String="Create triggers through a POST to the trigger collection."/>
++ </Record>
++ </Annotation>
++ <Annotation Term="Capabilities.UpdateRestrictions">
++ <Record>
++ <PropertyValue Property="Updatable" Bool="false"/>
++ </Record>
++ </Annotation>
++ <Annotation Term="Capabilities.DeleteRestrictions">
++ <Record>
++ <PropertyValue Property="Deletable" Bool="false"/>
++ </Record>
++ </Annotation>
++ <Annotation Term="Redfish.Uris">
++ <Collection>
++ <String>/redfish/v1/TelemetryService/Triggers</String>
++ </Collection>
++ </Annotation>
++ <NavigationProperty Name="Members" Type="Collection(Triggers.Triggers)">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="The members of this collection."/>
++ <Annotation Term="OData.LongDescription" String="This property shall contain an array of links to the members of this collection."/>
++ <Annotation Term="OData.AutoExpandReferences"/>
++ <Annotation Term="Redfish.Required"/>
++ </NavigationProperty>
++ </EntityType>
++
++ </Schema>
++ </edmx:DataServices>
++</edmx:Edmx>
+--
+2.25.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch
deleted file mode 100644
index 1cdd59d4b..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch
+++ /dev/null
@@ -1,168 +0,0 @@
-From 872a7bdb9c272944914d7c5babc751e6bb33afec Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Adrian=20Ambro=C5=BCewicz?= <adrian.ambrozewicz@intel.com>
-Date: Tue, 3 Aug 2021 13:59:31 +0200
-Subject: [PATCH] Generalize ReadingType in MetricDefinition
-
-Recent addition of PMT required adding new type of sensor 'count', which
-doesnt comply with any of Redfish-defined Sensor.ReadingType values.
-
-To support property of this kind MetricDefinition implementation was
-altered to support sensor types not covered by Redfish types by
-a 'fallback' to direct usage of sensor type. Populating 'Units' was also
-modified, so it won't be shown if value does not have any units mapped.
-
-Testing:
-- PMT counters are shown properly in MetricDefinitions/Count
-- Redfish Validator passes
----
- redfish-core/lib/metric_definition.hpp | 63 ++++++++++++++++----------
- 1 file changed, 39 insertions(+), 24 deletions(-)
-
-diff --git a/redfish-core/lib/metric_definition.hpp b/redfish-core/lib/metric_definition.hpp
-index 2443996..fcab44d 100644
---- a/redfish-core/lib/metric_definition.hpp
-+++ b/redfish-core/lib/metric_definition.hpp
-@@ -11,6 +11,18 @@ namespace redfish
- namespace telemetry
- {
-
-+std::string groupName(const std::string& sensorType)
-+{
-+ std::string group = sensors::toReadingType(sensorType);
-+ if (group.empty())
-+ {
-+ // Fallback for types not covered by standard Redfish Sensor.ReadingType
-+ group = sensorType;
-+ group[0] = static_cast<char>(std::toupper(group[0]));
-+ }
-+ return group;
-+}
-+
- void addMembers(crow::Response& res,
- const boost::container::flat_map<std::string, std::string>& el)
- {
-@@ -30,8 +42,7 @@ void addMembers(crow::Response& res,
- nlohmann::json& members = res.jsonValue["Members"];
-
- const std::string odataId =
-- std::string(telemetry::metricDefinitionUri) +
-- sensors::toReadingType(type);
-+ std::string(telemetry::metricDefinitionUri) + groupName(type);
-
- const auto it = std::find_if(members.begin(), members.end(),
- [&odataId](const nlohmann::json& item) {
-@@ -125,15 +136,15 @@ inline void requestRoutesMetricDefinitionCollection(App& app)
- namespace telemetry
- {
-
--bool isSensorIdSupported(std::string_view readingType)
-+bool isSensorIdSupported(std::string_view group)
- {
- for (const std::pair<std::string_view, std::vector<const char*>>&
- typeToPaths : sensors::dbus::paths)
- {
- for (const char* supportedPath : typeToPaths.second)
- {
-- if (readingType ==
-- sensors::toReadingType(
-+ if (group ==
-+ groupName(
- sdbusplus::message::object_path(supportedPath).filename()))
- {
- return true;
-@@ -144,7 +155,7 @@ bool isSensorIdSupported(std::string_view readingType)
- }
-
- void addMetricProperty(
-- bmcweb::AsyncResp& asyncResp, const std::string& readingType,
-+ bmcweb::AsyncResp& asyncResp, const std::string& group,
- const boost::container::flat_map<std::string, std::string>& el)
- {
- nlohmann::json& metricProperties =
-@@ -155,7 +166,7 @@ void addMetricProperty(
- std::string sensorId;
- if (dbus::utility::getNthStringFromPath(dbusSensor, 3, sensorId))
- {
-- if (sensors::toReadingType(sensorId) == readingType)
-+ if (groupName(sensorId) == group)
- {
- metricProperties.push_back(redfishSensor);
- }
-@@ -172,33 +183,37 @@ inline void requestRoutesMetricDefinition(App& app)
- .methods(boost::beast::http::verb::get)(
- [](const crow::Request&,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
-- const std::string& readingType) {
-- if (!telemetry::isSensorIdSupported(readingType))
-+ const std::string& group) {
-+ if (!telemetry::isSensorIdSupported(group))
- {
- messages::resourceNotFound(asyncResp->res,
-- "MetricDefinition", readingType);
-+ "MetricDefinition", group);
- return;
- }
-
- asyncResp->res.jsonValue["MetricProperties"] =
- nlohmann::json::array();
-- asyncResp->res.jsonValue["Id"] = readingType;
-- asyncResp->res.jsonValue["Name"] = readingType;
-+ asyncResp->res.jsonValue["Id"] = group;
-+ asyncResp->res.jsonValue["Name"] = group;
- asyncResp->res.jsonValue["@odata.id"] =
-- telemetry::metricDefinitionUri + readingType;
-+ telemetry::metricDefinitionUri + group;
- asyncResp->res.jsonValue["@odata.type"] =
- "#MetricDefinition.v1_0_3.MetricDefinition";
- asyncResp->res.jsonValue["MetricDataType"] = "Decimal";
- asyncResp->res.jsonValue["MetricType"] = "Numeric";
- asyncResp->res.jsonValue["IsLinear"] = true;
- asyncResp->res.jsonValue["Implementation"] = "PhysicalSensor";
-- asyncResp->res.jsonValue["Units"] =
-- sensors::toReadingUnits(readingType);
-+
-+ std::string readingUnits = sensors::toReadingUnits(group);
-+ if (!readingUnits.empty())
-+ {
-+ asyncResp->res.jsonValue["Units"] = readingUnits;
-+ }
-
- utils::getChassisNames(
-- [asyncResp, readingType](
-- boost::system::error_code ec,
-- const std::vector<std::string>& chassisNames) {
-+ [asyncResp,
-+ group](boost::system::error_code ec,
-+ const std::vector<std::string>& chassisNames) {
- if (ec)
- {
- messages::internalError(asyncResp->res);
-@@ -208,10 +223,10 @@ inline void requestRoutesMetricDefinition(App& app)
- }
-
- auto handleRetrieveUriToDbusMap =
-- [asyncResp, readingType](
-- const boost::beast::http::status status,
-- const boost::container::flat_map<
-- std::string, std::string>& uriToDbus) {
-+ [asyncResp,
-+ group](const boost::beast::http::status status,
-+ const boost::container::flat_map<
-+ std::string, std::string>& uriToDbus) {
- if (status != boost::beast::http::status::ok)
- {
- BMCWEB_LOG_ERROR
-@@ -221,8 +236,8 @@ inline void requestRoutesMetricDefinition(App& app)
- messages::internalError(asyncResp->res);
- return;
- }
-- telemetry::addMetricProperty(
-- *asyncResp, readingType, uriToDbus);
-+ telemetry::addMetricProperty(*asyncResp, group,
-+ uriToDbus);
- };
-
- for (const std::string& chassisName : chassisNames)
---
-2.25.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch
index 987a43b4c..987a43b4c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-event-service-fix-added-Context-field-to-response.patch
index ffab743f6..ffab743f6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-event-service-fix-added-Context-field-to-response.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch
new file mode 100644
index 000000000..bd6e64346
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch
@@ -0,0 +1,93 @@
+From d9baec3ccdff5ed4d1620f374a252c769de5b45b Mon Sep 17 00:00:00 2001
+From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
+Date: Thu, 19 Aug 2021 10:55:38 +0000
+Subject: [PATCH] Generalize ReadingType in MetricDefinition
+
+Recent addition of PMT required adding new type of sensor 'count', which
+doesnt comply with any of Redfish-defined Sensor.ReadingType values.
+
+To support property of this kind MetricDefinition implementation was
+altered to support sensor types not covered by Redfish types by
+a 'fallback' to direct usage of sensor type. Populating 'Units' was also
+modified, so it won't be shown if value does not have any units mapped.
+
+Testing:
+- PMT counters are shown properly in MetricDefinitions/Count
+- Redfish Validator passes
+---
+ redfish-core/lib/metric_definition.hpp | 25 ++++++++++++++++++-------
+ 1 file changed, 18 insertions(+), 7 deletions(-)
+
+diff --git a/redfish-core/lib/metric_definition.hpp b/redfish-core/lib/metric_definition.hpp
+index 019168b..df29b65 100644
+--- a/redfish-core/lib/metric_definition.hpp
++++ b/redfish-core/lib/metric_definition.hpp
+@@ -33,6 +33,18 @@ bool containsOdata(const nlohmann::json& json, const std::string& odataId)
+ return it != json.end();
+ }
+
++std::string groupName(const std::string& sensorType)
++{
++ std::string group = sensors::toReadingType(sensorType);
++ if (group.empty())
++ {
++ // Fallback for types not covered by standard Redfish Sensor.ReadingType
++ group = sensorType;
++ group[0] = static_cast<char>(std::toupper(group[0]));
++ }
++ return group;
++}
++
+ void addMembers(crow::Response& res,
+ const boost::container::flat_map<std::string, std::string>& el)
+ {
+@@ -52,8 +64,7 @@ void addMembers(crow::Response& res,
+ nlohmann::json& members = res.jsonValue["Members"];
+
+ const std::string odataId =
+- std::string(telemetry::metricDefinitionUri) +
+- sensors::toReadingType(type);
++ std::string(telemetry::metricDefinitionUri) + groupName(type);
+
+ if (!containsOdata(members, odataId))
+ {
+@@ -149,15 +160,15 @@ inline void requestRoutesMetricDefinitionCollection(App& app)
+ namespace telemetry
+ {
+
+-bool isSensorIdSupported(std::string_view readingType)
++bool isSensorIdSupported(std::string_view group)
+ {
+ for (const std::pair<std::string_view, std::vector<const char*>>&
+ typeToPaths : sensors::dbus::paths)
+ {
+ for (const char* supportedPath : typeToPaths.second)
+ {
+- if (readingType ==
+- sensors::toReadingType(
++ if (group ==
++ groupName(
+ sdbusplus::message::object_path(supportedPath).filename()))
+ {
+ return true;
+@@ -168,7 +179,7 @@ bool isSensorIdSupported(std::string_view readingType)
+ }
+
+ void addMetricProperty(
+- bmcweb::AsyncResp& asyncResp, const std::string& readingType,
++ bmcweb::AsyncResp& asyncResp, const std::string& group,
+ const boost::container::flat_map<std::string, std::string>& el)
+ {
+ nlohmann::json& metricProperties =
+@@ -179,7 +190,7 @@ void addMetricProperty(
+ std::string sensorId;
+ if (dbus::utility::getNthStringFromPath(dbusSensor, 3, sensorId))
+ {
+- if (sensors::toReadingType(sensorId) == readingType)
++ if (groupName(sensorId) == group)
+ {
+ metricProperties.push_back(redfishSensor);
+ }
+--
+2.25.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README
index cd15a815c..8dab07e2b 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README
@@ -3,22 +3,28 @@ Until change is integrated they will be manually merged here to enable feature i
Current revisions:
- Add support for MetricDefinition scheme
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/89
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/93
- Sync Telmetry service with EventService
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/36
-
-- LogService field, actual implementation will be upstreamed with triggers feature
- file://telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch
-
-- Event service fix for Context field
- file://telemetry/0004-event-service-fix-added-Context-field-to-response.patch
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/40
- Switched bmcweb to use new telemetry service API
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44270/4
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44270/5
- Add support for MetricDefinition property in MetricReport
- https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44512/8
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44512/9
+
+- Add DELETE method for MetricReport
+ https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/45688/5
+
+- Add GET method for TriggerCollection
+ file://telemetry/0006-Add-GET-method-for-TriggerCollection.patch
+
+- LogService field, actual implementation will be upstreamed with triggers feature
+ file://telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch
+
+- Event service fix for Context field
+ file://telemetry/0008-event-service-fix-added-Context-field-to-response.patch
- Generalize ReadingType in MetricDefinition
- file://telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch \ No newline at end of file
+ file://telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch
index b29082dce..439b05b3c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch
@@ -1,4 +1,4 @@
-From 95f7ca477a8353fa7b99f463de9ee310dda13735 Mon Sep 17 00:00:00 2001
+From 437a2a854303ed4e05344684b1990806464268cd Mon Sep 17 00:00:00 2001
From: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Date: Thu, 1 Jul 2021 10:08:27 +0000
Subject: [PATCH] Invalid status code from InsertMedia REST methods GET, PUT,
@@ -10,15 +10,16 @@ Not allowed for Legacy and Not found for Proxy.
Change-Id: Ib4c0a3e9a2a8853caa74c59239d9fcfed99c5e8b
Signed-off-by: Alicja Rybak <alicja.rybak@intel.com>
+Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
---
- redfish-core/lib/virtual_media.hpp | 129 +++++++++++++++++++++++++++++
- 1 file changed, 129 insertions(+)
+ redfish-core/lib/virtual_media.hpp | 137 +++++++++++++++++++++++++++++
+ 1 file changed, 137 insertions(+)
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
-index a834c69..186c04b 100644
+index 3b9f7ef..7d77b9f 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
-@@ -28,6 +28,109 @@
+@@ -30,6 +30,117 @@
namespace redfish
{
@@ -50,6 +51,14 @@ index a834c69..186c04b 100644
+
+ return;
+ }
++
++ if (getObjectType.size() == 0)
++ {
++ BMCWEB_LOG_ERROR << "ObjectMapper : No Service found";
++ aResp->res.result(boost::beast::http::status::not_found);
++ return;
++ }
++
+ std::string service = getObjectType.begin()->first;
+ BMCWEB_LOG_DEBUG << "GetObjectType: " << service;
+
@@ -128,7 +137,7 @@ index a834c69..186c04b 100644
/**
* @brief Function extracts transfer protocol name from URI.
*/
-@@ -829,6 +932,32 @@ inline void doVmAction(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+@@ -844,6 +955,32 @@ inline void doVmAction(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
inline void requestNBDVirtualMediaRoutes(App& app)
{
@@ -160,7 +169,7 @@ index a834c69..186c04b 100644
+
BMCWEB_ROUTE(app, "/redfish/v1/Managers/<str>/VirtualMedia/<str>/Actions/"
"VirtualMedia.InsertMedia")
- .privileges({{"ConfigureManager"}})
+ .privileges(redfish::privileges::postVirtualMedia)
--
-2.25.1
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
index b448121bf..0a7d18085 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -1,16 +1,16 @@
SRC_URI = "git://github.com/openbmc/bmcweb.git"
-SRCREV = "e6a716506447d2d03b99f1cd2007e207a6dfcae0"
+SRCREV = "abb93cdd0a49be03bf2fe95f07823686b289ecd5"
DEPENDS += "boost-url"
-RDEPENDS_${PN} += "phosphor-nslcd-authority-cert-config"
+RDEPENDS:${PN} += "phosphor-nslcd-authority-cert-config"
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
# add a user called bmcweb for the server to assume
# bmcweb is part of group shadow for non-root pam authentication
-USERADD_PARAM_${PN} = "-r -s /usr/sbin/nologin -d /home/bmcweb -m -G shadow bmcweb"
+USERADD_PARAM:${PN} = "-r -s /usr/sbin/nologin -d /home/bmcweb -m -G shadow bmcweb"
-GROUPADD_PARAM_${PN} = "web; redfish "
+GROUPADD_PARAM:${PN} = "web; redfish "
SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \
file://0002-Use-chip-id-based-UUID-for-Service-Root.patch \
@@ -28,7 +28,6 @@ SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \
file://0021-Add-message-registry-entry-for-FirmwareResiliencyErr.patch \
file://0023-Add-get-IPMI-session-id-s-to-Redfish.patch \
file://0024-Add-count-sensor-type.patch \
- file://0025-Revert-Support-new-boot-override-setting-design.patch \
"
# OOB Bios Config:
@@ -63,15 +62,17 @@ SRC_URI += "file://eventservice/0001-EventService-Fix-retry-handling-for-http-cl
# Temporary downstream mirror of upstream patches, see telemetry\README for details
SRC_URI += " file://telemetry/0001-Add-support-for-MetricDefinition-scheme.patch \
file://telemetry/0002-Sync-Telmetry-service-with-EventService.patch \
- file://telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch \
- file://telemetry/0004-event-service-fix-added-Context-field-to-response.patch \
- file://telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch \
- file://telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch \
- file://telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch \
+ file://telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch \
+ file://telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch \
+ file://telemetry/0005-Add-DELETE-method-for-MetricReport.patch \
+ file://telemetry/0006-Add-GET-method-for-TriggerCollection.patch \
+ file://telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch \
+ file://telemetry/0008-event-service-fix-added-Context-field-to-response.patch \
+ file://telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch \
"
# Temporary fix: Move it to service file
-do_install_append() {
+do_install:append() {
install -d ${D}/var/lib/bmcweb
install -d ${D}/etc/ssl/certs/authority
}
@@ -84,6 +85,6 @@ EXTRA_OEMESON += " -Dvm-nbdproxy=enabled"
# Disable dependency on external nbd-proxy application
EXTRA_OEMESON += " -Dvm-websocket=disabled"
-RDEPENDS_${PN}_remove += "jsnbd"
+RDEPENDS:${PN}:remove += "jsnbd"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
index 616fb9a75..73c3f2190 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -1,17 +1,17 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://dev_id.json \
file://channel_access.json \
file://channel_config.json \
file://master_write_read_white_list.json \
"
-FILES_${PN} += " \
+FILES:${PN} += " \
${datadir}/ipmi-providers/channel_access.json \
${datadir}/ipmi-providers/channel_config.json \
${datadir}/ipmi-providers/master_write_read_white_list.json \
"
-do_install_append() {
+do_install:append() {
install -m 0644 -D ${WORKDIR}/channel_access.json \
${D}${datadir}/ipmi-providers/channel_access.json
install -m 0644 -D ${WORKDIR}/channel_config.json \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend
index 2d892ad1a..3a2cf0e01 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend
@@ -1,4 +1,4 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://config.yaml"
#override source file before it is used for final FRU file (merged from multiple sources)
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
index bf1928825..112c1ffab 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
@@ -1,4 +1,4 @@
-From 16eb5d80893406739518e7a56eb5191aa7e68257 Mon Sep 17 00:00:00 2001
+From 99f63d2af9f45badaa8aff4ef958443bea62ede8 Mon Sep 17 00:00:00 2001
From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
Date: Mon, 3 Jun 2019 17:01:47 -0700
Subject: [PATCH] Update IPMI Chassis Control command
@@ -21,22 +21,22 @@ ipmitool power soft: soft power-off requested from system software
Change-Id: Ic9fba3ca4abd9a758eb88f1e6ee09f7ca64ff80a
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
---
- chassishandler.cpp | 206 +++++++++++----------------------------------
- 1 file changed, 50 insertions(+), 156 deletions(-)
+ chassishandler.cpp | 204 +++++++++++----------------------------------
+ 1 file changed, 48 insertions(+), 156 deletions(-)
diff --git a/chassishandler.cpp b/chassishandler.cpp
-index 4ca981d..cd0a13d 100644
+index dfbe004be490..cd0ba3402f84 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
-@@ -31,6 +31,7 @@
- #include <xyz/openbmc_project/Control/Boot/Mode/server.hpp>
+@@ -32,6 +32,7 @@
#include <xyz/openbmc_project/Control/Boot/Source/server.hpp>
+ #include <xyz/openbmc_project/Control/Boot/Type/server.hpp>
#include <xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp>
+#include <xyz/openbmc_project/State/Chassis/server.hpp>
#include <xyz/openbmc_project/State/Host/server.hpp>
#include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
-@@ -813,59 +814,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout,
+@@ -815,59 +816,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout,
//------------------------------------------
// Calls into Host State Manager Dbus object
//------------------------------------------
@@ -137,8 +137,8 @@ index 4ca981d..cd0a13d 100644
}
//------------------------------------------
-@@ -1298,76 +1303,6 @@ ipmi::RspType<uint4_t, // Restart Cause
- CHANNEL_NOT_SUPPORTED);
+@@ -1302,76 +1307,6 @@ ipmi::RspType<uint4_t, // Restart Cause
+ return ipmi::responseSuccess(cause.value(), reserved, channel);
}
-//-------------------------------------------------------------
@@ -214,7 +214,7 @@ index 4ca981d..cd0a13d 100644
/** @brief Implementation of chassis control command
*
* @param - chassisControl command byte
-@@ -1380,63 +1315,22 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
+@@ -1384,66 +1319,22 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
switch (chassisControl)
{
case CMD_POWER_ON:
@@ -259,9 +259,10 @@ index 4ca981d..cd0a13d 100644
break;
-
case CMD_HARD_RESET:
+- rc = initiate_state_transition(
+ rc = initiateHostStateTransition(
-+ State::Host::Transition::ForceWarmReboot);
-+ break;
+ State::Host::Transition::ForceWarmReboot);
+ break;
case CMD_POWER_CYCLE:
- // SPEC has a section that says certain implementations can trigger
- // PowerOn if power is Off when a command to power cycle is
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch
deleted file mode 100644
index ff1d0baea..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 90df4bce744fdff6de98f63a320c50e24d40a0d4 Mon Sep 17 00:00:00 2001
-From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
-Date: Mon, 2 Aug 2021 16:16:50 +0000
-Subject: [PATCH] Fix for BIOS boot type Legacy
-
-If user trying to set BIOS boot type as Legacy in Set System boot
-options IPMI command is getting success for boot option parameter 5
-(boot flags).
-Legacy boot type is not supported in Intel platforms, so returning
-InvalidFieldRequest. This can't be pushed to upstream as OEM's in
-community supports it.
-
-Tested:
-Verified using IPMI commands.
-//Set system boot options
-Command : ipmitool raw 0x00 0x08 0x05 0x80 0x18 0x00 0x00 0x00
-Response: Unable to send RAW command (channel=0x0 netfn=0x0 lun=0x0
- cmd=0x8 rsp=0xcc): Invalid data field in request
-Command: ipmitool raw 0x00 0x08 0x05 0xa0 0x18 0x00 0x00 0x00
-Response: //Success
-//Get System boot options
-Command : ipmitool raw 0x00 0x09 0x05 0x00 0x00
-Response: 01 05 a0 18 00 00 00
-
-Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
----
- chassishandler.cpp | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/chassishandler.cpp b/chassishandler.cpp
-index f7820af..abc84b6 100644
---- a/chassishandler.cpp
-+++ b/chassishandler.cpp
-@@ -1875,6 +1875,14 @@ ipmi::RspType<> ipmiChassisSetSysBootOptions(ipmi::Context::ptr ctx,
- {
- return ipmi::responseInvalidFieldRequest();
- }
-+ constexpr auto biosBootTypeLegacy = 0;
-+ if (biosBootType == biosBootTypeLegacy)
-+ {
-+ // return error if BIOS boot type is legacy
-+ log<level::ERR>("ipmiChassisSetSysBootOptions: BIOS boot type "
-+ "Legacy is not supported");
-+ return ipmi::responseInvalidFieldRequest();
-+ }
-
- using namespace chassis::internal;
- using namespace chassis::internal::cache;
---
-2.17.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
index 84ae31e5c..c40ecad7e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -1,4 +1,4 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PROJECT_SRC_DIR := "${THISDIR}/${PN}"
SRC_URI += "file://phosphor-ipmi-host.service \
@@ -8,33 +8,32 @@ SRC_URI += "file://phosphor-ipmi-host.service \
file://0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch \
file://0062-Update-IPMI-Chassis-Control-command.patch \
file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \
- file://0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch \
"
-EXTRA_OECONF_append = " --disable-i2c-whitelist-check"
-EXTRA_OECONF_append = " --enable-transport-oem=yes"
-EXTRA_OECONF_append = " --disable-boot-flag-safe-mode-support"
-EXTRA_OECONF_append = " --disable-ipmi-whitelist"
+EXTRA_OECONF:append = " --disable-i2c-whitelist-check"
+EXTRA_OECONF:append = " --enable-transport-oem=yes"
+EXTRA_OECONF:append = " --disable-boot-flag-safe-mode-support"
+EXTRA_OECONF:append = " --disable-ipmi-whitelist"
-RDEPENDS_${PN}_remove = "clear-once"
+RDEPENDS:${PN}:remove = "clear-once"
# remove the softpoweroff service since we do not need it
-SYSTEMD_SERVICE_${PN}_remove += " \
+SYSTEMD_SERVICE:${PN}:remove += " \
xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
-SYSTEMD_LINK_${PN}_remove += " \
+SYSTEMD_LINK_${PN}:remove += " \
../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service:obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
"
-FILES_${PN}_remove = " \
- ${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/ \
- ${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
+FILES:${PN}:remove = " \
+ ${D}${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/ \
+ ${D}${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
"
-do_compile_prepend(){
+do_compile:prepend(){
cp -f ${PROJECT_SRC_DIR}/transporthandler_oem.cpp ${S}
}
-do_install_append(){
+do_install:append(){
rm -f ${D}/${bindir}/phosphor-softpoweroff
rm -f ${S}/transporthandler_oem.cpp
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
index a83e1f670..465bd4c64 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
@@ -1,12 +1,12 @@
SRC_URI = "git://github.com/openbmc/ipmbbridge.git"
-SRCREV = "8fe0abe6d9f69f735e93d7055687fce4b56e80bf"
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRCREV = "bd78df6be9f677136ca190d50101c328267ddcd2"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-Add-dbus-method-SlotIpmbRequest.patch \
file://0002-Add-log-count-limitation-to-requestAdd.patch \
file://ipmb-channels.json \
"
-do_install_append() {
+do_install:append() {
install -D ${WORKDIR}/ipmb-channels.json \
${D}/usr/share/ipmbbridge
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
index a84352929..08b96ad71 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -1,4 +1,4 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
#SYSTEMD_SUBSTITUTIONS_remove = "KCS_DEVICE:${KCS_DEVICE}:${DBUS_SERVICE_${PN}}"
@@ -8,14 +8,14 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# Replace the '-' to '_', since Dbus object/interface names do not allow '-'.
KCS_DEVICE = "ipmi_kcs3"
SMM_DEVICE = "ipmi_kcs4"
-SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service "
+SYSTEMD_SERVICE:${PN}:append = " ${PN}@${SMM_DEVICE}.service "
SRC_URI = "git://github.com/openbmc/kcsbridge.git"
SRCREV = "03e6defcbca99c9c00cd37c4afb1d2b415a92acd"
SRC_URI += "file://99-ipmi-kcs.rules"
-do_install_append() {
+do_install:append() {
install -d ${D}${base_libdir}/udev/rules.d
install -m 0644 ${WORKDIR}/99-ipmi-kcs.rules ${D}${base_libdir}/udev/rules.d/
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch
index da173704b..7b690998f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch
@@ -1,4 +1,4 @@
-From a36f181163974b2da0a954fc97a89fb2cdbd7287 Mon Sep 17 00:00:00 2001
+From adabdfa46aa0db56f40030c7077f991ba1987b04 Mon Sep 17 00:00:00 2001
From: Cheng C Yang <cheng.c.yang@intel.com>
Date: Tue, 30 Apr 2019 05:35:31 +0800
Subject: [PATCH] Remove Get SOL Config Command from Netipmid
@@ -28,21 +28,21 @@ Payload Port : 623
Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
---
- command/sol_cmds.cpp | 91 ----------------------------
- command/sol_cmds.hpp | 168 ---------------------------------------------------
+ command/sol_cmds.cpp | 86 ----------------------
+ command/sol_cmds.hpp | 168 -------------------------------------------
sol_module.cpp | 6 --
- 3 files changed, 265 deletions(-)
+ 3 files changed, 260 deletions(-)
diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp
-index 804b5ea..8b2d041 100644
+index 81dfc993236c..be2cc81fc9cc 100644
--- a/command/sol_cmds.cpp
+++ b/command/sol_cmds.cpp
-@@ -65,97 +65,6 @@ void activating(uint8_t payloadInstance, uint32_t sessionID)
+@@ -69,92 +69,6 @@ void activating(uint8_t payloadInstance, uint32_t sessionID)
outPayload);
}
-std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
-- const message::Handler& handler)
+- std::shared_ptr<message::Handler>& handler)
-{
- std::vector<uint8_t> outPayload(sizeof(GetConfParamsResponse));
- auto request =
@@ -60,23 +60,22 @@ index 804b5ea..8b2d041 100644
- {
- case Parameter::PROGRESS:
- {
-- outPayload.push_back(
-- std::get<sol::Manager&>(singletonPool).progress);
+- outPayload.push_back(sol::Manager::get().progress);
- break;
- }
- case Parameter::ENABLE:
- {
-- outPayload.push_back(std::get<sol::Manager&>(singletonPool).enable);
+- outPayload.push_back(sol::Manager::get().enable);
- break;
- }
- case Parameter::AUTHENTICATION:
- {
- Auth value{0};
-
-- value.encrypt = std::get<sol::Manager&>(singletonPool).forceEncrypt;
-- value.auth = std::get<sol::Manager&>(singletonPool).forceAuth;
-- value.privilege = static_cast<uint8_t>(
-- std::get<sol::Manager&>(singletonPool).solMinPrivilege);
+- value.encrypt = sol::Manager::get().forceEncrypt;
+- value.auth = sol::Manager::get().forceAuth;
+- value.privilege =
+- static_cast<uint8_t>(sol::Manager::get().solMinPrivilege);
- auto buffer = reinterpret_cast<const uint8_t*>(&value);
-
- std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload));
@@ -86,11 +85,9 @@ index 804b5ea..8b2d041 100644
- {
- Accumulate value{0};
-
-- value.interval = std::get<sol::Manager&>(singletonPool)
-- .accumulateInterval.count() /
+- value.interval = sol::Manager::get().accumulateInterval.count() /
- sol::accIntervalFactor;
-- value.threshold =
-- std::get<sol::Manager&>(singletonPool).sendThreshold;
+- value.threshold = sol::Manager::get().sendThreshold;
- auto buffer = reinterpret_cast<const uint8_t*>(&value);
-
- std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload));
@@ -100,10 +97,9 @@ index 804b5ea..8b2d041 100644
- {
- Retry value{0};
-
-- value.count = std::get<sol::Manager&>(singletonPool).retryCount;
-- value.interval =
-- std::get<sol::Manager&>(singletonPool).retryInterval.count() /
-- sol::retryIntervalFactor;
+- value.count = sol::Manager::get().retryCount;
+- value.interval = sol::Manager::get().retryInterval.count() /
+- sol::retryIntervalFactor;
- auto buffer = reinterpret_cast<const uint8_t*>(&value);
-
- std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload));
@@ -119,8 +115,7 @@ index 804b5ea..8b2d041 100644
- }
- case Parameter::CHANNEL:
- {
-- outPayload.push_back(
-- std::get<sol::Manager&>(singletonPool).channel);
+- outPayload.push_back(sol::Manager::get().channel);
- break;
- }
- case Parameter::NVBITRATE:
@@ -136,7 +131,7 @@ index 804b5ea..8b2d041 100644
} // namespace sol
diff --git a/command/sol_cmds.hpp b/command/sol_cmds.hpp
-index 182b73e..10cbf25 100644
+index 3e05e0fc035f..9aedfddf0d39 100644
--- a/command/sol_cmds.hpp
+++ b/command/sol_cmds.hpp
@@ -62,174 +62,6 @@ struct ActivatingRequest
@@ -266,7 +261,7 @@ index 182b73e..10cbf25 100644
- * @return Response data for the command.
- */
-std::vector<uint8_t> setConfParams(const std::vector<uint8_t>& inPayload,
-- const message::Handler& handler);
+- std::shared_ptr<message::Handler>& handler);
-
-/** @struct GetConfParamsRequest
- *
@@ -309,16 +304,16 @@ index 182b73e..10cbf25 100644
- * @return Response data for the command.
- */
-std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
-- const message::Handler& handler);
+- std::shared_ptr<message::Handler>& handler);
-
} // namespace command
} // namespace sol
diff --git a/sol_module.cpp b/sol_module.cpp
-index 2b1fb46..6da82c0 100644
+index d9a9a7c9551f..21196d8a2cbf 100644
--- a/sol_module.cpp
+++ b/sol_module.cpp
-@@ -42,12 +42,6 @@ void registerCommands()
+@@ -41,12 +41,6 @@ void registerCommands()
&getPayloadInfo,
session::Privilege::USER,
false},
@@ -332,5 +327,5 @@ index 2b1fb46..6da82c0 100644
for (const auto& iter : commands)
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
index 759306cd0..bde839859 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -3,21 +3,21 @@ inherit useradd
# TODO: This should be removed, once up-stream bump up
# issue is resolved
SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid"
-SRCREV = "b88599a2cef6b4fd2272f065a37ce0f70ca8dd38"
+SRCREV = "1c5b3ab05817d62a11f75c2a90b6891b18bf62cc"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
-GROUPADD_PARAM_${PN} = "ipmi "
+GROUPADD_PARAM:${PN} = "ipmi "
# Default rmcpp iface is eth0; channel 1
# Add channel 2 instance (eth1)
RMCPP_EXTRA = "eth1"
-SYSTEMD_SERVICE_${PN} += " \
+SYSTEMD_SERVICE:${PN} += " \
${PN}@${RMCPP_EXTRA}.service \
${PN}@${RMCPP_EXTRA}.socket \
"
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://10-nice-rules.conf \
file://0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch \
@@ -25,7 +25,7 @@ SRC_URI += " file://10-nice-rules.conf \
file://0012-rakp12-Add-username-to-SessionInfo-interface.patch \
"
-do_install_append() {
+do_install:append() {
mkdir -p ${D}${sysconfdir}/systemd/system/phosphor-ipmi-net@.service.d/
install -m 0644 ${WORKDIR}/10-nice-rules.conf ${D}${sysconfdir}/systemd/system/phosphor-ipmi-net@.service.d/
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend
index 72d991c7e..4fc41d058 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend
@@ -1 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
index d5c1888b3..3be0d30b4 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
@@ -3,13 +3,13 @@ DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicat
with Management Engine via IPMB"
SRC_URI = "git://github.com/Intel-BMC/node-manager;protocol=ssh"
-SRCREV = "23590b428ea26e0ed4b8225015471b962e3b3704"
+SRCREV = "928d0994c7d8c1cc20dc69b763ecd62dcf8ab276"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SYSTEMD_SERVICE_${PN} = "node-manager-proxy.service"
+SYSTEMD_SERVICE:${PN} = "node-manager-proxy.service"
DEPENDS = "sdbusplus \
phosphor-logging \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb
index a1d20c2bc..21557d96b 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb
@@ -8,11 +8,11 @@ SRC_URI = "file://id-led-off.sh \
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
-RDEPENDS_${PN} += "bash"
+RDEPENDS:${PN} += "bash"
inherit systemd
-FILES_${PN} += "${systemd_system_unitdir}/id-led-off.service"
+FILES:${PN} += "${systemd_system_unitdir}/id-led-off.service"
do_install() {
install -d ${D}${systemd_system_unitdir}
@@ -21,4 +21,4 @@ do_install() {
install -m 0755 ${S}/id-led-off.sh ${D}/${bindir}/id-led-off.sh
}
-SYSTEMD_SERVICE_${PN} += " id-led-off.service"
+SYSTEMD_SERVICE:${PN} += " id-led-off.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
index 83fd20bdb..132fe2337 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
@@ -1,12 +1,12 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-RDEPENDS_${PN}_remove = "clear-once"
+RDEPENDS:${PN}:remove = "clear-once"
-do_compile_prepend(){
+do_compile:prepend(){
install -m 0644 ${STAGING_DATADIR_NATIVE}/${PN}/led.yaml ${S}
}
-do_install_append(){
+do_install:append(){
rm -f ${S}/led.yaml
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb
index c47a581f6..2468a487d 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb
@@ -3,8 +3,8 @@ DESCRIPTION = "New systemd target for non-legacy nodes on multi-node platform"
inherit systemd
-SYSTEMD_SERVICE_${PN} = "multi-node-nl.target"
-SYSTEMD_SERVICE_${PN} += "nonLegacyNode.service"
+SYSTEMD_SERVICE:${PN} = "multi-node-nl.target"
+SYSTEMD_SERVICE:${PN} += "nonLegacyNode.service"
S = "${WORKDIR}"
SRC_URI = "file://multi-node-nl.target \
@@ -15,9 +15,9 @@ SRC_URI = "file://multi-node-nl.target \
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
-RDEPENDS_${PN} = "bash"
+RDEPENDS:${PN} = "bash"
-do_install_append() {
+do_install:append() {
install -d ${D}${bindir}
install -m 0755 ${S}/nonLegacyNode.sh ${D}/${bindir}/nonLegacyNode.sh
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend
index 15673c0bf..119cd9657 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend
@@ -1,5 +1,5 @@
SRC_URI = "git://github.com/openbmc/peci-pcie"
-SRCREV = "6f55203b70316baec228073abcd581b64985af93"
+SRCREV = "8e96603605eebd574bb00cd35e7fa118071aeeae"
EXTRA_OECMAKE += "-DWAIT_FOR_OS_STANDBY=1 -DUSE_RDENDPOINTCFG=1"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
index 3ca492ebd..5a6191fcd 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
@@ -13,6 +13,6 @@ SRC_URI = "git://github.com/openbmc/phosphor-u-boot-env-mgr.git;protocol=ssh"
SRCREV = "1979d3b31a96e9359402ac4d7867ec5dddbece7e"
inherit cmake systemd
-SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service"
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service"
DEPENDS = "boost sdbusplus phosphor-logging"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb
index 4a8a5068b..770870f1e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb
@@ -1,8 +1,8 @@
-SUMMARY = "libmctp_intel"
+SUMMARY = "libmctp:intel"
DESCRIPTION = "Implementation of MCTP(DMTF DSP0236)"
SRC_URI = "git://github.com/Intel-BMC/libmctp.git;protocol=ssh"
-SRCREV = "5126468ca6c3ae139d1ab9853074246bbe70dd74"
+SRCREV = "52117fa04e6afabe8eb1285c702f1400fecfb992"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb
index caa3cc915..03d4d5ee9 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "libpldm_intel"
DESCRIPTION = "Provides encode/decode APIs for PLDM specifications"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0"
+SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c"
S = "${WORKDIR}/git/libpldm_intel"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb
index 7fb440c68..2fa3f8df1 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bcd9ada3a943f58551867d72893cc9ab"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0"
+SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c"
S = "${WORKDIR}/git/mctp_emulator"
@@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}"
inherit cmake systemd
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
DEPENDS += " \
libmctp-intel \
@@ -27,4 +27,4 @@ DEPENDS += " \
gtest \
"
-SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.mctp-emulator.service"
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.mctp-emulator.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb
index f616a9d5d..1ad4f6e2a 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bcd9ada3a943f58551867d72893cc9ab"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0"
+SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c"
S = "${WORKDIR}/git/mctp_wrapper"
@@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}"
inherit cmake systemd
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
DEPENDS += " \
libmctp-intel \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb
index 299e4f006..4e8315047 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${PN}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0"
+SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c"
S = "${WORKDIR}/git"
@@ -15,7 +15,7 @@ OECMAKE_SOURCEPATH = "${S}/${PN}"
inherit cmake systemd
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
DEPENDS += " \
libmctp-intel \
@@ -30,5 +30,5 @@ DEPENDS += " \
phosphor-dbus-interfaces \
udev \
"
-FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.mctpd@.service"
-FILES_${PN} += "/usr/share/mctp/mctp_config.json"
+FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.mctpd@.service"
+FILES:${PN} += "/usr/share/mctp/mctp_config.json"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb
index 936cd7bd3..b0139297d 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=615045c30a05cde5c0e924854d43c327"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0"
+SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c"
S = "${WORKDIR}/git/mctpwplus"
@@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}"
inherit cmake
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
DEPENDS += " \
systemd \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
index 489ea8117..351d584d1 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
@@ -5,13 +5,13 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = "git://github.com/Intel-BMC/nvme-mi.git;protocol=ssh"
-SRCREV = "b0b93949733398d56b2bda5ef57c8a50a477ff47"
+SRCREV = "29b49789236b89910af816e4606aab4126a56a4b"
S = "${WORKDIR}/git"
PV = "1.0+git${SRCPV}"
inherit meson systemd
-SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.nvme-mi.service"
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.nvme-mi.service"
DEPENDS = "boost sdbusplus systemd phosphor-logging mctpwplus googletest nlohmann-json"
EXTRA_OEMESON = "-Dyocto_dep='enabled'"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
index 1428e0f15..ffef31185 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI += "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0"
+SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c"
S = "${WORKDIR}/git/pldmd"
@@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}"
inherit cmake systemd
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
DEPENDS += " \
libpldm-intel \
@@ -27,5 +27,5 @@ DEPENDS += " \
mctpwplus \
"
-FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pldmd.service"
-SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.pldmd.service"
+FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pldmd.service"
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.pldmd.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb
index c7be89f41..485dcf4db 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh"
-SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0"
+SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c"
S = "${WORKDIR}/git/pmci_launcher"
@@ -19,5 +19,5 @@ DEPENDS += " \
phosphor-logging \
boost \
"
-FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pmci-launcher.service"
-SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.pmci-launcher.service"
+FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pmci-launcher.service"
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.pmci-launcher.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend
index 410775ee3..76b60aa8e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend
@@ -1,5 +1,5 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI = "file://init"
-RDEPENDS_${PN} += "bash"
+RDEPENDS:${PN} += "bash"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
index 7138e8628..a7df530cd 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
@@ -13,6 +13,6 @@ SRC_URI = "git://github.com/Intel-BMC/provisioning-mode-manager.git;protocol=ssh
SRCREV = "ea03e4e87f5d5f0d873624b46ebc3deabb8d6ebe"
inherit cmake systemd
-SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.RestrictionMode.Manager.service"
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.RestrictionMode.Manager.service"
DEPENDS = "boost sdbusplus phosphor-logging"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb
index 3fab0ae54..783dea029 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb
@@ -12,7 +12,7 @@ inherit cmake systemd
SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
SRCREV = "bee56d62b209088454d166d1efae4825a2b175df"
-SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.SecurityManager.service"
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.SecurityManager.service"
DEPENDS += " \
systemd \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
index 18be4b189..1fcbd958e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -1,4 +1,4 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git"
-SRCREV = "e9da2599f10f1b696f61c97f8c8036acfde05e18"
+SRCREV = "a138ebd3c759f95c53d61170c05e69bf31718114"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch
index 6815b5563..1cba1095d 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch
@@ -1,4 +1,4 @@
-From 235bb8a9b809c2449e3f5bf4e999db881012c144 Mon Sep 17 00:00:00 2001
+From db4353de222b51726c8e3c765cc8f1df4ad67687 Mon Sep 17 00:00:00 2001
From: Zhikui Ren <zhikui.ren@intel.com>
Date: Tue, 22 Jun 2021 11:35:12 -0700
Subject: [PATCH] Fix missing de-assert event when threshold changes
@@ -42,8 +42,8 @@ Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
---
include/Thresholds.hpp | 2 +-
include/sensor.hpp | 2 ++
- src/Thresholds.cpp | 17 ++++++++++++++---
- 3 files changed, 17 insertions(+), 4 deletions(-)
+ src/Thresholds.cpp | 20 ++++++++++++++++----
+ 3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/include/Thresholds.hpp b/include/Thresholds.hpp
index af63f72..fd507d0 100644
@@ -79,7 +79,7 @@ index b98241b..6235674 100644
}
diff --git a/src/Thresholds.cpp b/src/Thresholds.cpp
-index bbe8e20..78ded55 100644
+index 821083a..da0d650 100644
--- a/src/Thresholds.cpp
+++ b/src/Thresholds.cpp
@@ -418,10 +418,19 @@ bool checkThresholds(Sensor* sensor)
@@ -103,7 +103,22 @@ index bbe8e20..78ded55 100644
if (change.threshold.level == thresholds::Level::CRITICAL &&
change.asserted)
{
-@@ -473,7 +482,7 @@ void checkThresholdsPowerDelay(const std::weak_ptr<Sensor>& weakSensor,
+@@ -443,6 +452,7 @@ void checkThresholdsPowerDelay(const std::weak_ptr<Sensor>& weakSensor,
+
+ Sensor* sensor = sensorPtr.get();
+ std::vector<ChangeParam> changes = checkThresholds(sensor, sensor->value);
++ bool forceAssert = !sensor->hadValidValue;
+ for (const auto& change : changes)
+ {
+ // When CPU is powered off, some volatges are expected to
+@@ -467,13 +477,13 @@ void checkThresholdsPowerDelay(const std::weak_ptr<Sensor>& weakSensor,
+ }
+ }
+ assertThresholds(sensor, change.assertValue, change.threshold.level,
+- change.threshold.direction, change.asserted);
++ change.threshold.direction, change.asserted, forceAssert);
+ }
+ }
void assertThresholds(Sensor* sensor, double assertValue,
thresholds::Level level, thresholds::Direction direction,
@@ -112,7 +127,7 @@ index bbe8e20..78ded55 100644
{
std::string property;
std::shared_ptr<sdbusplus::asio::dbus_interface> interface;
-@@ -513,7 +522,9 @@ void assertThresholds(Sensor* sensor, double assertValue,
+@@ -513,7 +523,9 @@ void assertThresholds(Sensor* sensor, double assertValue,
return;
}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch
new file mode 100644
index 000000000..737ba9128
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch
@@ -0,0 +1,147 @@
+From 262682632ee493d0b6593540cfc902d11286b7c3 Mon Sep 17 00:00:00 2001
+From: Iwona Winiarska <iwona.winiarska@intel.com>
+Date: Tue, 13 Jul 2021 15:16:16 +0200
+Subject: [PATCH] CPUSensor: Create CPUConfig for each PECI adapter
+
+Currently CPUSensor is based on configuration that defines CPUs for the
+specific PECI adapter (usually peci-wire). As a consequence, MFD devices
+are created only for the defined adapter.
+
+Since duplicating static CPU records in configuration file for other
+PECI adapters may be confusing to users, let's add CPUConfig for other
+PECI adapters dynamically by detecting if there is more than one PECI
+adapter driver bound in the system.
+
+Please note, that this change is limited to enabling HWMON driver,
+sensors for all adapters will not be exposed on D-Bus.
+
+Tested:
+No changes if only one PECI interface is available, HWMON drivers
+creation will be based on provided configuration.
+When both peci-aspeed (peci-wire) and peci-mctp are bound in the system,
+HWMON drivers are created for each PECI interface.
+
+Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
+---
+ src/CPUSensorMain.cpp | 90 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 90 insertions(+)
+
+diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
+index 744ca50..6850df7 100644
+--- a/src/CPUSensorMain.cpp
++++ b/src/CPUSensorMain.cpp
+@@ -33,6 +33,7 @@
+ #include <fstream>
+ #include <functional>
+ #include <memory>
++#include <optional>
+ #include <regex>
+ #include <sstream>
+ #include <stdexcept>
+@@ -658,6 +659,91 @@ void detectCpuAsync(
+ });
+ }
+
++std::optional<uint64_t> getPeciDeviceNum(const fs::path& peciAdapterNamePath)
++{
++ fs::path::iterator it = peciAdapterNamePath.begin();
++ std::advance(it, 5); // /sys/bus/peci/devices/peci-xxxx
++ std::string peciDeviceName = *it;
++ auto pos = peciDeviceName.find('-');
++ if (pos == std::string::npos)
++ {
++ std::cerr << "Incorrect PECI device name: " << peciDeviceName << "\n";
++ return std::nullopt;
++ }
++
++ try
++ {
++ return std::stoull(peciDeviceName.substr(pos + 1, 1));
++ }
++ catch (std::logic_error&)
++ {
++ return std::nullopt;
++ }
++}
++
++std::optional<std::string>
++ readPeciAdapterNameFromFile(const fs::path& peciAdapterNamePath)
++{
++ std::ifstream nameFile(peciAdapterNamePath);
++ if (!nameFile.good())
++ {
++ std::cerr << "Cannot read: " << peciAdapterNamePath << "\n";
++ return std::nullopt;
++ }
++
++ std::string peciAdapterName;
++ std::getline(nameFile, peciAdapterName);
++ nameFile.close();
++ if (peciAdapterName.empty())
++ {
++ return std::nullopt;
++ }
++
++ auto pos = peciAdapterName.find('-');
++ peciAdapterName = peciAdapterName.substr(pos + 1);
++
++ return peciAdapterName;
++}
++
++void addConfigsForOtherPeciAdapters(
++ boost::container::flat_set<CPUConfig>& cpuConfigs, uint64_t& bus,
++ uint64_t& addr, std::string& name, const State& state)
++{
++ std::vector<fs::path> peciAdapterNamePaths;
++ if (!findFiles(fs::path(peciDevPath), R"(peci-\d+/name$)",
++ peciAdapterNamePaths, 1))
++ {
++ std::cerr << "No PECI adapters in system\n";
++ return;
++ }
++
++ for (const fs::path& peciAdapterNamePath : peciAdapterNamePaths)
++ {
++ std::optional<uint64_t> peciDeviceNum =
++ getPeciDeviceNum(peciAdapterNamePath);
++ if (!peciDeviceNum || peciDeviceNum == bus)
++ {
++ continue;
++ }
++
++ std::optional<std::string> peciAdapterName =
++ readPeciAdapterNameFromFile(peciAdapterNamePath);
++ if (!peciAdapterName)
++ {
++ continue;
++ }
++
++ // Change result for peci-aspeed
++ if (peciAdapterName->compare("bus") == 0)
++ {
++ peciAdapterName = "wire";
++ }
++
++ cpuConfigs.emplace(*peciDeviceNum, addr, name + "_" + *peciAdapterName,
++ state);
++ }
++}
++
+ bool getCpuConfig(std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+ boost::container::flat_set<CPUConfig>& cpuConfigs,
+ ManagedObjectType& sensorConfigs, boost::asio::io_service& io,
+@@ -789,7 +875,11 @@ bool getCpuConfig(std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+ std::cout << "name: " << name << "\n";
+ std::cout << "type: " << type << "\n";
+ }
++
+ cpuConfigs.emplace(bus, addr, name, State::OFF);
++
++ addConfigsForOtherPeciAdapters(cpuConfigs, bus, addr, name,
++ State::OFF);
+ }
+ }
+ }
+--
+2.31.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
index fbaf497b3..b54b8e974 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
@@ -1,7 +1,7 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PROJECT_SRC_DIR := "${THISDIR}/${PN}"
-SRCREV = "5cf0f99210890d0cd52d5929e919316d238a5701"
+SRCREV = "5ab424a6a4ea56e5fbfad5a1813bed7bfabbd399"
#SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
SRC_URI += "\
@@ -14,9 +14,10 @@ SRC_URI += "\
file://0006-CPUSensor-create-RequirediTempSensor-if-defined.patch \
file://0007-Add-support-for-the-energy-hwmon-type.patch \
file://0008-CPUSensor-additional-debug-message.patch \
+ file://0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch \
"
-DEPENDS_append = " libgpiod libmctp"
+DEPENDS:append = " libgpiod libmctp"
PACKAGECONFIG += " \
adcsensor \
@@ -35,11 +36,11 @@ PACKAGECONFIG[nvmesensor] = "-Dnvme=enabled, -Dnvme=disabled"
# Enable Validation unsecure based on IMAGE_FEATURES
EXTRA_OEMESON += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-Dvalidate-unsecure-feature=enabled', '', d)}"
-SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'nvmesensor', \
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'nvmesensor', \
'xyz.openbmc_project.nvmesensor.service', \
'', d)}"
-do_install_append() {
+do_install:append() {
svc="xyz.openbmc_project.intrusionsensor.service"
srcf="${WORKDIR}/intrusionsensor-depend-on-networkd.conf"
dstf="${D}/etc/systemd/system/${svc}.d/10-depend-on-networkd.conf"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
index 275963595..703cbb803 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
@@ -1,13 +1,13 @@
SUMMARY = "Settings"
SRC_URI = "git://github.com/Intel-BMC/settings.git;protocol=ssh"
-SRCREV = "1a39605ff52db92048df733181eda8fcfe18ce2f"
+SRCREV = "85a8be9a3fb8ef4726899b28f10fb9afa6fa9e89"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
-SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Settings.service"
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Settings.service"
DEPENDS = "boost \
nlohmann-json \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
index e566f3ea6..26d1364f6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
@@ -14,7 +14,7 @@ SRCREV = "5f413eec673f3e6e5e754e2c55048abf0a146e5b"
EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
inherit cmake systemd
-SYSTEMD_SERVICE_${PN} = "specialmodemgr.service"
+SYSTEMD_SERVICE:${PN} = "specialmodemgr.service"
DEPENDS += " \
systemd \
@@ -23,7 +23,7 @@ DEPENDS += " \
boost \
libpam \
"
-RDEPENDS_${PN} += " \
+RDEPENDS:${PN} += " \
libsystemd \
sdbusplus \
phosphor-logging \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend
index aef2a020f..b7e8c0b22 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend
@@ -1,3 +1,3 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
DEPENDS += "gtest"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
index 635d0a136..0483ced61 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
@@ -11,7 +11,7 @@ SRCREV = "1a9dde9b193a34392ab11a14d9cd0310f9abb930"
S = "${WORKDIR}/git/callback-manager"
-SYSTEMD_SERVICE_${PN} += "callback-manager.service"
+SYSTEMD_SERVICE:${PN} += "callback-manager.service"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENCE;md5=7becf906c8f8d03c237bad13bc3dac53"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
index b9a65cc75..68e8ee6ac 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
@@ -1,5 +1,5 @@
SRC_URI = "git://github.com/openbmc/telemetry.git"
-SRCREV = "a74e44f6ef7db43d38eb600fbfee152b31b30514"
+SRCREV = "93064d8fcef2c6fde1f61c0cedacb46b21eab039"
EXTRA_OEMESON += " -Dmax-reports=10"
EXTRA_OEMESON += " -Dmax-reading-parameters=200"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
index c0d4215a0..718829194 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
@@ -1,7 +1,7 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI = "git://github.com/openbmc/phosphor-user-manager"
-SRCREV = "607ed50ae1c4817969a117d951a3e90f686fbde0"
+SRCREV = "372c5668c0ed893f53edc0f9fa880cb50b48f203"
EXTRA_OECONF += "${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], '', '--disable-root_user_mgmt', d)}"
@@ -10,7 +10,7 @@ SRC_URI += " \
file://0006-Use-groupmems-instead-of-getgrnam_r-due-to-overlay.patch \
"
-FILES_${PN} += "/dbus-1/system.d/phosphor-nslcd-cert-config.conf"
-FILES_${PN} += "/usr/share/phosphor-certificate-manager/nslcd"
-FILES_${PN} += "\
+FILES:${PN} += "/dbus-1/system.d/phosphor-nslcd-cert-config.conf"
+FILES:${PN} += "/usr/share/phosphor-certificate-manager/nslcd"
+FILES:${PN} += "\
/lib/systemd/system/multi-user.target.wants/phosphor-certificate-manager@nslcd.service" \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
index e568ea5d2..b8aedc6ee 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
@@ -10,11 +10,11 @@ PV = "1.0+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.VirtualMedia.service"
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.VirtualMedia.service"
DEPENDS = "udev boost nlohmann-json systemd sdbusplus"
-RDEPENDS_${PN} = "nbd-client nbdkit"
+RDEPENDS:${PN} = "nbd-client nbdkit"
inherit cmake systemd
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb
index d6ff9f7a4..706e08646 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb
@@ -25,7 +25,7 @@ DEPENDS += " \
boost \
"
-RDEPENDS_${PN} += " \
+RDEPENDS:${PN} += " \
libsystemd \
sdbusplus \
phosphor-logging \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
index 07ac95c89..48bc4a086 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
@@ -1,4 +1,4 @@
-From 5760937ef1ae9a4610b47ba64fdebe594fc2c9df Mon Sep 17 00:00:00 2001
+From a7d1d3770a650df8fe61d594885fcb388ac2ca42 Mon Sep 17 00:00:00 2001
From: James Feist <james.feist@linux.intel.com>
Date: Mon, 17 Jun 2019 12:00:58 -0700
Subject: [PATCH] Customize phosphor-watchdog for Intel platforms
@@ -22,30 +22,26 @@ Signed-off-by: Sunita Kumari <sunitax.kumari@intel.com>
%% original patch: 0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
---
- src/watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++---
- src/watchdog.hpp | 23 ++++-
- 2 files changed, 242 insertions(+), 11 deletions(-)
+ src/watchdog.cpp | 229 ++++++++++++++++++++++++++++++++++++++++++++---
+ src/watchdog.hpp | 22 ++++-
+ 2 files changed, 240 insertions(+), 11 deletions(-)
diff --git a/src/watchdog.cpp b/src/watchdog.cpp
-index 57e905059153..1204db4cab0f 100644
+index 7de98ae3e70f..f96faebc7368 100644
--- a/src/watchdog.cpp
+++ b/src/watchdog.cpp
-@@ -1,11 +1,14 @@
- #include "watchdog.hpp"
-
-+#include <systemd/sd-journal.h>
-+
- #include <algorithm>
- #include <chrono>
+@@ -5,8 +5,10 @@
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/exception.hpp>
++#include <systemd/sd-journal.h>
+ #include <string_view>
#include <xyz/openbmc_project/Common/error.hpp>
+#include <xyz/openbmc_project/State/Host/server.hpp>
namespace phosphor
{
-@@ -18,10 +21,86 @@ using namespace phosphor::logging;
+@@ -19,10 +21,86 @@ using namespace phosphor::logging;
using sdbusplus::exception::SdBusError;
using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
@@ -136,7 +132,7 @@ index 57e905059153..1204db4cab0f 100644
void Watchdog::resetTimeRemaining(bool enableWatchdog)
{
-@@ -107,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value)
+@@ -108,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value)
// Optional callback function on timer expiration
void Watchdog::timeOutHandler()
{
@@ -249,7 +245,7 @@ index 57e905059153..1204db4cab0f 100644
auto target = actionTargetMap.find(action);
if (target == actionTargetMap.end())
-@@ -133,12 +310,45 @@ void Watchdog::timeOutHandler()
+@@ -147,12 +323,45 @@ void Watchdog::timeOutHandler()
try
{
@@ -301,16 +297,15 @@ index 57e905059153..1204db4cab0f 100644
catch (const SdBusError& e)
{
diff --git a/src/watchdog.hpp b/src/watchdog.hpp
-index 7de9bb38419c..b004b7ab4e3f 100644
+index 736e71f68fcc..79158f192f40 100644
--- a/src/watchdog.hpp
+++ b/src/watchdog.hpp
-@@ -68,7 +68,18 @@ class Watchdog : public WatchdogInherits
- WatchdogInherits(bus, objPath),
+@@ -73,7 +73,17 @@ class Watchdog : public WatchdogInherits
bus(bus), actionTargetMap(std::move(actionTargetMap)),
fallback(std::move(fallback)), minInterval(minInterval),
-- timer(event, std::bind(&Watchdog::timeOutHandler, this))
-+ timer(event, std::bind(&Watchdog::timeOutHandler, this)),
-+ powerStateChangedSignal(
+ timer(event, std::bind(&Watchdog::timeOutHandler, this)),
+- objPath(objPath)
++ objPath(objPath), powerStateChangedSignal(
+ bus,
+ sdbusplus::bus::match::rules::propertiesChanged(
+ "/xyz/openbmc_project/state/host0",
@@ -322,9 +317,9 @@ index 7de9bb38419c..b004b7ab4e3f 100644
+ powerStateChangedHandler(props);
+ })
{
- // We set the watchdog interval with the default value.
- interval(interval());
-@@ -77,6 +88,12 @@ class Watchdog : public WatchdogInherits
+ // Use default if passed in otherwise just use default that comes
+ // with object
+@@ -90,6 +100,12 @@ class Watchdog : public WatchdogInherits
tryFallbackOrDisable();
}
@@ -337,7 +332,7 @@ index 7de9bb38419c..b004b7ab4e3f 100644
/** @brief Resets the TimeRemaining to the configured Interval
* Optionally enables the watchdog.
*
-@@ -165,6 +182,10 @@ class Watchdog : public WatchdogInherits
+@@ -178,6 +194,10 @@ class Watchdog : public WatchdogInherits
/** @brief Contained timer object */
sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic> timer;
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
index 75f04e2ab..ad2984fa9 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
@@ -1,8 +1,8 @@
-FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
SRC_URI += "file://0001-Customize-phosphor-watchdog-for-Intel-platforms.patch \
"
# Remove the override to keep service running after DC cycle
-SYSTEMD_OVERRIDE_${PN}_remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
-SYSTEMD_SERVICE_${PN} = "phosphor-watchdog.service"
+SYSTEMD_OVERRIDE_${PN}:remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
+SYSTEMD_SERVICE:${PN} = "phosphor-watchdog.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb
index addd1ccb2..b5724710e 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb
@@ -8,5 +8,5 @@ inherit obmc-phosphor-systemd
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
-SYSTEMD_SERVICE_${PN} += "system-watchdog.service"
+SYSTEMD_SERVICE:${PN} += "system-watchdog.service"
SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/system-watchdog/system-watchdog.conf"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
index 36b155fe9..a403c4ec8 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
@@ -1,4 +1,4 @@
SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2"
-FILESEXTRAPATHS_prepend_intel := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS:prepend:intel := "${THISDIR}/${PN}:"
SRCREV = "2397c142c0d75c7705757a52848945b00928232d"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend
index cf54a7906..8c3c21530 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend
@@ -1,7 +1,7 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/webui-vue.git"
-SRCREV = "03dc2b7b9f0672aac84349fbc77aab55403447e0"
+SRCREV = "bfb346946727f09d99c1710e0443dcda2e8544a5"
-do_compile_prepend() {
+do_compile:prepend() {
cp -vf ${S}/.env.intel ${S}/.env
}