From 61f1ca1b31a9a1108e9e7f71e47fdc19beb0490b Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Wed, 3 Nov 2021 14:40:53 -0700 Subject: Update to internal 0.77 Signed-off-by: Jason M. Bills --- ...ot-delay-before-autoboot-in-release-image.patch | 34 + .../u-boot/u-boot-aspeed-sdk_%.bbappend | 6 + .../classes/obmc-phosphor-image-common.bbclass | 1 + .../base-files/base-files/40-oom_reboot.conf | 4 + .../recipes-core/base-files/base-files_%.bbappend | 15 +- .../recipes-core/ipmi/intel-ipmi-oem_%.bbappend | 2 +- .../recipes-core/logger-systemd/logger-systemd.inc | 1 - .../recipes-core/os-release/version-vars.inc | 6 +- .../libvncserver/libvncserver_%.bbappend | 2 +- ...-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch | 12 +- .../recipes-kernel/linux/linux-aspeed_%.bbappend | 2 +- .../network/phosphor-network_%.bbappend | 2 +- .../recipes-phosphor/beepcode-mgr/beepcode-mgr.bb | 6 +- ...-FRU-address-and-add-MUX-mode-configurati.patch | 96 +++ .../configuration/entity-manager_%.bbappend | 3 +- .../recipes-phosphor/datetime/pch-time-sync.bb | 6 +- .../dbus/phosphor-dbus-interfaces_%.bbappend | 2 +- .../fans/phosphor-pid-control_%.bbappend | 2 +- .../recipes-phosphor/fru/default-fru.bb | 22 +- .../host/obmc-op-control-host%.bbappend | 6 - ...fix-for-broken-feature-Pending-Attributes.patch | 919 +++++++++++++++++++++ ...010-Remove-Terminated-Event-Subscriptions.patch | 258 ++++++ .../0005-Add-DELETE-method-for-MetricReport.patch | 132 --- ...0005-Add-GET-method-for-TriggerCollection.patch | 313 +++++++ ...0006-Add-GET-method-for-TriggerCollection.patch | 313 ------- ...t-Remove-LogService-from-TelemetryService.patch | 26 + ...t-Remove-LogService-from-TelemetryService.patch | 26 - ...rvice-fix-added-Context-field-to-response.patch | 29 + ...eneralize-ReadingType-in-MetricDefinition.patch | 93 +++ ...rvice-fix-added-Context-field-to-response.patch | 29 - ...ort-for-deleting-terminated-subscriptions.patch | 46 ++ ...eneralize-ReadingType-in-MetricDefinition.patch | 93 --- .../interfaces/bmcweb/telemetry/README | 14 +- .../recipes-phosphor/interfaces/bmcweb_%.bbappend | 16 +- .../ipmi/phosphor-ipmi-host_%.bbappend | 8 +- ...003-Fix-for-clearing-outstanding-requests.patch | 62 ++ .../ipmi/phosphor-ipmi-ipmb_%.bbappend | 1 + .../recipes-phosphor/pmci/libpldm-intel_git.bb | 2 +- .../recipes-phosphor/pmci/mctp-emulator.bb | 2 +- .../recipes-phosphor/pmci/mctp-wrapper.bb | 2 +- .../meta-common/recipes-phosphor/pmci/mctpd.bb | 2 +- .../meta-common/recipes-phosphor/pmci/mctpwplus.bb | 2 +- .../meta-common/recipes-phosphor/pmci/pldmd.bb | 2 +- .../recipes-phosphor/pmci/pmci-launcher.bb | 2 +- .../sensors/dbus-sensors_%.bbappend | 2 +- .../special-mode-mgr/special-mode-mgr_git.bb | 1 + .../recipes-phosphor/watchdog/frb2-watchdog.bb | 6 +- .../phosphor-watchdog/phosphor-watchdog.service | 5 +- .../watchdog/phosphor-watchdog_%.bbappend | 2 +- .../recipes-phosphor/watchdog/system-watchdog.bb | 2 +- ...related-package-changes-from-the-axios-up.patch | 125 +++ .../recipes-phosphor/webui/webui-vue_%.bbappend | 7 +- .../recipes-support/boost-url/boost-url_git.bb | 17 - .../recipes-utilities/beeper-test/beeper-test.bb | 7 +- .../meta-common/recipes-utilities/io-app/io-app.bb | 7 +- .../recipes-utilities/lpc-cmds/lpc-cmds.bb | 9 +- .../recipes-utilities/oom-test/files/.clang-format | 99 +++ .../recipes-utilities/oom-test/files/meson.build | 21 + .../recipes-utilities/oom-test/files/oom-test.c | 86 ++ .../recipes-utilities/oom-test/oom-test.bb | 14 + .../chassis/x86-power-control_%.bbappend | 2 +- ...GPIOE0-and-GPIOE2-pass-through-by-default.patch | 70 ++ .../recipes-kernel/linux/linux-aspeed_%.bbappend | 5 + .../recipes-phosphor/fru/default-fru.bbappend | 2 +- .../recipes-phosphor/fru/default-fru.bbappend | 2 +- .../recipes-utilities/collectd/collectd_%.bbappend | 2 + 66 files changed, 2404 insertions(+), 711 deletions(-) create mode 100644 meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0035-Remove-u-boot-delay-before-autoboot-in-release-image.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-core/base-files/base-files/40-oom_reboot.conf create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0006-Change-HSBP-FRU-address-and-add-MUX-mode-configurati.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0010-Remove-Terminated-Event-Subscriptions.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-GET-method-for-TriggerCollection.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Revert-Remove-LogService-from-TelemetryService.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-event-service-fix-added-Context-field-to-response.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-Generalize-ReadingType-in-MetricDefinition.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-event-service-fix-added-Context-field-to-response.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Add-support-for-deleting-terminated-subscriptions.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue/0001-Undo-the-unrelated-package-changes-from-the-axios-up.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-support/boost-url/boost-url_git.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/.clang-format create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/meson.build create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/oom-test.c create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/oom-test/oom-test.bb create mode 100644 meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed/0001-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch create mode 100644 meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed_%.bbappend create mode 100644 meta-openbmc-mods/recipes-utilities/collectd/collectd_%.bbappend diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0035-Remove-u-boot-delay-before-autoboot-in-release-image.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0035-Remove-u-boot-delay-before-autoboot-in-release-image.patch new file mode 100644 index 000000000..17ef21308 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0035-Remove-u-boot-delay-before-autoboot-in-release-image.patch @@ -0,0 +1,34 @@ +From 7aeedcb63c6d83e7ad61b55a7098c2e6381a917c Mon Sep 17 00:00:00 2001 +From: AKSHAY RAVEENDRAN K +Date: Sun, 12 Sep 2021 19:16:59 +0000 +Subject: [PATCH] Remove u-boot delay before autoboot in release image + +Removed the delay in u-boot which allowed the user to stop +automatically booting to kernel in release image by changing +the delay value to negative. + +Tested: +After the fix, unable to stop the release image at u-boot +and prevent autoboot. + +Signed-off-by: AKSHAY RAVEENDRAN K +--- + include/configs/aspeed-common.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h +index 2be63a5c66..9707a49f90 100644 +--- a/include/configs/aspeed-common.h ++++ b/include/configs/aspeed-common.h +@@ -85,6 +85,8 @@ + + #define CONFIG_ENV_SECT_SIZE (4 << 10) + ++#define CONFIG_BOOTDELAY -2 ++ + /* + * Ethernet related + */ +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend index 2f24a602f..5b4885c2e 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend @@ -97,7 +97,13 @@ SRC_URI:append:intel-ast2600 = " \ PFR_SRC_URI = " \ file://0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-image.patch \ " + +AUTOBOOT_SRC_URI = " \ + file://0035-Remove-u-boot-delay-before-autoboot-in-release-image.patch \ + " + SRC_URI:append:intel-ast2600 += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', PFR_SRC_URI, '', d)}" +SRC_URI:append:intel-ast2600 += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', AUTOBOOT_SRC_URI, d)}" do_install:append () { install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config diff --git a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass index e65e75c0c..6de324049 100644 --- a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass +++ b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass @@ -78,6 +78,7 @@ IMAGE_INSTALL:append = " \ configure-usb-c \ zip \ peci-pcie \ + collectd \ " IMAGE_INSTALL:append = " ${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'pfr-manager', '', d)}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/base-files/base-files/40-oom_reboot.conf b/meta-openbmc-mods/meta-common/recipes-core/base-files/base-files/40-oom_reboot.conf new file mode 100644 index 000000000..43967a28b --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/base-files/base-files/40-oom_reboot.conf @@ -0,0 +1,4 @@ +# panic kernel on OOM +vm.panic_on_oom=2 +# reboot after 10 sec on panic +kernel.panic=10 diff --git a/meta-openbmc-mods/meta-common/recipes-core/base-files/base-files_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/base-files/base-files_%.bbappend index 799db92f3..ba5e41360 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/base-files/base-files_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/base-files/base-files_%.bbappend @@ -1,2 +1,15 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI:append = " file://fstab" +SRC_URI:append = " \ + file://fstab \ + file://40-oom_reboot.conf \ + " + +add_oom_reboot_config() { + install -d ${D}/${libdir}/sysctl.d + install -D -m 644 ${WORKDIR}/40-oom_reboot.conf ${D}/${libdir}/sysctl.d/40-oom_reboot.conf +} + +do_install:append() { + ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'add_oom_reboot_config', d)} +} + diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend index 9b5a06fc6..4811778ca 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend @@ -2,7 +2,7 @@ EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PF EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}" EXTRA_OECMAKE += "-DUSING_ENTITY_MANAGER_DECORATORS=OFF" SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git" -SRCREV = "98cb6186e77fb820dd26666118964897d36730be" +SRCREV = "e83c70aab0479a8103638166b330a06e499f4449" FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc index d808801c3..7dffc7c51 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc +++ b/meta-openbmc-mods/meta-common/recipes-core/logger-systemd/logger-systemd.inc @@ -19,7 +19,6 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 inherit autotools gettext pkgconfig DEPENDS = "libcap-ng ncurses virtual/crypt zlib systemd " #DEPENDS:intel-ast2500 += " systemd " -#RDEPENDS_${PN} += " libsystemd" MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${MAJOR_VERSION}.tar.xz \ diff --git a/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc index 95061a570..872e78eba 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc +++ b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc @@ -53,12 +53,12 @@ python() { 'describe --long --abbrev=6 ' + '--match \'{}-[0-9]*\.[0-9]*\''.format(gen)) - # If no tag in meta-openbmc-mods, provide default version + # If no tag, provide default version if meta_vers.startswith('fatal:'): - meta_vers = '{}-0.0-0'.format(gen) + meta_vers = '{}-0.0-0-g0'.format(gen) meta_hash = irun_git(d, mibase, 'rev-parse HEAD') - # If no hash from meta-openbmc-mods, provide default + # If no hash, provide default if meta_hash.startswith('fatal:'): meta_hash = '00000000' version_id = '{}-{}'.format(meta_vers, obmc_hash[0:7]) diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend index 38f687f98..d687b1124 100644 --- a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend @@ -2,4 +2,4 @@ FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" # Use the latest to support obmc-ikvm properly SRC_URI = "git://github.com/LibVNC/libvncserver" -SRCREV = "8f6b47ddb8f224510ec50d50012b17721bea6f2d" +SRCREV = "b889248659efa83cadf313e10493f4c9a3ac61ad" diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0009-ARM-dts-add-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0009-ARM-dts-add-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch index 4b84c831f..ef2196c44 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0009-ARM-dts-add-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0009-ARM-dts-add-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch @@ -1,4 +1,4 @@ -From dbd6feacb11dbcd81fb3586dd62170d3d5900c1c Mon Sep 17 00:00:00 2001 +From aed87d1ffe2d22986e38b22b1c77beadcd3376c8 Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo Date: Fri, 30 Jul 2021 14:17:24 -0700 Subject: [PATCH] ARM: dts: add rtc-pch node into aspeed-bmc-intel-ast2xxx @@ -13,10 +13,10 @@ Signed-off-by: Jae Hyun Yoo 2 files changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts -index 27f2febdb8e5..48e6029bcafc 100644 +index 2efa67f08dcb..a460169e1b7b 100644 --- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts +++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts -@@ -399,6 +399,11 @@ +@@ -383,6 +383,11 @@ aspeed,dma-buf-size = <4095>; aspeed,hw-timeout-ms = <300>; status = "okay"; @@ -29,12 +29,12 @@ index 27f2febdb8e5..48e6029bcafc 100644 &i2c4 { diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts -index 766496340b3c..8b2c20d200e1 100644 +index 02a671ca0f19..9bc859f69307 100644 --- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts +++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts -@@ -478,6 +478,11 @@ - /* SMB_HOST_STBY_BMC_LVC3_R */ +@@ -491,6 +491,11 @@ multi-master; + aspeed,hw-timeout-ms = <300>; status = "okay"; + + rtc-pch@44 { diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend index da5b88bb0..b5165c73c 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -6,7 +6,7 @@ KBRANCH = "dev-5.10-intel" KSRC = "git://github.com/Intel-BMC/linux;protocol=ssh;branch=${KBRANCH}" # Include this as a comment only for downstream auto-bump # SRC_URI = "git://github.com/Intel-BMC/linux;protocol=ssh;branch=dev-5.10-intel" -SRCREV="9c808fc8b3ad7c030fe546b1b5c6c38556fa784a" +SRCREV="c6e2963874ca7454eb901b4ac668f05b36cf03c8" do_compile:prepend(){ # device tree compiler flags diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend index f8010b283..63746d8be 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend @@ -3,7 +3,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += "nlohmann-json boost" SRC_URI = "git://github.com/openbmc/phosphor-networkd" -SRCREV = "b108fd740fdde4a9f0fe63e63ccdee695f5b92e7" +SRCREV = "2c0fc568057c5575a75ad638ea91bc8c65b57160" SRC_URI += " file://0003-Adding-channel-specific-privilege-to-network.patch \ file://0004-Fix-for-updating-MAC-address-from-RedFish.patch \ 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 a82a64f80..f24f69a5f 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 @@ -3,16 +3,14 @@ SUMMARY = "Beep code manager service" DESCRIPTION = "The beep code manager service will provide a method for beep code" SRC_URI = "\ - file://CMakeLists.txt \ - file://beepcode_mgr.cpp \ + file://CMakeLists.txt;subdir=${BP} \ + file://beepcode_mgr.cpp;subdir=${BP} \ " PV = "0.1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -S = "${WORKDIR}" - SYSTEMD_SERVICE:${PN} = "beepcode-mgr.service" inherit cmake diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0006-Change-HSBP-FRU-address-and-add-MUX-mode-configurati.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0006-Change-HSBP-FRU-address-and-add-MUX-mode-configurati.patch new file mode 100644 index 000000000..a3d065fd9 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0006-Change-HSBP-FRU-address-and-add-MUX-mode-configurati.patch @@ -0,0 +1,96 @@ +From 0ece2ae628f6d4ee57319dc7e153680cdddff1d2 Mon Sep 17 00:00:00 2001 +From: AKSHAY RAVEENDRAN K +Date: Sun, 12 Sep 2021 22:21:55 +0000 +Subject: [PATCH] Change HSBP FRU address and add MUX mode configuration + +Changed the HSBP EEPROM FRU address according to Hardware +rework and added the MUX idle mode configuration as +"Disconnect". The later will keep MUX channel mode in +disconnected state after the channel is accessed. + +Tested: +1. Detected and read the HSBP EEPROM FRU with new address +on reworked board. +2. Confirmed the idle state of MUX channel after it is +accessed is disconnected, this solved the bad read +caused by reading multiple buses of different MUXes at +same time. + +Signed-off-by: AKSHAY RAVEENDRAN K +--- + configurations/F2U8X25 HSBP.json | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/configurations/F2U8X25 HSBP.json b/configurations/F2U8X25 HSBP.json +index e2eedfa..60e7817 100644 +--- a/configurations/F2U8X25 HSBP.json ++++ b/configurations/F2U8X25 HSBP.json +@@ -16,6 +16,7 @@ + "Drive_3", + "Drive_4" + ], ++ "MuxIdleMode": "Disconnect", + "Name": "Drive Mux 1", + "Type": "PCA9546Mux" + }, +@@ -28,6 +29,7 @@ + "Drive_7", + "Drive_8" + ], ++ "MuxIdleMode": "Disconnect", + "Name": "Drive Mux 2", + "Type": "PCA9546Mux" + }, +@@ -65,7 +67,7 @@ + } + ], + "Name": "F2U8X25 HSBP 1", +- "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U8X25PCIHSBP', 'ADDRESS': 80})", ++ "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U8X25PCIHSBP', 'ADDRESS': 84})", + "Type": "Board", + "xyz.openbmc_project.Inventory.Decorator.Asset": { + "Manufacturer": "$BOARD_MANUFACTURER", +@@ -91,6 +93,7 @@ + "Drive_11", + "Drive_12" + ], ++ "MuxIdleMode": "Disconnect", + "Name": "Drive Mux 3", + "Type": "PCA9546Mux" + }, +@@ -103,6 +106,7 @@ + "Drive_15", + "Drive_16" + ], ++ "MuxIdleMode": "Disconnect", + "Name": "Drive Mux 4", + "Type": "PCA9546Mux" + }, +@@ -140,7 +144,7 @@ + } + ], + "Name": "F2U8X25 HSBP 2", +- "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U8X25PCIHSBP', 'ADDRESS': 83})", ++ "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U8X25PCIHSBP', 'ADDRESS': 87})", + "Type": "Board", + "xyz.openbmc_project.Inventory.Decorator.Asset": { + "Manufacturer": "$BOARD_MANUFACTURER", +@@ -166,6 +170,7 @@ + "Drive_19", + "Drive_20" + ], ++ "MuxIdleMode": "Disconnect", + "Name": "Drive Mux 5", + "Type": "PCA9546Mux" + }, +@@ -178,6 +183,7 @@ + "Drive_23", + "Drive_24" + ], ++ "MuxIdleMode": "Disconnect", + "Name": "Drive Mux 6", + "Type": "PCA9546Mux" + }, +-- +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 ff23c5831..a31b5ba93 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,6 +1,6 @@ # this is here just to bump faster than upstream # SRC_URI = "git://github.com/openbmc/entity-manager.git" -SRCREV = "e7ac9c9eb1d2e4b052d7f9b082ab4642eab304e9" +SRCREV = "8bb94ed6c9d64042ef367b5ff679336ff4d75093" FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" @@ -8,5 +8,6 @@ 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 \ + file://0006-Change-HSBP-FRU-address-and-add-MUX-mode-configurati.patch \ " 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 24e3700a6..83630fc36 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 @@ -3,16 +3,14 @@ SUMMARY = "PCH BMC time service" DESCRIPTION = "This service will read date/time from PCH device periodically, and set the BMC system time accordingly" SRC_URI = "\ - file://CMakeLists.txt \ - file://pch-time-sync.cpp \ + file://CMakeLists.txt;subdir=${BP} \ + file://pch-time-sync.cpp;subdir=${BP} \ " PV = "0.1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -S = "${WORKDIR}" - SYSTEMD_SERVICE:${PN} = "pch-time-sync.service" inherit cmake 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 aa0a08f0b..ba07f4736 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,7 +1,7 @@ # 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 = "6b50623459b54af222cb9a79c5a0c7912c92da41" +SRCREV = "3a665b28dcc0d9f6926a1f5eb20bc0d9d768418d" 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 5da365c02..41e824545 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 @@ -5,7 +5,7 @@ SYSTEMD_SERVICE:${PN} = "phosphor-pid-control.service" EXTRA_OECONF = "--enable-configure-dbus=yes" SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git" -SRCREV = "f7575a70018c09962500da8f4ba6883253651f62" +SRCREV = "e7507a8b55136accc501408d691bd816abc4833f" SRC_URI += "\ file://0001-allow-dbus-sensors-without-thresholds.patch \ 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 b113547da..a8dd35487 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 @@ -1,18 +1,15 @@ SUMMARY = "Default Fru" DESCRIPTION = "Builds a default FRU file at runtime based on board ID" -inherit systemd +inherit obmc-phosphor-systemd inherit cmake -SYSTEMD_SERVICE:${PN} = "SetBaseboardFru.service" - -S = "${WORKDIR}" -SRC_URI = "file://checkFru.sh \ - file://decodeBoardID.sh \ - file://SetBaseboardFru.service \ - file://mkfru.cpp \ - file://CMakeLists.txt \ +SRC_URI = "file://checkFru.sh;subdir=${BP} \ + file://decodeBoardID.sh;subdir=${BP} \ + file://mkfru.cpp;subdir=${BP} \ + file://CMakeLists.txt;subdir=${BP} \ " +SYSTEMD_SERVICE:${PN} = "SetBaseboardFru.service" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "\ @@ -24,9 +21,6 @@ RDEPENDS:${PN} = "bash" 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 - - install -d ${D}${base_libdir}/systemd/system - install -m 0644 ${S}/SetBaseboardFru.service ${D}${base_libdir}/systemd/system + 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 deleted file mode 100644 index c6ba3929c..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -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 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch new file mode 100644 index 000000000..0e4fc4903 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch @@ -0,0 +1,919 @@ +From 9814f83f36afafffa55bd19481654c064840e73d Mon Sep 17 00:00:00 2001 +From: Arun Lal K M +Date: Mon, 16 Aug 2021 17:49:11 +0000 +Subject: [PATCH] Add fix for broken feature 'Pending Attributes'. + +Fix is added for the following: +1) GET to 'redfish/v1/Systems/system/Bios'. +2) PATCH to 'redfish/v1/Systems/system/Bios/Settings'. +3) GET to 'redfish/v1/Systems/system/Bios/Settings'. +4) Fix for incremental duplicate values in BiosAttributeRegistry. + +Tested: +By giving PATCH to 'redfish/v1/Systems/system/Bios/Settings' +PATCH command raw data: +{ + "data":{ + "AmpPrefetchEnable": "0x1", + "Ce2LmLoggingEn": "0x1", + "DfxEadrDebugLogs": "0x2", + "PsfUrEnable": "0x1", + "ATS": "0x0" + } +} + +Response: +{ + "@Message.ExtendedInfo": [ + { + "@odata.type": "#Message.v1_1_1.Message", + "Message": "Successfully Completed Request", + "MessageArgs": [], + "MessageId": "Base.1.8.1.Success", + "MessageSeverity": "OK", + "Resolution": "None" + } + ] +} + +By giving GET to 'redfish/v1/Systems/system/Bios' +Response: +{ + "@Redfish.Settings": { + "@odata.type": "#Settings.v1_3_0.Settings", + "SettingsObject": { + "@odata.id": + "/redfish/v1/Systems/system/Bios/Settings" + } + }, + "@odata.id": "/redfish/v1/Systems/system/Bios", + "@odata.type": "#Bios.v1_1_0.Bios", + "Actions": { + "#Bios.ChangePassword": { + "target": + "/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword" + }, + "#Bios.ResetBios": { + "target": + "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios" + } + }, + "AttributeRegistry": "BiosAttributeRegistry", + "Attributes": { + "AEPErrorInjEn": "0x00", + "ARIEnable": "0x01", + "ARIForward": "0x00", + ... + ... + ... + "txEqCalibration": "0x01", + "volMemMode": "0x00", + "wrVrefCenter": "0x01" + }, + "Description": "BIOS Configuration Service", + "Id": "BIOS", + "Links": { + "ActiveSoftwareImage": { + "@odata.id": + "/redfish/v1/UpdateService/FirmwareInventory/bios_active" + }, + "SoftwareImages": [ + { + "@odata.id": + "/redfish/v1/UpdateService/FirmwareInventory/bios_active" + } + ], + "SoftwareImages@odata.count": 1 + }, + "Name": "BIOS Configuration" +} + +By giving GET to 'redfish/v1/Systems/system/Bios/Settings' +Response: +{ + "@odata.id": "/redfish/v1/Systems/system/Bios/Settings", + "@odata.type": "#Bios.v1_1_0.Bios", + "AttributeRegistry": "BiosAttributeRegistry", + "Attributes": { + "ATS": "0x0", + "AmpPrefetchEnable": "0x1", + "Ce2LmLoggingEn": "0x1", + "DfxEadrDebugLogs": "0x2", + "PsfUrEnable": "0x1" + }, + "Id": "BiosSettingsV1", + "Name": "Bios Settings Version 1" +} + +By running Redfish-Service-Validator +Result: +Elapsed time: 0:09:36 +invalidPropertyValue: 108 +metadataNamespaces: 2185 +missingNamespaces: 1 +optionalAction: 9 +pass: 13772 +passAction: 22 +passGet: 541 +reflink: 1 +repeat: 47 +serviceNamespaces: 75 +skipOptional: 9276 +unverifiedComplexAdditional: 1 +warnDeprecated: 230 +warningPresent: 54 +Validation has succeeded. + +Change-Id: Ib92eb7a1b81bef5adaf432b9225a183d7a78ebef +Signed-off-by: Arun Lal K M +--- + redfish-core/lib/bios.hpp | 583 ++++++++++++++++++++++++-------------- + 1 file changed, 374 insertions(+), 209 deletions(-) + +diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp +index 360a749..a927772 100644 +--- a/redfish-core/lib/bios.hpp ++++ b/redfish-core/lib/bios.hpp +@@ -12,13 +12,15 @@ map{attributeName,struct{attributeType,readonlyStatus,displayname, + description,menuPath,current,default, + array{struct{optionstring,optionvalue}}}} + */ +-using BiosBaseTableType = std::vector, std::variant, + std::vector< +- std::tuple>>>>>; ++ std::tuple>>>>; ++ + using BiosBaseTableItemType = std::pair< + std::string, + std::tuple< +@@ -29,6 +31,13 @@ using BiosBaseTableItemType = std::pair< + using OptionsItemType = + std::tuple>; + ++using PendingAttributesType = boost::container::flat_map< ++ std::string, std::tuple>>; ++ ++using PendingAttributesItemType = ++ std::pair>>; ++ + enum BiosBaseTableIndex + { + biosBaseAttrType = 0, +@@ -45,17 +54,7 @@ enum OptionsItemIndex + optItemType = 0, + optItemValue + }; +-/* +- The Pending attribute name and new value. +- ex- { {"QuietBoot",Type.Integer, 0x1}, +- { "DdrFreqLimit",Type.String,"2933"} +- } +-*/ +-using PendingAttributesType = std::vector>>>; +-using PendingAttributesItemType = +- std::pair>>; ++ + enum PendingAttributesIndex + { + pendingAttrType = 0, +@@ -64,31 +63,16 @@ enum PendingAttributesIndex + static std::string mapAttrTypeToRedfish(const std::string_view typeDbus) + { + std::string ret; +- if (typeDbus == "xyz.openbmc_project.BIOSConfig.Manager." +- "AttributeType.Enumeration") +- { +- ret = "Enumeration"; +- } +- else if (typeDbus == "xyz.openbmc_project.BIOSConfig." +- "Manager.AttributeType.String") ++ if (typeDbus == "xyz.openbmc_project.BIOSConfig." ++ "Manager.AttributeType.String") + { + ret = "String"; + } +- else if (typeDbus == "xyz.openbmc_project.BIOSConfig." +- "Manager.AttributeType.Password") +- { +- ret = "Password"; +- } + else if (typeDbus == "xyz.openbmc_project.BIOSConfig." + "Manager.AttributeType.Integer") + { + ret = "Integer"; + } +- else if (typeDbus == "xyz.openbmc_project.BIOSConfig." +- "Manager.AttributeType.Boolean") +- { +- ret = "Boolean"; +- } + else + { + ret = "UNKNOWN"; +@@ -96,29 +80,7 @@ static std::string mapAttrTypeToRedfish(const std::string_view typeDbus) + + return ret; + } +-static std::string mapRedfishToAttrType(const std::string_view type) +-{ +- std::string ret; +- if (type == "string") +- { +- ret = "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String"; +- } +- else if (type == "int") +- { +- ret = "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Integer"; +- } +- else if (type == "enum") +- { +- ret = "xyz.openbmc_project.BIOSConfig.Manager.AttributeType." +- "Enumeration"; +- } +- else +- { +- ret = "UNKNOWN"; +- } + +- return ret; +-} + static std::string mapBoundTypeToRedfish(const std::string_view typeDbus) + { + std::string ret; +@@ -208,6 +170,15 @@ inline void requestRoutesBiosService(App& app) + + return; + } ++ ++ if (getObjectType.empty()) ++ { ++ BMCWEB_LOG_ERROR << "getObjectType is empty."; ++ messages::internalError(asyncResp->res); ++ ++ return; ++ } ++ + const std::string& service = + getObjectType.begin()->first; + +@@ -231,7 +202,7 @@ inline void requestRoutesBiosService(App& app) + if (baseBiosTable == nullptr) + { + BMCWEB_LOG_ERROR +- << "baseBiosTable == nullptr "; ++ << "baseBiosTable is empty"; + messages::internalError(asyncResp->res); + return; + } +@@ -269,7 +240,6 @@ inline void requestRoutesBiosService(App& app) + { + BMCWEB_LOG_ERROR + << "Unsupported attribute type."; +- messages::internalError(asyncResp->res); + } + } + }, +@@ -293,7 +263,7 @@ inline void requestRoutesBiosService(App& app) + inline void requestRoutesBiosChangePassword(App& app) + { + BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/Bios/") +- .privileges({{"ConfigureComponents"}}) ++ .privileges(redfish::privileges::postBios) + .methods(boost::beast::http::verb::post)( + [](const crow::Request& req, + const std::shared_ptr& asyncResp) { +@@ -359,180 +329,298 @@ inline void requestRoutesBiosSettings(App& app) + { + BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/Bios/Settings") + .privileges(redfish::privileges::getBios) +- .methods(boost::beast::http::verb::get)( +- [](const crow::Request&, +- const std::shared_ptr& asyncResp) { +- asyncResp->res.jsonValue["@odata.id"] = +- asyncResp->res.jsonValue["@odata.id"] = +- "/redfish/v1/Systems/system/Bios/Settings"; +- asyncResp->res.jsonValue["@odata.type"] = "#Bios.v1_1_0.Bios"; +- asyncResp->res.jsonValue["Name"] = "Bios Settings Version 1"; +- asyncResp->res.jsonValue["Id"] = "BiosSettingsV1"; +- asyncResp->res.jsonValue["AttributeRegistry"] = +- "BiosAttributeRegistry"; +- asyncResp->res.jsonValue["Attributes"] = {}; ++ .methods( ++ boost::beast::http::verb:: ++ get)([](const crow::Request&, ++ const std::shared_ptr& asyncResp) { ++ asyncResp->res.jsonValue["@odata.id"] = ++ "/redfish/v1/Systems/system/Bios/Settings"; ++ asyncResp->res.jsonValue["@odata.type"] = "#Bios.v1_1_0.Bios"; ++ asyncResp->res.jsonValue["Name"] = "Bios Settings Version 1"; ++ asyncResp->res.jsonValue["Id"] = "BiosSettingsV1"; ++ asyncResp->res.jsonValue["AttributeRegistry"] = ++ "BiosAttributeRegistry"; ++ asyncResp->res.jsonValue["Attributes"] = {}; + +- crow::connections::systemBus->async_method_call( +- [asyncResp](const boost::system::error_code ec, +- const GetObjectType& getObjectType) { +- if (ec) +- { +- BMCWEB_LOG_ERROR +- << "ObjectMapper::GetObject call failed: " +- << ec; +- messages::internalError(asyncResp->res); ++ crow::connections::systemBus->async_method_call( ++ [asyncResp](const boost::system::error_code ec, ++ const GetObjectType& getObjectType) { ++ if (ec) ++ { ++ BMCWEB_LOG_ERROR ++ << "ObjectMapper::GetObject call failed: " << ec; ++ messages::internalError(asyncResp->res); + +- return; +- } +- std::string service = getObjectType.begin()->first; ++ return; ++ } + +- crow::connections::systemBus->async_method_call( +- [asyncResp]( +- const boost::system::error_code ec, +- const std::variant& +- retPendingAttributes) { +- if (ec) +- { +- BMCWEB_LOG_ERROR +- << "getBiosSettings DBUS error: " << ec; +- messages::resourceNotFound( +- asyncResp->res, "Systems/system/Bios", +- "Settings"); +- return; +- } +- const PendingAttributesType* pendingAttributes = +- std::get_if( +- &retPendingAttributes); +- nlohmann::json& attributesJson = +- asyncResp->res.jsonValue["Attributes"]; +- if (pendingAttributes == nullptr) +- { +- BMCWEB_LOG_ERROR +- << "pendingAttributes == nullptr "; +- messages::internalError(asyncResp->res); +- return; +- } +- for (const PendingAttributesItemType& item : +- *pendingAttributes) ++ if (getObjectType.empty()) ++ { ++ BMCWEB_LOG_ERROR << "getObjectType is empty."; ++ messages::internalError(asyncResp->res); ++ ++ return; ++ } ++ ++ std::string service = getObjectType.begin()->first; ++ ++ crow::connections::systemBus->async_method_call( ++ [asyncResp](const boost::system::error_code ec, ++ const std::variant& ++ retPendingAttributes) { ++ if (ec) ++ { ++ BMCWEB_LOG_ERROR ++ << "getBiosSettings DBUS error: " << ec; ++ messages::resourceNotFound( ++ asyncResp->res, "Systems/system/Bios", ++ "Settings"); ++ return; ++ } ++ ++ const PendingAttributesType* pendingAttributes = ++ std::get_if( ++ &retPendingAttributes); ++ nlohmann::json& attributesJson = ++ asyncResp->res.jsonValue["Attributes"]; ++ if (pendingAttributes == nullptr) ++ { ++ BMCWEB_LOG_ERROR ++ << "pendingAttributes is empty"; ++ messages::internalError(asyncResp->res); ++ return; ++ } ++ ++ for (const PendingAttributesItemType& ++ pendingAttributesItem : *pendingAttributes) ++ { ++ const std::string& biosAttrType = ++ std::get( ++ pendingAttributesItem.second); ++ ++ std::string itemType = ++ mapAttrTypeToRedfish(biosAttrType); ++ ++ if (itemType == "String") + { +- const std::string& key = item.first; +- const std::string& itemType = +- std::get(item.second); +- std::string attrType = +- mapAttrTypeToRedfish(itemType); +- if (attrType == "String") +- { +- const std::string* currValue = +- std::get_if( +- &std::get( +- item.second)); +- attributesJson.emplace( +- key, currValue != nullptr +- ? *currValue +- : ""); +- } +- else if (attrType == "Integer") ++ const std::string* currValue = ++ std::get_if( ++ &std::get( ++ pendingAttributesItem.second)); ++ ++ if (!currValue) + { +- const int64_t* currValue = +- std::get_if( +- &std::get( +- item.second)); +- attributesJson.emplace( +- key, currValue != nullptr +- ? *currValue +- : 0); ++ BMCWEB_LOG_ERROR ++ << "No string data in pending " ++ "attributes item data"; ++ messages::internalError(asyncResp->res); ++ return; + } +- else ++ ++ attributesJson.emplace( ++ pendingAttributesItem.first, ++ *currValue); ++ } ++ else if (itemType == "Integer") ++ { ++ const int64_t* currValue = ++ std::get_if( ++ &std::get( ++ pendingAttributesItem.second)); ++ ++ if (!currValue) + { + BMCWEB_LOG_ERROR +- << "Unsupported attribute type."; ++ << "No int64_t data in pending " ++ "attributes item data"; + messages::internalError(asyncResp->res); ++ return; + } ++ ++ attributesJson.emplace( ++ pendingAttributesItem.first, ++ *currValue); + } +- }, +- service, "/xyz/openbmc_project/bios_config/manager", +- "org.freedesktop.DBus.Properties", "Get", +- "xyz.openbmc_project.BIOSConfig.Manager", +- "PendingAttributes"); +- }, +- "xyz.openbmc_project.ObjectMapper", +- "/xyz/openbmc_project/object_mapper", +- "xyz.openbmc_project.ObjectMapper", "GetObject", +- "/xyz/openbmc_project/bios_config/manager", +- std::array()); +- }); ++ else ++ { ++ BMCWEB_LOG_ERROR ++ << "Unsupported attribute type."; ++ messages::internalError(asyncResp->res); ++ return; ++ } ++ } ++ }, ++ service, "/xyz/openbmc_project/bios_config/manager", ++ "org.freedesktop.DBus.Properties", "Get", ++ "xyz.openbmc_project.BIOSConfig.Manager", ++ "PendingAttributes"); ++ }, ++ "xyz.openbmc_project.ObjectMapper", ++ "/xyz/openbmc_project/object_mapper", ++ "xyz.openbmc_project.ObjectMapper", "GetObject", ++ "/xyz/openbmc_project/bios_config/manager", ++ std::array()); ++ }); + + BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/Bios/Settings") +- .privileges({{"ConfigureComponents"}}) +- .methods(boost::beast::http::verb::patch)( +- [](const crow::Request& req, +- const std::shared_ptr& asyncResp) { +- nlohmann::json inpJson; +- +- if (!redfish::json_util::readJson(req, asyncResp->res, "data", +- inpJson)) +- { +- return; +- } ++ .privileges(redfish::privileges::patchBios) ++ .methods( ++ boost::beast::http::verb:: ++ patch)([](const crow::Request& req, ++ const std::shared_ptr& asyncResp) { ++ nlohmann::json inpJson; ++ ++ if (!redfish::json_util::readJson(req, asyncResp->res, "data", ++ inpJson)) ++ { ++ BMCWEB_LOG_ERROR << "No 'data' in req!"; ++ return; ++ } ++ ++ if (inpJson.empty()) ++ { ++ messages::invalidObject(asyncResp->res, "data"); ++ BMCWEB_LOG_ERROR << "No input in req!"; ++ return; ++ } + +- for (auto& attrInfo : inpJson) +- { +- std::optional attrName; +- std::optional attrType; +- std::optional attrValue; +- if (!json_util::getValueFromJsonObject( +- attrInfo, "AttributeName", attrName)) +- { +- messages::propertyMissing(asyncResp->res, +- "AttributeName"); +- return; +- } +- if (!json_util::getValueFromJsonObject( +- attrInfo, "AttributeType", attrType)) +- { +- messages::propertyMissing(asyncResp->res, +- "AttributeType"); +- return; +- } +- if (!json_util::getValueFromJsonObject( +- attrInfo, "AttributeValue", attrValue)) ++ crow::connections::systemBus->async_method_call( ++ [asyncResp, inpJson](const boost::system::error_code ec, ++ const GetObjectType& getObjectType) { ++ if (ec) + { +- messages::propertyMissing(asyncResp->res, +- "AttributeValue"); ++ BMCWEB_LOG_ERROR ++ << "ObjectMapper::GetObject call failed: " << ec; ++ messages::internalError(asyncResp->res); ++ + return; + } +- std::string biosAttrType = mapRedfishToAttrType(*attrType); + +- if (biosAttrType == "UNKNOWN") ++ if (getObjectType.empty()) + { +- BMCWEB_LOG_ERROR << "Invalid attribute type"; +- messages::propertyValueNotInList( +- asyncResp->res, "AttributeType", *attrType); ++ BMCWEB_LOG_ERROR << "getObjectType is empty."; ++ messages::internalError(asyncResp->res); ++ + return; + } + +- PendingAttributesType pendingAttributes; +- pendingAttributes.emplace_back(std::make_pair( +- *attrName, std::make_tuple(biosAttrType, *attrValue))); ++ std::string service = getObjectType.begin()->first; + + crow::connections::systemBus->async_method_call( +- [asyncResp](const boost::system::error_code ec) { ++ [asyncResp, ++ inpJson](const boost::system::error_code ec, ++ const std::variant& ++ retBiosTable) { + if (ec) + { + BMCWEB_LOG_ERROR +- << "doPatch resp_handler got error " << ec; ++ << "getBiosAttributes DBUS error: " << ec; + messages::internalError(asyncResp->res); + return; + } ++ ++ const BiosBaseTableType* baseBiosTable = ++ std::get_if(&retBiosTable); ++ ++ if (baseBiosTable == nullptr) ++ { ++ BMCWEB_LOG_ERROR << "baseBiosTable is empty."; ++ messages::internalError(asyncResp->res); ++ return; ++ } ++ ++ PendingAttributesType pendingAttributes{}; ++ ++ for (nlohmann::detail::iteration_proxy_value< ++ nlohmann::detail::iter_impl< ++ const nlohmann::basic_json<>>>& ++ attributes : inpJson.items()) ++ { ++ BiosBaseTableType::const_iterator knobIter = ++ baseBiosTable->find(attributes.key()); ++ if (knobIter == baseBiosTable->end()) ++ { ++ BMCWEB_LOG_ERROR << "Cannot find " ++ << attributes.key() ++ << " in baseBiosTable"; ++ messages::propertyValueNotInList( ++ asyncResp->res, attributes.key(), ++ "data"); ++ return; ++ } ++ ++ const std::string& itemType = ++ std::get( ++ knobIter->second); ++ std::string attrType = ++ mapAttrTypeToRedfish(itemType); ++ ++ if (attrType == "String") ++ { ++ std::string val = attributes.value(); ++ ++ pendingAttributes.emplace( ++ attributes.key(), ++ std::make_tuple(itemType, val)); ++ } ++ else if (attrType == "Integer") ++ { ++ pendingAttributes.emplace( ++ attributes.key(), ++ std::make_tuple( ++ itemType, static_cast( ++ attributes.value()))); ++ } ++ else ++ { ++ BMCWEB_LOG_ERROR << "UNKNOWN attrType == " ++ << itemType; ++ messages::internalError(asyncResp->res); ++ ++ return; ++ } ++ } ++ ++ if (pendingAttributes.empty()) ++ { ++ BMCWEB_LOG_ERROR ++ << "pendingAttributes is empty."; ++ messages::invalidObject(asyncResp->res, "data"); ++ } ++ ++ crow::connections::systemBus->async_method_call( ++ [asyncResp]( ++ const boost::system::error_code ec) { ++ if (ec) ++ { ++ BMCWEB_LOG_ERROR ++ << "doPatch resp_handler got error " ++ << ec << "\n"; ++ messages::internalError(asyncResp->res); ++ return; ++ } ++ ++ messages::success(asyncResp->res); ++ }, ++ "xyz.openbmc_project.BIOSConfigManager", ++ "/xyz/openbmc_project/bios_config/manager", ++ "org.freedesktop.DBus.Properties", "Set", ++ "xyz.openbmc_project.BIOSConfig.Manager", ++ "PendingAttributes", ++ std::variant( ++ pendingAttributes)); + }, +- "xyz.openbmc_project.BIOSConfigManager", +- "/xyz/openbmc_project/bios_config/manager", +- "org.freedesktop.DBus.Properties", "Set", ++ service, "/xyz/openbmc_project/bios_config/manager", ++ "org.freedesktop.DBus.Properties", "Get", + "xyz.openbmc_project.BIOSConfig.Manager", +- "PendingAttributes", +- std::variant(pendingAttributes)); +- } +- }); ++ "BaseBIOSTable"); ++ }, ++ "xyz.openbmc_project.ObjectMapper", ++ "/xyz/openbmc_project/object_mapper", ++ "xyz.openbmc_project.ObjectMapper", "GetObject", ++ "/xyz/openbmc_project/bios_config/manager", ++ std::array()); ++ }); + } + /** + * BiosAttributeRegistry class supports handle get method for BIOS attribute +@@ -572,6 +660,15 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + + return; + } ++ ++ if (getObjectType.empty()) ++ { ++ BMCWEB_LOG_ERROR << "getObjectType is empty."; ++ messages::internalError(asyncResp->res); ++ ++ return; ++ } ++ + std::string service = getObjectType.begin()->first; + + crow::connections::systemBus->async_method_call( +@@ -592,8 +689,6 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + nlohmann::json& attributeArray = + asyncResp->res + .jsonValue["RegistryEntries"]["Attributes"]; +- nlohmann::json optionsArray = +- nlohmann::json::array(); + if (baseBiosTable == nullptr) + { + BMCWEB_LOG_ERROR << "baseBiosTable == nullptr "; +@@ -609,10 +704,11 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + mapAttrTypeToRedfish(itemType); + if (attrType == "UNKNOWN") + { +- BMCWEB_LOG_ERROR << "attrType == UNKNOWN"; +- messages::internalError(asyncResp->res); +- return; ++ BMCWEB_LOG_ERROR << "UNKNOWN attrType == " ++ << itemType; ++ continue; + } ++ + nlohmann::json attributeItem; + attributeItem["AttributeName"] = item.first; + attributeItem["Type"] = attrType; +@@ -632,10 +728,30 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + std::get_if( + &std::get( + item.second)); ++ ++ if (!currValue) ++ { ++ BMCWEB_LOG_ERROR ++ << "Unable to get currValue, no " ++ "std::string data in BIOS " ++ "attributes item data"; ++ continue; ++ } ++ + const std::string* defValue = + std::get_if( + &std::get( + item.second)); ++ ++ if (!defValue) ++ { ++ BMCWEB_LOG_ERROR ++ << "Unable to get defValue, no " ++ "std::string data in BIOS " ++ "attributes item data"; ++ continue; ++ } ++ + attributeItem["CurrentValue"] = + currValue != nullptr ? *currValue : ""; + attributeItem["DefaultValue"] = +@@ -647,10 +763,30 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + std::get_if( + &std::get( + item.second)); ++ ++ if (!currValue) ++ { ++ BMCWEB_LOG_ERROR ++ << "Unable to get currValue, no " ++ "int64_t data in BIOS " ++ "attributes item data"; ++ continue; ++ } ++ + const int64_t* defValue = + std::get_if( + &std::get( + item.second)); ++ ++ if (!defValue) ++ { ++ BMCWEB_LOG_ERROR ++ << "Unable to get defValue, no " ++ "int64_t data in BIOS " ++ "attributes item data"; ++ continue; ++ } ++ + attributeItem["CurrentValue"] = + currValue != nullptr ? *currValue : 0; + attributeItem["DefaultValue"] = +@@ -658,12 +794,13 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + } + else + { +- BMCWEB_LOG_ERROR +- << "Unsupported attribute type."; +- messages::internalError(asyncResp->res); +- return; ++ BMCWEB_LOG_ERROR << "UNKNOWN attrType == " ++ << itemType; ++ continue; + } + ++ nlohmann::json optionsArray = ++ nlohmann::json::array(); + const std::vector& + optionsVector = + std::get(item.second); +@@ -678,9 +815,9 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + if (optItemTypeRedfish == "UNKNOWN") + { + BMCWEB_LOG_ERROR +- << "optItemTypeRedfish == UNKNOWN"; +- messages::internalError(asyncResp->res); +- return; ++ << "UNKNOWN optItemTypeRedfish == " ++ << strOptItemType; ++ continue; + } + if (optItemTypeRedfish == "OneOf") + { +@@ -688,6 +825,17 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + std::get_if( + &std::get( + optItem)); ++ ++ if (!currValue) ++ { ++ BMCWEB_LOG_ERROR ++ << "Unable to get currValue, " ++ "no " ++ "std::string data in option " ++ "item value"; ++ continue; ++ } ++ + optItemJson[optItemTypeRedfish] = + currValue != nullptr ? *currValue + : ""; +@@ -698,6 +846,17 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + std::get_if( + &std::get( + optItem)); ++ ++ if (!currValue) ++ { ++ BMCWEB_LOG_ERROR ++ << "Unable to get currValue, " ++ "no " ++ "int64_t data in option " ++ "item value"; ++ continue; ++ } ++ + optItemJson[optItemTypeRedfish] = + currValue != nullptr ? *currValue + : 0; +@@ -706,6 +865,12 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + optionsArray.push_back(optItemJson); + } + ++ if (optionsArray.empty()) ++ { ++ BMCWEB_LOG_ERROR << "optionsArray is empty"; ++ continue; ++ } ++ + attributeItem["Value"] = optionsArray; + attributeArray.push_back(attributeItem); + } +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0010-Remove-Terminated-Event-Subscriptions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0010-Remove-Terminated-Event-Subscriptions.patch new file mode 100644 index 000000000..7fcc235d2 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0010-Remove-Terminated-Event-Subscriptions.patch @@ -0,0 +1,258 @@ +From adaa5cb4c494148430b90edb248260eb2e66bca7 Mon Sep 17 00:00:00 2001 +From: P Dheeraj Srujan Kumar +Date: Wed, 8 Sep 2021 15:42:52 +0530 +Subject: [PATCH] Delete/Remove Terminated Event Subscription(s) + +Added functionality to delete/remove event subscription(s) which are +configured to Terminate after retries. + +Currently, when an Event is subscribed with Retry Policy as +"TerminateAfterRetries", the state of the connection is set to +"Terminated" after retrying, but the Subscription is not removed. +This commit adds the functionality to detect terminated connection and +remove the respective subscription. + +Tested: + - Created a Subscription with + DeliveryRetryPolicy: "TerminateAfterRetries" + - Received Events successfully on Event listener + - Once the Event listener was stopped, the Subscription was + removed/deleted after retries. + +Change-Id: If447acb2db74fb29a5d1cfe6194b77cda82bc8a1 +Signed-off-by: P Dheeraj Srujan Kumar +--- + http/http_client.hpp | 43 +++++++++++++++---- + .../include/event_service_manager.hpp | 37 ++++++++++++++++ + 2 files changed, 71 insertions(+), 9 deletions(-) + +diff --git a/http/http_client.hpp b/http/http_client.hpp +index aaf1b2d..4f62c40 100644 +--- a/http/http_client.hpp ++++ b/http/http_client.hpp +@@ -56,6 +56,8 @@ enum class ConnState + closeInProgress, + closed, + suspended, ++ terminate, ++ terminateInProgress, + terminated, + abortConnection, + retry +@@ -263,7 +265,14 @@ class HttpClient : public std::enable_shared_from_this + } + void doClose() + { +- state = ConnState::closeInProgress; ++ if (state == ConnState::terminate) ++ { ++ state = ConnState::terminateInProgress; ++ } ++ else if (state != ConnState::suspended) ++ { ++ state = ConnState::closeInProgress; ++ } + + // Set the timeout on the tcp stream socket for the async operation + conn.expires_after(std::chrono::seconds(30)); +@@ -293,8 +302,11 @@ class HttpClient : public std::enable_shared_from_this + } + self->conn.close(); + +- if ((self->state != ConnState::suspended) && +- (self->state != ConnState::terminated)) ++ if (self->state == ConnState::terminateInProgress) ++ { ++ self->state = ConnState::terminated; ++ } ++ else if (self->state == ConnState::closeInProgress) + { + self->state = ConnState::closed; + self->handleConnState(); +@@ -316,8 +328,11 @@ class HttpClient : public std::enable_shared_from_this + } + conn.close(); + +- if ((state != ConnState::suspended) && +- (state != ConnState::terminated)) ++ if (state == ConnState::terminateInProgress) ++ { ++ state = ConnState::terminated; ++ } ++ else if (state == ConnState::closeInProgress) + { + state = ConnState::closed; + handleConnState(); +@@ -340,8 +355,7 @@ class HttpClient : public std::enable_shared_from_this + BMCWEB_LOG_DEBUG << "Retry policy: " << retryPolicyAction; + if (retryPolicyAction == "TerminateAfterRetries") + { +- // TODO: delete subscription +- state = ConnState::terminated; ++ state = ConnState::terminate; + } + if (retryPolicyAction == "SuspendRetries") + { +@@ -392,6 +406,7 @@ class HttpClient : public std::enable_shared_from_this + case ConnState::sendInProgress: + case ConnState::recvInProgress: + case ConnState::closeInProgress: ++ case ConnState::terminateInProgress: + { + BMCWEB_LOG_DEBUG << "Async operation is already in progress"; + break; +@@ -413,7 +428,7 @@ class HttpClient : public std::enable_shared_from_this + break; + } + case ConnState::suspended: +- case ConnState::terminated: ++ case ConnState::terminate: + { + doClose(); + break; +@@ -480,7 +495,8 @@ class HttpClient : public std::enable_shared_from_this + } + void sendData(const std::string& data) + { +- if ((state == ConnState::suspended) || (state == ConnState::terminated)) ++ if ((state == ConnState::terminate) || ++ (state == ConnState::terminated) || (state == ConnState::suspended)) + { + return; + } +@@ -489,6 +505,15 @@ class HttpClient : public std::enable_shared_from_this + return; + } + ++ bool isTerminated() ++ { ++ if (state == ConnState::terminated) ++ { ++ return true; ++ } ++ return false; ++ } ++ + void addHeaders( + const std::vector>& httpHeaders) + { +diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp +index 8d7067b..79618f6 100644 +--- a/redfish-core/include/event_service_manager.hpp ++++ b/redfish-core/include/event_service_manager.hpp +@@ -591,6 +591,14 @@ class Subscription : public persistent_data::UserSubscription + return std::nullopt; + } + ++ bool isTerminated() ++ { ++ if (conn != nullptr) ++ return conn->isTerminated(); ++ ++ return false; ++ } ++ + private: + std::shared_ptr sseConn = nullptr; + uint64_t eventSeqNum; +@@ -847,6 +855,22 @@ class EventServiceManager + } + } + ++ void deleteTerminatedSubcriptions() ++ { ++ boost::container::flat_map>::iterator it = ++ subscriptionsMap.begin(); ++ while (it != subscriptionsMap.end()) ++ { ++ std::shared_ptr entry = it->second; ++ if (entry->isTerminated()) ++ { ++ subscriptionsMap.erase(it); ++ } ++ it++; ++ } ++ } ++ + void updateNoOfSubscribersCount() + { + size_t eventLogSubCount = 0; +@@ -881,6 +905,7 @@ class EventServiceManager + + std::shared_ptr getSubscription(const std::string& id) + { ++ deleteTerminatedSubcriptions(); + auto obj = subscriptionsMap.find(id); + if (obj == subscriptionsMap.end()) + { +@@ -971,6 +996,7 @@ class EventServiceManager + + bool isSubscriptionExist(const std::string& id) + { ++ deleteTerminatedSubcriptions(); + auto obj = subscriptionsMap.find(id); + if (obj == subscriptionsMap.end()) + { +@@ -1033,6 +1059,7 @@ class EventServiceManager + + size_t getNumberOfSubscriptions() + { ++ deleteTerminatedSubcriptions(); + return subscriptionsMap.size(); + } + +@@ -1049,6 +1076,7 @@ class EventServiceManager + + std::vector getAllIDs() + { ++ deleteTerminatedSubcriptions(); + std::vector idList; + for (const auto& it : subscriptionsMap) + { +@@ -1059,6 +1087,7 @@ class EventServiceManager + + bool isDestinationExist(const std::string& destUrl) + { ++ deleteTerminatedSubcriptions(); + for (const auto& it : subscriptionsMap) + { + std::shared_ptr entry = it.second; +@@ -1073,6 +1102,7 @@ class EventServiceManager + + void sendTestEventLog() + { ++ deleteTerminatedSubcriptions(); + for (const auto& it : this->subscriptionsMap) + { + std::shared_ptr entry = it.second; +@@ -1100,6 +1130,8 @@ class EventServiceManager + } + eventRecord.push_back(eventMessage); + ++ deleteTerminatedSubcriptions(); ++ + for (const auto& it : this->subscriptionsMap) + { + std::shared_ptr entry = it.second; +@@ -1143,6 +1175,8 @@ class EventServiceManager + } + void sendBroadcastMsg(const std::string& broadcastMsg) + { ++ deleteTerminatedSubcriptions(); ++ + for (const auto& it : this->subscriptionsMap) + { + std::shared_ptr entry = it.second; +@@ -1291,6 +1325,8 @@ class EventServiceManager + return; + } + ++ deleteTerminatedSubcriptions(); ++ + for (const auto& it : this->subscriptionsMap) + { + std::shared_ptr entry = it.second; +-- +2.17.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 deleted file mode 100644 index aabe500f5..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 4cf883dba6e16c56d04dbd092d30c9a13d5a5eb4 Mon Sep 17 00:00:00 2001 -From: Lukasz Kazmierczak -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/ or via - /redfish/v1/TelemetryService/MetricReportDefinitions/ -- 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 -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&, -+ const std::string&)> -+ getMetricReportDeleteHandler(const std::string& type) -+{ -+ return [type](const crow::Request&, -+ const std::shared_ptr& 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//") -+ .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//") - .privileges(redfish::privileges::deleteMetricReportDefinitionCollection) - .methods(boost::beast::http::verb::delete_)( -- [](const crow::Request&, -- const std::shared_ptr& 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/0005-Add-GET-method-for-TriggerCollection.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-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/0005-Add-GET-method-for-TriggerCollection.patch @@ -0,0 +1,313 @@ +From a1e89d356ba5ed594a1494efe8257946e1062396 Mon Sep 17 00:00:00 2001 +From: Lukasz Kazmierczak +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 +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 + getMetadataJson(const std::string& metadataStr) +@@ -57,15 +64,27 @@ inline std::optional + return res; + } + +-inline void +- getReportCollection(const std::shared_ptr& asyncResp, +- const std::string& uri) ++struct CollectionParams + { +- const std::array interfaces = {reportInterface}; ++ const char* subtree; ++ int depth; ++ std::array interfaces; + ++ CollectionParams() = delete; ++ CollectionParams(const char* st, int dp, ++ const std::array& ifaces) : ++ subtree{st}, ++ depth{dp}, interfaces{ifaces} ++ {} ++}; ++ ++inline void getCollection(const std::shared_ptr& 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& reports) { ++ const std::vector& 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 ++#include ++ ++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& 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 @@ + + + ++ ++ ++ + + + +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 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ /redfish/v1/TelemetryService/Triggers ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +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 deleted file mode 100644 index 0646aba5c..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch +++ /dev/null @@ -1,313 +0,0 @@ -From a1e89d356ba5ed594a1494efe8257946e1062396 Mon Sep 17 00:00:00 2001 -From: Lukasz Kazmierczak -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 -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 - getMetadataJson(const std::string& metadataStr) -@@ -57,15 +64,27 @@ inline std::optional - return res; - } - --inline void -- getReportCollection(const std::shared_ptr& asyncResp, -- const std::string& uri) -+struct CollectionParams - { -- const std::array interfaces = {reportInterface}; -+ const char* subtree; -+ int depth; -+ std::array interfaces; - -+ CollectionParams() = delete; -+ CollectionParams(const char* st, int dp, -+ const std::array& ifaces) : -+ subtree{st}, -+ depth{dp}, interfaces{ifaces} -+ {} -+}; -+ -+inline void getCollection(const std::shared_ptr& 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& reports) { -+ const std::vector& 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 -+#include -+ -+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& 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 @@ - - - -+ -+ -+ - - - -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 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ /redfish/v1/TelemetryService/Triggers -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ --- -2.25.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Revert-Remove-LogService-from-TelemetryService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Revert-Remove-LogService-from-TelemetryService.patch new file mode 100644 index 000000000..987a43b4c --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Revert-Remove-LogService-from-TelemetryService.patch @@ -0,0 +1,26 @@ +From 472ac5f15a19917042852b243e8b668b3ab49e32 Mon Sep 17 00:00:00 2001 +From: Krzysztof Grobelny +Date: Tue, 22 Jun 2021 13:59:48 +0000 +Subject: [PATCH] Revert "Remove LogService from TelemetryService" + +This reverts commit 2b3da45876aac57a36d3093379a992d699e7e396. +--- + redfish-core/lib/telemetry_service.hpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp +index 37221c3..f3a1efb 100644 +--- a/redfish-core/lib/telemetry_service.hpp ++++ b/redfish-core/lib/telemetry_service.hpp +@@ -30,6 +30,8 @@ inline void requestRoutesTelemetryService(App& app) + "/redfish/v1/TelemetryService/MetricReports"; + asyncResp->res.jsonValue["MetricDefinitions"]["@odata.id"] = + "/redfish/v1/TelemetryService/MetricDefinitions"; ++ asyncResp->res.jsonValue["LogService"]["@odata.id"] = ++ "/redfish/v1/Managers/bmc/LogServices/Journal"; + + crow::connections::systemBus->async_method_call( + [asyncResp]( +-- +2.25.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch deleted file mode 100644 index 987a43b4c..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 472ac5f15a19917042852b243e8b668b3ab49e32 Mon Sep 17 00:00:00 2001 -From: Krzysztof Grobelny -Date: Tue, 22 Jun 2021 13:59:48 +0000 -Subject: [PATCH] Revert "Remove LogService from TelemetryService" - -This reverts commit 2b3da45876aac57a36d3093379a992d699e7e396. ---- - redfish-core/lib/telemetry_service.hpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp -index 37221c3..f3a1efb 100644 ---- a/redfish-core/lib/telemetry_service.hpp -+++ b/redfish-core/lib/telemetry_service.hpp -@@ -30,6 +30,8 @@ inline void requestRoutesTelemetryService(App& app) - "/redfish/v1/TelemetryService/MetricReports"; - asyncResp->res.jsonValue["MetricDefinitions"]["@odata.id"] = - "/redfish/v1/TelemetryService/MetricDefinitions"; -+ asyncResp->res.jsonValue["LogService"]["@odata.id"] = -+ "/redfish/v1/Managers/bmc/LogServices/Journal"; - - crow::connections::systemBus->async_method_call( - [asyncResp]( --- -2.25.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-event-service-fix-added-Context-field-to-response.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-event-service-fix-added-Context-field-to-response.patch new file mode 100644 index 000000000..ffab743f6 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-event-service-fix-added-Context-field-to-response.patch @@ -0,0 +1,29 @@ +From 0ca8c383db8c9afbce63380955a20ada0acc20b7 Mon Sep 17 00:00:00 2001 +From: Krzysztof Grobelny +Date: Wed, 2 Jun 2021 12:44:43 +0000 +Subject: [PATCH] event service fix, added Context field to response + +Tested: + - Context field is present + - No regression detected + +Signed-off-by: Krzysztof Grobelny +--- + redfish-core/include/event_service_manager.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp +index 2b957ea..289886b 100644 +--- a/redfish-core/include/event_service_manager.hpp ++++ b/redfish-core/include/event_service_manager.hpp +@@ -556,6 +556,7 @@ class Subscription + << id; + return; + } ++ msg["Context"] = customText; + + this->sendEvent( + msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace)); +-- +2.25.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-Generalize-ReadingType-in-MetricDefinition.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-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/0008-Generalize-ReadingType-in-MetricDefinition.patch @@ -0,0 +1,93 @@ +From d9baec3ccdff5ed4d1620f374a252c769de5b45b Mon Sep 17 00:00:00 2001 +From: Krzysztof Grobelny +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(std::toupper(group[0])); ++ } ++ return group; ++} ++ + void addMembers(crow::Response& res, + const boost::container::flat_map& 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>& + 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& 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/0008-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 deleted file mode 100644 index ffab743f6..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-event-service-fix-added-Context-field-to-response.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0ca8c383db8c9afbce63380955a20ada0acc20b7 Mon Sep 17 00:00:00 2001 -From: Krzysztof Grobelny -Date: Wed, 2 Jun 2021 12:44:43 +0000 -Subject: [PATCH] event service fix, added Context field to response - -Tested: - - Context field is present - - No regression detected - -Signed-off-by: Krzysztof Grobelny ---- - redfish-core/include/event_service_manager.hpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp -index 2b957ea..289886b 100644 ---- a/redfish-core/include/event_service_manager.hpp -+++ b/redfish-core/include/event_service_manager.hpp -@@ -556,6 +556,7 @@ class Subscription - << id; - return; - } -+ msg["Context"] = customText; - - this->sendEvent( - msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace)); --- -2.25.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Add-support-for-deleting-terminated-subscriptions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Add-support-for-deleting-terminated-subscriptions.patch new file mode 100644 index 000000000..548e3d9c6 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Add-support-for-deleting-terminated-subscriptions.patch @@ -0,0 +1,46 @@ +From ef83a4fb14648edc6c8370363ff88fb6f060a43b Mon Sep 17 00:00:00 2001 +From: P Dheeraj Srujan Kumar +Date: Mon, 20 Sep 2021 21:55:57 +0530 +Subject: [PATCH] Add support for deleting terminated subscriptions + +Added functionality to delete/remove event subscription(s) which are +configured to Terminate after retries. + +Currently, when an Event is subscribed with Retry Policy as +"TerminateAfterRetries", the state of the connection is set to +"Terminated" after retrying, but the Subscription is not removed. +This commit adds the functionality to detect terminated connection and +remove the respective subscription. + +This commit adds this check for metric reports. + +Tested: + - Created a Subscription with + DeliveryRetryPolicy: "TerminateAfterRetries" + - Received Events successfully on Event listener + - Once the Event listener was stopped, the Subscription was + removed/deleted after retries. + +Change-Id: I3cb0af5bc24411cddcdb3d1d9de25e8e9144106c +Signed-off-by: P Dheeraj Srujan Kumar +--- + redfish-core/include/event_service_manager.hpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp +index c9e2812..c2fefb3 100644 +--- a/redfish-core/include/event_service_manager.hpp ++++ b/redfish-core/include/event_service_manager.hpp +@@ -1535,6 +1535,9 @@ class EventServiceManager + + std::variant& readings = + found->second; ++ ++ this->deleteTerminatedSubcriptions(); ++ + for (const auto& it : + EventServiceManager::getInstance().subscriptionsMap) + { +-- +2.17.1 + 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 deleted file mode 100644 index bd6e64346..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch +++ /dev/null @@ -1,93 +0,0 @@ -From d9baec3ccdff5ed4d1620f374a252c769de5b45b Mon Sep 17 00:00:00 2001 -From: Krzysztof Grobelny -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(std::toupper(group[0])); -+ } -+ return group; -+} -+ - void addMembers(crow::Response& res, - const boost::container::flat_map& 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>& - 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& 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 8dab07e2b..fd88e9e18 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 @@ -14,17 +14,17 @@ Current revisions: - Add support for MetricDefinition property in MetricReport 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 + file://telemetry/0005-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 + file://telemetry/0006-Revert-Remove-LogService-from-TelemetryService.patch - Event service fix for Context field - file://telemetry/0008-event-service-fix-added-Context-field-to-response.patch + file://telemetry/0007-event-service-fix-added-Context-field-to-response.patch - Generalize ReadingType in MetricDefinition - file://telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch + file://telemetry/0008-Generalize-ReadingType-in-MetricDefinition.patch + +- Add support for deleting terminated subscriptions + file://telemetry/0009-Add-support-for-deleting-terminated-subscriptions.patch 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 0a7d18085..7806b5481 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -36,6 +36,7 @@ SRC_URI += "file://biosconfig/0001-Define-Redfish-interface-Registries-Bios.patc file://biosconfig/0003-Add-support-to-ResetBios-action.patch \ file://biosconfig/0004-Add-support-to-ChangePassword-action.patch \ file://biosconfig/0005-Fix-remove-bios-user-pwd-change-option-via-Redfish.patch \ + file://biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch \ " # Virtual Media: Backend code is not upstreamed so downstream only patches. @@ -57,6 +58,7 @@ SRC_URI += "file://eventservice/0001-EventService-Fix-retry-handling-for-http-cl file://eventservice/0007-EventService-Log-events-for-subscription-actions.patch \ file://eventservice/0008-Add-checks-on-Event-Subscription-input-parameters.patch \ file://eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch \ + file://eventservice/0010-Remove-Terminated-Event-Subscriptions.patch \ " # Temporary downstream mirror of upstream patches, see telemetry\README for details @@ -64,11 +66,11 @@ SRC_URI += " file://telemetry/0001-Add-support-for-MetricDefinition-scheme.patch file://telemetry/0002-Sync-Telmetry-service-with-EventService.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 \ + file://telemetry/0005-Add-GET-method-for-TriggerCollection.patch \ + file://telemetry/0006-Revert-Remove-LogService-from-TelemetryService.patch \ + file://telemetry/0007-event-service-fix-added-Context-field-to-response.patch \ + file://telemetry/0008-Generalize-ReadingType-in-MetricDefinition.patch \ + file://telemetry/0009-Add-support-for-deleting-terminated-subscriptions.patch \ " # Temporary fix: Move it to service file @@ -77,6 +79,10 @@ do_install:append() { install -d ${D}/etc/ssl/certs/authority } +# Temporary fix:Enable new power and thermal subsystem +EXTRA_OEMESON += " -Dredfish-new-powersubsystem-thermalsubsystem=enabled" +EXTRA_OEMESON += " -Dredfish-allow-deprecated-power-thermal=disabled" + # Enable PFR support EXTRA_OEMESON += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-Dredfish-provisioning-feature=enabled', '', d)}" 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 c40ecad7e..fd45b0e1c 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 @@ -18,16 +18,12 @@ EXTRA_OECONF:append = " --disable-ipmi-whitelist" 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 = " \ - ${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(){ cp -f ${PROJECT_SRC_DIR}/transporthandler_oem.cpp ${S} diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch new file mode 100644 index 000000000..ffa3ab1b0 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch @@ -0,0 +1,62 @@ +From e107bdc375aa23a4c0a3d23978cfe8b378bce09a Mon Sep 17 00:00:00 2001 +From: Jayaprakash Mutyala +Date: Mon, 20 Sep 2021 14:06:05 +0000 +Subject: [PATCH] Fix for clearing outstanding requests + +IPMB requests were made valid even if there was an error in opening the +mux bus. This fix makes the IPMB requests valid only we were able to +successfully open the Mux fd. + +Tested: +Verified using busctl command. +Command: busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb + /xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb + sendRequest yyyyay 0 0x30 0 0x70 2 0 32 +Response: (iyyyyay) 0 49 0 112 193 0 + +Signed-off-by: Jayaprakash Mutyala +--- + ipmbbridged.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp +index 3ffc1f7..0508fcc 100644 +--- a/ipmbbridged.cpp ++++ b/ipmbbridged.cpp +@@ -801,7 +801,6 @@ std::tuple> + std::shared_ptr request, + const uint8_t pcieSlot) + { +- makeRequestValid(request); + std::filesystem::path p = + "/dev/i2c-mux/PCIE_Mux/Pcie_Slot_" + std::to_string(pcieSlot); + +@@ -825,6 +824,7 @@ std::tuple> + return returnStatus(ipmbResponseStatus::error); + } + ++ makeRequestValid(request); + uint8_t size = buffer.size(); + + const uint8_t slaveAddrIndex = 1; +@@ -894,6 +894,7 @@ std::tuple> + std::vector buffer(0); + if (request->ipmbToi2cConstruct(buffer) != 0) + { ++ makeRequestInvalid(*request); + return returnStatus(ipmbResponseStatus::error); + } + +@@ -929,7 +930,8 @@ std::tuple> + " To avoid log storm, not all the logs for the " + "issue will be shown: "; + } +- if (!(requestAddLogCount % ipmbRequestAddLogInterval) && (requestAddLogCount != 0)) ++ if (!(requestAddLogCount % ipmbRequestAddLogInterval) && ++ (requestAddLogCount != 0)) + { + msgToLog = "requestAdd: There are " + + std::to_string(requestAddLogCount) + +-- +2.17.1 + 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 465bd4c64..1ddd13477 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 @@ -3,6 +3,7 @@ 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://0003-Fix-for-clearing-outstanding-requests.patch \ file://ipmb-channels.json \ " 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 03d4d5ee9..3e2bfc603 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 = "02b272fb17a5fe835311818e9194eb0cd49db20c" +SRCREV = "c76742e725d7a1ebbee8a2d95168da8a53f0b2e1" 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 2fa3f8df1..128f6b544 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 = "02b272fb17a5fe835311818e9194eb0cd49db20c" +SRCREV = "c76742e725d7a1ebbee8a2d95168da8a53f0b2e1" S = "${WORKDIR}/git/mctp_emulator" 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 1ad4f6e2a..10dd1cf29 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 = "02b272fb17a5fe835311818e9194eb0cd49db20c" +SRCREV = "c76742e725d7a1ebbee8a2d95168da8a53f0b2e1" S = "${WORKDIR}/git/mctp_wrapper" 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 4e8315047..4ab99cae9 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 = "02b272fb17a5fe835311818e9194eb0cd49db20c" +SRCREV = "c76742e725d7a1ebbee8a2d95168da8a53f0b2e1" S = "${WORKDIR}/git" 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 b0139297d..87ac63624 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 = "02b272fb17a5fe835311818e9194eb0cd49db20c" +SRCREV = "c76742e725d7a1ebbee8a2d95168da8a53f0b2e1" S = "${WORKDIR}/git/mctpwplus" 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 ffef31185..091865b39 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 = "02b272fb17a5fe835311818e9194eb0cd49db20c" +SRCREV = "c76742e725d7a1ebbee8a2d95168da8a53f0b2e1" S = "${WORKDIR}/git/pldmd" 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 485dcf4db..dc4c03ae8 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 = "02b272fb17a5fe835311818e9194eb0cd49db20c" +SRCREV = "c76742e725d7a1ebbee8a2d95168da8a53f0b2e1" S = "${WORKDIR}/git/pmci_launcher" 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 b54b8e974..ccffb1e58 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}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" -SRCREV = "5ab424a6a4ea56e5fbfad5a1813bed7bfabbd399" +SRCREV = "1e34cecad498e89fb52b4c73cb19e62a297f2329" #SRC_URI = "git://github.com/openbmc/dbus-sensors.git" SRC_URI += "\ 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 26d1364f6..7820d805b 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 @@ -22,6 +22,7 @@ DEPENDS += " \ phosphor-logging \ boost \ libpam \ + libgpiod \ " RDEPENDS:${PN} += " \ libsystemd \ 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 706e08646..f8ddf7892 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 @@ -4,16 +4,14 @@ DESCRIPTION = "The FRB2 timer service will monitor the mailbox register 0\ and start a watchdog for FRB2 if the data is 1(BIOS will write this value)" SRC_URI = "\ - file://CMakeLists.txt \ - file://frb2-watchdog.cpp \ + file://CMakeLists.txt;subdir=${BP} \ + file://frb2-watchdog.cpp;subdir=${BP} \ " PV = "0.1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -S = "${WORKDIR}" - inherit cmake inherit pkgconfig diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service index 007e39d8a..35d3e8e0f 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service @@ -2,14 +2,13 @@ Description=Phosphor Watchdog [Service] -ExecStart=/usr/bin/env phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \ +ExecStart=/usr/bin/phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \ --path=/xyz/openbmc_project/watchdog/host0 \ --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=xyz.openbmc_project.State.Host.Transition.ForceWarmReboot \ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=xyz.openbmc_project.State.Chassis.Transition.Off \ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=xyz.openbmc_project.State.Chassis.Transition.PowerCycle -SyslogIdentifier=phosphor-watchdog -BusName =xyz.openbmc_project.Watchdog +BusName=xyz.openbmc_project.Watchdog Type=dbus [Install] 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 ad2984fa9..cc439b2c5 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 @@ -4,5 +4,5 @@ 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_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 b5724710e..ac1302d9c 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 @@ -9,4 +9,4 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" SYSTEMD_SERVICE:${PN} += "system-watchdog.service" -SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/system-watchdog/system-watchdog.conf" +SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/system-watchdog/system-watchdog.conf" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue/0001-Undo-the-unrelated-package-changes-from-the-axios-up.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue/0001-Undo-the-unrelated-package-changes-from-the-axios-up.patch new file mode 100644 index 000000000..1068f8518 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue/0001-Undo-the-unrelated-package-changes-from-the-axios-up.patch @@ -0,0 +1,125 @@ +From 3b32612a73088b48486d38f46c780dfe3b8d463f Mon Sep 17 00:00:00 2001 +From: "Jason M. Bills" +Date: Fri, 24 Sep 2021 14:46:36 -0700 +Subject: [PATCH] Undo the unrelated package changes from the axios update + +When I pushed the update to axios, the npm commands changed other +packages as well. I assumed this was expected but have since been +seeing issues with nlf able to get license information. + +This reverts the non-axios changes from the previous update. + +Tested: +Built and logged into the web UI successfully. Also successfully +ran nlf a few times to get node license info. + +Change-Id: Idc03c1154861ccd493322e226814b20cc988bb00 +Signed-off-by: Jason M. Bills +--- + package-lock.json | 62 ++++++++++++++++++++--------------------------- + 1 file changed, 26 insertions(+), 36 deletions(-) + +diff --git a/package-lock.json b/package-lock.json +index df71815..413dd62 100644 +--- a/package-lock.json ++++ b/package-lock.json +@@ -4155,6 +4155,18 @@ + "supports-color": "^7.0.0" + } + }, ++ "loader-utils": { ++ "version": "2.0.0", ++ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", ++ "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", ++ "dev": true, ++ "optional": true, ++ "requires": { ++ "big.js": "^5.2.2", ++ "emojis-list": "^3.0.0", ++ "json5": "^2.1.2" ++ } ++ }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", +@@ -4188,6 +4200,18 @@ + "webpack-sources": "^1.4.3" + } + }, ++ "vue-loader-v16": { ++ "version": "npm:vue-loader@16.1.2", ++ "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz", ++ "integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==", ++ "dev": true, ++ "optional": true, ++ "requires": { ++ "chalk": "^4.1.0", ++ "hash-sum": "^2.0.0", ++ "loader-utils": "^2.0.0" ++ } ++ }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", +@@ -5552,14 +5576,7 @@ + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { +- "follow-redirects": "^1.14.0" +- }, +- "dependencies": { +- "follow-redirects": { +- "version": "1.14.4", +- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", +- "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" +- } ++ "follow-redirects": "^1.10.0" + } + }, + "babel-code-frame": { +@@ -10030,8 +10047,7 @@ + "follow-redirects": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", +- "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==", +- "dev": true ++ "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" + }, + "for-each": { + "version": "0.3.3", +@@ -19486,32 +19502,6 @@ + } + } + }, +- "vue-loader-v16": { +- "version": "npm:vue-loader@16.8.1", +- "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.1.tgz", +- "integrity": "sha512-V53TJbHmzjBhCG5OYI2JWy/aYDspz4oVHKxS43Iy212GjGIG1T3EsB3+GWXFm/1z5VwjdjLmdZUFYM70y77vtQ==", +- "dev": true, +- "optional": true, +- "requires": { +- "chalk": "^4.1.0", +- "hash-sum": "^2.0.0", +- "loader-utils": "^2.0.0" +- }, +- "dependencies": { +- "loader-utils": { +- "version": "2.0.0", +- "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", +- "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", +- "dev": true, +- "optional": true, +- "requires": { +- "big.js": "^5.2.2", +- "emojis-list": "^3.0.0", +- "json5": "^2.1.2" +- } +- } +- } +- }, + "vue-router": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz", +-- +2.17.1 + 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 8c3c21530..ed29c89df 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,6 +1,11 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/webui-vue.git" -SRCREV = "bfb346946727f09d99c1710e0443dcda2e8544a5" +SRCREV = "6a192d526c9efebf7a614a9aa473eee62e555fc5" + +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" +SRC_URI += " \ + file://0001-Undo-the-unrelated-package-changes-from-the-axios-up.patch \ + " do_compile:prepend() { cp -vf ${S}/.env.intel ${S}/.env diff --git a/meta-openbmc-mods/meta-common/recipes-support/boost-url/boost-url_git.bb b/meta-openbmc-mods/meta-common/recipes-support/boost-url/boost-url_git.bb deleted file mode 100644 index 6d4635b66..000000000 --- a/meta-openbmc-mods/meta-common/recipes-support/boost-url/boost-url_git.bb +++ /dev/null @@ -1,17 +0,0 @@ -DESCRIPTION = "Boost.URL is a library for manipulating Uniform Resource Identifiers (URI) and Locators (URL)" -HOMEPAGE = "https://github.com/CPPAlliance/url" -SECTION = "libs" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" - -SRC_URI = "git://github.com/CPPAlliance/url.git" - -SRCREV = "a56ae0df6d3078319755fbaa67822b4fa7fd352b" - -S = "${WORKDIR}/git" - -inherit cmake - -DEPENDS = "boost" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/beeper-test/beeper-test.bb b/meta-openbmc-mods/meta-common/recipes-utilities/beeper-test/beeper-test.bb index 51cda82e9..0610ec5a4 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/beeper-test/beeper-test.bb +++ b/meta-openbmc-mods/meta-common/recipes-utilities/beeper-test/beeper-test.bb @@ -9,9 +9,6 @@ LIC_FILES_CHKSUM += "\ " SRC_URI = "\ - file://CMakeLists.txt \ - file://beeper-test.cpp \ + file://CMakeLists.txt;subdir=${BP} \ + file://beeper-test.cpp;subdir=${BP} \ " - -S = "${WORKDIR}" - diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/io-app/io-app.bb b/meta-openbmc-mods/meta-common/recipes-utilities/io-app/io-app.bb index 5ac0f0a75..af0bc8fde 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/io-app/io-app.bb +++ b/meta-openbmc-mods/meta-common/recipes-utilities/io-app/io-app.bb @@ -9,9 +9,6 @@ LIC_FILES_CHKSUM += "\ " SRC_URI = "\ - file://CMakeLists.txt \ - file://io-app.c \ + file://CMakeLists.txt;subdir=${BP} \ + file://io-app.c;subdir=${BP} \ " - -S = "${WORKDIR}" - diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/lpc-cmds.bb b/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/lpc-cmds.bb index 38489263b..cf7182e3d 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/lpc-cmds.bb +++ b/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/lpc-cmds.bb @@ -7,10 +7,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" SRC_URI = "\ - file://CMakeLists.txt \ - file://lpc_drv.h \ - file://lpc_cmds.c \ + file://CMakeLists.txt;subdir=${BP} \ + file://lpc_drv.h;subdir=${BP} \ + file://lpc_cmds.c;subdir=${BP} \ " - -S = "${WORKDIR}" - diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/.clang-format b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/.clang-format new file mode 100644 index 000000000..ea71ad6e1 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/.clang-format @@ -0,0 +1,99 @@ +--- +Language: Cpp +# BasedOnStyle: LLVM +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlinesLeft: false +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: true +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse: true + IndentBraces: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: AfterColon +ColumnLimit: 80 +CommentPragmas: '^ IWYU pragma:' +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +PointerAlignment: Left +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^[<"](gtest|gmock)' + Priority: 5 + - Regex: '^"config.h"' + Priority: -1 + - Regex: '^".*\.hpp"' + Priority: 1 + - Regex: '^<.*\.h>' + Priority: 2 + - Regex: '^<.*' + Priority: 3 + - Regex: '.*' + Priority: 4 +IndentCaseLabels: true +IndentWidth: 4 +IndentWrappedFunctionNames: true +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 4 +UseTab: Never +... + diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/meson.build b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/meson.build new file mode 100644 index 000000000..215a7e60b --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/meson.build @@ -0,0 +1,21 @@ +project( + 'oom-test', + 'c', + default_options: [ + 'warning_level=3', + 'werror=true', + 'c_std=c11' + ], + license: 'Apache-2.0', + version: '0.1', +) +project_description = 'OOM (Out Of Memory) Test Application' + +executable( + 'oom-test', + [ + 'oom-test.c', + ], + install: true, + install_dir: get_option('bindir') +) diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/oom-test.c b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/oom-test.c new file mode 100644 index 000000000..90363a4b2 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/files/oom-test.c @@ -0,0 +1,86 @@ +/* +// Copyright (c) 2021 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Abstract: oom test application +// +*/ + +#include +#include +#include + +void Usage(char* progname) +{ + printf("Usage:\n"); + printf("%s -s \n", progname); + printf("Options:\n"); + printf("\t%-12s%s\n", "-h", "Display this help information"); + printf("\t%-12s%s\n", "-s ", + "Allocation unit size for getting heap in infinite loop"); + printf("\n"); +} + +int main(int argc, char** argv) +{ + int c, i, unitSize = 0, allocSize = 0; + + while (-1 != (c = getopt(argc, argv, "h:s:"))) + { + switch (c) + { + case 'h': + Usage(argv[0]); + return 0; + + case 's': + if (optarg != NULL) + { + unitSize = (int)strtoul(optarg, NULL, 0); + } + break; + + default: + Usage(argv[0]); + return 1; + } + } + + if (!unitSize) + { + printf("Error: Invalid allocation unit size\n"); + Usage(argv[0]); + return 1; + } + + while (1) + { + char* buf = (char*)malloc(unitSize); + if (!buf) + { + printf("Can't allocate memory!\n"); + exit(0); + } + + printf("Filling allocated memory...\n"); + for (i = 0; i < unitSize; i++) + buf[i] = 1; + + printf("Allocated %d MB\n", (++allocSize * 10)); + + /* continue looping without freeing to make OOM condition */ + } + + return 0; +} diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/oom-test.bb b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/oom-test.bb new file mode 100644 index 000000000..eb943af8d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/oom-test/oom-test.bb @@ -0,0 +1,14 @@ +SUMMARY = "OOM Test App" +DESCRIPTION = "OOM (Out Of Memory) Test Application" + +inherit meson + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM += "\ + file://oom-test.c;beginline=2;endline=14;md5=5175224c8877845cb45a6461c96de64d \ + " + +SRC_URI = "\ + file://meson.build;subdir=${BP} \ + file://oom-test.c;subdir=${BP} \ + " diff --git a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend index e696d4bee..896439fc2 100755 --- a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend @@ -1,6 +1,6 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh" -SRCREV = "6b8e3e0d7f9d7bafe2b9addf4c52217339999974" +SRCREV = "676ef2c425b4e7748bea43d5c94ee6d3239fa7a9" FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" diff --git a/meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed/0001-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch b/meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed/0001-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch new file mode 100644 index 000000000..143cccdba --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed/0001-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch @@ -0,0 +1,70 @@ +From a60792bba4fb67a1a181b6e1b488d3ca7b98b305 Mon Sep 17 00:00:00 2001 +From: "Jason M. Bills" +Date: Mon, 6 May 2019 14:18:27 -0700 +Subject: [PATCH] Enable GPIOE0 and GPIOE2 pass-through by default + +This change sets the gpio DT pinctrl default configuration to +enable GPIOE0 and GPIOE2 pass-through. Since this causes +pinctrl_get_select_default() to be called automatically for +the gpio driver to claim the GPIO pins in those groups, we +also need to call pinctrl_put() to release claim on the +pass-through GPIOs so they can be requested at runtime. + +Tested: +Disabled pass-through in uboot and confirmed that after booting +Linux, pass-through is enabled and 'cat /sys/kernel/debug/pinctrl/ +1e6e2000.syscon\:pinctrl-aspeed-g5-pinctrl/pinmux-pins' shows that +the pass-through GPIOs are UNCLAIMED. + +Signed-off-by: Jason M. Bills +--- + arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 4 ++++ + drivers/gpio/gpio-aspeed.c | 10 ++++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts +index 7d0b65bde369..f99cbef971b4 100644 +--- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts ++++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts +@@ -194,6 +194,10 @@ + + &gpio { + status = "okay"; ++ /* Enable GPIOE0 and GPIOE2 pass-through by default */ ++ pinctrl-names = "pass-through"; ++ pinctrl-0 = <&pinctrl_gpie0_default ++ &pinctrl_gpie2_default>; + gpio-line-names = + /*A0-A7*/ "","","","","","","","", + /*B0-B7*/ "FM_BMC_BOARD_SKU_ID0_N","FM_BMC_BOARD_SKU_ID1_N","FM_BMC_BOARD_SKU_ID2_N","FM_BMC_BOARD_SKU_ID3_N","FM_BMC_BOARD_SKU_ID4_N","","","", +diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c +index b966f5e28ebf..ac2282f72de6 100644 +--- a/drivers/gpio/gpio-aspeed.c ++++ b/drivers/gpio/gpio-aspeed.c +@@ -1140,6 +1140,7 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev) + { + const struct of_device_id *gpio_id; + struct aspeed_gpio *gpio; ++ struct pinctrl *pinctrl; + int rc, i, banks, err; + u32 ngpio; + +@@ -1189,6 +1190,15 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev) + if (!gpio->dcache) + return -ENOMEM; + ++ /* ++ * Select the pass-through pinctrl config to enable the pass-through ++ * mux for GPIOs marked as pass-through. Then call pinctrl_put() to ++ * release claim of the GPIO pins, so they can be requested at runtime. ++ */ ++ pinctrl = pinctrl_get_select(&pdev->dev, "pass-through"); ++ if (!IS_ERR(pinctrl)) ++ pinctrl_put(pinctrl); ++ + /* + * Populate it with initial values read from the HW and switch + * all command sources to the ARM by default +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed_%.bbappend new file mode 100644 index 000000000..8db895312 --- /dev/null +++ b/meta-openbmc-mods/meta-wht/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch \ + " diff --git a/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru.bbappend b/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru.bbappend index f9150385d..cef8105da 100644 --- a/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru.bbappend +++ b/meta-openbmc-mods/meta-wht/recipes-phosphor/fru/default-fru.bbappend @@ -1,3 +1,3 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI:append = " file://decodeBoardID.sh" +SRC_URI:append = " file://decodeBoardID.sh;subdir=${BP}" diff --git a/meta-openbmc-mods/meta-wolfpass/recipes-phosphor/fru/default-fru.bbappend b/meta-openbmc-mods/meta-wolfpass/recipes-phosphor/fru/default-fru.bbappend index f9150385d..cef8105da 100644 --- a/meta-openbmc-mods/meta-wolfpass/recipes-phosphor/fru/default-fru.bbappend +++ b/meta-openbmc-mods/meta-wolfpass/recipes-phosphor/fru/default-fru.bbappend @@ -1,3 +1,3 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI:append = " file://decodeBoardID.sh" +SRC_URI:append = " file://decodeBoardID.sh;subdir=${BP}" diff --git a/meta-openbmc-mods/recipes-utilities/collectd/collectd_%.bbappend b/meta-openbmc-mods/recipes-utilities/collectd/collectd_%.bbappend new file mode 100644 index 000000000..814f7a57b --- /dev/null +++ b/meta-openbmc-mods/recipes-utilities/collectd/collectd_%.bbappend @@ -0,0 +1,2 @@ +SYSTEMD_AUTO_ENABLE:${PN} = "disable" +EXTRA_OECONF += " --disable-notify_email --disable-notify_nagios --disable-apache --disable-apcups --disable-battery --disable-bind --disable-email --disable-hddtemp --disable-nginx --disable-infiniband --disable-openvpn --disable-zfs_arc --disable-teamspeak2" -- cgit v1.2.3