From ffe6d597d9e3d4407cf8062b5d6505a80ce08f41 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Tue, 28 Sep 2021 12:04:51 -0700 Subject: Update to internal 0.75 Signed-off-by: Jason M. Bills --- meta-openbmc-mods/conf/layer.conf | 2 +- meta-openbmc-mods/meta-ast2500/conf/layer.conf | 6 +- .../conf/machine/include/obmc-bsp-si-common.inc | 4 +- ...d-sgio-support-for-port80-snoop-post-LEDs.patch | 4 +- ...acturing-mode-physical-presence-detection.patch | 39 +- ...g-uart1-uart2-in-u-boot-for-BIOS-messages.patch | 10 +- ...33-Reboot-into-UBOOT-on-Watchdog-Failures.patch | 8 +- ...ncrease-default-fan-speed-for-cooper-city.patch | 14 +- ...ip-counting-WDT2-event-when-EXTRST-is-set.patch | 6 +- .../recipes-bsp/u-boot/u-boot-aspeed_%.bbappend | 16 +- .../recipes-kernel/linux/linux-aspeed_%.bbappend | 2 +- .../configuration/entity-manager_%.bbappend | 8 +- .../sensors/dbus-sensors_%.bbappend | 2 +- meta-openbmc-mods/meta-ast2600/conf/layer.conf | 6 +- .../conf/machine/include/intel-ast2600.inc | 2 +- .../conf/machine/include/obmc-bsp-si-common.inc | 4 +- .../0001-Add-ast2600-intel-as-a-new-board.patch | 76 +-- ...acturing-mode-physical-presence-detection.patch | 41 +- ...22-Reboot-into-UBOOT-on-Watchdog-Failures.patch | 8 +- ...-PFR-platform-EXTRST-reset-mask-selection.patch | 2 +- ...I-initialization-in-u-boot-for-normal-boo.patch | 20 +- .../u-boot/u-boot-aspeed-sdk_%.bbappend | 44 +- .../obmc-ikvm/obmc-ikvm_%.bbappend | 2 +- .../recipes-kernel/linux/linux-aspeed_%.bbappend | 2 +- .../meta-common-small/conf/layer.conf | 2 +- .../recipes-core/systemd/systemd_%.bbappend | 8 +- .../python/python-pycryptodomex.inc | 6 +- .../qemu/qemu-system-native_%.bbappend | 2 +- .../classes/image_types_intel_pfr.bbclass | 2 +- .../classes/image_types_phosphor_auto.bbclass | 2 +- .../classes/obmc-phosphor-image-common.bbclass | 11 +- .../classes/obmc-phosphor-image-dev.bbclass | 2 +- meta-openbmc-mods/meta-common/conf/layer.conf | 2 +- .../recipes-bsp/u-boot/u-boot-%.bbappend | 2 +- .../recipes-connectivity/avahi/avahi_%.bbappend | 2 +- .../recipes-connectivity/openssl/openssl_1.1.1k.bb | 211 ------ .../recipes-connectivity/openssl/openssl_1.1.1l.bb | 211 ++++++ .../ac-boot-check/ac-boot-check_git.bb | 6 +- .../at-scale-debug/at-scale-debug_git.bb | 8 +- .../recipes-core/base-files/base-files_%.bbappend | 4 +- .../recipes-core/busybox/busybox_%.bbappend | 2 +- .../recipes-core/dropbear/dropbear_%.bbappend | 10 +- .../recipes-core/fw-update/intel-fw-update.bb | 10 +- ..._pthread_attr_copy-in-mq_notify-bug-27896.patch | 54 -- ..._pthread_attr_copy-in-mq_notify-bug-27896.patch | 52 -- ...e-overflow-in-positional-parameter-number.patch | 40 -- .../recipes-core/glibc/glibc_%.bbappend | 5 +- .../recipes-core/interfaces/libmctp_git.bb | 18 +- .../recipes-core/ipmi/intel-ipmi-oem_%.bbappend | 4 +- .../kernel-panic-check/kernel-panic-check.bb | 6 +- .../recipes-core/libxcrypt/libxcrypt_%.bbappend | 2 +- .../recipes-core/logger-systemd/logger-systemd.inc | 4 +- .../recipes-core/microsoft-gsl/microsoft-gsl.bb | 2 +- .../recipes-core/nv-sync/nv-sync/nv-syncd | 8 +- .../recipes-core/nv-sync/nv-sync_git.bb | 6 +- .../recipes-core/os-release/os-release.bbappend | 8 +- ...ackagegroup-core-standalone-sdk-target.bbappend | 2 +- .../recipes-core/readline/readline_%.bbappend | 4 +- .../recipes-core/safec/safec_%.bbappend | 4 +- .../meta-common/recipes-core/safec/safec_3.4.bb | 2 +- .../security-registers-check.bb | 6 +- .../recipes-core/systemd/obmc-targets.bbappend | 18 +- .../recipes-core/systemd/systemd-conf_%.bbappend | 6 +- ...ic-unit-name-do-not-use-strdupa-on-a-path.patch | 64 -- .../recipes-core/systemd/systemd_%.bbappend | 11 +- .../recipes-core/util-linux/util-linux_%.bbappend | 4 + .../recipes-devtools/cjson/cjson_%.bbappend | 2 +- .../recipes-devtools/mtd-util/mtd-util.bb | 2 +- .../recipes-extended/pam/libpam_%.bbappend | 4 +- .../recipes-extended/pam/pam-ipmi_%.bbappend | 2 +- .../sdbusplus/sdbusplus_%.bbappend | 2 +- .../recipes-extended/shadow/shadow_%.bbappend | 2 +- .../libvncserver/libvncserver_%.bbappend | 2 +- .../obmc-ikvm/obmc-ikvm_%.bbappend | 2 +- .../configure-usb-c/configure-usb-c.bb | 8 +- .../host-misc-comm-manager_git.bb | 2 +- .../recipes-intel/hsbp/hsbp-manager_git.bb | 2 +- .../intel-pfr/intel-blocksign-native.bb | 2 +- .../meta-common/recipes-intel/nic/enable-nics.bb | 6 +- .../packagegroups/packagegroup-intel-apps.bb | 25 +- .../packagegroups/packagegroup-obmc-apps.bbappend | 10 +- .../recipes-intel/psu-manager/psu-manager.bb | 2 +- .../recipes-intel/smbios/smbios-mdrv1.bb | 4 +- .../recipes-intel/smbios/smbios-mdrv2.bb | 6 +- .../linux-aspeed/0005-128MB-flashmap-for-PFR.patch | 45 -- ...05-Die_CPU-filter-first-zero-from-GetTemp.patch | 61 ++ ...CPU-filter-first-zero-from-RdPkgConfig-10.patch | 66 ++ ...p-filter-the-first-zero-from-RdPkgConfig-.patch | 70 ++ ...-vegman-kernel-add-RTC-driver-for-PCHC620.patch | 205 ++++++ ...-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch | 49 ++ .../linux-aspeed/1000-128MB-flashmap-for-PFR.patch | 45 ++ ...03-Die_CPU-filter-first-zero-from-GetTemp.patch | 60 -- ...CPU-filter-first-zero-from-RdPkgConfig-10.patch | 64 -- .../recipes-kernel/linux/linux-aspeed/intel.cfg | 5 +- .../recipes-kernel/linux/linux-aspeed_%.bbappend | 17 +- .../recipes-network/network/ncsi-monitor.bb | 4 +- ...Fix-for-updating-MAC-address-from-RedFish.patch | 33 +- ...-logs-to-isolate-the-coredump-issue-of-RT.patch | 261 ++++++++ .../network/phosphor-network_%.bbappend | 9 +- .../recipes-network/network/static-mac-addr.bb | 4 +- .../network/static-mac-addr/mac-check | 50 +- .../recipes-phosphor/beepcode-mgr/beepcode-mgr.bb | 2 +- .../biosconfig-manager/biosconfig-manager_git.bb | 4 +- ...idle-state-to-be-configured-as-DISCONNECT.patch | 131 ++++ .../configuration/entity-manager_%.bbappend | 5 +- .../console/obmc-console_%.bbappend | 6 +- .../recipes-phosphor/datetime/pch-time-sync.bb | 2 +- .../datetime/phosphor-time-manager_git.bbappend | 4 +- .../dbus/phosphor-dbus-interfaces_%.bbappend | 4 +- .../dbus/phosphor-mapper_%.bbappend | 2 +- .../fans/phosphor-pid-control_%.bbappend | 6 +- ...rmware-activation-to-launch-fwupd.sh-thro.patch | 2 +- ...-remove-image-file-on-pre-script-failures.patch | 18 +- ...image-by-ID-and-inhibit-removal-of-bmc_ac.patch | 42 +- .../flash/phosphor-software-manager_%.bbappend | 4 +- .../recipes-phosphor/fru/default-fru.bb | 6 +- .../host/obmc-op-control-host%.bbappend | 10 +- ...-Add-PhysicalContext-to-Thermal-resources.patch | 31 +- ...-Support-new-boot-override-setting-design.patch | 723 --------------------- .../0003-Add-support-to-ResetBios-action.patch | 26 +- .../0004-Add-Server-Sent-Events-support.patch | 19 +- ...tyle-subscription-support-to-eventservice.patch | 41 +- .../0006-Add-EventService-SSE-filter-support.patch | 10 +- ...rvice-Log-events-for-subscription-actions.patch | 42 +- ...cture-Redifsh-EventLog-Transmit-code-flow.patch | 20 +- ...1-Add-support-for-MetricDefinition-scheme.patch | 420 ++++++------ ...2-Sync-Telmetry-service-with-EventService.patch | 20 +- ...t-Remove-LogService-from-TelemetryService.patch | 26 - ...d-bmcweb-to-use-new-telemetry-service-API.patch | 301 +++++++++ ...MetricDefinition-property-in-MetricReport.patch | 267 ++++++++ ...rvice-fix-added-Context-field-to-response.patch | 29 - .../0005-Add-DELETE-method-for-MetricReport.patch | 132 ++++ ...d-bmcweb-to-use-new-telemetry-service-API.patch | 301 --------- ...0006-Add-GET-method-for-TriggerCollection.patch | 313 +++++++++ ...MetricDefinition-property-in-MetricReport.patch | 268 -------- ...eneralize-ReadingType-in-MetricDefinition.patch | 168 ----- ...t-Remove-LogService-from-TelemetryService.patch | 26 + ...rvice-fix-added-Context-field-to-response.patch | 29 + ...eneralize-ReadingType-in-MetricDefinition.patch | 93 +++ .../interfaces/bmcweb/telemetry/README | 28 +- ...status-code-from-InsertMedia-REST-methods.patch | 25 +- .../recipes-phosphor/interfaces/bmcweb_%.bbappend | 27 +- .../ipmi/phosphor-ipmi-config.bbappend | 6 +- .../phosphor-ipmi-fru-merge-config-native.bbappend | 2 +- .../0062-Update-IPMI-Chassis-Control-command.patch | 25 +- ...ssishandler-Fix-for-BIOS-boot-type-Legacy.patch | 51 -- .../ipmi/phosphor-ipmi-host_%.bbappend | 27 +- .../ipmi/phosphor-ipmi-ipmb_%.bbappend | 6 +- .../ipmi/phosphor-ipmi-kcs_%.bbappend | 6 +- ...move-Get-SOL-Config-Command-from-Netipmid.patch | 55 +- .../ipmi/phosphor-ipmi-net_%.bbappend | 10 +- .../ipmi/phosphor-ipmi-sensor-inventory%.bbappend | 2 +- .../ipmi/phosphor-node-manager-proxy_git.bb | 4 +- .../recipes-phosphor/leds/id-led-off_git.bb | 6 +- .../leds/phosphor-led-manager_%.bbappend | 8 +- .../multi-node-nl/multi-node-nl.bb | 8 +- .../recipes-phosphor/peci/peci-pcie_%.bbappend | 2 +- .../phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb | 2 +- .../recipes-phosphor/pmci/libmctp-intel_git.bb | 4 +- .../recipes-phosphor/pmci/libpldm-intel_git.bb | 2 +- .../recipes-phosphor/pmci/mctp-emulator.bb | 6 +- .../recipes-phosphor/pmci/mctp-wrapper.bb | 4 +- .../meta-common/recipes-phosphor/pmci/mctpd.bb | 8 +- .../meta-common/recipes-phosphor/pmci/mctpwplus.bb | 4 +- .../recipes-phosphor/pmci/nvmemi-daemon.bb | 4 +- .../meta-common/recipes-phosphor/pmci/pldmd.bb | 8 +- .../recipes-phosphor/pmci/pmci-launcher.bb | 6 +- .../preinit-mounts/preinit-mounts.bbappend | 4 +- .../prov-mode-mgr/prov-mode-mgr_git.bb | 2 +- .../security-manager/security-manager_git.bb | 2 +- .../sel-logger/phosphor-sel-logger_%.bbappend | 2 +- ...-threshold-de-assert-event-when-threshold.patch | 27 +- ...or-Create-CPUConfig-for-each-PECI-adapter.patch | 147 +++++ .../sensors/dbus-sensors_%.bbappend | 11 +- .../recipes-phosphor/settings/settings_git.bb | 4 +- .../special-mode-mgr/special-mode-mgr_git.bb | 4 +- .../state/phosphor-state-manager_%.bbappend | 2 +- .../recipes-phosphor/system/callback-manager.bb | 2 +- .../telemetry/telemetry_%.bbappend | 2 +- .../users/phosphor-user-manager_%.bbappend | 10 +- .../virtual-media/virtual-media.bb | 4 +- .../recipes-phosphor/watchdog/frb2-watchdog.bb | 2 +- ...ize-phosphor-watchdog-for-Intel-platforms.patch | 45 +- .../watchdog/phosphor-watchdog_%.bbappend | 6 +- .../recipes-phosphor/watchdog/system-watchdog.bb | 2 +- .../webui/phosphor-webui_%.bbappend | 2 +- .../recipes-phosphor/webui/webui-vue_%.bbappend | 4 +- .../recipes-security/sssd/sssd_%.bbappend | 6 +- .../recipes-support/avro/avro-c++_git.bb | 2 +- .../recipes-support/boost/boost_%.bbappend | 7 +- .../0001-replace-krb5-config-with-pkg-config.patch | 44 ++ .../recipes-support/curl/curl_7.78.0.bb | 89 +++ .../recipes-support/nettle/nettle_3.7.2.bb | 8 +- .../recipes-support/rng-tools/rng-tools_6.7.bb | 8 +- .../recipes-utilities/dimmsensor/dimmsensor.bb | 2 +- .../recipes-utilities/i3c-tools/i3c-tools.bb | 2 +- .../recipes-utilities/lpc-cmds/files/lpc_cmds.c | 27 + .../recipes-utilities/lpc-cmds/files/lpc_drv.h | 1 + .../0003-Add-support-for-tls13-ciphers.patch | 39 ++ ...dle-empty-CAInfo-in-curl-plugin-correctly.patch | 35 + .../recipes-utilities/nbdkit/nbdkit_git.bb | 4 +- .../peci-hwmon-test/peci-hwmon-test.bb | 2 +- .../chassis/x86-power-control_%.bbappend | 4 +- meta-openbmc-mods/meta-wht/conf/layer.conf | 2 +- meta-openbmc-mods/meta-wht/conf/local.conf.sample | 6 +- .../host-error-monitor_%.bbappend | 2 +- .../recipes-core/libpeci/libpeci_%.bbappend | 4 +- .../intel-pfr/obmc-intel-pfr-image-native.bbappend | 6 +- .../obmc-intel-pfr-image-native/bmc_config.xml | 96 +-- .../recipes-phosphor/fru/default-fru.bbappend | 4 +- .../ipmi/phosphor-ipmi-ipmb_%.bbappend | 6 +- meta-openbmc-mods/meta-wolfpass/conf/layer.conf | 2 +- .../meta-wolfpass/conf/local.conf.sample | 6 +- .../recipes-phosphor/fru/default-fru.bbappend | 4 +- 214 files changed, 3768 insertions(+), 3127 deletions(-) delete mode 100644 meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1k.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1l.bb delete mode 100644 meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0038-CVE-2021-35942-handle-overflow-in-positional-parameter-number.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0003-CVE-2021-33910-basic-unit-name-do-not-use-strdupa-on-a-path.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-core/util-linux/util-linux_%.bbappend delete mode 100755 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-128MB-flashmap-for-PFR.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-Die_CPU-filter-first-zero-from-GetTemp.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0007-peci-cputemp-filter-the-first-zero-from-RdPkgConfig-.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0008-vegman-kernel-add-RTC-driver-for-PCHC620.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0009-ARM-dts-add-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1000-128MB-flashmap-for-PFR.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0005-Added-debug-logs-to-isolate-the-coredump-issue-of-RT.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch create 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/0008-event-service-fix-added-Context-field-to-response.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.78.0.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0003-Add-support-for-tls13-ciphers.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0004-Handle-empty-CAInfo-in-curl-plugin-correctly.patch diff --git a/meta-openbmc-mods/conf/layer.conf b/meta-openbmc-mods/conf/layer.conf index 62442c850..2286ce881 100644 --- a/meta-openbmc-mods/conf/layer.conf +++ b/meta-openbmc-mods/conf/layer.conf @@ -8,7 +8,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "intel-openbmc" BBFILE_PATTERN_intel-openbmc = "^${LAYERDIR}/" BBFILE_PRIORITY_intel-openbmc = "5" -LAYERSERIES_COMPAT_intel-openbmc = "gatesgarth hardknott" +LAYERSERIES_COMPAT_intel-openbmc = "gatesgarth hardknott honister" IMAGE_FEATURES[validitems] += "tools-sdk tools-debug validation-unsecure" diff --git a/meta-openbmc-mods/meta-ast2500/conf/layer.conf b/meta-openbmc-mods/meta-ast2500/conf/layer.conf index 1d1a92521..da49b8734 100644 --- a/meta-openbmc-mods/meta-ast2500/conf/layer.conf +++ b/meta-openbmc-mods/meta-ast2500/conf/layer.conf @@ -9,12 +9,12 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "ast2500" BBFILE_PATTERN_ast2500 = "^${LAYERDIR}/" BBFILE_PRIORITY_ast2500 = "10" -LAYERSERIES_COMPAT_ast2500 = "gatesgarth hardknott" +LAYERSERIES_COMPAT_ast2500 = "gatesgarth hardknott honister" INHERIT += "extrausers" #INHERIT += " cve-check" -EXTRA_USERS_PARAMS_append_pn-intel-platforms = " \ +EXTRA_USERS_PARAMS:append:pn-intel-platforms = " \ ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', "usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root;", '', d)}" -hostname_pn-base-files = "intel-obmc" +hostname:pn-base-files = "intel-obmc" diff --git a/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc b/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc index 0690d6b56..72426453b 100644 --- a/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc +++ b/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc @@ -8,7 +8,7 @@ EXTRA_IMAGEDEPENDS += "u-boot" IMAGE_FSTYPES += "squashfs-xz" IMAGE_FSTYPES += "mtd-auto" INITRAMFS_FSTYPES = "squashfs-xz" -EXTRA_IMAGECMD_squashfs-xz_append = "-processors ${BB_NUMBER_THREADS} -b 262144 -Xdict-size 100% -Xbcj arm" +EXTRA_IMAGECMD:squashfs-xz:append = "-processors ${BB_NUMBER_THREADS} -b 262144 -Xdict-size 100% -Xbcj arm" KERNEL_CLASSES ?= "kernel-fitimage" KERNEL_IMAGETYPES ?= "fitImage" @@ -19,7 +19,7 @@ UBOOT_SUFFIX ?= "bin" MACHINEOVERRIDES =. "openbmc:" OBMC_PHOSPHOR_IMAGE_OVERLAY= "1" -OBMC_IMAGE_EXTRA_INSTALL_append = " u-boot-fw-utils-aspeed" +OBMC_IMAGE_EXTRA_INSTALL:append = " u-boot-fw-utils-aspeed" IMAGE_CLASSES += "image_types image_types_phosphor_auto qemuboot" IMAGE_CLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'image_types_intel_pfr', '', d)}" diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch index d82acc623..950b3247d 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0008-add-sgio-support-for-port80-snoop-post-LEDs.patch @@ -145,8 +145,8 @@ index e79235c8d0..c2a8b33aec 100644 + value = readl(AST_LPC_BASE + HICRB) | HICRB_EN80HSGIO; + writel(value, AST_LPC_BASE + HICRB); + -+ /* set the gpio clock to pclk/(2*(5+1)) or ~2 MHz */ -+ value = SGPIO_CLK_DIV(256) | SGPIO_BYTES(10) | SGPIO_ENABLE; ++ /* set the gpio clock to 2MHz */ ++ value = SGPIO_CLK_DIV(24) | SGPIO_BYTES(10) | SGPIO_ENABLE; + writel(value, AST_GPIO_BASE + GPIO254); +} diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch index 76606db0a..eaccfa99e 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch @@ -1,4 +1,4 @@ -From 3ed477feebb959749bd20a22e3acd8b39e22c193 Mon Sep 17 00:00:00 2001 +From 8a2f6a42c3be0426803fc0a70444ba95bf73443f Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Thu, 20 Jun 2019 18:11:43 +0530 Subject: [PATCH] Manufacturing mode physical presence detection @@ -24,10 +24,10 @@ Signed-off-by: Richard Marian Thomaiyar --- board/aspeed/ast-g5/ast-g5-gpio.h | 2 +- - board/aspeed/ast-g5/ast-g5-intel.c | 42 ++++++++++++++++++++++++++++++ + board/aspeed/ast-g5/ast-g5-intel.c | 57 ++++++++++++++++++++++++++++++ board/aspeed/ast-g5/ast-g5.c | 2 -- - common/autoboot.c | 16 ++++++++++-- - 4 files changed, 57 insertions(+), 5 deletions(-) + common/autoboot.c | 16 +++++++-- + 4 files changed, 72 insertions(+), 5 deletions(-) diff --git a/board/aspeed/ast-g5/ast-g5-gpio.h b/board/aspeed/ast-g5/ast-g5-gpio.h index 54b7388a22f5..8ccf4373460b 100644 @@ -43,7 +43,7 @@ index 54b7388a22f5..8ccf4373460b 100644 // GPIO Configuration Register bits #define GPCFG_EVENT_TO_SMI (1 << 7) // 1 == enabled diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index 45ecd83fd3f0..79de13caa0af 100644 +index 45ecd83fd3f0..6ea7f0060c57 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c @@ -24,6 +24,7 @@ enum gpio_names { @@ -74,7 +74,7 @@ index 45ecd83fd3f0..79de13caa0af 100644 static void sgpio_init(void) { uint32_t value; -@@ -403,6 +410,30 @@ static void update_bootargs_cmd(const char *key, const char *value) +@@ -403,6 +410,44 @@ static void update_bootargs_cmd(const char *key, const char *value) free(buf); } @@ -87,8 +87,10 @@ index 45ecd83fd3f0..79de13caa0af 100644 + */ + const uint32_t delay_in_ms = 100; + const uint32_t read_count = ((15 * 1000) / delay_in_ms); -+ const uint32_t delay_for_indication = 10 * 1000; -+ for (uint32_t count = 0; count < read_count; ++count) { ++ const uint32_t delay_for_indication = 2 * 1000; ++ uint32_t count; ++ ++ for (count = 0; count < read_count; ++count) { + if (!gpio_get_value(GPIO_FP_PWR_BTN)) + return false; + @@ -96,8 +98,20 @@ index 45ecd83fd3f0..79de13caa0af 100644 + } + debug("is_mfg_mode_phy_req : detected mfg mode request\n"); + id_led_control(GPIO_GREEN_LED, EIDLED_Blink_3HZ); -+ /* Delay the boot to do physical indication for mfg mode */ -+ mdelay(delay_for_indication); ++ /* ++ * Delay up to 15 seconds until the power button is released to prevent ++ * unintentional power button overriding to PCH through GPIO ++ * pass-through. ++ */ ++ for (count = 0; count < read_count; ++count) { ++ if (!gpio_get_value(GPIO_FP_PWR_BTN)) ++ break; ++ ++ mdelay(delay_in_ms); ++ } ++ /* Keep the indication at least for 2 seconds */ ++ if (delay_in_ms * count < delay_for_indication) ++ mdelay(delay_for_indication - (delay_in_ms * count)); + + return true; +} @@ -105,7 +119,7 @@ index 45ecd83fd3f0..79de13caa0af 100644 void ast_g5_intel_late_init(void) { char value[32]; -@@ -450,6 +481,17 @@ void ast_g5_intel_late_init(void) +@@ -450,6 +495,18 @@ void ast_g5_intel_late_init(void) ast_scu_write(0, AST_SCU_SYS_CTRL); update_bootargs_cmd("resetreason", value); @@ -115,11 +129,12 @@ index 45ecd83fd3f0..79de13caa0af 100644 + update_bootargs_cmd("special", "mfg"); + else + update_bootargs_cmd("special", NULL); ++ ++ ast_enable_pass_through(); +} + +void board_pre_abort_autoboot(void) +{ -+ ast_enable_pass_through(); } static void pwm_init(void) diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch index fe95ef466..129b6be88 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch @@ -1,4 +1,4 @@ -From 777d3db853a7a9e6ec6e19d97ed12db689faa051 Mon Sep 17 00:00:00 2001 +From 8c2a3f6489c86d8dae57cae03d617de2296774ab Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Mon, 13 May 2019 23:49:02 +0530 Subject: [PATCH] Enabling uart1&uart2 in u-boot for BIOS messages @@ -18,11 +18,11 @@ Signed-off-by: AppaRao Puli 1 file changed, 21 insertions(+) diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index 4eaed429e327..4190fb05acbe 100644 +index 6ea7f0060c57..5196a1a41299 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c -@@ -492,6 +492,26 @@ void board_pre_abort_autoboot(void) - ast_enable_pass_through(); +@@ -509,6 +509,26 @@ void board_pre_abort_autoboot(void) + { } +static void uart_init(void) @@ -48,7 +48,7 @@ index 4eaed429e327..4190fb05acbe 100644 static void pwm_init(void) { uint32_t val; -@@ -543,6 +563,7 @@ extern void espi_init(void); +@@ -560,6 +580,7 @@ extern void espi_init(void); extern void kcs_init(void); void ast_g5_intel(void) { diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch index 3e7727c32..bd612e691 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch @@ -1,4 +1,4 @@ -From 655a30e879704b72e1934bdc8e47d93166978c38 Mon Sep 17 00:00:00 2001 +From 8fe68fe9b30d1da027281b5468492aa45ca0b052 Mon Sep 17 00:00:00 2001 From: James Feist Date: Wed, 31 Jul 2019 16:01:49 -0700 Subject: [PATCH] Reboot into UBOOT on Watchdog Failures @@ -30,7 +30,7 @@ index a88521a1b3c7..64f4ed17bfd5 100644 #endif diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index d05de5c4a274..9b546cffee77 100644 +index 5196a1a41299..6b8395754f00 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c @@ -114,7 +114,23 @@ static const GPIOValue gpio_table[] = { @@ -69,7 +69,7 @@ index d05de5c4a274..9b546cffee77 100644 void arch_preboot_os(void) { // last second before booting... set the LEDs -@@ -438,6 +459,7 @@ void ast_g5_intel_late_init(void) +@@ -452,6 +473,7 @@ void ast_g5_intel_late_init(void) { char value[32]; u32 reset_reason = 0; @@ -77,7 +77,7 @@ index d05de5c4a274..9b546cffee77 100644 /* By default host serail A and B use normal speed */ uint32_t host_serial_cfg = 0; -@@ -482,6 +504,13 @@ void ast_g5_intel_late_init(void) +@@ -496,6 +518,13 @@ void ast_g5_intel_late_init(void) update_bootargs_cmd("resetreason", value); diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch index 456763398..eea9e035a 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch @@ -1,4 +1,4 @@ -From d248ebf5bddd0c0bc6f7e287867b651d0c17aafe Mon Sep 17 00:00:00 2001 +From 5861b964317bb52defb30215efff52fab5e11df4 Mon Sep 17 00:00:00 2001 From: James Feist Date: Thu, 24 Oct 2019 14:39:22 -0700 Subject: [PATCH] Increase default fan speed for cooper city @@ -9,14 +9,13 @@ as it has high core count CPUS. Tested: In uboot fans appeared to run faster Signed-off-by: James Feist - --- board/aspeed/ast-g5/ast-g5-gpio.h | 6 ++++ board/aspeed/ast-g5/ast-g5-intel.c | 46 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/board/aspeed/ast-g5/ast-g5-gpio.h b/board/aspeed/ast-g5/ast-g5-gpio.h -index 8ccf437346..7f0c06d88f 100644 +index 8ccf4373460b..7f0c06d88f5a 100644 --- a/board/aspeed/ast-g5/ast-g5-gpio.h +++ b/board/aspeed/ast-g5/ast-g5-gpio.h @@ -71,9 +71,15 @@ @@ -36,7 +35,7 @@ index 8ccf437346..7f0c06d88f 100644 // GPIO Configuration Register bits #define GPCFG_EVENT_TO_SMI (1 << 7) // 1 == enabled diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index e05a6da468..4b017269f9 100644 +index 5536efde1d43..3a0e15eaac82 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c @@ -25,6 +25,12 @@ enum gpio_names { @@ -74,7 +73,7 @@ index e05a6da468..4b017269f9 100644 }; #define LPC_SNOOP_ADDR 0x80 -@@ -117,6 +138,8 @@ static const GPIOValue gpio_table[] = { +@@ -118,6 +139,8 @@ static const GPIOValue gpio_table[] = { #define POWERON_RESET_BIT BIT(0) #define BOOT_FAILURE_LIMIT 0x3 @@ -118,7 +117,7 @@ index e05a6da468..4b017269f9 100644 static inline uint32_t ast_scu_read(uint32_t reg) -@@ -606,6 +650,8 @@ void ast_g5_intel(void) +@@ -626,6 +670,8 @@ void ast_g5_intel(void) id_led_control(GPIO_GREEN_LED, EIDLED_Off); id_led_control(GPIO_AMBER_LED, EIDLED_On); kcs_init(); @@ -127,3 +126,6 @@ index e05a6da468..4b017269f9 100644 /* TODO: need to stop the booting here. */ } } +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch index ad99773d1..944ae4558 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch @@ -1,4 +1,4 @@ -From 94cecaf3d944ee0b2a24b5628131db92de7cbaf3 Mon Sep 17 00:00:00 2001 +From fd386708fdea5f1c6c0311077907df55a5ac2c3d Mon Sep 17 00:00:00 2001 From: Vikram Bodireddy Date: Wed, 18 Mar 2020 21:47:11 +0530 Subject: [PATCH] PFR- Skip counting WDT2 event when EXTRST# is set @@ -19,7 +19,7 @@ Signed-off-by: Vikram Bodireddy 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index 511bf32f94ac..66423d9b55a8 100644 +index 07a180a489f5..7b238b59aba3 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c @@ -137,6 +137,7 @@ static const GPIOValue gpio_table[] = { @@ -30,7 +30,7 @@ index 511bf32f94ac..66423d9b55a8 100644 #define POWERON_RESET_BIT BIT(0) #define BOOT_FAILURE_LIMIT 0x3 -@@ -551,7 +552,8 @@ void ast_g5_intel_late_init(void) +@@ -565,7 +566,8 @@ void ast_g5_intel_late_init(void) boot_failures = get_boot_failures(); diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend index 5b36974bb..92d5cf7d8 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend @@ -1,12 +1,11 @@ COMPATIBLE_MACHINE = "intel-ast2500" -FILESEXTRAPATHS_append_intel-ast2500:= "${THISDIR}/files:" -FILESEXTRAPATHS_append_intel-ast2500:= "${THISDIR}/files/CVE-2020-10648:" +FILESEXTRAPATHS:append:intel-ast2500:= "${THISDIR}/files:" # the meta-phosphor layer adds this patch, which conflicts # with the intel layout for environment -SRC_URI_remove_intel-ast2500 = " file://0001-configs-ast-Add-redundnant-env.patch" +SRC_URI:remove:intel-ast2500 = " file://0001-configs-ast-Add-redundnant-env.patch" -SRC_URI_append_intel-ast2500 = " \ +SRC_URI:append:intel-ast2500 = " \ file://intel.cfg \ file://0001-flash-use-readX-writeX-not-udelay.patch \ file://0002-intel-layout-environment-addr.patch \ @@ -51,7 +50,8 @@ SRC_URI_append_intel-ast2500 = " \ file://0050-Set-UART-routing-in-lowlevel_init.patch \ " # CVE-2020-10648 vulnerability fix -SRC_URI_append_intel-ast2500 = " \ +FILESEXTRAPATHS:append:intel-ast2500:= "${THISDIR}/files/CVE-2020-10648:" +SRC_URI:append:intel-ast2500 = " \ file://0001-image-Correct-comment-for-fit_conf_get_node.patch \ file://0002-image-Be-a-little-more-verbose-when-checking-signatu.patch \ file://0003-image-Return-an-error-message-from-fit_config_verify.patch \ @@ -69,9 +69,9 @@ PFR_SRC_URI = " \ AUTOBOOT_SRC_URI = " \ file://0041-Disabling-boot-delay.patch \ " -SRC_URI_append_intel-ast2500 += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', PFR_SRC_URI, '', d)}" -SRC_URI_append_intel-ast2500 += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', AUTOBOOT_SRC_URI, d)}" -do_install_append () { +SRC_URI:append:intel-ast2500 += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', PFR_SRC_URI, '', d)}" +SRC_URI:append:intel-ast2500 += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', AUTOBOOT_SRC_URI, d)}" +do_install:append () { install -m 0644 ${WORKDIR}/fw_env.config ${S}/tools/env/fw_env.config } diff --git a/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend index 5d8fa34bf..6c2b7d43b 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend +++ b/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -1,3 +1,3 @@ COMPATIBLE_MACHINE = "intel-ast2500" -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-aspeed:" +FILESEXTRAPATHS:prepend := "${THISDIR}/linux-aspeed:" SRC_URI += "file://intel-ast2500.cfg" diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager_%.bbappend index 97102fdf1..0756d0547 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager_%.bbappend +++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager_%.bbappend @@ -1,5 +1,5 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" -SRC_URI_append = " file://0001-Blacklist-DIMM-Bus.patch \ +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" +SRC_URI:append = " file://0001-Blacklist-DIMM-Bus.patch \ file://WC-Baseboard.json \ file://WP-Baseboard.json \ file://TNP-baseboard.json \ @@ -12,9 +12,9 @@ SRC_URI_append = " file://0001-Blacklist-DIMM-Bus.patch \ file://WC-Chassis.json \ file://blocklist.json" -RDEPENDS_${PN} += " default-fru" +RDEPENDS:${PN} += " default-fru" -do_install_append() { +do_install:append() { install -d ${D}/usr/share/entity-manager/configurations install -m 0444 ${WORKDIR}/WC-Baseboard.json ${D}/usr/share/entity-manager/configurations install -m 0444 ${WORKDIR}/WP-Baseboard.json ${D}/usr/share/entity-manager/configurations diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/sensors/dbus-sensors_%.bbappend index 1c8817772..da645b75f 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/sensors/dbus-sensors_%.bbappend +++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/sensors/dbus-sensors_%.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-Only-allow-drive-sensors-on-bus-2-for-ast2500.patch" diff --git a/meta-openbmc-mods/meta-ast2600/conf/layer.conf b/meta-openbmc-mods/meta-ast2600/conf/layer.conf index e60de28cc..72c40f6e1 100644 --- a/meta-openbmc-mods/meta-ast2600/conf/layer.conf +++ b/meta-openbmc-mods/meta-ast2600/conf/layer.conf @@ -9,12 +9,12 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "ast2600" BBFILE_PATTERN_ast2600 = "^${LAYERDIR}/" BBFILE_PRIORITY_ast2600 = "10" -LAYERSERIES_COMPAT_ast2600 = "gatesgarth hardknott" +LAYERSERIES_COMPAT_ast2600 = "gatesgarth hardknott honister" INHERIT += "extrausers" #INHERIT += " cve-check" -EXTRA_USERS_PARAMS_append_pn-intel-platforms = " \ +EXTRA_USERS_PARAMS:append:pn-intel-platforms = " \ ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', "usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root;", '', d)}" -hostname_pn-base-files = "intel-obmc" +hostname:pn-base-files = "intel-obmc" diff --git a/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc b/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc index a1700c873..a7146299c 100644 --- a/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc +++ b/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc @@ -1,4 +1,4 @@ -COMPATIBLE_MACHINE_intel-ast2600 = "intel-ast2600" +COMPATIBLE_MACHINE:intel-ast2600 = "intel-ast2600" KMACHINE = "aspeed" KERNEL_DEVICETREE = " \ ${KMACHINE}-bmc-${COMPATIBLE_MACHINE}.dtb \ diff --git a/meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc b/meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc index 06e4a2ed3..59ec0c2a9 100644 --- a/meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc +++ b/meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc @@ -8,7 +8,7 @@ EXTRA_IMAGEDEPENDS += "u-boot" IMAGE_FSTYPES += "squashfs-xz" IMAGE_FSTYPES += "mtd-auto" INITRAMFS_FSTYPES = "squashfs-xz" -EXTRA_IMAGECMD_squashfs-xz_append = "-processors ${BB_NUMBER_THREADS} -b 262144 -Xdict-size 100% -Xbcj arm" +EXTRA_IMAGECMD:squashfs-xz:append = "-processors ${BB_NUMBER_THREADS} -b 262144 -Xdict-size 100% -Xbcj arm" KERNEL_CLASSES ?= "kernel-fitimage" KERNEL_IMAGETYPES ?= "fitImage" @@ -19,7 +19,7 @@ UBOOT_SUFFIX ?= "bin" MACHINEOVERRIDES =. "openbmc:" OBMC_PHOSPHOR_IMAGE_OVERLAY= "1" -OBMC_IMAGE_EXTRA_INSTALL_append = "u-boot-fw-utils-aspeed-sdk" +OBMC_IMAGE_EXTRA_INSTALL:append = "u-boot-fw-utils-aspeed-sdk" IMAGE_CLASSES += "image_types image_types_phosphor_auto qemuboot" diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch index d1ccc278a..a2981f822 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch @@ -1,4 +1,4 @@ -From 45d1a40a3fc5fa97c92e59fc36fd98eb047a9bd1 Mon Sep 17 00:00:00 2001 +From 9c65cf5fa3cdbbdf1ac7f8269502ec6564703319 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Thu, 24 Oct 2019 14:06:33 -0700 Subject: [PATCH] Add ast2600-intel as a new board @@ -6,6 +6,7 @@ Subject: [PATCH] Add ast2600-intel as a new board Signed-off-by: Vernon Mauery Signed-off-by: Kuiying Wang Signed-off-by: Jae Hyun Yoo +Signed-off-by: AKSHAY RAVEENDRAN K --- arch/arm/dts/ast2600-intel.dts | 202 ++++--------- arch/arm/lib/interrupts.c | 5 + @@ -15,11 +16,11 @@ Signed-off-by: Jae Hyun Yoo board/aspeed/ast2600_intel/ast-irq.c | 399 +++++++++++++++++++++++++ board/aspeed/ast2600_intel/ast-irq.h | 8 + board/aspeed/ast2600_intel/ast-timer.c | 59 ++++ - board/aspeed/ast2600_intel/intel.c | 346 ++++++++++----------- + board/aspeed/ast2600_intel/intel.c | 347 ++++++++++----------- cmd/Kconfig | 2 +- common/autoboot.c | 10 + configs/ast2600_openbmc_defconfig | 2 +- - 12 files changed, 998 insertions(+), 334 deletions(-) + 12 files changed, 999 insertions(+), 334 deletions(-) create mode 100644 board/aspeed/ast2600_intel/ast-espi.c create mode 100644 board/aspeed/ast2600_intel/ast-irq.c create mode 100644 board/aspeed/ast2600_intel/ast-irq.h @@ -1163,10 +1164,10 @@ index 000000000000..cf8c69aba5d3 + writel(tctrl, AST_TIMER_BASE + TIMER_CONTROL); +} diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c -index be6dc49a3bc7..092ff8b5c095 100644 +index be6dc49a3bc7..fc0e41a47712 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c -@@ -1,222 +1,192 @@ +@@ -1,222 +1,193 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) ASPEED Technology Inc. @@ -1323,6 +1324,7 @@ index be6dc49a3bc7..092ff8b5c095 100644 + +/* HICRB Bits */ +#define HICRB_EN80HSGIO (1 << 13) /* Enable 80hSGIO */ ++#define HICRB_ENSNP0D (1 << 14) /* Enable ACCEPT response for snoop #0 */ + +static void port80h_snoop_init(void) +{ @@ -1358,7 +1360,7 @@ index be6dc49a3bc7..092ff8b5c095 100644 - val = readl(LPC_HICRB); - val |= LPC_HICRB_80HSGPIO_EN; - writel(val, LPC_HICRB); -+ value = readl(AST_LPC_BASE + HICRB) | HICRB_EN80HSGIO; ++ value = readl(AST_LPC_BASE + HICRB) | HICRB_EN80HSGIO | HICRB_ENSNP0D; + writel(value, AST_LPC_BASE + HICRB); } @@ -1373,29 +1375,35 @@ index be6dc49a3bc7..092ff8b5c095 100644 +#define SCU_414 0x414 /* Multi-function Pin Control #5 */ #define SCU_414_SGPM_MASK GENMASK(27, 24) -+ uint32_t value; - /* set the sgpio clock to pclk/(2*(5+1)) or ~2 MHz */ +- /* set the sgpio clock to pclk/(2*(5+1)) or ~2 MHz */ - u32 val; - - val = ((256 << SGPIO_M1_CONF_CLKDIV_SHIFT) & SGPIO_M1_CONF_CLKDIV_MASK) | - ((10 << SGPIO_M1_PINS_SHIFT) & SGPIO_M1_PINS_MASK) | - SPGIO_M1_EN; - writel(val, SGPIO_M1_CONF); -- ++ uint32_t value; ++ /* set the sgpio clock to 2MHz */ ++ value = SGPIO_CLK_DIV(24) | SGPIO_BYTES(10) | SGPIO_ENABLE; ++ writel(value, AST_GPIO_BASE + GPIO554); ++ writel(readl(SCU_BASE | SCU_414) | SCU_414_SGPM_MASK, ++ SCU_BASE | SCU_414); ++} + - val = readl(SCU_PINMUX5); - val |= (SCU_PINMUX5_SGPMI | - SCU_PINMUX5_SGPMO | - SCU_PINMUX5_SGPMLD | - SCU_PINMUX5_SGPMCK); - writel(val, SCU_PINMUX5); -+ value = SGPIO_CLK_DIV(256) | SGPIO_BYTES(10) | SGPIO_ENABLE; -+ writel(value, AST_GPIO_BASE + GPIO554); -+ writel(readl(SCU_BASE | SCU_414) | SCU_414_SGPM_MASK, -+ SCU_BASE | SCU_414); ++static void timer_handler(void *regs) ++{ ++ printf("+"); } -static void gpio_init(void) -+static void timer_handler(void *regs) ++extern int arch_interrupt_init_early(void); ++int board_early_init_f(void) { - /* Default setting of Y23 pad in AST2600 A1 is HBLED so disable it. */ - writel(readl(SCU_PINMUX27) & ~SCU_PINMUX27_HBLED_EN, @@ -1438,12 +1446,24 @@ index be6dc49a3bc7..092ff8b5c095 100644 - /* GPIO G6 is also an open-drain output so set it as an input. */ - writel(readl(GPIO_EFGH_DIR) & ~GPIO_EFGH_DIR_G6, - GPIO_EFGH_DIR); -+ printf("+"); ++ /* This is called before relocation; beware! */ ++ /* initialize running timer? timer_init is next in the list but ++ * I am not sure if it actually does anything... */ ++ arch_interrupt_init_early(); ++ ++ gpio_passthru_init(); ++ ++ port80h_snoop_init(); ++ ++ sgpio_init(); ++ ++ /* TODO: is it too late to enforce HW security registers? */ ++ return 0; } -static void espi_init(void) -+extern int arch_interrupt_init_early(void); -+int board_early_init_f(void) ++extern void timer_enable(int n, uint32_t freq, interrupt_handler_t *handler); ++int board_early_init_r(void) { - u32 reg; - @@ -1488,31 +1508,13 @@ index be6dc49a3bc7..092ff8b5c095 100644 - reg = readl(ESPI_CTRL); - reg |= 0x10; - writel(reg, ESPI_CTRL); -+ /* This is called before relocation; beware! */ -+ /* initialize running timer? timer_init is next in the list but -+ * I am not sure if it actually does anything... */ -+ arch_interrupt_init_early(); -+ -+ gpio_passthru_init(); -+ -+ port80h_snoop_init(); -+ -+ sgpio_init(); ++ debug("board_early_init_r\n"); ++ /* timer_enable(0, 1, timer_handler); */ + -+ /* TODO: is it too late to enforce HW security registers? */ + return 0; } -int board_early_init_f(void) -+extern void timer_enable(int n, uint32_t freq, interrupt_handler_t *handler); -+int board_early_init_r(void) -+{ -+ debug("board_early_init_r\n"); -+ /* timer_enable(0, 1, timer_handler); */ -+ -+ return 0; -+} -+ +extern void espi_init(void); +int board_late_init(void) { diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch index c0d409592..7df227c82 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0017-Manufacturing-mode-physical-presence-detection.patch @@ -1,4 +1,4 @@ -From 5d3f9d42ba9b1f634a65ae52f6263b1c4a95b947 Mon Sep 17 00:00:00 2001 +From 3b08379cb6e841c934ded3db3c70a3d0906cea65 Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Thu, 20 Jun 2019 18:11:43 +0530 Subject: [PATCH] Manufacturing mode physical presence detection @@ -22,12 +22,12 @@ Signed-off-by: Richard Marian Thomaiyar Signed-off-by: Jae Hyun Yoo --- - board/aspeed/ast2600_intel/intel.c | 74 ++++++++++++++++++++++++++++-- + board/aspeed/ast2600_intel/intel.c | 87 ++++++++++++++++++++++++++++-- common/autoboot.c | 12 ++++- - 2 files changed, 82 insertions(+), 4 deletions(-) + 2 files changed, 95 insertions(+), 4 deletions(-) diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c -index fb9075f93945..a644010dd339 100644 +index f45b9d06a3f5..7664ac0ddfc6 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c @@ -8,6 +8,8 @@ @@ -66,19 +66,18 @@ index fb9075f93945..a644010dd339 100644 #define SCU_BASE 0x1E6E2000 #define SCU_338 0x338 //Generate UART 24 MHz Reference from UXCLK #define SCU_33C 0x33c //Generate UART 24 MHz Reference from HUXCLK -@@ -119,6 +141,11 @@ static void gpio_passthru_init(void) +@@ -119,6 +141,10 @@ static void gpio_passthru_init(void) SCU_BASE | SCU_418); } +void board_pre_abort_autoboot(void) +{ -+ gpio_passthru_init(); +} + #define AST_LPC_BASE 0x1e789000 #define LPC_SNOOP_ADDR 0x80 #define HICR5 0x080 /* Host Interface Control Register 5 */ -@@ -300,8 +327,6 @@ int board_early_init_f(void) +@@ -301,8 +327,6 @@ int board_early_init_f(void) set_gpio_default_state(); @@ -87,7 +86,7 @@ index fb9075f93945..a644010dd339 100644 port80h_snoop_init(); sgpio_init(); -@@ -388,6 +413,43 @@ static void update_bootargs_cmd(const char *key, const char *value) +@@ -389,6 +413,56 @@ static void update_bootargs_cmd(const char *key, const char *value) free(buf); } @@ -100,13 +99,14 @@ index fb9075f93945..a644010dd339 100644 + */ + const uint32_t delay_in_ms = 100; + const uint32_t read_count = ((15 * 1000) / delay_in_ms); -+ const uint32_t delay_for_indication = 10 * 1000; ++ const uint32_t delay_for_indication = 2 * 1000; ++ uint32_t count; +#ifdef CONFIG_LED_BLINK + struct udevice *dev; + int ret; +#endif + -+ for (uint32_t count = 0; count < read_count; ++count) { ++ for (count = 0; count < read_count; ++count) { + if (read_frontpanel_power_button() != 1) + return false; + @@ -122,8 +122,20 @@ index fb9075f93945..a644010dd339 100644 + } +#endif + -+ /* Delay the boot to do physical indication for mfg mode */ -+ mdelay(delay_for_indication); ++ /* ++ * Delay up to 15 seconds until the power button is released to prevent ++ * unintentional power button overriding to PCH through GPIO ++ * pass-through. ++ */ ++ for (count = 0; count < read_count; ++count) { ++ if (read_frontpanel_power_button() != 1) ++ break; ++ ++ mdelay(delay_in_ms); ++ } ++ /* Keep the indication at least for 2 seconds */ ++ if (delay_in_ms * count < delay_for_indication) ++ mdelay(delay_for_indication - (delay_in_ms * count)); + + return true; +} @@ -131,7 +143,7 @@ index fb9075f93945..a644010dd339 100644 extern void espi_init(void); extern void kcs_init(void); extern void timer_enable(int n, u32 interval_us, interrupt_handler_t *handler, -@@ -413,8 +475,14 @@ int board_late_init(void) +@@ -414,8 +488,15 @@ int board_late_init(void) snprintf(value, sizeof(value), "0x%x", gd->reset_reason); update_bootargs_cmd("resetreason", value); @@ -140,8 +152,9 @@ index fb9075f93945..a644010dd339 100644 + if (gd->reset_reason & SYS_PWR_RESET_FLAG && is_mfg_mode_phy_req()) + update_bootargs_cmd("special", "mfg"); + ++ gpio_passthru_init(); ++ + if (read_ffuj()) { -+ gpio_passthru_init(); kcs_init(); + } diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch index d1cb523e5..9b87b5c57 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0022-Reboot-into-UBOOT-on-Watchdog-Failures.patch @@ -1,4 +1,4 @@ -From 56a1cafcf68c624ca9ea9de6c38080603e80ea0d Mon Sep 17 00:00:00 2001 +From 1c879ae1f822f59d74cec9dd7ed10790279ad65b Mon Sep 17 00:00:00 2001 From: James Feist Date: Wed, 31 Jul 2019 16:01:49 -0700 Subject: [PATCH] Reboot into UBOOT on Watchdog Failures @@ -17,7 +17,7 @@ Signed-off-by: Jae Hyun Yoo 1 file changed, 61 insertions(+) diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c -index a644010dd339..2db162bc9d4c 100644 +index 7664ac0ddfc6..24ae48fc62e7 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c @@ -9,6 +9,55 @@ @@ -87,7 +87,7 @@ index a644010dd339..2db162bc9d4c 100644 /* check ffuj to abort the autoboot */ value = read_ffuj(); printf("FFUJ: %d\n", value); -@@ -460,6 +513,7 @@ int board_late_init(void) +@@ -473,6 +526,7 @@ int board_late_init(void) #define REV_ID_AST2600A0 0x05000303 /* AST2600 A0 */ #define ONE_MSEC_IN_USEC 1000 char value[11]; @@ -95,7 +95,7 @@ index a644010dd339..2db162bc9d4c 100644 if (readl(SCU_BASE | SCU_014) == REV_ID_AST2600A0) timer_enable(0, ONE_MSEC_IN_USEC, timer_callback, (void *)0); -@@ -475,6 +529,13 @@ int board_late_init(void) +@@ -488,6 +542,13 @@ int board_late_init(void) snprintf(value, sizeof(value), "0x%x", gd->reset_reason); update_bootargs_cmd("resetreason", value); diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch index 959fd0bf4..e72679836 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0025-ast2600-PFR-platform-EXTRST-reset-mask-selection.patch @@ -34,7 +34,7 @@ index c65adff0d69a..3db7d993d3ca 100644 2: + /* SCU060:EXTRST1# reset mask selection */ + ldr r0, =AST_SCU_EXTRST_SEL1 -+ ldr r1, =0x6FF1FF1 ++ ldr r1, =0x6CF1FF1 + str r1, [r0] + + /* SCU070:EXTRST2# reset mask selection */ diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch index aa1f0cc65..018ab07cf 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch @@ -1,4 +1,4 @@ -From e152d718da6bfdf71d309b7ec885d2050fc19d01 Mon Sep 17 00:00:00 2001 +From 08f2b4f0464ef8abcf32511f8549233359d16eed Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo Date: Wed, 2 Jun 2021 13:03:47 -0700 Subject: [PATCH] Disable eSPI initialization in u-boot for normal booting @@ -21,27 +21,25 @@ eSPI will be initialized in u-boot only in these specific cases: Signed-off-by: Jae Hyun Yoo --- - board/aspeed/ast2600_intel/intel.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) + board/aspeed/ast2600_intel/intel.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c -index aff0c8593759..fc2f3c8feea7 100644 +index 54f53d77c476..f3f1d8114616 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c -@@ -201,7 +201,11 @@ static void gpio_passthru_init(void) +@@ -201,6 +201,10 @@ static void gpio_passthru_init(void) void board_pre_abort_autoboot(void) { -- gpio_passthru_init(); + if (!read_ffuj()) { + espi_init(); -+ gpio_passthru_init(); + kcs_init(); + } } #define AST_LPC_BASE 0x1e789000 -@@ -662,7 +666,6 @@ int board_late_init(void) +@@ -625,7 +629,6 @@ int board_late_init(void) #endif pwm_init(); @@ -49,14 +47,14 @@ index aff0c8593759..fc2f3c8feea7 100644 /* Add reset reason to bootargs */ snprintf(value, sizeof(value), "0x%x", gd->reset_reason); -@@ -684,6 +687,7 @@ int board_late_init(void) - update_bootargs_cmd("special", "mfg"); +@@ -645,6 +648,7 @@ int board_late_init(void) + gpio_passthru_init(); if (read_ffuj()) { + espi_init(); - gpio_passthru_init(); kcs_init(); } + -- 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 08eb6336e..2f24a602f 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 @@ -1,12 +1,10 @@ COMPATIBLE_MACHINE = "intel-ast2600" -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:" - -SRCREV = "e1417368fdc3ba45ffde51a4b13290114a643be4" +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files:" # the meta-phosphor layer adds this patch, which conflicts # with the intel layout for environment -SRC_URI_append_intel-ast2600 = " \ +SRC_URI:append:intel-ast2600 = " \ file://intel.cfg \ file://0001-Add-ast2600-intel-as-a-new-board.patch \ file://0002-AST2600-Enable-host-searial-port-clock-configuration.patch \ @@ -44,8 +42,8 @@ SRC_URI_append_intel-ast2600 = " \ " # CVE-2020-10648 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2020-10648:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2020-10648:" +SRC_URI:append:intel-ast2600 = " \ file://0001-image-Correct-comment-for-fit_conf_get_node.patch \ file://0008-image-Load-the-correct-configuration-in-fit_check_si.patch \ file://0009-fit_check_sign-Allow-selecting-the-configuration-to-.patch \ @@ -53,56 +51,56 @@ SRC_URI_append_intel-ast2600 = " \ " # CVE-2019-11059 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-11059:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2019-11059:" +SRC_URI:append:intel-ast2600 = " \ file://0001-Fix-ext4-block-group-descriptor-sizing.patch \ " # CVE-2019-11690 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-11690:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2019-11690:" +SRC_URI:append:intel-ast2600 = " \ file://0001-lib-uuid-Fix-unseeded-PRNG-on-RANDOM_UUID-y.patch \ " # CVE-2019-13105 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13105:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2019-13105:" +SRC_URI:append:intel-ast2600 = " \ file://0001-fs-ext4-cache-extent-data.patch \ file://0002-CVE-2019-13105-ext4-fix-double-free-in-ext4_cache_re.patch \ " # CVE-2019-13104 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13104:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2019-13104:" +SRC_URI:append:intel-ast2600 = " \ file://0001-CVE-2019-13104-ext4-check-for-underflow-in-ext4fs_re.patch \ " # CVE-2019-13106 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2019-13106:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2019-13106:" +SRC_URI:append:intel-ast2600 = " \ file://0001-CVE-2019-13106-ext4-fix-out-of-bounds-memset.patch \ " # CVE-2021-27097 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2021-27097:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2021-27097:" +SRC_URI:append:intel-ast2600 = " \ file://0001-image-Adjust-the-workings-of-fit_check_format.patch \ file://0002-image-Add-an-option-to-do-a-full-check-of-the-FIT.patch \ " # CVE-2021-27138 vulnerability fix -FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files/CVE-2021-27138:" -SRC_URI_append_intel-ast2600 = " \ +FILESEXTRAPATHS:append:intel-ast2600:= "${THISDIR}/files/CVE-2021-27138:" +SRC_URI:append:intel-ast2600 = " \ file://0001-image-Check-for-unit-addresses-in-FITs.patch \ " PFR_SRC_URI = " \ file://0043-AST2600-PFR-u-boot-env-changes-as-per-PFR-BMC-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('IMAGE_FSTYPES', 'intel-pfr', PFR_SRC_URI, '', d)}" -do_install_append () { +do_install:append () { install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config install -m 0644 ${WORKDIR}/fw_env.config ${S}/tools/env/fw_env.config } -RDEPENDS_${PN} = "udev-aspeed-mtd-partitions" +RDEPENDS:${PN} = "udev-aspeed-mtd-partitions" diff --git a/meta-openbmc-mods/meta-ast2600/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend index 23c9060d2..85e3ffc26 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend +++ b/meta-openbmc-mods/meta-ast2600/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" SRC_URI += " \ file://0001-Enable-per-frame-CRC-calculation-option-to-save-netw.patch \ diff --git a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend index 07cafe94e..e5687d4d1 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend +++ b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -1,5 +1,5 @@ COMPATIBLE_MACHINE = "intel-ast2600" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " \ file://intel-ast2600.cfg \ diff --git a/meta-openbmc-mods/meta-common-small/conf/layer.conf b/meta-openbmc-mods/meta-common-small/conf/layer.conf index bd30de5f8..a8c66a9da 100644 --- a/meta-openbmc-mods/meta-common-small/conf/layer.conf +++ b/meta-openbmc-mods/meta-common-small/conf/layer.conf @@ -8,4 +8,4 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "common-small" BBFILE_PATTERN_common-small = "^${LAYERDIR}/" BBFILE_PRIORITY_common-small = "9" -LAYERSERIES_COMPAT_common-small = "gatesgarth hardknott" +LAYERSERIES_COMPAT_common-small = "gatesgarth hardknott honister" diff --git a/meta-openbmc-mods/meta-common-small/recipes-core/systemd/systemd_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-core/systemd/systemd_%.bbappend index 12cb9fd48..547b6ae30 100644 --- a/meta-openbmc-mods/meta-common-small/recipes-core/systemd/systemd_%.bbappend +++ b/meta-openbmc-mods/meta-common-small/recipes-core/systemd/systemd_%.bbappend @@ -2,13 +2,13 @@ LICENSE = "GPL-2.0" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" # Disable udev hwdb -RRECOMMENDS_${PN}_remove += "udev-hwdb" -PACKAGES_remove += "udev-hwdb" +RRECOMMENDS:${PN}:remove += "udev-hwdb" +PACKAGES:remove += "udev-hwdb" -do_install_append() { +do_install:append() { rm -rf ${D}${rootlibexecdir}/udev/hwdb.d rm -f ${D}${sysconfdir}/udev/hwdb.bin } diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/python/python-pycryptodomex.inc b/meta-openbmc-mods/meta-common-small/recipes-devtools/python/python-pycryptodomex.inc index fa88defc1..83aa4bcd8 100644 --- a/meta-openbmc-mods/meta-common-small/recipes-devtools/python/python-pycryptodomex.inc +++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/python/python-pycryptodomex.inc @@ -10,18 +10,18 @@ SRC_URI[sha256sum] = "22d970cee5c096b9123415e183ae03702b2cd4d3ba3f0ced25c4e1aba3 inherit pypi -RDEPENDS_${PN} += " \ +RDEPENDS:${PN} += " \ ${PYTHON_PN}-io \ ${PYTHON_PN}-math \ " -RDEPENDS_${PN}-tests += " \ +RDEPENDS:${PN}-tests += " \ ${PYTHON_PN}-unittest \ " PACKAGES =+ "${PN}-tests" -FILES_${PN}-tests += " \ +FILES:${PN}-tests += " \ ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \ ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/__pycache__/ \ " diff --git a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend index 680eccc2c..1bc423139 100644 --- a/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend +++ b/meta-openbmc-mods/meta-common-small/recipes-devtools/qemu/qemu-system-native_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://0001-hw-arm-aspeed-Add-an-intel-ast2500-machine-type.patch \ file://0002-hw-arm-aspeed-Add-an-intel-ast2600-machine-type.patch \ file://0003-Remove-clearing-aspeed-GPIO-registers.patch" diff --git a/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass index 2161cdf8d..470d5a10d 100644 --- a/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass +++ b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass @@ -8,7 +8,7 @@ require recipes-core/os-release/version-vars.inc IMAGE_TYPES += "intel-pfr" -IMAGE_TYPEDEP_intel-pfr = "mtd-auto" +IMAGE_TYPEDEP:intel-pfr = "mtd-auto" IMAGE_TYPES_MASKED += "intel-pfr" # PFR images directory diff --git a/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass b/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass index 0c32e0e53..3efbfe092 100644 --- a/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass +++ b/meta-openbmc-mods/meta-common/classes/image_types_phosphor_auto.bbclass @@ -14,7 +14,7 @@ OVERLAY_BASETYPE ?= "jffs2" IMAGE_TYPES += "mtd-auto" -IMAGE_TYPEDEP_mtd-auto = "${IMAGE_BASETYPE}" +IMAGE_TYPEDEP:mtd-auto = "${IMAGE_BASETYPE}" IMAGE_TYPES_MASKED += "mtd-auto" # Flash characteristics in KB unless otherwise noted 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 036164585..e65e75c0c 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 @@ -30,7 +30,7 @@ IMAGE_FEATURES += " \ obmc-console \ " -IMAGE_INSTALL_append = " \ +IMAGE_INSTALL:append = " \ dbus-broker \ entity-manager \ fru-device \ @@ -39,7 +39,6 @@ IMAGE_INSTALL_append = " \ phosphor-ipmi-ipmb \ phosphor-node-manager-proxy \ dbus-sensors \ - webui-vue \ at-scale-debug \ phosphor-pid-control \ phosphor-host-postd \ @@ -67,7 +66,6 @@ IMAGE_INSTALL_append = " \ id-led-off \ hsbp-manager \ security-registers-check \ - pch-time-sync \ nv-sync \ security-manager \ multi-node-nl \ @@ -79,13 +77,14 @@ IMAGE_INSTALL_append = " \ i3c-tools \ configure-usb-c \ zip \ + peci-pcie \ " -IMAGE_INSTALL_append = " ${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'pfr-manager', '', d)}" +IMAGE_INSTALL:append = " ${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'pfr-manager', '', d)}" -IMAGE_INSTALL_append = " ${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'ncsi-monitor', '', d)}" +IMAGE_INSTALL:append = " ${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'ncsi-monitor', '', d)}" # this package was flagged as a security risk -IMAGE_INSTALL_remove += " lrzsz" +IMAGE_INSTALL:remove += " lrzsz" BAD_RECOMMENDATIONS += "phosphor-settings-manager" diff --git a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-dev.bbclass b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-dev.bbclass index 6a1ac3f14..1bc1653dc 100644 --- a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-dev.bbclass +++ b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-dev.bbclass @@ -1,4 +1,4 @@ -IMAGE_INSTALL_append = " \ +IMAGE_INSTALL:append = " \ mtd-util \ io-app \ intel-fw-update \ diff --git a/meta-openbmc-mods/meta-common/conf/layer.conf b/meta-openbmc-mods/meta-common/conf/layer.conf index 5d4becae0..8d9452850 100644 --- a/meta-openbmc-mods/meta-common/conf/layer.conf +++ b/meta-openbmc-mods/meta-common/conf/layer.conf @@ -8,4 +8,4 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "common" BBFILE_PATTERN_common = "^${LAYERDIR}/" BBFILE_PRIORITY_common = "9" -LAYERSERIES_COMPAT_common = "gatesgarth hardknott" +LAYERSERIES_COMPAT_common = "gatesgarth hardknott honister" diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-%.bbappend index eee5194fb..e9093b403 100644 --- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += " \ file://fw_env.config \ diff --git a/meta-openbmc-mods/meta-common/recipes-connectivity/avahi/avahi_%.bbappend b/meta-openbmc-mods/meta-common/recipes-connectivity/avahi/avahi_%.bbappend index e1caeaafa..fa58d9726 100644 --- a/meta-openbmc-mods/meta-common/recipes-connectivity/avahi/avahi_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-connectivity/avahi/avahi_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " \ " diff --git a/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1k.bb b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1k.bb deleted file mode 100644 index 034cc610d..000000000 --- a/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1k.bb +++ /dev/null @@ -1,211 +0,0 @@ -SUMMARY = "Secure Socket Layer" -DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." -HOMEPAGE = "http://www.openssl.org/" -BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" -SECTION = "libs/network" - -# "openssl" here actually means both OpenSSL and SSLeay licenses apply -# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) -LICENSE = "openssl" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" - -DEPENDS = "hostperl-runtime-native" - -SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ - file://run-ptest \ - file://0001-skip-test_symbol_presence.patch \ - file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ - file://afalg.patch \ - file://reproducible.patch \ - " - -SRC_URI_append_class-nativesdk = " \ - file://environment.d-openssl.sh \ - " - -SRC_URI[sha256sum] = "892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" - -inherit lib_package multilib_header multilib_script ptest -MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" - -PACKAGECONFIG ?= "" -PACKAGECONFIG_class-native = "" -PACKAGECONFIG_class-nativesdk = "" - -PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" - -B = "${WORKDIR}/build" -do_configure[cleandirs] = "${B}" - -#| ./libcrypto.so: undefined reference to `getcontext' -#| ./libcrypto.so: undefined reference to `setcontext' -#| ./libcrypto.so: undefined reference to `makecontext' -EXTRA_OECONF_append_libc-musl = " no-async" -EXTRA_OECONF_append_libc-musl_powerpc64 = " no-asm" - -# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions -# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) -EXTRA_OECONF_class-native = "--with-rand-seed=os,devrandom" -EXTRA_OECONF_class-nativesdk = "--with-rand-seed=os,devrandom" - -# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. -CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" -CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" - -do_configure () { - os=${HOST_OS} - case $os in - linux-gnueabi |\ - linux-gnuspe |\ - linux-musleabi |\ - linux-muslspe |\ - linux-musl ) - os=linux - ;; - *) - ;; - esac - target="$os-${HOST_ARCH}" - case $target in - linux-arm*) - target=linux-armv4 - ;; - linux-aarch64*) - target=linux-aarch64 - ;; - linux-i?86 | linux-viac3) - target=linux-x86 - ;; - linux-gnux32-x86_64 | linux-muslx32-x86_64 ) - target=linux-x32 - ;; - linux-gnu64-x86_64) - target=linux-x86_64 - ;; - linux-mips | linux-mipsel) - # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags - target="linux-mips32 ${TARGET_CC_ARCH}" - ;; - linux-gnun32-mips*) - target=linux-mips64 - ;; - linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) - target=linux64-mips64 - ;; - linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) - target=linux-generic32 - ;; - linux-powerpc) - target=linux-ppc - ;; - linux-powerpc64) - target=linux-ppc64 - ;; - linux-powerpc64le) - target=linux-ppc64le - ;; - linux-riscv32) - target=linux-generic32 - ;; - linux-riscv64) - target=linux-generic64 - ;; - linux-sparc | linux-supersparc) - target=linux-sparcv9 - ;; - esac - - useprefix=${prefix} - if [ "x$useprefix" = "x" ]; then - useprefix=/ - fi - # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the - # environment variables set by bitbake. Adjust the environment variables instead. - HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ - perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target - perl ${B}/configdata.pm --dump -} - -do_install () { - oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install - - oe_multilib_header openssl/opensslconf.h - - # Create SSL structure for packages such as ca-certificates which - # contain hard-coded paths to /etc/ssl. Debian does the same. - install -d ${D}${sysconfdir}/ssl - mv ${D}${libdir}/ssl-1.1/certs \ - ${D}${libdir}/ssl-1.1/private \ - ${D}${libdir}/ssl-1.1/openssl.cnf \ - ${D}${sysconfdir}/ssl/ - - # Although absolute symlinks would be OK for the target, they become - # invalid if native or nativesdk are relocated from sstate. - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf -} - -do_install_append_class-native () { - create_wrapper ${D}${bindir}/openssl \ - OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ - SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ - SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ - OPENSSL_ENGINES=${libdir}/engines-1.1 -} - -do_install_append_class-nativesdk () { - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh - sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh -} - -PTEST_BUILD_HOST_FILES += "configdata.pm" -PTEST_BUILD_HOST_PATTERN = "perl_version =" -do_install_ptest () { - # Prune the build tree - rm -f ${B}/fuzz/*.* ${B}/test/*.* - - cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} - cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} - - # For test_shlibload - ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ - ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ - - install -d ${D}${PTEST_PATH}/apps - ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps - install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps - install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps - - install -d ${D}${PTEST_PATH}/engines - install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines -} - -# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto -# package RRECOMMENDS on this package. This will enable the configuration -# file to be installed for both the openssl-bin package and the libcrypto -# package since the openssl-bin package depends on the libcrypto package. - -PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" - -FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" -FILES_libssl = "${libdir}/libssl${SOLIBS}" -FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" -FILES_${PN}-engines = "${libdir}/engines-1.1" -FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" -FILES_${PN} =+ "${libdir}/ssl-1.1/*" -FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" - -CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" - -RRECOMMENDS_libcrypto += "openssl-conf" -RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash" - -BBCLASSEXTEND = "native nativesdk" - -CVE_PRODUCT = "openssl:openssl" - -# Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37 -# Apache in meta-webserver is already recent enough -CVE_CHECK_WHITELIST += "CVE-2019-0190" diff --git a/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1l.bb b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1l.bb new file mode 100644 index 000000000..e395de665 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1l.bb @@ -0,0 +1,211 @@ +SUMMARY = "Secure Socket Layer" +DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." +HOMEPAGE = "http://www.openssl.org/" +BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" +SECTION = "libs/network" + +# "openssl" here actually means both OpenSSL and SSLeay licenses apply +# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped) +LICENSE = "openssl" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8" + +DEPENDS = "hostperl-runtime-native" + +SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ + file://run-ptest \ + file://0001-skip-test_symbol_presence.patch \ + file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ + file://afalg.patch \ + file://reproducible.patch \ + " + +SRC_URI:append:class-nativesdk = " \ + file://environment.d-openssl.sh \ + " + +SRC_URI[sha256sum] = "0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1" + +inherit lib_package multilib_header multilib_script ptest +MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" + +PACKAGECONFIG ?= "" +PACKAGECONFIG:class-native = "" +PACKAGECONFIG:class-nativesdk = "" + +PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +#| ./libcrypto.so: undefined reference to `getcontext' +#| ./libcrypto.so: undefined reference to `setcontext' +#| ./libcrypto.so: undefined reference to `makecontext' +EXTRA_OECONF:append:libc-musl = " no-async" +EXTRA_OECONF:append:libc-musl:powerpc64 = " no-asm" + +# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions +# (native versions can be built with newer glibc, but then relocated onto a system with older glibc) +EXTRA_OECONF:class-native = "--with-rand-seed=os,devrandom" +EXTRA_OECONF:class-nativesdk = "--with-rand-seed=os,devrandom" + +# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. +CFLAGS:append:class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" +CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" + +do_configure () { + os=${HOST_OS} + case $os in + linux-gnueabi |\ + linux-gnuspe |\ + linux-musleabi |\ + linux-muslspe |\ + linux-musl ) + os=linux + ;; + *) + ;; + esac + target="$os-${HOST_ARCH}" + case $target in + linux-arm*) + target=linux-armv4 + ;; + linux-aarch64*) + target=linux-aarch64 + ;; + linux-i?86 | linux-viac3) + target=linux-x86 + ;; + linux-gnux32-x86_64 | linux-muslx32-x86_64 ) + target=linux-x32 + ;; + linux-gnu64-x86_64) + target=linux-x86_64 + ;; + linux-mips | linux-mipsel) + # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags + target="linux-mips32 ${TARGET_CC_ARCH}" + ;; + linux-gnun32-mips*) + target=linux-mips64 + ;; + linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) + target=linux64-mips64 + ;; + linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) + target=linux-generic32 + ;; + linux-powerpc) + target=linux-ppc + ;; + linux-powerpc64) + target=linux-ppc64 + ;; + linux-powerpc64le) + target=linux-ppc64le + ;; + linux-riscv32) + target=linux-generic32 + ;; + linux-riscv64) + target=linux-generic64 + ;; + linux-sparc | linux-supersparc) + target=linux-sparcv9 + ;; + esac + + useprefix=${prefix} + if [ "x$useprefix" = "x" ]; then + useprefix=/ + fi + # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the + # environment variables set by bitbake. Adjust the environment variables instead. + HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ + perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target + perl ${B}/configdata.pm --dump +} + +do_install () { + oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install + + oe_multilib_header openssl/opensslconf.h + + # Create SSL structure for packages such as ca-certificates which + # contain hard-coded paths to /etc/ssl. Debian does the same. + install -d ${D}${sysconfdir}/ssl + mv ${D}${libdir}/ssl-1.1/certs \ + ${D}${libdir}/ssl-1.1/private \ + ${D}${libdir}/ssl-1.1/openssl.cnf \ + ${D}${sysconfdir}/ssl/ + + # Although absolute symlinks would be OK for the target, they become + # invalid if native or nativesdk are relocated from sstate. + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private + ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf +} + +do_install:append:class-native () { + create_wrapper ${D}${bindir}/openssl \ + OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ + SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ + SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ + OPENSSL_ENGINES=${libdir}/engines-1.1 +} + +do_install:append:class-nativesdk () { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh + sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh +} + +PTEST_BUILD_HOST_FILES += "configdata.pm" +PTEST_BUILD_HOST_PATTERN = "perl_version =" +do_install_ptest () { + # Prune the build tree + rm -f ${B}/fuzz/*.* ${B}/test/*.* + + cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} + cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} + + # For test_shlibload + ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ + ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ + + install -d ${D}${PTEST_PATH}/apps + ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps + install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps + install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps + + install -d ${D}${PTEST_PATH}/engines + install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines +} + +# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto +# package RRECOMMENDS on this package. This will enable the configuration +# file to be installed for both the openssl-bin package and the libcrypto +# package since the openssl-bin package depends on the libcrypto package. + +PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" + +FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}" +FILES:libssl = "${libdir}/libssl${SOLIBS}" +FILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf" +FILES:${PN}-engines = "${libdir}/engines-1.1" +FILES:${PN}-misc = "${libdir}/ssl-1.1/misc" +FILES:${PN} =+ "${libdir}/ssl-1.1/*" +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" + +CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf" + +RRECOMMENDS:libcrypto += "openssl-conf" +RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "openssl:openssl" + +# Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37 +# Apache in meta-webserver is already recent enough +CVE_CHECK_WHITELIST += "CVE-2019-0190" diff --git a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check_git.bb b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check_git.bb index 2a30696dc..10d2c6f29 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check_git.bb @@ -8,11 +8,11 @@ SRC_URI = "file://ac-boot-check.sh \ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" inherit systemd -FILES_${PN} += "${systemd_system_unitdir}/ac-boot-check.service" +FILES:${PN} += "${systemd_system_unitdir}/ac-boot-check.service" do_install() { install -d ${D}${systemd_system_unitdir} @@ -21,4 +21,4 @@ do_install() { install -m 0755 ${S}/ac-boot-check.sh ${D}/${bindir}/ac-boot-check.sh } -SYSTEMD_SERVICE_${PN} += " ac-boot-check.service" +SYSTEMD_SERVICE:${PN} += " ac-boot-check.service" diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb index f35fee7ab..2c18cc0ec 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb @@ -20,14 +20,14 @@ inherit useradd USERADD_PACKAGES = "${PN}" # add a special user asdbg -USERADD_PARAM_${PN} = "-u 999 asdbg" +USERADD_PARAM:${PN} = "-u 999 asdbg" S = "${WORKDIR}/git" -SYSTEMD_SERVICE_${PN} += "com.intel.AtScaleDebug.service" +SYSTEMD_SERVICE:${PN} += "com.intel.AtScaleDebug.service" # Specify any options you want to pass to cmake using EXTRA_OECMAKE: EXTRA_OECMAKE = "-DBUILD_UT=OFF" -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/" +CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" +CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/" 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 79e529179..799db92f3 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,2 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " file://fstab" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +SRC_URI:append = " file://fstab" diff --git a/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend index c72975ccc..ee6330b69 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/busybox/busybox_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " \ file://disable.cfg \ file://enable.cfg \ diff --git a/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend index cfa1d0711..9d5dcf6b0 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://enable-ssh.sh" @@ -12,11 +12,11 @@ add_manual_ssh_enable() { rm ${D}/${systemd_unitdir}/system/dropbear.socket } -do_install_append() { +do_install:append() { # Add manual ssh enable script if debug-tweaks is disabled ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'add_manual_ssh_enable', d)} } -FILES_${PN} += "/usr/share/misc" -SYSTEMD_SERVICE_${PN} += "dropbearkey.service" -SYSTEMD_SERVICE_${PN}_remove += " ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'dropbear.socket', d)}" +FILES:${PN} += "/usr/share/misc" +SYSTEMD_SERVICE:${PN} += "dropbearkey.service" +SYSTEMD_SERVICE:${PN}:remove += " ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'dropbear.socket', d)}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb b/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb index 118d6aab8..df7d6e7f1 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb @@ -3,13 +3,13 @@ DESCRIPTION = "At runtime, perform a firmware update and reboot" PR = "r1" # flash_eraseall -RDEPENDS_intel-fw-update += "mtd-utils" +RDEPENDS:intel-fw-update += "mtd-utils" # wget tftp scp -RDEPENDS_intel-fw-update += "busybox dropbear" +RDEPENDS:intel-fw-update += "busybox dropbear" # mkfs.vfat, parted -RDEPENDS_intel-fw-update += "dosfstools dtc" +RDEPENDS:intel-fw-update += "dosfstools dtc" -RDEPENDS_intel-fw-update += "bash" +RDEPENDS:intel-fw-update += "bash" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" @@ -18,7 +18,7 @@ PFR_EN = "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'pfr', '', d)}" SRC_URI += "file://fwupd.sh" SRC_URI += "file://usb-ctrl" -FILES_${PN} += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '${datadir}/pfr', '', d)}" +FILES:${PN} += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '${datadir}/pfr', '', d)}" do_install() { install -d ${D}${bindir} diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch deleted file mode 100644 index 5e1bc958b..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 42d359350510506b87101cf77202fefcbfc790cb Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Thu, 27 May 2021 12:49:47 +0200 -Subject: [PATCH] Use __pthread_attr_copy in mq_notify (bug 27896) - -Make a deep copy of the pthread attribute object to remove a potential -use-after-free issue. ---- - sysdeps/unix/sysv/linux/mq_notify.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c -index cc575a0cdd..f7ddfe5a6c 100644 ---- a/sysdeps/unix/sysv/linux/mq_notify.c -+++ b/sysdeps/unix/sysv/linux/mq_notify.c -@@ -133,8 +133,11 @@ helper_thread (void *arg) - (void) __pthread_barrier_wait (¬ify_barrier); - } - else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED) -- /* The only state we keep is the copy of the thread attributes. */ -- free (data.attr); -+ { -+ /* The only state we keep is the copy of the thread attributes. */ -+ pthread_attr_destroy (data.attr); -+ free (data.attr); -+ } - } - return NULL; - } -@@ -255,8 +258,7 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) - if (data.attr == NULL) - return -1; - -- memcpy (data.attr, notification->sigev_notify_attributes, -- sizeof (pthread_attr_t)); -+ __pthread_attr_copy (data.attr, notification->sigev_notify_attributes); - } - - /* Construct the new request. */ -@@ -270,7 +272,10 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) - - /* If it failed, free the allocated memory. */ - if (__glibc_unlikely (retval != 0)) -- free (data.attr); -+ { -+ pthread_attr_destroy (data.attr); -+ free (data.attr); -+ } - - return retval; - } --- -2.27.0 - diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch deleted file mode 100644 index 447943a46..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 217b6dc298156bdb0d6aea9ea93e7e394a5ff091 Mon Sep 17 00:00:00 2001 -From: Florian Weimer -Date: Tue, 1 Jun 2021 17:51:41 +0200 -Subject: [PATCH] Fix use of __pthread_attr_copy in mq_notify (bug 27896) - -__pthread_attr_copy can fail and does not initialize the attribute -structure in that case. - -If __pthread_attr_copy is never called and there is no allocated -attribute, pthread_attr_destroy should not be called, otherwise -there is a null pointer dereference in rt/tst-mqueue6. - -Fixes commit 42d359350510506b87101cf77202fefcbfc790cb -("Use __pthread_attr_copy in mq_notify (bug 27896)"). - -Reviewed-by: Siddhesh Poyarekar ---- - sysdeps/unix/sysv/linux/mq_notify.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c -index f7ddfe5a6c..6f46d29d1d 100644 ---- a/sysdeps/unix/sysv/linux/mq_notify.c -+++ b/sysdeps/unix/sysv/linux/mq_notify.c -@@ -258,7 +258,14 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) - if (data.attr == NULL) - return -1; - -- __pthread_attr_copy (data.attr, notification->sigev_notify_attributes); -+ int ret = __pthread_attr_copy (data.attr, -+ notification->sigev_notify_attributes); -+ if (ret != 0) -+ { -+ free (data.attr); -+ __set_errno (ret); -+ return -1; -+ } - } - - /* Construct the new request. */ -@@ -271,7 +278,7 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) - int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, &se); - - /* If it failed, free the allocated memory. */ -- if (__glibc_unlikely (retval != 0)) -+ if (retval != 0 && data.attr != NULL) - { - pthread_attr_destroy (data.attr); - free (data.attr); --- -2.27.0 - diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0038-CVE-2021-35942-handle-overflow-in-positional-parameter-number.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0038-CVE-2021-35942-handle-overflow-in-positional-parameter-number.patch deleted file mode 100644 index 4ad5da6da..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0038-CVE-2021-35942-handle-overflow-in-positional-parameter-number.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 5adda61f62b77384718b4c0d8336ade8f2b4b35c Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Fri, 25 Jun 2021 15:02:47 +0200 -Subject: [PATCH] wordexp: handle overflow in positional parameter number (bug - 28011) - -Use strtoul instead of atoi so that overflow can be detected. ---- - posix/wordexp-test.c | 1 + - posix/wordexp.c | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c -index f93a546d7e..9df02dbbb3 100644 ---- a/posix/wordexp-test.c -+++ b/posix/wordexp-test.c -@@ -183,6 +183,7 @@ struct test_case_struct - { 0, NULL, "$var", 0, 0, { NULL, }, IFS }, - { 0, NULL, "\"\\n\"", 0, 1, { "\\n", }, IFS }, - { 0, NULL, "", 0, 0, { NULL, }, IFS }, -+ { 0, NULL, "${1234567890123456789012}", 0, 0, { NULL, }, IFS }, - - /* Flags not already covered (testit() has special handling for these) */ - { 0, NULL, "one two", WRDE_DOOFFS, 2, { "one", "two", }, IFS }, -diff --git a/posix/wordexp.c b/posix/wordexp.c -index bcbe96e48d..1f3b09f721 100644 ---- a/posix/wordexp.c -+++ b/posix/wordexp.c -@@ -1399,7 +1399,7 @@ envsubst: - /* Is it a numeric parameter? */ - else if (isdigit (env[0])) - { -- int n = atoi (env); -+ unsigned long n = strtoul (env, NULL, 10); - - if (n >= __libc_argc) - /* Substitute NULL. */ --- -2.27.0 - diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend index a40461c62..19e136238 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend @@ -1,9 +1,6 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " \ file://0035-Fix-build-error.patch \ file://0036-sunrpc-use-snprintf-to-guard-against-buffer-overflow.patch \ - file://0036-Use-__pthread_attr_copy-in-mq_notify-bug-27896.patch \ - file://0037-Fix-use-of-__pthread_attr_copy-in-mq_notify-bug-27896.patch \ - file://0038-CVE-2021-35942-handle-overflow-in-positional-parameter-number.patch \ " diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb index 9a78fd9f8..5ca73964c 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb @@ -2,7 +2,7 @@ SUMMARY = "libmctp" DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)" SRC_URI = "git://github.com/openbmc/libmctp.git" -SRCREV = "cfeaef8ecb0ab8c59ea4e145603523e599d60014" +SRCREV = "ae59f4fe3a3ceaf52a682ada2a2b54855fad2408" PV = "0.1+git${SRCPV}" @@ -15,10 +15,10 @@ S = "${WORKDIR}/git" DEPENDS += "i2c-tools" -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" +CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" +CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-Smbus-changes-for-libmctp.patch \ file://0002-Fix-Memory-Leak.patch \ @@ -28,16 +28,16 @@ SRC_URI += "file://0001-Smbus-changes-for-libmctp.patch \ file://libmctp-smbus.h \ file://smbus.c" -do_configure_prepend() { +do_configure:prepend() { cp -f ${WORKDIR}/*.c ${S} cp -f ${WORKDIR}/*.h ${S} cp -f ${WORKDIR}/CMakeLists.txt ${S} } # linux-libc-headers guides this way to include custom uapi headers -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" -CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" +CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" +CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include" +CXXFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" +CXXFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include" do_configure[depends] += "virtual/kernel:do_shared_workdir" 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 2e5c11158..9b5a06fc6 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 = "a87dbd4ee3ff53e7e53052c1663f85b390a0ab31" +SRCREV = "98cb6186e77fb820dd26666118964897d36730be" -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/kernel-panic-check/kernel-panic-check.bb b/meta-openbmc-mods/meta-common/recipes-core/kernel-panic-check/kernel-panic-check.bb index 955ed1921..b95f426c4 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/kernel-panic-check/kernel-panic-check.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/kernel-panic-check/kernel-panic-check.bb @@ -10,11 +10,11 @@ SRC_URI = "file://kernel-panic-check.sh \ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS_${PN} += "bash logger-systemd" +RDEPENDS:${PN} += "bash logger-systemd" inherit systemd -FILES_${PN} += "${systemd_system_unitdir}/kernel-panic-check.service" +FILES:${PN} += "${systemd_system_unitdir}/kernel-panic-check.service" do_install() { install -d ${D}${systemd_system_unitdir} @@ -23,4 +23,4 @@ do_install() { install -m 0755 ${S}/kernel-panic-check.sh ${D}/${bindir}/kernel-panic-check.sh } -SYSTEMD_SERVICE_${PN} += " kernel-panic-check.service" +SYSTEMD_SERVICE:${PN} += " kernel-panic-check.service" diff --git a/meta-openbmc-mods/meta-common/recipes-core/libxcrypt/libxcrypt_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/libxcrypt/libxcrypt_%.bbappend index f47a3c866..386bc8204 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/libxcrypt/libxcrypt_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/libxcrypt/libxcrypt_%.bbappend @@ -1,5 +1,5 @@ # libxcrypt fails to compile under gcc with the -Os flag. Because we want to # be able to compile the rest of the system with -Os, override the global # setting here to fall back to -O3 -CFLAGS_append = " --param max-inline-insns-single=1000" +CFLAGS:append = " --param max-inline-insns-single=1000" FULL_OPTIMIZATION = "-O3 -pipe ${DEBUG_FLAGS}" 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 abad9d12d..d808801c3 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 @@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 inherit autotools gettext pkgconfig DEPENDS = "libcap-ng ncurses virtual/crypt zlib systemd " -#DEPENDS_intel-ast2500 += " systemd " +#DEPENDS:intel-ast2500 += " systemd " #RDEPENDS_${PN} += " libsystemd" MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" @@ -34,7 +34,7 @@ EXTRA_OECONF = " --disable-nls --disable-all-programs \ --enable-logger \ " -do_install_append () { +do_install:append () { mv ${D}${bindir}/logger ${D}${bindir}/logger-systemd rm -rf ${D}${sbindir} rm -rf ${D}${base_libdir} diff --git a/meta-openbmc-mods/meta-common/recipes-core/microsoft-gsl/microsoft-gsl.bb b/meta-openbmc-mods/meta-common/recipes-core/microsoft-gsl/microsoft-gsl.bb index f8e5505ef..645811f09 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/microsoft-gsl/microsoft-gsl.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/microsoft-gsl/microsoft-gsl.bb @@ -21,4 +21,4 @@ do_install () { done } -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" diff --git a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-syncd b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-syncd index e2bb4bb0c..538c96875 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-syncd +++ b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-syncd @@ -3,8 +3,12 @@ NVMP=/tmp/.rwfs SOMP=/var/sofs +clean_var_volatile_tmp() { + rm -rf $NVMP/.overlay/var/volatile/tmp/* || : +} + do_sync() { - rsync -a --delete /tmp/.overlay/ $NVMP/.overlay + rsync -a --delete --exclude='**/var/volatile/tmp/**' /tmp/.overlay/ $NVMP/.overlay sync $NVMP/.overlay } @@ -25,6 +29,8 @@ trap stop_nv EXIT mount -o remount,rw $NVMP mount -o remount,rw $SOMP +clean_var_volatile_tmp + # Run rsync periodically to sync the overlay to NV storage while true; do do_sync diff --git a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb index fa74149d4..a30df4dc6 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb @@ -12,9 +12,9 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe inherit systemd -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" -FILES_${PN} += "${systemd_system_unitdir}/nv-sync.service \ +FILES:${PN} += "${systemd_system_unitdir}/nv-sync.service \ ${libdir}/tmpfiles.d/nv-sync-tmp.conf" do_install() { @@ -26,4 +26,4 @@ do_install() { install -m 0644 ${WORKDIR}/nv-sync-tmp.conf ${D}${libdir}/tmpfiles.d/ } -SYSTEMD_SERVICE_${PN} += " nv-sync.service" +SYSTEMD_SERVICE:${PN} += " nv-sync.service" diff --git a/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend b/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend index ba95727b4..65739f638 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend @@ -7,11 +7,11 @@ require version-vars.inc -OS_RELEASE_FIELDS_append = " OPENBMC_VERSION IPMI_MAJOR IPMI_MINOR IPMI_AUX13 IPMI_AUX14 IPMI_AUX15 IPMI_AUX16" +OS_RELEASE_FIELDS:append = " OPENBMC_VERSION IPMI_MAJOR IPMI_MINOR IPMI_AUX13 IPMI_AUX14 IPMI_AUX15 IPMI_AUX16" -OS_RELEASE_FIELDS_remove = "BUILD_ID" +OS_RELEASE_FIELDS:remove = "BUILD_ID" -python do_compile_append () { +python do_compile:append () { import glob with open(d.expand('${B}/os-release'), 'a') as f: corebase = d.getVar('COREBASE', True) @@ -33,4 +33,4 @@ python do_compile_append () { BB_DONT_CACHE = "1" # Make os-release available to other recipes. -SYSROOT_DIRS_append = " ${sysconfdir}" +SYSROOT_DIRS:append = " ${sysconfdir}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/meta-openbmc-mods/meta-common/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend index 87a4c8503..fc644c307 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend @@ -1 +1 @@ -RRECOMMENDS_${PN}_append = " vim cmake sdbusplus" +RRECOMMENDS:${PN}:append = " vim cmake sdbusplus" diff --git a/meta-openbmc-mods/meta-common/recipes-core/readline/readline_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/readline/readline_%.bbappend index c63a45dd4..a16994583 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/readline/readline_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/readline/readline_%.bbappend @@ -1,2 +1,2 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " file://inputrc" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +SRC_URI:append = " file://inputrc" diff --git a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_%.bbappend index 4ce29534d..b8256e2b1 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_%.bbappend @@ -1,5 +1,5 @@ -RDEPENDS_${PN} = "" -do_install_append() { +RDEPENDS:${PN} = "" +do_install:append() { F=$(find ${D} -name check_for_unsafe_apis) if [ -n "${F}" ]; then # remove the unused perl script diff --git a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb index bc62305e8..92d0f7cd2 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb @@ -12,4 +12,4 @@ SRC_URI = "git://github.com/rurban/safeclib.git" COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64).*-linux' -RDEPENDS_${PN} = "perl" +RDEPENDS:${PN} = "perl" diff --git a/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb index cfea1a910..2c4770471 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb @@ -10,11 +10,11 @@ SRC_URI = "file://security-registers-check.sh \ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS_${PN} += "bash logger-systemd" +RDEPENDS:${PN} += "bash logger-systemd" inherit systemd -FILES_${PN} += "${systemd_system_unitdir}/security-registers-check.service" +FILES:${PN} += "${systemd_system_unitdir}/security-registers-check.service" do_install() { install -d ${D}${systemd_system_unitdir} @@ -23,4 +23,4 @@ do_install() { install -m 0755 ${S}/security-registers-check.sh ${D}/${bindir}/security-registers-check.sh } -SYSTEMD_SERVICE_${PN} += " security-registers-check.service" +SYSTEMD_SERVICE:${PN} += " security-registers-check.service" diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/obmc-targets.bbappend b/meta-openbmc-mods/meta-common/recipes-core/systemd/obmc-targets.bbappend index 3d4e594a4..adbdb0e6e 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/obmc-targets.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/obmc-targets.bbappend @@ -1,10 +1,10 @@ # Remove these files since they are provided by obmc-intel-targets -SYSTEMD_SERVICE_${PN}_remove += " obmc-host-start@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-host-stop@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-host-shutdown@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-host-reboot@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-host-startmin@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-chassis-poweron@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-chassis-poweroff@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-chassis-hard-poweroff@.target" -SYSTEMD_SERVICE_${PN}_remove += " obmc-chassis-powerreset@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-host-start@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-host-stop@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-host-shutdown@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-host-reboot@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-host-startmin@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-chassis-poweron@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-chassis-poweroff@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-chassis-hard-poweroff@.target" +SYSTEMD_SERVICE:${PN}:remove += " obmc-chassis-powerreset@.target" diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd-conf_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd-conf_%.bbappend index b3c318e15..b7bd6796c 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd-conf_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd-conf_%.bbappend @@ -1,11 +1,11 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://journald.conf \ file://systemd-timesyncd-save-time.conf \ " -FILES_${PN} += " ${systemd_system_unitdir}/systemd-timesyncd.service.d/systemd-timesyncd-save-time.conf" +FILES:${PN} += " ${systemd_system_unitdir}/systemd-timesyncd.service.d/systemd-timesyncd-save-time.conf" -do_install_append() { +do_install:append() { install -m 644 -D ${WORKDIR}/systemd-timesyncd-save-time.conf ${D}${systemd_system_unitdir}/systemd-timesyncd.service.d/systemd-timesyncd-save-time.conf } diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0003-CVE-2021-33910-basic-unit-name-do-not-use-strdupa-on-a-path.patch b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0003-CVE-2021-33910-basic-unit-name-do-not-use-strdupa-on-a-path.patch deleted file mode 100644 index a240d63d4..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0003-CVE-2021-33910-basic-unit-name-do-not-use-strdupa-on-a-path.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 4a1c5f34bd3e1daed4490e9d97918e504d19733b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Wed, 23 Jun 2021 11:46:41 +0200 -Subject: [PATCH] basic/unit-name: do not use strdupa() on a path - -The path may have unbounded length, for example through a fuse mount. - -CVE-2021-33910: attacked controlled alloca() leads to crash in systemd and -ultimately a kernel panic. Systemd parses the content of /proc/self/mountinfo -and each mountpoint is passed to mount_setup_unit(), which calls -unit_name_path_escape() underneath. A local attacker who is able to mount a -filesystem with a very long path can crash systemd and the whole system. - -https://bugzilla.redhat.com/show_bug.cgi?id=1970887 - -The resulting string length is bounded by UNIT_NAME_MAX, which is 256. But we -can't easily check the length after simplification before doing the -simplification, which in turns uses a copy of the string we can write to. -So we can't reject paths that are too long before doing the duplication. -Hence the most obvious solution is to switch back to strdup(), as before -7410616cd9dbbec97cf98d75324da5cda2b2f7a2. - -(cherry picked from commit 441e0115646d54f080e5c3bb0ba477c892861ab9) -(cherry picked from commit 764b74113e36ac5219a4b82a05f311b5a92136ce) ---- - src/basic/unit-name.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - -diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c -index 85dcba6cb7..46b24f2d9e 100644 ---- a/src/basic/unit-name.c -+++ b/src/basic/unit-name.c -@@ -378,12 +378,13 @@ int unit_name_unescape(const char *f, char **ret) { - } - - int unit_name_path_escape(const char *f, char **ret) { -- char *p, *s; -+ _cleanup_free_ char *p = NULL; -+ char *s; - - assert(f); - assert(ret); - -- p = strdupa(f); -+ p = strdup(f); - if (!p) - return -ENOMEM; - -@@ -395,13 +396,9 @@ int unit_name_path_escape(const char *f, char **ret) { - if (!path_is_normalized(p)) - return -EINVAL; - -- /* Truncate trailing slashes */ -+ /* Truncate trailing slashes and skip leading slashes */ - delete_trailing_chars(p, "/"); -- -- /* Truncate leading slashes */ -- p = skip_leading_chars(p, "/"); -- -- s = unit_name_escape(p); -+ s = unit_name_escape(skip_leading_chars(p, "/")); - } - if (!s) - return -ENOMEM; diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend index 3fe5ff5ac..50f82d21e 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend @@ -2,20 +2,19 @@ LICENSE = "GPL-2.0" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch \ file://systemd-time-wait-sync.service \ file://0002-Add-event-log-for-system-time-synchronization.patch \ - file://0003-CVE-2021-33910-basic-unit-name-do-not-use-strdupa-on-a-path.patch \ " -USERADD_PACKAGES_remove = "${PN}-journal-gateway ${PN}-journal-upload ${PN}-journal-remote" +USERADD_PACKAGES:remove = "${PN}-journal-gateway ${PN}-journal-upload ${PN}-journal-remote" -do_install_append(){ +do_install:append(){ rm -rf ${D}/lib/udev/rules.d/80-drivers.rules cp -f ${WORKDIR}/systemd-time-wait-sync.service ${D}/lib/systemd/system/ } -PACKAGECONFIG_remove = " kmod" -PACKAGECONFIG_append = " logind" +PACKAGECONFIG:remove = " kmod" +PACKAGECONFIG:append = " logind" diff --git a/meta-openbmc-mods/meta-common/recipes-core/util-linux/util-linux_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/util-linux/util-linux_%.bbappend new file mode 100644 index 000000000..fa58d9726 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/util-linux/util-linux_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + " diff --git a/meta-openbmc-mods/meta-common/recipes-devtools/cjson/cjson_%.bbappend b/meta-openbmc-mods/meta-common/recipes-devtools/cjson/cjson_%.bbappend index 666bc5991..c0e17b456 100644 --- a/meta-openbmc-mods/meta-common/recipes-devtools/cjson/cjson_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-devtools/cjson/cjson_%.bbappend @@ -1,3 +1,3 @@ -FILES_${PN}-dev += "${libdir}/cmake/cJSON/*" +FILES:${PN}-dev += "${libdir}/cmake/cJSON/*" EXTRA_OECMAKE += " -DENABLE_CUSTOM_COMPILER_FLAGS=OFF -DENABLE_TARGET_EXPORT=OFF" diff --git a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb index 32bfba4b6..fc7577db4 100644 --- a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb +++ b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b77c43ae4eaf67bd73fb6452b2f113a3" SRC_URI = "git://github.com/Intel-BMC/mtd-util;protocol=ssh" PV = "1.0+git${SRCPV}" -SRCREV = "69016601a521a95732cc49a3f4c8c7fe4b0ee058" +SRCREV = "3e12f8493b8f261c2e6df607b3ffab2f5875e642" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend index 96439ffc7..21e1d88ea 100644 --- a/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-extended/pam/libpam_%.bbappend @@ -1,7 +1,7 @@ -RDEPENDS_${PN}-runtime += "${MLPREFIX}pam-plugin-localuser-${libpam_suffix}" +RDEPENDS:${PN}-runtime += "${MLPREFIX}pam-plugin-localuser-${libpam_suffix}" #Default settings lockout duration to 300 seconds and threshold value to 10 -do_install_append() { +do_install:append() { sed -i 's/deny=0/deny=10/' ${D}${sysconfdir}/pam.d/common-auth sed -i 's/unlock_time=0/unlock_time=300/' ${D}${sysconfdir}/pam.d/common-auth } diff --git a/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend index 55fb00a77..971fe4290 100644 --- a/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend @@ -1,4 +1,4 @@ -do_install_append () { +do_install:append () { # Remove ipmi_pass from image, if debug-tweaks is not enabled ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'rm ${D}/${sysconfdir}/ipmi_pass', d)} } diff --git a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend index cea571f08..8413ae3bc 100644 --- a/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-extended/sdbusplus/sdbusplus_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " \ file://0001-Revert-server-Check-return-code-for-sd_bus_add_objec.patch \ diff --git a/meta-openbmc-mods/meta-common/recipes-extended/shadow/shadow_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/shadow/shadow_%.bbappend index 283d787e5..31952588b 100644 --- a/meta-openbmc-mods/meta-common/recipes-extended/shadow/shadow_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-extended/shadow/shadow_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PAM_SRC_URI += "file://pam.d/login \ " 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 4ee58544e..38f687f98 100644 --- a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" # Use the latest to support obmc-ikvm properly SRC_URI = "git://github.com/LibVNC/libvncserver" diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend index 7277faaad..ba7a7821c 100644 --- a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" #SRC_URI = "git://github.com/openbmc/obmc-ikvm" SRCREV = "2d2f3dab4253a3d6edf6bef98c5f880f51d2394b" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/configure-usb-c.bb b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/configure-usb-c.bb index 66481543b..e46b96115 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/configure-usb-c.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/configure-usb-c.bb @@ -9,17 +9,17 @@ SRC_URI = " \ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" inherit systemd -FILES_${PN} += "${systemd_system_unitdir}/configure-usb-c.service" +FILES:${PN} += "${systemd_system_unitdir}/configure-usb-c.service" -do_install_append() { +do_install:append() { install -d ${D}${bindir} install -m 0755 ${S}/configure-usb-c.sh ${D}/${bindir}/configure-usb-c.sh install -d ${D}${systemd_system_unitdir} install -m 0644 ${S}/configure-usb-c.service ${D}${base_libdir}/systemd/system } -SYSTEMD_SERVICE_${PN} = "configure-usb-c.service" +SYSTEMD_SERVICE:${PN} = "configure-usb-c.service" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb index dff0d2a23..2bd500677 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/host-misc-comm-manager/host-misc-comm-manager_git.bb @@ -14,6 +14,6 @@ SRC_URI = "git://github.com/Intel-BMC/host-misc-comm-manager.git;protocol=ssh" SRCREV = "da65b239e6622fbf913a904480fe3ff87ee02dec" inherit cmake systemd -SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Host.Misc.Manager.service" +SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Host.Misc.Manager.service" DEPENDS = "boost sdbusplus phosphor-logging" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb index 93de696d2..7c7c483c2 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb @@ -8,7 +8,7 @@ PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" -SYSTEMD_SERVICE_${PN} = "hsbp-manager.service" +SYSTEMD_SERVICE:${PN} = "hsbp-manager.service" DEPENDS = "boost \ i2c-tools \ diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb index 95ecf30fc..51c5fdf74 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb @@ -14,7 +14,7 @@ SRCREV = "966d16f680c1b14c338640d35a12d5e2f9a6937a" S = "${WORKDIR}/git" -do_install_append() { +do_install:append() { install -d ${D}/${bindir} install -m 775 ${B}/blocksign ${D}/${bindir} } diff --git a/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb index 50c8bd63e..4d5102386 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/nic/enable-nics.bb @@ -8,11 +8,11 @@ SRC_URI = "file://enable-nics.sh \ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" inherit systemd -FILES_${PN} += "${systemd_system_unitdir}/enable-nics.service" +FILES:${PN} += "${systemd_system_unitdir}/enable-nics.service" do_install() { install -d ${D}${systemd_system_unitdir} @@ -21,4 +21,4 @@ do_install() { install -m 0755 ${S}/enable-nics.sh ${D}/${bindir}/enable-nics.sh } -SYSTEMD_SERVICE_${PN} += " enable-nics.service" +SYSTEMD_SERVICE:${PN} += " enable-nics.service" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb index 4d91ac673..edee2c70b 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb @@ -19,20 +19,25 @@ PROVIDES += "virtual/obmc-fan-mgmt" PROVIDES += "virtual/obmc-flash-mgmt" PROVIDES += "virtual/obmc-system-mgmt" -RPROVIDES_${PN}-chassis += "virtual-obmc-chassis-mgmt" -RPROVIDES_${PN}-fans += "virtual-obmc-fan-mgmt" -RPROVIDES_${PN}-flash += "virtual-obmc-flash-mgmt" -RPROVIDES_${PN}-system += "virtual-obmc-system-mgmt" +RPROVIDES:${PN}-chassis += "virtual-obmc-chassis-mgmt" +RPROVIDES:${PN}-fans += "virtual-obmc-fan-mgmt" +RPROVIDES:${PN}-flash += "virtual-obmc-flash-mgmt" +RPROVIDES:${PN}-system += "virtual-obmc-system-mgmt" -SUMMARY_${PN}-chassis = "Intel Chassis" -RDEPENDS_${PN}-chassis = " \ +SUMMARY:${PN}-chassis = "Intel Chassis" +RDEPENDS:${PN}-chassis = " \ x86-power-control \ " -SUMMARY_${PN}-fans = "Intel Fans" -RDEPENDS_${PN}-fans = " \ +SUMMARY:${PN}-fans = "Intel Fans" +RDEPENDS:${PN}-fans = " \ phosphor-pid-control \ " -SUMMARY_${PN}-flash = "Intel Flash" -RDEPENDS_${PN}-flash = "" +SUMMARY:${PN}-flash = "Intel Flash" +RDEPENDS:${PN}-flash = "" + +SUMMARY:${PN}-system = "Intel System" +RDEPENDS:${PN}-system = " \ + webui-vue \ + " diff --git a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend index 7d61ea5c7..e3fccea14 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend @@ -1,7 +1,7 @@ -RDEPENDS_${PN}-extrasdevtools = "libgpiod-tools" -RDEPENDS_${PN}-chassis-state-mgmt_remove = "obmc-phosphor-power" -RDEPENDS_${PN}-devtools_remove = "ffdc" +RDEPENDS:${PN}-extrasdevtools = "libgpiod-tools" +RDEPENDS:${PN}-chassis-state-mgmt:remove = "obmc-phosphor-power" +RDEPENDS:${PN}-devtools:remove = "ffdc" -PACKAGES_remove = "${PN}-debug-collector" +PACKAGES:remove = "${PN}-debug-collector" -RDEPENDS_${PN}-settings = "settings" +RDEPENDS:${PN}-settings = "settings" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb index ab41db601..d957147de 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" inherit cmake inherit systemd -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.coldredundancy.service" +SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.coldredundancy.service" DEPENDS += " \ systemd \ diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb index 34352acef..9eca05bae 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" inherit cmake pkgconfig inherit obmc-phosphor-systemd -SYSTEMD_SERVICE_${PN} += "smbios-mdrv1.service" +SYSTEMD_SERVICE:${PN} += "smbios-mdrv1.service" DEPENDS += " \ autoconf-archive-native \ @@ -23,7 +23,7 @@ DEPENDS += " \ phosphor-dbus-interfaces \ phosphor-logging \ " -RDEPENDS_${PN} += " \ +RDEPENDS:${PN} += " \ libsystemd \ sdbusplus \ phosphor-dbus-interfaces \ diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb index b96ded9a4..e40148a91 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb +++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb @@ -2,7 +2,7 @@ SUMMARY = "SMBIOS MDR version 2 service for Intel based platform" DESCRIPTION = "SMBIOS MDR version 2 service for Intel based platfrom" SRC_URI = "git://github.com/openbmc/smbios-mdr.git" -SRCREV = "a427dd1de9e765861a52ce0f73021a282cc6ce4c" +SRCREV = "ecbd71baa68d0c2834614d84f24de7d369a51ce4" S = "${WORKDIR}/git" @@ -14,8 +14,8 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" inherit cmake pkgconfig inherit obmc-phosphor-systemd -SYSTEMD_SERVICE_${PN} += "smbios-mdrv2.service" -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.cpuinfo.service" +SYSTEMD_SERVICE:${PN} += "smbios-mdrv2.service" +SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.cpuinfo.service" DEPENDS += " \ autoconf-archive-native \ diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-128MB-flashmap-for-PFR.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-128MB-flashmap-for-PFR.patch deleted file mode 100755 index 7dd9990a9..000000000 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-128MB-flashmap-for-PFR.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ca0fa975d066b15637188e8fe37dd6d12e0e2bc4 Mon Sep 17 00:00:00 2001 -From: Kuiying Wang -Date: Tue, 28 Apr 2020 22:32:41 +0800 -Subject: [PATCH] Selecting 128MB for PFR - -PFR platforms requires 128MB flash mapping. -This will override the existing 64MB flash map -and loads 128MB flash map. - -Signed-off-by: Vikram Bodireddy -Signed-off-by: Kuiying Wang ---- - arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 2 +- - arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts -index 13b94bdf5d62..2cab5fb38d4f 100644 ---- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts -+++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts -@@ -96,7 +96,7 @@ - flash@0 { - status = "okay"; - m25p,fast-read; --#include "openbmc-flash-layout-intel-64MB.dtsi" -+#include "openbmc-flash-layout-intel-128MB.dtsi" - }; - }; - -diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts -index a95b5ac828b3..bf66e1b6c0fd 100644 ---- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts -+++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts -@@ -94,7 +94,7 @@ - spi-max-frequency = <40000000>; - spi-tx-bus-width = <4>; - m25p,fast-read; --#include "openbmc-flash-layout-intel-64MB.dtsi" -+#include "openbmc-flash-layout-intel-128MB.dtsi" - }; - }; - --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-Die_CPU-filter-first-zero-from-GetTemp.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-Die_CPU-filter-first-zero-from-GetTemp.patch new file mode 100644 index 000000000..54dced64f --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0005-Die_CPU-filter-first-zero-from-GetTemp.patch @@ -0,0 +1,61 @@ +From b0740cbafa468ece35d26a797e7cf80f04fb5102 Mon Sep 17 00:00:00 2001 +From: Zhikui Ren +Date: Mon, 11 Jan 2021 16:31:36 -0800 +Subject: [PATCH] Die_CPU: filter first zero from GetTemp + +Peci command GetTemp can return 0 during CPU reset. +It does not have a have completion code either. +Discard the first zero reading and return -ENODATA. +Consecutive zeros will be returned so that real hot +condition will still be detected and logged but possibly delayed +by the sensor polling period, which is normally 500ms-1s. + +Signed-off-by: Zhikui Ren +--- + drivers/hwmon/peci-cputemp.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c +index c5d92d1d2c25..49670bc80530 100644 +--- a/drivers/hwmon/peci-cputemp.c ++++ b/drivers/hwmon/peci-cputemp.c +@@ -15,6 +15,7 @@ + + struct temp_group { + struct peci_sensor_data die; ++ u32 die_raw_prev; + struct peci_sensor_data dts; + struct peci_sensor_data tcontrol; + struct peci_sensor_data tthrottle; +@@ -119,6 +120,7 @@ static int get_die_temp(struct peci_cputemp *priv) + { + struct peci_get_temp_msg msg; + int ret; ++ bool discard = false; + + if (!peci_sensor_need_update(&priv->temp.die)) + return 0; +@@ -129,6 +131,20 @@ static int get_die_temp(struct peci_cputemp *priv) + if (ret) + return ret; + ++ /* ++ * GET_TEMP command does not have cc and can return zero during ++ * cpu reset. Treat the first zero reading as data not available. ++ * Consecutive zeros will be returned so true hot condition ++ * is not be missed. ++ */ ++ if (msg.temp_raw == 0 && priv->temp.die_raw_prev != 0) { ++ dev_err(priv->dev, "discard first 0 reading from GetTemp\n"); ++ discard = true; ++ } ++ priv->temp.die_raw_prev = msg.temp_raw; ++ if (discard) ++ return -ENODATA; ++ + /* Note that the tjmax should be available before calling it */ + priv->temp.die.value = priv->temp.tjmax.value + + (msg.temp_raw * 1000 / 64); +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch new file mode 100644 index 000000000..a498f9c19 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch @@ -0,0 +1,66 @@ +From 4d4e68e0eed7ccf899bc1b3799a93ed8eb44270d Mon Sep 17 00:00:00 2001 +From: Zhikui Ren +Date: Tue, 2 Feb 2021 14:49:28 -0800 +Subject: [PATCH] DTS_CPU: filter first zero from RdPkgConfig 10 + +Peci command GetPkgConfig 10 can return 0 (hot) with cc 0x40 +after cpu reset. Once pcode run time image is loaded +and it returns 0x8000 as DTS margin data not ready +Discard the first zero reading and return -ENODATA. +Consecutive zeros will be returned so that real hot +condition will still be detected and logged but possibly delayed +by the sensor polling period, which is normally one second. + +Signed-off-by: Zhikui Ren +--- + drivers/hwmon/peci-cputemp.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c +index 49670bc80530..af1c09741120 100644 +--- a/drivers/hwmon/peci-cputemp.c ++++ b/drivers/hwmon/peci-cputemp.c +@@ -17,6 +17,7 @@ struct temp_group { + struct peci_sensor_data die; + u32 die_raw_prev; + struct peci_sensor_data dts; ++ u32 dts_raw_prev; + struct peci_sensor_data tcontrol; + struct peci_sensor_data tthrottle; + struct peci_sensor_data tjmax; +@@ -159,6 +160,7 @@ static int get_dts(struct peci_cputemp *priv) + s32 dts_margin; + u8 pkg_cfg[4]; + int ret; ++ bool discard = false; + + if (!peci_sensor_need_update(&priv->temp.dts)) + return 0; +@@ -172,6 +174,24 @@ static int get_dts(struct peci_cputemp *priv) + + dts_margin = le16_to_cpup((__le16 *)pkg_cfg); + ++ /* ++ * There is a small window (500us) for read dts_margin (RdPkgConfig 10) ++ * to return cc 0x40, and dts_margin of 0 after cpu reset, before ++ * runtime image is loaded to set it to 0x8000 (dts reading not ready). ++ * DTS sensor is polled by user application at a slower rate than this ++ * window. Treat the first zero reading as data not available. ++ * Consecutive zeros will be returned so true hot condition is not be ++ * missed. ++ */ ++ if (dts_margin == 0 && priv->temp.dts_raw_prev != 0) { ++ dev_err(priv->dev, ++ "discard first 0 reading from RdPkgConfig 10\n"); ++ discard = true; ++ } ++ priv->temp.dts_raw_prev = dts_margin; ++ if (discard) ++ return -ENODATA; ++ + /** + * Processors return a value of DTS reading in 10.6 format + * (10 bits signed decimal, 6 bits fractional). +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0007-peci-cputemp-filter-the-first-zero-from-RdPkgConfig-.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0007-peci-cputemp-filter-the-first-zero-from-RdPkgConfig-.patch new file mode 100644 index 000000000..1ee3be689 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0007-peci-cputemp-filter-the-first-zero-from-RdPkgConfig-.patch @@ -0,0 +1,70 @@ +From d622c220351def5c8b3fa5540473a4d3ca685233 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo +Date: Thu, 29 Jul 2021 11:07:31 -0700 +Subject: [PATCH] peci: cputemp: filter the first zero from RdPkgConfig 16 + +Peci command GetPkgConfig 16 can return 0 with cc 0x40 after a CPU +reset. Once pcode run time image is loaded and it returns 0x8000 +as a data not ready. This commit makes it discard the first zero +reading and return -ENODATA. Consecutive zeros will be returned +so that real invalid temperature target setting condition will +still be detected and logged but possibly delayed by the sensor +polling period which is one second (UPDATE_INTERVAL_DEFAULT). + +Signed-off-by: Zhikui Ren +Signed-off-by: Jae Hyun Yoo +--- + drivers/hwmon/peci-cputemp.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c +index af1c09741120..8d5d579ccb1a 100644 +--- a/drivers/hwmon/peci-cputemp.c ++++ b/drivers/hwmon/peci-cputemp.c +@@ -21,6 +21,7 @@ struct temp_group { + struct peci_sensor_data tcontrol; + struct peci_sensor_data tthrottle; + struct peci_sensor_data tjmax; ++ u32 temp_target_raw_prev; + struct peci_sensor_data module[MODTEMP_CHANNEL_NUMS]; + }; + +@@ -89,6 +90,8 @@ static int get_temp_targets(struct peci_cputemp *priv) + s32 tcontrol_margin; + u8 pkg_cfg[4]; + int ret; ++ bool discard = false; ++ u32 temp_target_raw; + + /* + * Just use only the tcontrol marker to determine if target values need +@@ -103,6 +106,26 @@ static int get_temp_targets(struct peci_cputemp *priv) + if (ret) + return ret; + ++ /* ++ * There is a small window (500us) for read temperature target ++ * (RdPkgConfig 16) to return cc 0x40, and temperature target of 0 after ++ * cpu reset, before runtime image is loaded to set it to 0x8000 ++ * Since update interval of the temperature target value is slower than ++ * this window, treat the first zero reading as data not available. ++ * Consecutive zeros will be returned so true invalid temperature target ++ * setting condition will not be missed. ++ */ ++ temp_target_raw = le32_to_cpup((__le32 *)pkg_cfg); ++ if (temp_target_raw == 0 && ++ priv->temp.temp_target_raw_prev != 0) { ++ dev_err(priv->dev, ++ "discard first 0 reading from RdPkgConfig 16\n"); ++ discard = true; ++ } ++ priv->temp.temp_target_raw_prev = temp_target_raw; ++ if (discard) ++ return -ENODATA; ++ + priv->temp.tjmax.value = pkg_cfg[2] * 1000; + + tcontrol_margin = pkg_cfg[1]; +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0008-vegman-kernel-add-RTC-driver-for-PCHC620.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0008-vegman-kernel-add-RTC-driver-for-PCHC620.patch new file mode 100644 index 000000000..1622a01e5 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0008-vegman-kernel-add-RTC-driver-for-PCHC620.patch @@ -0,0 +1,205 @@ +From b80e1dea7595519edbabf3e12b6d31f0e128f901 Mon Sep 17 00:00:00 2001 +From: Ivan Mikhaylov +Date: Mon, 12 Jul 2021 10:46:22 +0300 +Subject: [PATCH] vegman: kernel: add RTC driver for PCHC620 + +Signed-off-by: Ivan Mikhaylov +--- + drivers/rtc/Kconfig | 10 +++ + drivers/rtc/Makefile | 1 + + drivers/rtc/rtc-pchc620.c | 150 ++++++++++++++++++++++++++++++++++++++ + 3 files changed, 161 insertions(+) + create mode 100644 drivers/rtc/rtc-pchc620.c + +diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig +index 1adf9f815652..79aba84dd19f 100644 +--- a/drivers/rtc/Kconfig ++++ b/drivers/rtc/Kconfig +@@ -564,6 +564,16 @@ config RTC_DRV_PALMAS + This driver can also be built as a module. If so, the module + will be called rtc-palma. + ++config RTC_DRV_PCHC620 ++ tristate "PCH C620 RTC driver" ++ help ++ If you say yes here you get support for the Intel C620 Series PCH ++ built-in read-only RTC. This driver is not for in-system use on x86, ++ but rather is for external access over I2C from a BMC. ++ ++ This driver can also be built as a module. If so, the module ++ will be called rtc-pchc620. ++ + config RTC_DRV_TPS6586X + tristate "TI TPS6586X RTC driver" + depends on MFD_TPS6586X +diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile +index 4ac8f19fb631..87ab76563a59 100644 +--- a/drivers/rtc/Makefile ++++ b/drivers/rtc/Makefile +@@ -118,6 +118,7 @@ obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o + obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o + obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o + obj-$(CONFIG_RTC_DRV_PALMAS) += rtc-palmas.o ++obj-$(CONFIG_RTC_DRV_PCHC620) += rtc-pchc620.o + obj-$(CONFIG_RTC_DRV_PCAP) += rtc-pcap.o + obj-$(CONFIG_RTC_DRV_PCF2123) += rtc-pcf2123.o + obj-$(CONFIG_RTC_DRV_PCF2127) += rtc-pcf2127.o +diff --git a/drivers/rtc/rtc-pchc620.c b/drivers/rtc/rtc-pchc620.c +new file mode 100644 +index 000000000000..a944b327ca67 +--- /dev/null ++++ b/drivers/rtc/rtc-pchc620.c +@@ -0,0 +1,150 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * RTC driver for PCHC620 ++ * Copyright (C) 2021 YADRO ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define PCH_REG_FORCE_OFF 0x00 ++#define PCH_REG_SC 0x09 ++#define PCH_REG_MN 0x0a ++#define PCH_REG_HR 0x0b ++#define PCH_REG_DW 0x0c ++#define PCH_REG_DM 0x0d ++#define PCH_REG_MO 0x0e ++#define PCH_REG_YR 0x0f ++ ++#define NUM_TIME_REGS (PCH_REG_YR - PCH_REG_SC + 1) ++ ++struct pch { ++ struct rtc_device *rtc; ++ struct regmap *regmap; ++}; ++ ++static int pchc620_rtc_read_time(struct device *dev, struct rtc_time *tm) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct pch *pch = i2c_get_clientdata(client); ++ unsigned char rtc_data[NUM_TIME_REGS] = {0}; ++ int rc; ++ ++ rc = regmap_bulk_read(pch->regmap, PCH_REG_SC, rtc_data, NUM_TIME_REGS); ++ if (rc < 0) { ++ dev_err(dev, "Fail to read time reg(%d)\n", rc); ++ return rc; ++ } ++ ++ tm->tm_sec = bcd2bin(rtc_data[0]); ++ tm->tm_min = bcd2bin(rtc_data[1]); ++ tm->tm_hour = bcd2bin(rtc_data[2]); ++ tm->tm_wday = rtc_data[3]; ++ tm->tm_mday = bcd2bin(rtc_data[4]); ++ tm->tm_mon = bcd2bin(rtc_data[5]) - 1; ++ tm->tm_year = bcd2bin(rtc_data[6]) + 100; ++ ++ return 0; ++} ++ ++static ssize_t pch_force_off(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct pch *pch = i2c_get_clientdata(client); ++ unsigned long val; ++ int rc; ++ ++ if (kstrtoul(buf, 10, &val)) ++ return -EINVAL; ++ ++ if (val) { ++ /* 0x02 host force off */ ++ rc = regmap_write(pch->regmap, PCH_REG_FORCE_OFF, 0x2); ++ if (rc < 0) { ++ dev_err(dev, "Fail to read time reg(%d)\n", rc); ++ return rc; ++ } ++ } ++ ++ return 0; ++} ++static DEVICE_ATTR(force_off, S_IWUSR | S_IWGRP, NULL, pch_force_off); ++ ++static const struct rtc_class_ops pchc620_rtc_ops = { ++ .read_time = pchc620_rtc_read_time, ++}; ++ ++static const struct regmap_config pchc620_rtc_regmap_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ .use_single_read = true, ++}; ++ ++static int pchc620_rtc_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct pch *pch; ++ int rc; ++ ++ pch = devm_kzalloc(&client->dev, sizeof(*pch), GFP_KERNEL); ++ if (!pch) ++ return -ENOMEM; ++ ++ pch->regmap = devm_regmap_init_i2c(client, &pchc620_rtc_regmap_config); ++ if (IS_ERR(pch->regmap)) { ++ dev_err(&client->dev, "regmap_init failed\n"); ++ return PTR_ERR(pch->regmap); ++ } ++ ++ i2c_set_clientdata(client, pch); ++ ++ pch->rtc = devm_rtc_device_register(&client->dev, "pch-rtc", ++ &pchc620_rtc_ops, THIS_MODULE); ++ if (IS_ERR(pch->rtc)) ++ return PTR_ERR(pch->rtc); ++ ++ rc = sysfs_create_file(&client->dev.kobj, &dev_attr_force_off.attr); ++ if (rc) ++ return rc; ++ ++ return 0; ++} ++ ++static int pchc620_rtc_remove(struct i2c_client *client) ++{ ++ sysfs_remove_file(&client->dev.kobj, &dev_attr_force_off.attr); ++ return 0; ++} ++ ++static const struct i2c_device_id pchc620_rtc_id[] = { ++ { "pchc620-rtc", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, pchc620_rtc_id); ++ ++static const struct of_device_id pchc620_rtc_of_match[] = { ++ { .compatible = "rtc,pchc620", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, pchc620_rtc_of_match); ++ ++static struct i2c_driver pchc620_rtc_driver = { ++ .driver = { ++ .name = "pchc620-rtc", ++ .of_match_table = pchc620_rtc_of_match, ++ }, ++ .probe = pchc620_rtc_probe, ++ .remove = pchc620_rtc_remove, ++ .id_table = pchc620_rtc_id, ++}; ++module_i2c_driver(pchc620_rtc_driver); ++ ++MODULE_DESCRIPTION("RTC PCHC620 driver"); ++MODULE_AUTHOR("Ivan Mikhaylov "); ++MODULE_LICENSE("GPL"); +-- +2.31.1 + 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 new file mode 100644 index 000000000..4b84c831f --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0009-ARM-dts-add-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch @@ -0,0 +1,49 @@ +From dbd6feacb11dbcd81fb3586dd62170d3d5900c1c 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 + +This commit adds rtc-pch node into aspeed-bmc-intel-ast2500 and +aspeed-bmc-intel-ast2600 to enable PCH RTC driver. + +Signed-off-by: Jae Hyun Yoo +--- + arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 5 +++++ + arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 5 +++++ + 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 +--- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts ++++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts +@@ -399,6 +399,11 @@ + aspeed,dma-buf-size = <4095>; + aspeed,hw-timeout-ms = <300>; + status = "okay"; ++ ++ rtc-pch@44 { ++ compatible = "rtc,pchc620"; ++ reg = <0x44>; ++ }; + }; + + &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 +--- 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 */ + multi-master; + status = "okay"; ++ ++ rtc-pch@44 { ++ compatible = "rtc,pchc620"; ++ reg = <0x44>; ++ }; + }; + + &i2c12 { +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1000-128MB-flashmap-for-PFR.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1000-128MB-flashmap-for-PFR.patch new file mode 100644 index 000000000..7dd9990a9 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1000-128MB-flashmap-for-PFR.patch @@ -0,0 +1,45 @@ +From ca0fa975d066b15637188e8fe37dd6d12e0e2bc4 Mon Sep 17 00:00:00 2001 +From: Kuiying Wang +Date: Tue, 28 Apr 2020 22:32:41 +0800 +Subject: [PATCH] Selecting 128MB for PFR + +PFR platforms requires 128MB flash mapping. +This will override the existing 64MB flash map +and loads 128MB flash map. + +Signed-off-by: Vikram Bodireddy +Signed-off-by: Kuiying Wang +--- + arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 2 +- + arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts +index 13b94bdf5d62..2cab5fb38d4f 100644 +--- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts ++++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts +@@ -96,7 +96,7 @@ + flash@0 { + status = "okay"; + m25p,fast-read; +-#include "openbmc-flash-layout-intel-64MB.dtsi" ++#include "openbmc-flash-layout-intel-128MB.dtsi" + }; + }; + +diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts +index a95b5ac828b3..bf66e1b6c0fd 100644 +--- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts ++++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts +@@ -94,7 +94,7 @@ + spi-max-frequency = <40000000>; + spi-tx-bus-width = <4>; + m25p,fast-read; +-#include "openbmc-flash-layout-intel-64MB.dtsi" ++#include "openbmc-flash-layout-intel-128MB.dtsi" + }; + }; + +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch deleted file mode 100644 index b7823ce14..000000000 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1003-Die_CPU-filter-first-zero-from-GetTemp.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 0d202fb06b873c5e258658462ac4fc01a673fd83 Mon Sep 17 00:00:00 2001 -From: Zhikui Ren -Date: Mon, 11 Jan 2021 16:31:36 -0800 -Subject: [PATCH] Die_CPU: filter first zero from GetTemp - -Peci command GetTemp can return 0 during CPU reset. -It does not have a have completion code either. -Discard the first zero reading and return -ENODATA. -Consecutive zeros will be returned so that real hot -condition will still be detected and logged but possibly delayed -by the sensor polling period, which is normally 500ms-1s. - -Signed-off-by: Zhikui Ren ---- - drivers/hwmon/peci-cputemp.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c -index b633ea545644..19002f02bd91 100644 ---- a/drivers/hwmon/peci-cputemp.c -+++ b/drivers/hwmon/peci-cputemp.c -@@ -15,6 +15,7 @@ - - struct temp_group { - struct peci_sensor_data die; -+ u32 die_raw_prev; - struct peci_sensor_data dts; - struct peci_sensor_data tcontrol; - struct peci_sensor_data tthrottle; -@@ -129,6 +130,7 @@ static int get_die_temp(struct peci_cputemp *priv) - { - struct peci_get_temp_msg msg; - int ret; -+ bool discard = false; - - if (!peci_sensor_need_update(&priv->temp.die)) - return 0; -@@ -139,6 +141,19 @@ static int get_die_temp(struct peci_cputemp *priv) - if (ret) - return ret; - -+ /* GET_TEMP command does not have cc and can return zero during -+ * cpu reset. Treat the first zero reading as data not available. -+ * Consecutive zeros will be returned so true hot condition -+ * is not be missed. -+ */ -+ if (msg.temp_raw == 0 && priv->temp.die_raw_prev != 0) { -+ pr_err("peci-cputemp_die: discard first 0 reading from GetTemp\n"); -+ discard = true; -+ } -+ priv->temp.die_raw_prev = msg.temp_raw; -+ if (discard) -+ return -ENODATA; -+ - /* Note that the tjmax should be available before calling it */ - priv->temp.die.value = priv->temp.tjmax.value + - (msg.temp_raw * 1000 / 64); --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch deleted file mode 100644 index aab6c3cea..000000000 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 68db4c74c43d4042b0b32bcd133121ab39b9b310 Mon Sep 17 00:00:00 2001 -From: Zhikui Ren -Date: Tue, 2 Feb 2021 14:49:28 -0800 -Subject: [PATCH] DTS_CPU: filter first zero from RdPkgConfig 10 - -Peci command GetPkgConfig 10 can return 0 (hot) with cc 0x40 -after cpu reset. Once pcode run time image is loaded -and it returns 0x8000 as DTS margin data not ready -Discard the first zero reading and return -ENODATA. -Consecutive zeros will be returned so that real hot -condition will still be detected and logged but possibly delayed -by the sensor polling period, which is normally one second. - -Signed-off-by: Zhikui Ren ---- - drivers/hwmon/peci-cputemp.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c -index 19002f02bd91..e1860779aa66 100644 ---- a/drivers/hwmon/peci-cputemp.c -+++ b/drivers/hwmon/peci-cputemp.c -@@ -17,6 +17,7 @@ struct temp_group { - struct peci_sensor_data die; - u32 die_raw_prev; - struct peci_sensor_data dts; -+ u32 dts_raw_prev; - struct peci_sensor_data tcontrol; - struct peci_sensor_data tthrottle; - struct peci_sensor_data tjmax; -@@ -168,6 +169,7 @@ static int get_dts(struct peci_cputemp *priv) - s32 dts_margin; - u8 pkg_cfg[4]; - int ret; -+ bool discard = false; - - if (!peci_sensor_need_update(&priv->temp.dts)) - return 0; -@@ -181,6 +183,22 @@ static int get_dts(struct peci_cputemp *priv) - - dts_margin = le16_to_cpup((__le16 *)pkg_cfg); - -+ /* There is a small window (500us) for read dts_margin (RdPkgConfig 10) -+ * to return cc 0x40, and dts_margin of 0 after cpu reset, before runtime -+ * image is loaded to set it to 0x8000 (dts reading not ready). -+ * DTS sensor is polled by user application at a slower rate than this window. -+ * Treat the first zero reading as data not available. -+ * Consecutive zeros will be returned so true hot condition -+ * is not be missed. -+ */ -+ if (dts_margin == 0 && priv->temp.dts_raw_prev != 0) { -+ pr_err("peci-cputemp_dts: discard first 0 reading from RdPkgConfig 10\n"); -+ discard = true; -+ } -+ priv->temp.dts_raw_prev = dts_margin; -+ if (discard) -+ return -ENODATA; -+ - /** - * Processors return a value of DTS reading in 10.6 format - * (10 bits signed decimal, 6 bits fractional). --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg index 21bfcf792..c33020874 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg @@ -5,7 +5,7 @@ CONFIG_SPI_MASTER=y CONFIG_IIO=y CONFIG_SENSORS_IIO_HWMON=y CONFIG_ASPEED_ADC=y -CONFIG_SGPIO_ASPEED=y +CONFIG_GPIO_ASPEED_SGPIO=y CONFIG_CRC8=y CONFIG_PECI=y CONFIG_PECI_CHARDEV=y @@ -91,3 +91,6 @@ CONFIG_USB_EHCI_HCD_PLATFORM=n CONFIG_IPMB_DEVICE_INTERFACE=y CONFIG_BPF_SYSCALL=n CONFIG_IPV6_SIT=n +CONFIG_RTC_DRV_PCHC620=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" \ No newline at end of file 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 8c35e6c07..da5b88bb0 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 @@ -1,14 +1,14 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -LINUX_VERSION = "5.10.53" +LINUX_VERSION = "5.10.60" 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="978d545ce0c53bd45c80a224b56141bcc3389828" +SRCREV="9c808fc8b3ad7c030fe546b1b5c6c38556fa784a" -do_compile_prepend(){ +do_compile:prepend(){ # device tree compiler flags export DTC_FLAGS=-@ } @@ -19,9 +19,12 @@ SRC_URI += " \ file://0002-soc-aspeed-add-AST2600-A0-specific-fix-into-mbox-dri.patch \ file://0003-Fix-libmctp-build-error.patch \ file://0004-Add-a-quick-fix-to-resolve-USB-gadget-DMA-issue.patch \ - file://1003-Die_CPU-filter-first-zero-from-GetTemp.patch \ - file://1004-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch \ + file://0005-Die_CPU-filter-first-zero-from-GetTemp.patch \ + file://0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch \ + file://0007-peci-cputemp-filter-the-first-zero-from-RdPkgConfig-.patch \ + file://0008-vegman-kernel-add-RTC-driver-for-PCHC620.patch \ + file://0009-ARM-dts-add-rtc-pch-node-into-aspeed-bmc-intel-ast2x.patch \ " -SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://0005-128MB-flashmap-for-PFR.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://1000-128MB-flashmap-for-PFR.patch', '', d)}" SRC_URI += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', 'file://debug.cfg', '', d)}" diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/ncsi-monitor.bb b/meta-openbmc-mods/meta-common/recipes-network/network/ncsi-monitor.bb index 98d053219..cdb8e2097 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/ncsi-monitor.bb +++ b/meta-openbmc-mods/meta-common/recipes-network/network/ncsi-monitor.bb @@ -2,7 +2,7 @@ SUMMARY = "Check for host in reset to disable the NCSI iface" DESCRIPTION = "If the host is in reset, the NCSI NIC will not be \ available, so this will manually disable the NIC" -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" PV = "1.0" @@ -16,7 +16,7 @@ SRC_URI = "\ inherit obmc-phosphor-systemd -SYSTEMD_SERVICE_${PN} += "${BPN}.service" +SYSTEMD_SERVICE:${PN} += "${BPN}.service" do_install() { install -d ${D}${bindir} diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch index e4d9d2837..fe7c45532 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Fix-for-updating-MAC-address-from-RedFish.patch @@ -1,4 +1,4 @@ -From c139e292d43bdc9484f77ef2f75df5dc9ff14e15 Mon Sep 17 00:00:00 2001 +From f6240a81c0ed87c128d454fa9c4023b9062efe5e Mon Sep 17 00:00:00 2001 From: sunitakx Date: Tue, 13 Jul 2021 12:54:01 +0000 Subject: [PATCH] Fix for updating MAC address from RedFish @@ -27,14 +27,14 @@ Response code: {"200 OK"} received. Signed-off-by: sunitakx --- src/ethernet_interface.cpp | 19 +++++++++++++------ - src/ethernet_interface.hpp | 4 ++++ - 2 files changed, 17 insertions(+), 6 deletions(-) + src/ethernet_interface.hpp | 5 +++++ + 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp -index 9a4d95a..95cd70b 100644 +index 666173e6587e..95bc8db9cd3a 100644 --- a/src/ethernet_interface.cpp +++ b/src/ethernet_interface.cpp -@@ -139,6 +139,8 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, +@@ -144,6 +144,8 @@ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus, { this->emit_object_added(); } @@ -43,7 +43,7 @@ index 9a4d95a..95cd70b 100644 } static IP::Protocol convertFamily(int family) -@@ -1069,8 +1071,18 @@ void EthernetInterface::writeDHCPSection(std::fstream& stream) +@@ -1129,8 +1131,18 @@ void EthernetInterface::writeDHCPSection(std::fstream& stream) } } @@ -62,7 +62,7 @@ index 9a4d95a..95cd70b 100644 ether_addr newMAC; try { -@@ -1104,12 +1116,7 @@ std::string EthernetInterface::macAddress(std::string value) +@@ -1164,12 +1176,7 @@ std::string EthernetInterface::macAddress(std::string value) intf->MacAddressIntf::macAddress(validMAC); } MacAddressIntf::macAddress(validMAC); @@ -77,10 +77,10 @@ index 9a4d95a..95cd70b 100644 } diff --git a/src/ethernet_interface.hpp b/src/ethernet_interface.hpp -index ebba151..ebe72a1 100644 +index 6c7bd69ef987..acf6b6792b75 100644 --- a/src/ethernet_interface.hpp +++ b/src/ethernet_interface.hpp -@@ -11,6 +11,7 @@ +@@ -11,11 +11,14 @@ #include #include #include @@ -88,23 +88,22 @@ index ebba151..ebe72a1 100644 #include #include #include -@@ -25,6 +26,7 @@ - #define nicEnabled nICEnabled - #define ntpServers nTPServers - #endif + #include + +static constexpr const uint32_t defaultTimeout = 1; - ++ namespace phosphor { -@@ -93,6 +95,8 @@ class EthernetInterface : public Ifaces + namespace network +@@ -83,6 +86,8 @@ class EthernetInterface : public Ifaces EthernetInterface& operator=(EthernetInterface&&) = delete; virtual ~EthernetInterface() = default; - + + std::unique_ptr macUpdateTimer; + void macAddressTimeoutHandler(); /** @brief Constructor to put object onto bus at a dbus path. * @param[in] bus - Bus to attach to. * @param[in] objPath - Path to attach at. --- +-- 2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0005-Added-debug-logs-to-isolate-the-coredump-issue-of-RT.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0005-Added-debug-logs-to-isolate-the-coredump-issue-of-RT.patch new file mode 100644 index 000000000..255ae4836 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0005-Added-debug-logs-to-isolate-the-coredump-issue-of-RT.patch @@ -0,0 +1,261 @@ +From f898e4512e7907ba185a1178ad36cb7af6ad0811 Mon Sep 17 00:00:00 2001 +From: sureshv1 +Date: Tue, 10 Aug 2021 16:38:42 +0530 +Subject: [PATCH] Added Debug logs to isolate coredump of RTNETLink Packet + Processing Clang Format updated + +Tested: +Flashed the BMC firmware image with logs included and observed that +the logs are logged during the boot up time and not flooding serial +console.After the BMC is booted up, logs were logged in when ever a +RT Net Link Packet is received and not flooding the journalctl logs. + +Change-Id: I5e1d152b18df17e5351c498210dae5c45f551f7b +Signed-off-by: sureshv1 +--- + src/network_manager.cpp | 15 ++++++++ + src/network_manager_main.cpp | 12 +++++++ + src/rtnetlink_server.cpp | 70 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 97 insertions(+) + +diff --git a/src/network_manager.cpp b/src/network_manager.cpp +index 2f5097a..ec48f2a 100644 +--- a/src/network_manager.cpp ++++ b/src/network_manager.cpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -26,6 +27,8 @@ constexpr char SYSTEMD_PATH[] = "/org/freedesktop/systemd1"; + constexpr char SYSTEMD_INTERFACE[] = "org.freedesktop.systemd1.Manager"; + constexpr auto FirstBootFile = "/var/lib/network/firstBoot_"; + ++constexpr bool debug = true; ++ + namespace phosphor + { + namespace network +@@ -273,6 +276,12 @@ void Manager::createInterfaces() + + void Manager::createChildObjects() + { ++ if (debug) ++ { ++ std::cout ++ << "Create Child Objects called(restart system conf and DHCP conf)" ++ << "\n"; ++ } + // creates the ethernet interface dbus object. + createInterfaces(); + +@@ -289,6 +298,12 @@ void Manager::createChildObjects() + objPath /= "dhcp"; + dhcpConf = std::make_unique( + bus, objPath.string(), *this); ++ ++ if (debug) ++ { ++ std::cout << "Create Child Objects Exiting" ++ << "\n"; ++ } + } + + ObjectPath Manager::vlan(IntfName interfaceName, uint32_t id) +diff --git a/src/network_manager_main.cpp b/src/network_manager_main.cpp +index 983616f..c9bdb15 100644 +--- a/src/network_manager_main.cpp ++++ b/src/network_manager_main.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include + #ifdef SYNC_MAC_FROM_INVENTORY + #include +@@ -41,6 +42,8 @@ constexpr auto configFile = "/usr/share/network/config.json"; + constexpr auto invNetworkIntf = + "xyz.openbmc_project.Inventory.Item.NetworkInterface"; + ++constexpr bool debug = true; ++ + namespace phosphor + { + namespace network +@@ -255,10 +258,19 @@ void restartNetwork() + + void initializeTimers() + { ++ if (debug) ++ std::cout ++ << "Initialize Timer for Refresh Object Timer and Restart Timer" ++ << "\n"; ++ + auto event = sdeventplus::Event::get_default(); + refreshObjectTimer = + std::make_unique(event, std::bind(refreshObjects)); + restartTimer = std::make_unique(event, std::bind(restartNetwork)); ++ ++ if (debug) ++ std::cout << "Initialize Timer Exiting" ++ << "\n"; + } + + } // namespace network +diff --git a/src/rtnetlink_server.cpp b/src/rtnetlink_server.cpp +index 07ca08c..74f08b3 100644 +--- a/src/rtnetlink_server.cpp ++++ b/src/rtnetlink_server.cpp +@@ -11,12 +11,15 @@ + #include + #include + ++#include + #include + #include + #include + #include + #include + ++constexpr bool debug = true; ++ + namespace phosphor + { + namespace network +@@ -29,6 +32,9 @@ namespace rtnetlink + + static bool shouldRefresh(const struct nlmsghdr& hdr, std::string_view data) + { ++ if (debug) ++ std::cout << "Should Refresh the Received Header with Data" ++ << "\n"; + switch (hdr.nlmsg_type) + { + case RTM_NEWADDR: +@@ -36,22 +42,43 @@ static bool shouldRefresh(const struct nlmsghdr& hdr, std::string_view data) + case RTM_NEWROUTE: + case RTM_DELROUTE: + { ++ if (debug) ++ std::cout << "Don't Copy Data as the Message Type is:" ++ << hdr.nlmsg_type << "\n"; + return true; + } + case RTM_NEWNEIGH: + case RTM_DELNEIGH: + { ++ if (debug) ++ std::cout << "Message Type is" << hdr.nlmsg_type << "\n"; + struct ndmsg ndm; + if (data.size() < sizeof(ndm)) + { ++ if (debug) ++ std::cout << "Data Size:" << data.size() ++ << " NDM Size:" << sizeof(ndm) << "\n"; + return false; + } ++ if (debug) ++ std::cout ++ << "Processing/Copying the received Data for MLMSG_TYPE:" ++ << hdr.nlmsg_type << " Data Size:" << data.size() << "\n"; + memcpy(&ndm, data.data(), sizeof(ndm)); ++ if (debug) ++ std::cout << "Copied the received Data for MLMSG_TYPE:" ++ << hdr.nlmsg_type ++ << " and NDM Message Size is:" << sizeof(ndm) << "\n"; + // We only want to refresh for static neighbors + return ndm.ndm_state & NUD_PERMANENT; + } + } + ++ if (debug) ++ std::cout << "Should Refresh Object is verified and done without any " ++ "known header type" ++ << "\n"; ++ + return false; + } + +@@ -62,25 +89,58 @@ static int eventHandler(sd_event_source* /*es*/, int fd, uint32_t /*revents*/, + char buffer[phosphor::network::rtnetlink::BUFSIZE]{}; + int len{}; + ++ if (debug) ++ std::cout << "\n" ++ << "RTNETLINK event Handler is called to read the RTNETLINK " ++ "Packet and Refresh it for a buffer size:" ++ << phosphor::network::rtnetlink::BUFSIZE << "\n"; + auto netLinkHeader = reinterpret_cast(buffer); + while ((len = recv(fd, netLinkHeader, phosphor::network::rtnetlink::BUFSIZE, + 0)) > 0) + { ++ if (debug) ++ { ++ std::cout << "Received the Packet with a Length:" << len << "\n"; ++ } + for (; (NLMSG_OK(netLinkHeader, len)) && + (netLinkHeader->nlmsg_type != NLMSG_DONE); + netLinkHeader = NLMSG_NEXT(netLinkHeader, len)) + { ++ if (debug) ++ std::cout << "NetLinkHeader Message Type is:" ++ << netLinkHeader->nlmsg_type ++ << " with total length(len):" << len ++ << " and block data packet " ++ "length(netLinkHeader->nlmsg_len - NLMSG_HDRLEN):" ++ << netLinkHeader->nlmsg_len - NLMSG_HDRLEN ++ << " and Message Length(netLinkHeader->nlmsg_len):" ++ << netLinkHeader->nlmsg_len << "\n"; + std::string_view data( + reinterpret_cast(NLMSG_DATA(netLinkHeader)), + netLinkHeader->nlmsg_len - NLMSG_HDRLEN); ++ if (debug) ++ { ++ if (netLinkHeader) ++ std::cout << "NetLinkHeader is valid" ++ << "\n"; ++ } + if (shouldRefresh(*netLinkHeader, data)) + { + // starting the timer here to make sure that we don't want + // create the child objects multiple times. ++ if (debug) ++ std::cout << "Check Refresh Object Timer is enabled?" ++ << "\n"; + if (!refreshObjectTimer->isEnabled()) + { + // if start timer throws exception then let the application + // crash ++ if (debug) ++ std::cout ++ << "Call Restart Once with a Timeout seconds:" ++ << std::chrono::seconds(refreshTimeout).count() ++ << "\n"; ++ + refreshObjectTimer->restartOnce(refreshTimeout); + } // end if + } // end if +@@ -89,6 +149,16 @@ static int eventHandler(sd_event_source* /*es*/, int fd, uint32_t /*revents*/, + + } // end while + ++ if (debug) ++ { ++ std::cout << "RTNETLINK Event Handler completed read of packets and " ++ "processed it" ++ << " with an length(exit):" << len << "\n"; ++ ++ if (errno) ++ std::cout << "Error Number:" << errno << "\n"; ++ } ++ + return 0; + } + +-- +2.17.1 + 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 be2c2c070..f8010b283 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 @@ -1,13 +1,14 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += "nlohmann-json boost" SRC_URI = "git://github.com/openbmc/phosphor-networkd" -SRCREV = "1ea359943afbd59168f490778a528c858903b74d" +SRCREV = "b108fd740fdde4a9f0fe63e63ccdee695f5b92e7" SRC_URI += " file://0003-Adding-channel-specific-privilege-to-network.patch \ file://0004-Fix-for-updating-MAC-address-from-RedFish.patch \ + file://0005-Added-debug-logs-to-isolate-the-coredump-issue-of-RT.patch \ " -EXTRA_OECONF_append = " --enable-nic-ethtool=yes" -EXTRA_OECONF_append = " --enable-ipv6-accept-ra=yes" +EXTRA_OECONF:append = " --enable-nic-ethtool=yes" +EXTRA_OECONF:append = " --enable-ipv6-accept-ra=yes" diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr.bb b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr.bb index 0dab0fc1a..ee55c5407 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr.bb +++ b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr.bb @@ -2,7 +2,7 @@ SUMMARY = "Enforce static MAC addresses" DESCRIPTION = "Set a priority on MAC addresses to run with: \ factory-specified > u-boot-specified > random" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PV = "1.0" @@ -16,7 +16,7 @@ SRC_URI = "\ inherit obmc-phosphor-systemd -SYSTEMD_SERVICE_${PN} += "${PN}.service" +SYSTEMD_SERVICE:${PN} += "${PN}.service" do_install() { install -d ${D}${bindir} diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check index 68678e420..39d7dd8a7 100644 --- a/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check +++ b/meta-openbmc-mods/meta-common/recipes-network/network/static-mac-addr/mac-check @@ -59,6 +59,50 @@ fi return 0 } +# An earlier version of the mac_check utility disabled the netipmid for +# eth1. This was done to eliminate an error message being logged in the +# journal for systems that only had a single NIC. The error message is +# undesirable as it is present in Redfish session log output. + +# Systems that have both NICs have also had the eth1 netipmid disabled. +# The reason for this is failing to specify the correct kernel device +# tree during the U-Boot kernel boot process. Without the correct +# device tree, eth1 is not enumerated by the kernel. The mac-check +# script turned off the netipmid service for eth1. + +# The configure_netipmid_svc_eth1 function manages enabling and +# disabling netipmid for eth1. It is explicit, and does not rely upon +# previous state to enable or disable the service. + +# Note: Enabling the service is independent of the IPMI channel +# enable/disable command. This means "ipmitool lan set access +# off" functions correctly with the netipmid service enabled. +configure_netipmid_svc_eth1() { + if [ -h /sys/class/net/eth1 ]; then + if [ $(systemctl is-enabled phosphor-ipmi-net@eth1.socket) == "disabled" ]; + then + /bin/systemctl enable "phosphor-ipmi-net@eth1.socket" + /bin/systemctl start "phosphor-ipmi-net@eth1.socket" + fi + if [ $(systemctl is-enabled phosphor-ipmi-net@eth1.service) =="disabled" ]; + then + /bin/systemctl enable "phosphor-ipmi-net@eth1.service" + /bin/systemctl start "phosphor-ipmi-net@eth1.service" + fi + else + if [ $(systemctl is-enabled phosphor-ipmi-net@eth1.socket) == "enabled" ]; + then + /bin/systemctl disable "phosphor-ipmi-net@eth1.socket" + /bin/systemctl stop "phosphor-ipmi-net@eth1.socket" + fi + if [ $(systemctl is-enabled phosphor-ipmi-net@eth1.service) == "enabled" ]; + then + /bin/systemctl disable "phosphor-ipmi-net@eth1.service" + /bin/systemctl stop "phosphor-ipmi-net@eth1.service" + fi + fi +} + mac_check() { local iface="$1" local envname="$2" @@ -93,6 +137,8 @@ mac_check() { create_macdir +configure_netipmid_svc_eth1 + error=0 first_error_seen=0 @@ -107,10 +153,6 @@ while read IFACE UBDEV; do if [ $error -ne 0 ] && [ $first_error_seen -eq 0 ]; then first_error_seen=$error fi - else - # Disable netipmid if present because eth(x) is not present - /bin/systemctl disable "phosphor-ipmi-net@$IFACE.socket" - /bin/systemctl disable "phosphor-ipmi-net@$IFACE.service" fi done <<-END_CONF eth0 eth1addr diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb index 1bf81d953..a82a64f80 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/beepcode-mgr/beepcode-mgr.bb @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe S = "${WORKDIR}" -SYSTEMD_SERVICE_${PN} = "beepcode-mgr.service" +SYSTEMD_SERVICE:${PN} = "beepcode-mgr.service" inherit cmake inherit obmc-phosphor-systemd diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb index 7426dc6de..53ba2eeac 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb @@ -10,9 +10,9 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe inherit meson systemd SRC_URI = "git://github.com/openbmc/bios-settings-mgr.git" -SRCREV = "5e2cb7206e695662f09c7cb4e0c73ba11686acaa" +SRCREV = "b5984b87eb93f57f8bc2c123717527076a560753" -SYSTEMD_SERVICE_${PN} += " \ +SYSTEMD_SERVICE:${PN} += " \ xyz.openbmc_project.biosconfig_manager.service \ xyz.openbmc_project.biosconfig_password.service \ " diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch new file mode 100644 index 000000000..ac0995614 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch @@ -0,0 +1,131 @@ +From aada39602a21e83d7e8c39c39fb8c5c32122863c Mon Sep 17 00:00:00 2001 +From: AKSHAY RAVEENDRAN K +Date: Thu, 2 Sep 2021 11:11:40 +0000 +Subject: [PATCH] Allow MUX idle state to be configured as DISCONNECT + +The existing Linux behavior is to leave the Mux status as it is after +an operation. In HSBP and in other places we have more than one MUX +parallel in same root bus. The existing behavior will result in reading +multiple buses of different MUXes at the same time and causes bad read. +In this fix, we can configure "MuxIdleMode" as "Disconnect" in +configuration file as shown below + +{ + "Address": "0x70", + "Bus": "$bus", + "ChannelNames": [ + "Drive_1", + "Drive_2", + "Drive_3", + "Drive_4" + ], + "MuxIdleMode": "Disconnect", + "Name": "Drive Mux 1", + "Type": "PCA9546Mux" + +Tested: +Set the MUX idle mode to Disconnect in MUXes present in HSBP board and +only one channel is read at a time. + +Change-Id: I6d29cd3be350682c386bd3072e76b930a7d45587 +Signed-off-by: AKSHAY RAVEENDRAN K +--- + src/Overlay.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 52 insertions(+), 3 deletions(-) + +diff --git a/src/Overlay.cpp b/src/Overlay.cpp +index 4454423..2843c31 100644 +--- a/src/Overlay.cpp ++++ b/src/Overlay.cpp +@@ -38,11 +38,46 @@ constexpr const char* outputDir = "/tmp/overlays"; + constexpr const char* templateChar = "$"; + constexpr const char* i2CDevsDir = "/sys/bus/i2c/devices"; + constexpr const char* muxSymlinkDir = "/dev/i2c-mux"; ++constexpr const char* idleModeAsIs = "-1"; ++constexpr const char* idleModeDisconnect = "-2"; + + constexpr const bool debug = false; + + std::regex illegalNameRegex("[^A-Za-z0-9_]"); + ++void setIdleMode(const std::string& muxName, size_t busIndex, size_t address, ++ const std::string& idleMode) ++{ ++ std::error_code ec; ++ ++ std::ostringstream hexAddress; ++ hexAddress << std::hex << std::setfill('0') << std::setw(4) << address; ++ ++ std::filesystem::path idlePath(i2CDevsDir); ++ idlePath /= ++ std::to_string(busIndex) + "-" + hexAddress.str() + "/idle_state"; ++ ++ std::string modeData = ++ (idleMode == "Disconnect") ? idleModeDisconnect : idleModeAsIs; ++ ++ if (debug) ++ { ++ std::cerr << "Setting " << muxName << " idle state to " << modeData ++ << " in " << idlePath << "\n"; ++ } ++ ++ std::ofstream idleFile(idlePath); ++ if (!idleFile.good()) ++ { ++ std::cerr << "Can't set idle mode in " << idlePath << " for " << muxName ++ << "\n"; ++ } ++ else ++ { ++ idleFile << modeData; ++ } ++} ++ + // helper function to make json types into string + std::string jsonToString(const nlohmann::json& in) + { +@@ -285,6 +320,7 @@ void exportDevice(const std::string& type, + std::shared_ptr bus = nullptr; + std::shared_ptr address = nullptr; + const nlohmann::json::array_t* channels = nullptr; ++ std::string idleMode; + + for (auto keyPair = configuration.begin(); keyPair != configuration.end(); + keyPair++) +@@ -318,6 +354,11 @@ void exportDevice(const std::string& type, + channels = + keyPair.value().get_ptr(); + } ++ else if (keyPair.key() == "MuxIdleMode") ++ { ++ idleMode = keyPair.value().get(); ++ } ++ + boost::replace_all(parameters, templateChar + keyPair.key(), + subsituteString); + boost::replace_all(devicePath, templateChar + keyPair.key(), +@@ -327,10 +368,18 @@ void exportDevice(const std::string& type, + int err = buildDevice(devicePath, parameters, bus, address, constructor, + destructor, createsHWMon); + +- if (!err && boost::ends_with(type, "Mux") && bus && address && channels) ++ if (!err && boost::ends_with(type, "Mux") && bus && address) + { +- linkMux(name, static_cast(*bus), static_cast(*address), +- *channels); ++ if (channels) ++ { ++ linkMux(name, static_cast(*bus), ++ static_cast(*address), *channels); ++ } ++ if (!idleMode.empty()) ++ { ++ setIdleMode(name, static_cast(*bus), ++ static_cast(*address), idleMode); ++ } + } + } + +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend index 3c9b75210..ff23c5831 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend @@ -1,11 +1,12 @@ # this is here just to bump faster than upstream # SRC_URI = "git://github.com/openbmc/entity-manager.git" -SRCREV = "ee70147add704c40e1999900ec8e67d1213729cc" +SRCREV = "e7ac9c9eb1d2e4b052d7f9b082ab4642eab304e9" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " file://0002-Entity-manager-Add-support-to-update-assetTag.patch \ file://0003-Add-logs-to-fwVersionIsSame.patch \ file://0004-Adding-MUX-and-Drives-present-in-HSBP-in-json-config.patch \ + file://0005-Allow-MUX-idle-state-to-be-configured-as-DISCONNECT.patch \ " diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend index 09510fec8..9a0eae176 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend @@ -1,15 +1,15 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" OBMC_CONSOLE_HOST_TTY = "ttyS2" SRC_URI += "file://sol-option-check.sh \ file://obmc-console@.service \ " inherit obmc-phosphor-systemd -SYSTEMD_SERVICE_${PN} += " \ +SYSTEMD_SERVICE:${PN} += " \ ${PN}@${OBMC_CONSOLE_HOST_TTY}.service \ " -do_install_append() { +do_install:append() { rm -rf ${D}${base_libdir}/udev/rules.d/80-obmc-console-uart.rules install -m 0644 ${WORKDIR}/${PN}@.service ${D}${systemd_system_unitdir} install -d ${D}${bindir} diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb index 089aaf59f..24e3700a6 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe S = "${WORKDIR}" -SYSTEMD_SERVICE_${PN} = "pch-time-sync.service" +SYSTEMD_SERVICE:${PN} = "pch-time-sync.service" inherit cmake inherit obmc-phosphor-systemd diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend index 18780dfdd..4d6031b03 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/phosphor-time-manager_git.bbappend @@ -1,2 +1,2 @@ -RDEPENDS_${PN}_remove = "phosphor-settings-manager" -RDEPENDS_${PN} += " settings" +RDEPENDS:${PN}:remove = "phosphor-settings-manager" +RDEPENDS:${PN} += " settings" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend index 6e5d21ad4..aa0a08f0b 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend @@ -1,9 +1,9 @@ # Keep this as a comment to enable the auto-bump script without # stomping on SRC_URI from previous .bbappend files #SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git" -SRCREV = "5795dacbc5763a0f1d1e1ac59d73baf4ca2ae616" +SRCREV = "6b50623459b54af222cb9a79c5a0c7912c92da41" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0007-ipmi-set-BIOS-id.patch \ file://0010-Increase-the-default-watchdog-timeout-value.patch \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend index 72d991c7e..4fc41d058 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-mapper_%.bbappend @@ -1 +1 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend index f72287bc3..5da365c02 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend @@ -1,7 +1,7 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" inherit obmc-phosphor-systemd -SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service" +SYSTEMD_SERVICE:${PN} = "phosphor-pid-control.service" EXTRA_OECONF = "--enable-configure-dbus=yes" SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git" @@ -11,4 +11,4 @@ SRC_URI += "\ file://0001-allow-dbus-sensors-without-thresholds.patch \ " -FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor" +FILES:${PN} = "${bindir}/swampd ${bindir}/setsensor" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch index b8df3e07c..fcdc75f8f 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch @@ -62,7 +62,7 @@ index 5490cd9974b3..e43959d78ed2 100644 + } + else if (activationProgress->progress() == 100) + { -+ log("progress == 100..."); ++ error("progress == 100..."); + if (!redundancyPriority) + { + redundancyPriority = diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch index d5d0f513e..6bbd59918 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0013-remove-image-file-on-pre-script-failures.patch @@ -1,4 +1,4 @@ -From ae3a9616b44677f20b4ca534c3f55ccb478fdf55 Mon Sep 17 00:00:00 2001 +From 0628db177655e6f890c4da8c7de7c3cd7487d528 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Thu, 16 Jul 2020 14:16:28 -0700 Subject: [PATCH] remove image file on pre-script failures @@ -19,22 +19,22 @@ Signed-off-by: Vernon Mauery 1 file changed, 9 insertions(+) diff --git a/watch.cpp b/watch.cpp -index ccdf594..c738945 100644 +index d6c09a946fd0..5d70edbf52b4 100644 --- a/watch.cpp +++ b/watch.cpp -@@ -106,6 +106,15 @@ int Watch::callback(sd_event_source* /* s */, int fd, uint32_t revents, +@@ -106,6 +106,12 @@ int Watch::callback(sd_event_source* /* s */, int fd, uint32_t revents, { - log("Error processing image", - entry("IMAGE=%s", tarballPath.c_str())); + error("Error ({RC}) processing image {IMAGE}", "RC", rc, + "IMAGE", tarballPath); + std::error_code ec{}; + fs::remove_all(tarballPath, ec); + if (!ec) + { -+ log( -+ "Unable to remove image on processing failure", -+ entry("ERROR=%s", ec.message().c_str()), -+ entry("IMAGE=%s", tarballPath.c_str())); ++ error("Unable to remove image on processing failure"); + } } } +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch index eb5a40fbf..0b2026c92 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0018-Fix-delete-image-by-ID-and-inhibit-removal-of-bmc_ac.patch @@ -1,7 +1,7 @@ -From 19661c1173d9d82dfbb879f8cc89c05a0883dffa Mon Sep 17 00:00:00 2001 +From 77b861136b6780ce4eabfe9589a0b584e6ed2b43 Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Wed, 21 Apr 2021 21:16:47 +0000 -Subject: [PATCH] Fix delete image by ID and inhibit removal of bmc_active +Subject: [PATCH] Fix delete image by ID and inhibit removal of bmc_active Delete image by ID was broken because when hitting the delete dbus interface, it recalculated the ID from the parent version, which then @@ -20,17 +20,17 @@ Signed-off-by: Vernon Mauery Signed-off-by: AppaRao Puli --- image_manager.cpp | 2 +- - item_updater.cpp | 20 +++++++++++++------- + item_updater.cpp | 16 +++++++++++----- pfr_image_manager.cpp | 2 +- version.cpp | 2 +- version.hpp | 19 +++++++++++++++---- - 5 files changed, 31 insertions(+), 14 deletions(-) + 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/image_manager.cpp b/image_manager.cpp -index 4be357f..311a63f 100644 +index 6334704cd980..4fefd221e6d2 100644 --- a/image_manager.cpp +++ b/image_manager.cpp -@@ -219,7 +219,7 @@ int Manager::processImage(const std::string& tarFilePath) +@@ -221,7 +221,7 @@ int Manager::processImage(const std::string& tarFilePath) { // Create Version object auto versionPtr = std::make_unique( @@ -40,7 +40,7 @@ index 4be357f..311a63f 100644 std::bind(&Manager::erase, this, std::placeholders::_1)); versionPtr->deleteObject = diff --git a/item_updater.cpp b/item_updater.cpp -index 6efd519..6685bf5 100644 +index 26b52b3f7846..3f64feb43c55 100644 --- a/item_updater.cpp +++ b/item_updater.cpp @@ -145,7 +145,7 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg) @@ -52,7 +52,7 @@ index 6efd519..6685bf5 100644 std::bind(&ItemUpdater::erase, this, std::placeholders::_1)); versionPtr->deleteObject = std::make_unique(bus, path, -@@ -263,7 +263,7 @@ void ItemUpdater::processBMCImage() +@@ -260,7 +260,7 @@ void ItemUpdater::processBMCImage() // Create Version instance for this version. auto versionPtr = std::make_unique( @@ -61,23 +61,19 @@ index 6efd519..6685bf5 100644 std::bind(&ItemUpdater::erase, this, std::placeholders::_1)); auto isVersionFunctional = versionPtr->isFunctional(); if (!isVersionFunctional) -@@ -338,11 +338,11 @@ void ItemUpdater::erase(std::string entryId) +@@ -336,9 +336,9 @@ void ItemUpdater::erase(std::string entryId) auto it = versions.find(entryId); if (it != versions.end()) { - if (it->second->isFunctional() && ACTIVE_BMC_MAX_ALLOWED > 1) + if (it->second->isFunctional()) { -- log("Error: Version is currently running on the BMC. " -- "Unable to remove.", -- entry("VERSIONID=%s", entryId.c_str())); -+ log("Error: Version is currently running on the BMC. " -+ "Unable to remove.", -+ entry("VERSIONID=%s", entryId.c_str())); +- error( ++ info( + "Version ({VERSIONID}) is currently running on the BMC; unable to remove.", + "VERSIONID", entryId); return; - } - } -@@ -681,6 +681,12 @@ void ItemUpdater::freeSpace(Activation& caller) +@@ -679,6 +679,12 @@ void ItemUpdater::freeSpace(Activation& caller) std::size_t count = 0; for (const auto& iter : activations) { @@ -90,7 +86,7 @@ index 6efd519..6685bf5 100644 if ((iter.second.get()->activation() == server::Activation::Activations::Active) || (iter.second.get()->activation() == -@@ -775,7 +781,7 @@ void ItemUpdater::createBIOSObject() +@@ -772,7 +778,7 @@ void ItemUpdater::createBIOSObject() // Do nothing; }; biosVersion = std::make_unique( @@ -100,7 +96,7 @@ index 6efd519..6685bf5 100644 biosVersion->deleteObject = std::make_unique(bus, path, diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp -index 55ad21f..e2dcc80 100644 +index 80db63ca4d85..03bc34a3a78b 100644 --- a/pfr_image_manager.cpp +++ b/pfr_image_manager.cpp @@ -399,7 +399,7 @@ int Manager::processImage(const std::string& imgFilePath) @@ -113,10 +109,10 @@ index 55ad21f..e2dcc80 100644 versionPtr->deleteObject = std::make_unique(bus, objPath, diff --git a/version.cpp b/version.cpp -index 04f40c4..44ef571 100644 +index 97f3be94b4aa..5410c38887f8 100644 --- a/version.cpp +++ b/version.cpp -@@ -206,7 +206,7 @@ void Delete::delete_() +@@ -208,7 +208,7 @@ void Delete::delete_() { if (parent.eraseCallback) { @@ -126,7 +122,7 @@ index 04f40c4..44ef571 100644 } diff --git a/version.hpp b/version.hpp -index 8a68cb5..afc589c 100644 +index 8a68cb5f7b1f..afc589c0226c 100644 --- a/version.hpp +++ b/version.hpp @@ -77,11 +77,11 @@ class Version : public VersionInherit diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend index decea878f..5745cb87c 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend @@ -1,7 +1,7 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" EXTRA_OEMESON += "-Dfwupd-script=enabled" -SYSTEMD_SERVICE_${PN}-updater += "fwupd@.service" +SYSTEMD_SERVICE:${PN}-updater += "fwupd@.service" EXTRA_OEMESON += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-Dpfr-update=enabled', '', d)}" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb index da8fc846e..b113547da 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru.bb @@ -4,7 +4,7 @@ DESCRIPTION = "Builds a default FRU file at runtime based on board ID" inherit systemd inherit cmake -SYSTEMD_SERVICE_${PN} = "SetBaseboardFru.service" +SYSTEMD_SERVICE:${PN} = "SetBaseboardFru.service" S = "${WORKDIR}" SRC_URI = "file://checkFru.sh \ @@ -20,9 +20,9 @@ LIC_FILES_CHKSUM = "\ file://mkfru.cpp;beginline=2;endline=14;md5=c451359f18a13ee69602afce1588c01a \ " -RDEPENDS_${PN} = "bash" +RDEPENDS:${PN} = "bash" -do_install_append() { +do_install:append() { install -d ${D}${bindir} install -m 0755 ${S}/checkFru.sh ${D}/${bindir}/checkFru.sh install -m 0755 ${S}/decodeBoardID.sh ${D}/${bindir}/decodeBoardID.sh diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend index 5326680f6..c6ba3929c 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/host/obmc-op-control-host%.bbappend @@ -1,6 +1,6 @@ -SYSTEMD_LINK_${PN}_remove += "../op-start-host@.service:obmc-host-startmin@0.target.requires/op-start-host@0.service" -SYSTEMD_LINK_${PN}_remove += "../op-init-pnor@.service:obmc-host-startmin@0.target.requires/op-init-pnor@0.service" +SYSTEMD_LINK_${PN}:remove += "../op-start-host@.service:obmc-host-startmin@0.target.requires/op-start-host@0.service" +SYSTEMD_LINK_${PN}:remove += "../op-init-pnor@.service:obmc-host-startmin@0.target.requires/op-init-pnor@0.service" -FILES_${PN}_remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires" -FILES_${PN}_remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-start-host@0.service" -FILES_${PN}_remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-init-pnor@0.service" \ No newline at end of file +FILES:${PN}:remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires" +FILES:${PN}:remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-start-host@0.service" +FILES:${PN}:remove = "${systemd_unitdir}/system/obmc-host-startmin@0.target.requires/op-init-pnor@0.service" \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch index e52dff3f4..f41e6f994 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0011-bmcweb-Add-PhysicalContext-to-Thermal-resources.patch @@ -65,6 +65,24 @@ Response: }, "UpperThresholdCritical": 115.0, "UpperThresholdNonCritical": 110.0 +}, +{ + @odata.id": "/redfish/v1/Chassis/F2U8X25_HSBP_2/Thermal#/Temperatures/0", + @odata.type": "#Thermal.v1_3_0.Temperature", + LowerThresholdCritical": 7.0, + LowerThresholdNonCritical": 12.0, + MaxReadingRangeTemp": 127.0, + MemberId": "HSBP2_Temp", + MinReadingRangeTemp": -128.0, + Name": "HSBP2 Temp", + PhysicalContext": "Backplane", + ReadingCelsius": 21.437, + Status": { + "Health": "OK", + "State": "Enabled" + }, + UpperThresholdCritical": 57.0, + UpperThresholdNonCritical": 52.0 } 3. GET - https:///redfish/v1/Chassis//Power Response: @@ -103,15 +121,16 @@ Response: } } Signed-off-by: Snehalatha Venkatesh +Signed-off-by: sunitakx --- - redfish-core/lib/sensors.hpp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) + redfish-core/lib/sensors.hpp | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp -index 9f06d2f..40fcdf8 100644 +index 5d27577..d51d09f 100644 --- a/redfish-core/lib/sensors.hpp +++ b/redfish-core/lib/sensors.hpp -@@ -964,6 +964,18 @@ inline void objectInterfacesToJson( +@@ -973,6 +973,22 @@ inline void objectInterfacesToJson( { unit = "/ReadingCelsius"_json_pointer; sensorJson["@odata.type"] = "#Thermal.v1_3_0.Temperature"; @@ -123,6 +142,10 @@ index 9f06d2f..40fcdf8 100644 + { + sensorJson["PhysicalContext"] = "Intake"; + } ++ else if (sensorName.find("HSBP") != std::string::npos) ++ { ++ sensorJson["PhysicalContext"] = "Backplane"; ++ } + else + { + sensorJson["PhysicalContext"] = "SystemBoard"; diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch deleted file mode 100644 index e0664a350..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Revert-Support-new-boot-override-setting-design.patch +++ /dev/null @@ -1,723 +0,0 @@ -From c6ed122a09b1e41b9eab0032ff428b8b1a999534 Mon Sep 17 00:00:00 2001 -From: Jae Hyun Yoo -Date: Wed, 4 Aug 2021 15:50:34 -0700 -Subject: [PATCH] Revert "Support new boot override setting design" - -This reverts commit c21865c469cfc9dffdc15d87710293115cf6d9e4. - -Change-Id: Icfd03551dd9ea2fb216519d8ab05b92521838542 -Signed-off-by: Jae Hyun Yoo ---- - redfish-core/lib/systems.hpp | 493 +++++++++++++++++------------------ - 1 file changed, 245 insertions(+), 248 deletions(-) - -diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp -index fc6e2c78fd1f..5ad065b3518a 100644 ---- a/redfish-core/lib/systems.hpp -+++ b/redfish-core/lib/systems.hpp -@@ -769,8 +769,11 @@ inline int assignBootParameters(const std::shared_ptr& aResp, - const std::string& rfSource, - std::string& bootSource, std::string& bootMode) - { -- bootSource = "xyz.openbmc_project.Control.Boot.Source.Sources.Default"; -- bootMode = "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"; -+ // The caller has initialized the bootSource and bootMode to: -+ // bootMode = "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"; -+ // bootSource = "xyz.openbmc_project.Control.Boot.Source.Sources.Default"; -+ // Only modify the bootSource/bootMode variable needed to achieve the -+ // desired boot action. - - if (rfSource == "None") - { -@@ -917,14 +920,45 @@ inline void getBootProgress(const std::shared_ptr& aResp) - } - - /** -- * @brief Retrieves boot override type over DBUS and fills out the response -+ * @brief Checks if the current boot override state can be considered as -+ * Disabled - * - * @param[in] aResp Shared pointer for generating response message. - * - * @return None. - */ -+inline void -+ checkIfOverrideIsDisabled(const std::shared_ptr& aResp) -+{ -+ // If the BootSourceOverrideTarget is still "None" at the end, -+ // reset the BootSourceOverrideEnabled to indicate that -+ // overrides are disabled -+ if (aResp->res.jsonValue["Boot"]["BootSourceOverrideTarget"] == "None") -+ { -+ // If the BootSourceOverrideMode is supported we should -+ // check if it is still "UEFI" too -+ if (aResp->res.jsonValue["Boot"].contains("BootSourceOverrideMode")) -+ { -+ if (aResp->res.jsonValue["Boot"]["BootSourceOverrideMode"] != -+ "UEFI") -+ { -+ return; -+ } -+ } -+ aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] = "Disabled"; -+ } -+} - --inline void getBootOverrideType(const std::shared_ptr& aResp) -+/** -+ * @brief Retrieves boot type over DBUS and fills out the response -+ * -+ * @param[in] aResp Shared pointer for generating response message. -+ * @param[in] bootDbusObj The dbus object to query for boot properties. -+ * -+ * @return None. -+ */ -+inline void getBootType(const std::shared_ptr& aResp, -+ const std::string& bootDbusObj) - { - crow::connections::systemBus->async_method_call( - [aResp](const boost::system::error_code ec, -@@ -932,6 +966,12 @@ inline void getBootOverrideType(const std::shared_ptr& aResp) - if (ec) - { - // not an error, don't have to have the interface -+ -+ // Support Disabled override state in a way: -+ // "BootSourceOverrideEnabled=Disabled" = -+ // "BootSourceOverrideMode=UEFI" + -+ // "BootSourceOverrideTarget=None" -+ checkIfOverrideIsDisabled(aResp); - return; - } - -@@ -958,26 +998,31 @@ inline void getBootOverrideType(const std::shared_ptr& aResp) - } - - aResp->res.jsonValue["Boot"]["BootSourceOverrideMode"] = rfType; -+ -+ // Support Disabled override state in a way: -+ // "BootSourceOverrideEnabled=Disabled" = -+ // "BootSourceOverrideMode=UEFI" + "BootSourceOverrideTarget=None" -+ checkIfOverrideIsDisabled(aResp); - }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -+ "xyz.openbmc_project.Settings", bootDbusObj, - "org.freedesktop.DBus.Properties", "Get", - "xyz.openbmc_project.Control.Boot.Type", "BootType"); - } - - /** -- * @brief Retrieves boot override mode over DBUS and fills out the response -+ * @brief Retrieves boot mode over DBUS and fills out the response - * - * @param[in] aResp Shared pointer for generating response message. -+ * @param[in] bootDbusObj The dbus object to query for boot properties. - * - * @return None. - */ -- --inline void getBootOverrideMode(const std::shared_ptr& aResp) -+inline void getBootMode(const std::shared_ptr& aResp, -+ const std::string& bootDbusObj) - { - crow::connections::systemBus->async_method_call( -- [aResp](const boost::system::error_code ec, -- const std::variant& bootMode) { -+ [aResp, bootDbusObj](const boost::system::error_code ec, -+ const std::variant& bootMode) { - if (ec) - { - BMCWEB_LOG_DEBUG << "DBUS response error " << ec; -@@ -1010,27 +1055,39 @@ inline void getBootOverrideMode(const std::shared_ptr& aResp) - rfMode; - } - } -+ -+ // Get BootType inside this async call as we need all of the -+ // BootSource/BootMode/BootType to support -+ // "BootSourceOverrideEnabled"="Disabled" state. -+ getBootType(aResp, bootDbusObj); - }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -+ "xyz.openbmc_project.Settings", bootDbusObj, - "org.freedesktop.DBus.Properties", "Get", - "xyz.openbmc_project.Control.Boot.Mode", "BootMode"); - } - - /** -- * @brief Retrieves boot override source over DBUS -+ * @brief Retrieves boot source over DBUS - * - * @param[in] aResp Shared pointer for generating response message. -+ * @param[in] oneTimeEnable Boolean to indicate boot properties are one-time. - * - * @return None. - */ -- --inline void -- getBootOverrideSource(const std::shared_ptr& aResp) -+inline void getBootSource(const std::shared_ptr& aResp, -+ bool oneTimeEnabled) - { -+ std::string bootDbusObj = -+ oneTimeEnabled ? "/xyz/openbmc_project/control/host0/boot/one_time" -+ : "/xyz/openbmc_project/control/host0/boot"; -+ -+ BMCWEB_LOG_DEBUG << "Is one time: " << oneTimeEnabled; -+ aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] = -+ (oneTimeEnabled) ? "Once" : "Continuous"; -+ - crow::connections::systemBus->async_method_call( -- [aResp](const boost::system::error_code ec, -- const std::variant& bootSource) { -+ [aResp, bootDbusObj](const boost::system::error_code ec, -+ const std::variant& bootSource) { - if (ec) - { - BMCWEB_LOG_DEBUG << "DBUS response error " << ec; -@@ -1057,43 +1114,32 @@ inline void - - // Get BootMode as BootSourceOverrideTarget is constructed - // from both BootSource and BootMode -- getBootOverrideMode(aResp); -+ getBootMode(aResp, bootDbusObj); - }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -+ "xyz.openbmc_project.Settings", bootDbusObj, - "org.freedesktop.DBus.Properties", "Get", - "xyz.openbmc_project.Control.Boot.Source", "BootSource"); - } - - /** -- * @brief This functions abstracts all the logic behind getting a -- * "BootSourceOverrideEnabled" property from an overall boot override enable -- * state -+ * @brief Retrieves "One time" enabled setting over DBUS and calls function to -+ * get boot source and boot mode. - * - * @param[in] aResp Shared pointer for generating response message. - * - * @return None. - */ -- --inline void -- processBootOverrideEnable(const std::shared_ptr& aResp, -- const bool bootOverrideEnableSetting) -+inline void getBootProperties(const std::shared_ptr& aResp) - { -- if (!bootOverrideEnableSetting) -- { -- aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] = "Disabled"; -- return; -- } -+ BMCWEB_LOG_DEBUG << "Get boot information."; - -- // If boot source override is enabled, we need to check 'one_time' -- // property to set a correct value for the "BootSourceOverrideEnabled" - crow::connections::systemBus->async_method_call( - [aResp](const boost::system::error_code ec, - const std::variant& oneTime) { - if (ec) - { - BMCWEB_LOG_DEBUG << "DBUS response error " << ec; -- messages::internalError(aResp->res); -+ // not an error, don't have to have the interface - return; - } - -@@ -1104,19 +1150,7 @@ inline void - messages::internalError(aResp->res); - return; - } -- -- bool oneTimeSetting = *oneTimePtr; -- -- if (oneTimeSetting) -- { -- aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] = -- "Once"; -- } -- else -- { -- aResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] = -- "Continuous"; -- } -+ getBootSource(aResp, *oneTimePtr); - }, - "xyz.openbmc_project.Settings", - "/xyz/openbmc_project/control/host0/boot/one_time", -@@ -1124,60 +1158,6 @@ inline void - "xyz.openbmc_project.Object.Enable", "Enabled"); - } - --/** -- * @brief Retrieves boot override enable over DBUS -- * -- * @param[in] aResp Shared pointer for generating response message. -- * -- * @return None. -- */ -- --inline void -- getBootOverrideEnable(const std::shared_ptr& aResp) --{ -- crow::connections::systemBus->async_method_call( -- [aResp](const boost::system::error_code ec, -- const std::variant& bootOverrideEnable) { -- if (ec) -- { -- BMCWEB_LOG_DEBUG << "DBUS response error " << ec; -- messages::internalError(aResp->res); -- return; -- } -- -- const bool* bootOverrideEnablePtr = -- std::get_if(&bootOverrideEnable); -- -- if (!bootOverrideEnablePtr) -- { -- messages::internalError(aResp->res); -- return; -- } -- -- processBootOverrideEnable(aResp, *bootOverrideEnablePtr); -- }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -- "org.freedesktop.DBus.Properties", "Get", -- "xyz.openbmc_project.Object.Enable", "Enabled"); --} -- --/** -- * @brief Retrieves boot source override properties -- * -- * @param[in] aResp Shared pointer for generating response message. -- * -- * @return None. -- */ --inline void getBootProperties(const std::shared_ptr& aResp) --{ -- BMCWEB_LOG_DEBUG << "Get boot information."; -- -- getBootOverrideSource(aResp); -- getBootOverrideType(aResp); -- getBootOverrideEnable(aResp); --} -- - /** - * @brief Retrieves the Last Reset Time - * -@@ -1479,47 +1459,59 @@ inline void getTrustedModuleRequiredToBoot( - * @brief Sets boot properties into DBUS object(s). - * - * @param[in] aResp Shared pointer for generating response message. -+ * @param[in] overrideEnabled The source override "enable". -+ * @param[in] bootObj Path to the DBUS object. - * @param[in] bootType The boot type to set. - * @return Integer error code. - */ - inline void setBootType(const std::shared_ptr& aResp, -+ const bool overrideEnabled, const std::string& bootObj, - const std::optional& bootType) - { -- std::string bootTypeStr; -- -- if (!bootType) -- { -- return; -- } -+ std::string bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.EFI"; - -- // Source target specified -- BMCWEB_LOG_DEBUG << "Boot type: " << *bootType; -- // Figure out which DBUS interface and property to use -- if (*bootType == "Legacy") -- { -- bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.Legacy"; -- } -- else if (*bootType == "UEFI") -+ if (bootType && overrideEnabled) - { -- bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.EFI"; -- } -- else -- { -- BMCWEB_LOG_DEBUG << "Invalid property value for " -- "BootSourceOverrideMode: " -- << *bootType; -- messages::propertyValueNotInList(aResp->res, *bootType, -- "BootSourceOverrideMode"); -- return; -+ // Source target specified -+ BMCWEB_LOG_DEBUG << "Boot type: " << *bootType; -+ // Figure out which DBUS interface and property to use -+ if (*bootType == "Legacy") -+ { -+ bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.Legacy"; -+ } -+ else if (*bootType == "UEFI") -+ { -+ bootTypeStr = "xyz.openbmc_project.Control.Boot.Type.Types.EFI"; -+ } -+ else -+ { -+ BMCWEB_LOG_DEBUG << "Invalid property value for " -+ "BootSourceOverrideMode: " -+ << *bootType; -+ messages::propertyValueNotInList(aResp->res, *bootType, -+ "BootSourceOverrideMode"); -+ return; -+ } - } - - // Act on validated parameters - BMCWEB_LOG_DEBUG << "DBUS boot type: " << bootTypeStr; - - crow::connections::systemBus->async_method_call( -- [aResp](const boost::system::error_code ec) { -+ [aResp, bootType](const boost::system::error_code ec) { - if (ec) - { -+ if (!bootType) -+ { -+ // If bootType wasn't explicitly present in the incoming -+ // message don't output error. The error could come from a -+ // fact that the BootType interface may be not present in -+ // the settings object. It could happen because this -+ // interface is not relevant for some Host architectures -+ // (for example POWER). -+ return; -+ } -+ - BMCWEB_LOG_DEBUG << "DBUS response error " << ec; - if (ec.value() == boost::asio::error::host_unreachable) - { -@@ -1531,8 +1523,7 @@ inline void setBootType(const std::shared_ptr& aResp, - } - BMCWEB_LOG_DEBUG << "Boot type update done."; - }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -+ "xyz.openbmc_project.Settings", bootObj, - "org.freedesktop.DBus.Properties", "Set", - "xyz.openbmc_project.Control.Boot.Type", "BootType", - std::variant(bootTypeStr)); -@@ -1542,48 +1533,42 @@ inline void setBootType(const std::shared_ptr& aResp, - * @brief Sets boot properties into DBUS object(s). - * - * @param[in] aResp Shared pointer for generating response message. -- * @param[in] bootType The boot type to set. -+ * @param[in] overrideEnabled The source override "enable". -+ * @param[in] bootObj Path to the DBUS object. -+ * @param[in] bootSource The boot source to set. -+ * - * @return Integer error code. - */ --inline void setBootEnable(const std::shared_ptr& aResp, -- const std::optional& bootEnable) -+inline void setBootModeOrSource(const std::shared_ptr& aResp, -+ const bool overrideEnabled, -+ const std::string& bootObj, -+ const std::optional& bootSource) - { -- if (!bootEnable) -- { -- return; -- } -- // Source target specified -- BMCWEB_LOG_DEBUG << "Boot enable: " << *bootEnable; -+ std::string bootSourceStr = -+ "xyz.openbmc_project.Control.Boot.Source.Sources.Default"; -+ std::string bootModeStr = -+ "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"; - -- bool bootOverrideEnable = false; -- bool bootOverridePersistent = false; -- // Figure out which DBUS interface and property to use -- if (*bootEnable == "Disabled") -- { -- bootOverrideEnable = false; -- } -- else if (*bootEnable == "Once") -- { -- bootOverrideEnable = true; -- bootOverridePersistent = false; -- } -- else if (*bootEnable == "Continuous") -+ if (bootSource && overrideEnabled) - { -- bootOverrideEnable = true; -- bootOverridePersistent = true; -- } -- else -- { -- BMCWEB_LOG_DEBUG << "Invalid property value for " -- "BootSourceOverrideEnabled: " -- << *bootEnable; -- messages::propertyValueNotInList(aResp->res, *bootEnable, -- "BootSourceOverrideEnabled"); -- return; -+ // Source target specified -+ BMCWEB_LOG_DEBUG << "Boot source: " << *bootSource; -+ // Figure out which DBUS interface and property to use -+ if (assignBootParameters(aResp, *bootSource, bootSourceStr, -+ bootModeStr)) -+ { -+ BMCWEB_LOG_DEBUG -+ << "Invalid property value for BootSourceOverrideTarget: " -+ << *bootSource; -+ messages::propertyValueNotInList(aResp->res, *bootSource, -+ "BootSourceTargetOverride"); -+ return; -+ } - } - - // Act on validated parameters -- BMCWEB_LOG_DEBUG << "DBUS boot override enable: " << bootOverrideEnable; -+ BMCWEB_LOG_DEBUG << "DBUS boot source: " << bootSourceStr; -+ BMCWEB_LOG_DEBUG << "DBUS boot mode: " << bootModeStr; - - crow::connections::systemBus->async_method_call( - [aResp](const boost::system::error_code ec) { -@@ -1593,23 +1578,12 @@ inline void setBootEnable(const std::shared_ptr& aResp, - messages::internalError(aResp->res); - return; - } -- BMCWEB_LOG_DEBUG << "Boot override enable update done."; -+ BMCWEB_LOG_DEBUG << "Boot source update done."; - }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -+ "xyz.openbmc_project.Settings", bootObj, - "org.freedesktop.DBus.Properties", "Set", -- "xyz.openbmc_project.Object.Enable", "Enabled", -- std::variant(bootOverrideEnable)); -- -- if (!bootOverrideEnable) -- { -- return; -- } -- -- // In case boot override is enabled we need to set correct value for the -- // 'one_time' enable DBus interface -- BMCWEB_LOG_DEBUG << "DBUS boot override persistent: " -- << bootOverridePersistent; -+ "xyz.openbmc_project.Control.Boot.Source", "BootSource", -+ std::variant(bootSourceStr)); - - crow::connections::systemBus->async_method_call( - [aResp](const boost::system::error_code ec) { -@@ -1619,86 +1593,45 @@ inline void setBootEnable(const std::shared_ptr& aResp, - messages::internalError(aResp->res); - return; - } -- BMCWEB_LOG_DEBUG << "Boot one_time update done."; -+ BMCWEB_LOG_DEBUG << "Boot mode update done."; - }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot/one_time", -+ "xyz.openbmc_project.Settings", bootObj, - "org.freedesktop.DBus.Properties", "Set", -- "xyz.openbmc_project.Object.Enable", "Enabled", -- std::variant(!bootOverridePersistent)); -+ "xyz.openbmc_project.Control.Boot.Mode", "BootMode", -+ std::variant(bootModeStr)); - } - - /** -- * @brief Sets boot properties into DBUS object(s). -+ * @brief Sets "One time" enabled setting into DBUS object - * -- * @param[in] aResp Shared pointer for generating response message. -- * @param[in] bootSource The boot source to set. -+ * @param[in] aResp Shared pointer for generating response message. -+ * @param[in] oneTime Enable property for one-time object - * - * @return Integer error code. - */ --inline void setBootModeOrSource(const std::shared_ptr& aResp, -- const std::optional& bootSource) -+inline void setOneTime(const std::shared_ptr& aResp, -+ bool oneTime) - { -- std::string bootSourceStr; -- std::string bootModeStr; -- -- if (!bootSource) -- { -- return; -- } -- -- // Source target specified -- BMCWEB_LOG_DEBUG << "Boot source: " << *bootSource; -- // Figure out which DBUS interface and property to use -- if (assignBootParameters(aResp, *bootSource, bootSourceStr, bootModeStr)) -- { -- BMCWEB_LOG_DEBUG -- << "Invalid property value for BootSourceOverrideTarget: " -- << *bootSource; -- messages::propertyValueNotInList(aResp->res, *bootSource, -- "BootSourceTargetOverride"); -- return; -- } -- -- // Act on validated parameters -- BMCWEB_LOG_DEBUG << "DBUS boot source: " << bootSourceStr; -- BMCWEB_LOG_DEBUG << "DBUS boot mode: " << bootModeStr; -- - crow::connections::systemBus->async_method_call( -- [aResp](const boost::system::error_code ec) { -+ [aResp{aResp}](const boost::system::error_code ec) { - if (ec) - { - BMCWEB_LOG_DEBUG << "DBUS response error " << ec; - messages::internalError(aResp->res); - return; - } -- BMCWEB_LOG_DEBUG << "Boot source update done."; -+ BMCWEB_LOG_DEBUG << "Boot enable update done."; - }, - "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -- "org.freedesktop.DBus.Properties", "Set", -- "xyz.openbmc_project.Control.Boot.Source", "BootSource", -- std::variant(bootSourceStr)); -- -- crow::connections::systemBus->async_method_call( -- [aResp](const boost::system::error_code ec) { -- if (ec) -- { -- BMCWEB_LOG_DEBUG << "DBUS response error " << ec; -- messages::internalError(aResp->res); -- return; -- } -- BMCWEB_LOG_DEBUG << "Boot mode update done."; -- }, -- "xyz.openbmc_project.Settings", -- "/xyz/openbmc_project/control/host0/boot", -+ "/xyz/openbmc_project/control/host0/boot/one_time", - "org.freedesktop.DBus.Properties", "Set", -- "xyz.openbmc_project.Control.Boot.Mode", "BootMode", -- std::variant(bootModeStr)); -+ "xyz.openbmc_project.Object.Enable", "Enabled", -+ std::variant(oneTime)); - } - - /** -- * @brief Sets Boot source override properties. -+ * @brief Retrieves "One time" enabled setting over DBUS and calls function to -+ * set boot source/boot mode properties. - * - * @param[in] aResp Shared pointer for generating response message. - * @param[in] bootSource The boot source from incoming RF request. -@@ -1707,17 +1640,81 @@ inline void setBootModeOrSource(const std::shared_ptr& aResp, - * - * @return Integer error code. - */ -- --inline void setBootProperties(const std::shared_ptr& aResp, -- const std::optional& bootSource, -- const std::optional& bootType, -- const std::optional& bootEnable) -+inline void -+ setBootSourceProperties(const std::shared_ptr& aResp, -+ std::optional bootSource, -+ std::optional bootType, -+ std::optional bootEnable) - { - BMCWEB_LOG_DEBUG << "Set boot information."; - -- setBootModeOrSource(aResp, bootSource); -- setBootType(aResp, bootType); -- setBootEnable(aResp, bootEnable); -+ crow::connections::systemBus->async_method_call( -+ [aResp, bootSource{std::move(bootSource)}, -+ bootType{std::move(bootType)}, -+ bootEnable{std::move(bootEnable)}](const boost::system::error_code ec, -+ const std::variant& oneTime) { -+ if (ec) -+ { -+ BMCWEB_LOG_DEBUG << "DBUS response error " << ec; -+ messages::internalError(aResp->res); -+ return; -+ } -+ -+ const bool* oneTimePtr = std::get_if(&oneTime); -+ -+ if (!oneTimePtr) -+ { -+ messages::internalError(aResp->res); -+ return; -+ } -+ -+ BMCWEB_LOG_DEBUG << "Got one time: " << *oneTimePtr; -+ -+ bool oneTimeSetting = *oneTimePtr; -+ bool overrideEnabled = true; -+ -+ // Validate incoming parameters -+ if (bootEnable) -+ { -+ if (*bootEnable == "Once") -+ { -+ oneTimeSetting = true; -+ } -+ else if (*bootEnable == "Continuous") -+ { -+ oneTimeSetting = false; -+ } -+ else if (*bootEnable == "Disabled") -+ { -+ BMCWEB_LOG_DEBUG << "Boot source override will be disabled"; -+ oneTimeSetting = false; -+ overrideEnabled = false; -+ } -+ else -+ { -+ BMCWEB_LOG_DEBUG << "Unsupported value for " -+ "BootSourceOverrideEnabled: " -+ << *bootEnable; -+ messages::propertyValueNotInList( -+ aResp->res, *bootEnable, "BootSourceOverrideEnabled"); -+ return; -+ } -+ } -+ -+ std::string bootObj = "/xyz/openbmc_project/control/host0/boot"; -+ if (oneTimeSetting) -+ { -+ bootObj += "/one_time"; -+ } -+ -+ setBootModeOrSource(aResp, overrideEnabled, bootObj, bootSource); -+ setBootType(aResp, overrideEnabled, bootObj, bootType); -+ setOneTime(aResp, oneTimeSetting); -+ }, -+ "xyz.openbmc_project.Settings", -+ "/xyz/openbmc_project/control/host0/boot/one_time", -+ "org.freedesktop.DBus.Properties", "Get", -+ "xyz.openbmc_project.Object.Enable", "Enabled"); - } - - /** -@@ -2806,11 +2803,11 @@ inline void requestRoutesSystems(App& app) - { - return; - } -- - if (bootSource || bootType || bootEnable) - { -- setBootProperties(asyncResp, bootSource, bootType, -- bootEnable); -+ setBootSourceProperties( -+ asyncResp, std::move(bootSource), -+ std::move(bootType), std::move(bootEnable)); - } - if (automaticRetryConfig) - { --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch index 028d09e74..a5c55afd1 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0003-Add-support-to-ResetBios-action.patch @@ -1,31 +1,25 @@ -From 02e44acef17a2b0681fe019e090d09015f9412e0 Mon Sep 17 00:00:00 2001 -From: Krzysztof Grobelny -Date: Wed, 30 Jun 2021 15:27:16 +0000 -Subject: [PATCH 3/5] Add support to ResetBios action +From 415b5079ff45c1dabad15e0f751001a6265412e4 Mon Sep 17 00:00:00 2001 +From: AppaRao Puli +Date: Fri, 27 Aug 2021 13:02:20 +0000 +Subject: [PATCH] Add support to ResetBios action Tested: Bios reset flag can be modified throw redfish POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios -Change-Id: I5e5fbdd70d4a3ce3b976cc2eb0a7d9a2a3adb124 +Change-Id: Ic719c55705e5f634539b3dd858b60922e505a8d0 Signed-off-by: Kuiying Wang +Signed-off-by: AppaRao Puli --- - redfish-core/lib/bios.hpp | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) + redfish-core/lib/bios.hpp | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp -index 14d2171..49c0fd0 100644 +index 85ccaaa..360a749 100644 --- a/redfish-core/lib/bios.hpp +++ b/redfish-core/lib/bios.hpp -@@ -665,24 +665,28 @@ inline void requestRoutesBiosAttributeRegistry(App& app) - inline void requestRoutesBiosReset(App& app) - { - BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios/") -- // Incorrect Privilege; Should be ConfigureComponents -- //.privileges(redfish::privileges::postBios) -- .privileges({{"ConfigureManager"}}) -+ .privileges(redfish::privileges::postBios) +@@ -737,18 +737,24 @@ inline void requestRoutesBiosReset(App& app) .methods(boost::beast::http::verb::post)( [](const crow::Request&, const std::shared_ptr& asyncResp) { diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch index 64948ca0c..da281467e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0004-Add-Server-Sent-Events-support.patch @@ -1,4 +1,4 @@ -From 882dc7755083eea32f3d14f7e6c7330d5a9ac66f Mon Sep 17 00:00:00 2001 +From 54bdd897bd416fef4c043224b398b1b6d47fd271 Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Fri, 12 Mar 2021 18:53:25 +0000 Subject: [PATCH] Add Server-Sent-Events support @@ -30,10 +30,10 @@ Signed-off-by: AppaRao Puli create mode 100644 http/server_sent_event.hpp diff --git a/http/http_connection.hpp b/http/http_connection.hpp -index fb64014..45b1a68 100644 +index a1a7045..90535c5 100644 --- a/http/http_connection.hpp +++ b/http/http_connection.hpp -@@ -326,7 +326,7 @@ class Connection : +@@ -331,7 +331,7 @@ class Connection : BMCWEB_LOG_INFO << "Request: " << " " << this << " HTTP/" << req->version() / 10 << "." << req->version() % 10 << ' ' << req->methodString() @@ -42,10 +42,10 @@ index fb64014..45b1a68 100644 needToCallAfterHandlers = false; -@@ -345,11 +345,15 @@ class Connection : +@@ -350,11 +350,15 @@ class Connection : boost::asio::post(self->adaptor.get_executor(), [self] { self->completeRequest(); }); - }; + }); - if (req->isUpgrade() && - boost::iequals( - req->getHeaderValue(boost::beast::http::field::upgrade), @@ -63,7 +63,7 @@ index fb64014..45b1a68 100644 // delete lambda with self shared_ptr // to enable connection destruction diff --git a/http/http_response.hpp b/http/http_response.hpp -index 72ff9e9..6bb3aa5 100644 +index a983d4a..07b0265 100644 --- a/http/http_response.hpp +++ b/http/http_response.hpp @@ -15,10 +15,15 @@ namespace crow @@ -82,7 +82,7 @@ index 72ff9e9..6bb3aa5 100644 using response_type = boost::beast::http::response; -@@ -138,8 +143,8 @@ struct Response +@@ -143,8 +148,8 @@ struct Response private: bool completed{}; @@ -93,7 +93,7 @@ index 72ff9e9..6bb3aa5 100644 // In case of a JSON object, set the Content-Type header void jsonMode() diff --git a/http/routing.hpp b/http/routing.hpp -index af6269e..318fcfe 100644 +index d2a10b2..25e4ce8 100644 --- a/http/routing.hpp +++ b/http/routing.hpp @@ -6,6 +6,7 @@ @@ -474,4 +474,5 @@ index 0000000..41d18ed +}; +} // namespace crow -- -2.25.1 +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch index 78b52eea1..42a1ebbf0 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0005-Add-SSE-style-subscription-support-to-eventservice.patch @@ -1,4 +1,4 @@ -From a9d994919b677a2650b80fb449cf96baad4f04dd Mon Sep 17 00:00:00 2001 +From 36c1391749e19e4a25ca6e57d369457f48e6bb11 Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Tue, 16 Mar 2021 15:37:24 +0000 Subject: [PATCH] Add SSE style subscription support to eventservice @@ -19,23 +19,24 @@ Tested: - Ran RedfishValidation and its passed. Signed-off-by: AppaRao Puli +Signed-off-by: Nitin Wankhade Change-Id: I7f4b7a34974080739c4ba968ed570489af0474de --- http/http_connection.hpp | 2 +- include/eventservice_sse.hpp | 75 +++++ - .../include/event_service_manager.hpp | 109 +++++-- + .../include/event_service_manager.hpp | 111 +++++-- redfish-core/include/server_sent_events.hpp | 290 ------------------ redfish-core/lib/event_service.hpp | 8 +- src/webserver_main.cpp | 2 + - 6 files changed, 164 insertions(+), 322 deletions(-) + 6 files changed, 165 insertions(+), 323 deletions(-) create mode 100644 include/eventservice_sse.hpp delete mode 100644 redfish-core/include/server_sent_events.hpp diff --git a/http/http_connection.hpp b/http/http_connection.hpp -index 45b1a68bf015..ccc2d6a753b7 100644 +index 90535c5..37c0a0b 100644 --- a/http/http_connection.hpp +++ b/http/http_connection.hpp -@@ -350,7 +350,7 @@ class Connection : +@@ -355,7 +355,7 @@ class Connection : boost::iequals(req->getHeaderValue( boost::beast::http::field::upgrade), "websocket")) || @@ -46,7 +47,7 @@ index 45b1a68bf015..ccc2d6a753b7 100644 << " is getting upgraded"; diff --git a/include/eventservice_sse.hpp b/include/eventservice_sse.hpp new file mode 100644 -index 000000000000..14daf00852f5 +index 0000000..14daf00 --- /dev/null +++ b/include/eventservice_sse.hpp @@ -0,0 +1,75 @@ @@ -126,7 +127,7 @@ index 000000000000..14daf00852f5 +} // namespace eventservice_sse +} // namespace redfish diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp -index ca46aa7dc62f..098134a3a259 100644 +index ca46aa7..9397271 100644 --- a/redfish-core/include/event_service_manager.hpp +++ b/redfish-core/include/event_service_manager.hpp @@ -22,15 +22,17 @@ @@ -216,23 +217,23 @@ index ca46aa7dc62f..098134a3a259 100644 ~Subscription() = default; -@@ -417,7 +417,7 @@ class Subscription : public persistent_data::UserSubscription +@@ -412,13 +412,14 @@ class Subscription : public persistent_data::UserSubscription + } + conn->addHeaders(reqHeaders); + conn->sendData(msg); +- this->eventSeqNum++; + } if (sseConn != nullptr) { - sseConn->sendData(eventSeqNum, msg); + sseConn->sendEvent(std::to_string(eventSeqNum), msg); } - } - -@@ -508,6 +508,7 @@ class Subscription : public persistent_data::UserSubscription - - this->sendEvent( - msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace)); ++ + this->eventSeqNum++; } - #endif + void sendTestEventLog() @@ -578,14 +579,39 @@ class Subscription : public persistent_data::UserSubscription return eventSeqNum; } @@ -326,7 +327,7 @@ index ca46aa7dc62f..098134a3a259 100644 std::vector idList; diff --git a/redfish-core/include/server_sent_events.hpp b/redfish-core/include/server_sent_events.hpp deleted file mode 100644 -index 7613d7ba6427..000000000000 +index 7613d7b..0000000 --- a/redfish-core/include/server_sent_events.hpp +++ /dev/null @@ -1,290 +0,0 @@ @@ -621,7 +622,7 @@ index 7613d7ba6427..000000000000 - -} // namespace crow diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp -index f1d6f5007d79..4a2d58a2f1dd 100644 +index 67ad014..f8a2dac 100644 --- a/redfish-core/lib/event_service.hpp +++ b/redfish-core/lib/event_service.hpp @@ -37,8 +37,6 @@ static constexpr const std::array supportedResourceTypes = { @@ -654,7 +655,7 @@ index f1d6f5007d79..4a2d58a2f1dd 100644 std::optional retryAttemps; std::optional retryInterval; diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp -index c01accd2e93e..363005105d18 100644 +index bf98aae..53745d8 100644 --- a/src/webserver_main.cpp +++ b/src/webserver_main.cpp @@ -6,6 +6,7 @@ @@ -662,10 +663,10 @@ index c01accd2e93e..363005105d18 100644 #include #include +#include + #include #include #include - #include -@@ -82,6 +83,7 @@ int main(int /*argc*/, char** /*argv*/) +@@ -83,6 +84,7 @@ int main(int /*argc*/, char** /*argv*/) #endif #ifdef BMCWEB_ENABLE_REDFISH diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch index 79b6e42d7..9043bd0b9 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0006-Add-EventService-SSE-filter-support.patch @@ -1,4 +1,4 @@ -From e8bf93f1cc374a986896174489719065d0cc49a0 Mon Sep 17 00:00:00 2001 +From 22c6b6cfb468f8de9ff3ea051dffdba05778645e Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Wed, 17 Mar 2021 01:16:50 +0000 Subject: [PATCH] Add EventService SSE filter support @@ -223,10 +223,10 @@ index 10567d1..f29e326 100644 } // namespace redfish diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp -index 098134a..c8fcb33 100644 +index 5886d81..c3e7f61 100644 --- a/redfish-core/include/event_service_manager.hpp +++ b/redfish-core/include/event_service_manager.hpp -@@ -55,6 +55,11 @@ static constexpr const char* eventServiceFile = +@@ -56,6 +56,11 @@ static constexpr const char* eventServiceFile = static constexpr const uint8_t maxNoOfSubscriptions = 20; static constexpr const uint8_t maxNoOfSSESubscriptions = 10; @@ -239,10 +239,10 @@ index 098134a..c8fcb33 100644 static std::optional inotifyConn; static constexpr const char* redfishEventLogDir = "/var/log"; diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp -index 4a2d58a..67abb95 100644 +index 2e7c3f3..9def549 100644 --- a/redfish-core/lib/event_service.hpp +++ b/redfish-core/lib/event_service.hpp -@@ -21,11 +21,6 @@ +@@ -25,11 +25,6 @@ namespace redfish { diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch index 7749ddb72..3be65ee2a 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0007-EventService-Log-events-for-subscription-actions.patch @@ -1,6 +1,6 @@ -From dad35d6e6736f1c4ab6d739c62b22923ad749ad7 Mon Sep 17 00:00:00 2001 -From: Krzysztof Grobelny -Date: Tue, 13 Jul 2021 12:30:08 +0000 +From b8eb53886106e44e3668857b13f8642d2ad3cfbf Mon Sep 17 00:00:00 2001 +From: AppaRao Puli +Date: Fri, 27 Aug 2021 16:02:01 +0000 Subject: [PATCH] EventService: Log events for subscription actions Log redfish event for below 3 actions @@ -18,7 +18,7 @@ Tested: - Performed all the above actions and verified the redfish event messages are logged. -Change-Id: I528293e55b1f3401bc2bb09c11c63ae985fbfedb +Change-Id: I3745fa6357bd215379781a9818d9acc02a853d79 Signed-off-by: AppaRao Puli Signed-off-by: Ayushi Smriti --- @@ -27,10 +27,10 @@ Signed-off-by: Ayushi Smriti 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp -index a5b37e5..75f5615 100644 +index c3e7f61..e9bdbfa 100644 --- a/redfish-core/include/event_service_manager.hpp +++ b/redfish-core/include/event_service_manager.hpp -@@ -20,6 +20,7 @@ +@@ -21,6 +21,7 @@ #include "registries/task_event_message_registry.hpp" #include @@ -38,16 +38,16 @@ index a5b37e5..75f5615 100644 #include #include -@@ -813,7 +814,7 @@ class EventServiceManager - return; +@@ -788,7 +789,7 @@ class EventServiceManager + } } - void updateSubscriptionData() + void persistSubscriptionData() { - // Persist the config and subscription data. - nlohmann::json jsonData; -@@ -910,7 +911,7 @@ class EventServiceManager + persistent_data::EventServiceStore::getInstance() + .eventServiceConfig.enabled = serviceEnabled; +@@ -835,7 +836,7 @@ class EventServiceManager if (updateConfig) { @@ -56,7 +56,7 @@ index a5b37e5..75f5615 100644 } if (updateRetryCfg) -@@ -1005,7 +1006,7 @@ class EventServiceManager +@@ -947,7 +948,7 @@ class EventServiceManager if (updateFile) { @@ -65,7 +65,7 @@ index a5b37e5..75f5615 100644 } #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES -@@ -1020,6 +1021,13 @@ class EventServiceManager +@@ -962,6 +963,13 @@ class EventServiceManager // Set Subscription ID for back trace subValue->setSubscriptionId(id); @@ -79,9 +79,9 @@ index a5b37e5..75f5615 100644 return id; } -@@ -1040,7 +1048,14 @@ class EventServiceManager - { - subscriptionsMap.erase(obj); +@@ -986,7 +994,14 @@ class EventServiceManager + persistent_data::EventServiceStore::getInstance() + .subscriptionsConfigMap.erase(obj2); updateNoOfSubscribersCount(); - updateSubscriptionData(); + @@ -95,7 +95,7 @@ index a5b37e5..75f5615 100644 } } -@@ -1062,6 +1077,18 @@ class EventServiceManager +@@ -1008,6 +1023,18 @@ class EventServiceManager } } @@ -115,10 +115,10 @@ index a5b37e5..75f5615 100644 { return subscriptionsMap.size(); diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp -index 53a60d3..435c93d 100644 +index 9def549..6a8421f 100644 --- a/redfish-core/lib/event_service.hpp +++ b/redfish-core/lib/event_service.hpp -@@ -579,7 +579,7 @@ inline void requestRoutesEventDestination(App& app) +@@ -617,7 +617,7 @@ inline void requestRoutesEventDestination(App& app) subValue->updateRetryPolicy(); } @@ -126,7 +126,7 @@ index 53a60d3..435c93d 100644 + EventServiceManager::getInstance().updateSubscription(param); }); BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions//") - .privileges({{"ConfigureManager"}}) + // The below privilege is wrong, it should be ConfigureManager OR -- -2.25.1 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch index 6e635a828..d1fe475f5 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/eventservice/0009-Restructure-Redifsh-EventLog-Transmit-code-flow.patch @@ -1,4 +1,4 @@ -From 7f45c83c0b3acb08461461c23e0d7add46d9191c Mon Sep 17 00:00:00 2001 +From 542505dff60e3921b00b51acae882e207d46f1a6 Mon Sep 17 00:00:00 2001 From: Krzysztof Grobelny Date: Wed, 14 Jul 2021 14:13:11 +0000 Subject: [PATCH] Restructure Redfish EventLog Transmit code flow @@ -35,10 +35,10 @@ Signed-off-by: P Dheeraj Srujan Kumar 1 file changed, 76 insertions(+), 32 deletions(-) diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp -index 430767a..53ed3f6 100644 +index e9bdbfa..5c4de70 100644 --- a/redfish-core/include/event_service_manager.hpp +++ b/redfish-core/include/event_service_manager.hpp -@@ -133,15 +133,10 @@ static const Message* formatMessage(const std::string_view& messageID) +@@ -134,15 +134,10 @@ static const Message* formatMessage(const std::string_view& messageID) namespace event_log { @@ -55,7 +55,7 @@ index 430767a..53ed3f6 100644 // Get the entry timestamp std::time_t curTs = 0; -@@ -639,6 +634,7 @@ class EventServiceManager +@@ -621,6 +616,7 @@ class EventServiceManager } std::string lastEventTStr; @@ -63,7 +63,7 @@ index 430767a..53ed3f6 100644 size_t noOfEventLogSubscribers{0}; size_t noOfMetricReportSubscribers{0}; std::shared_ptr matchTelemetryMonitor; -@@ -1204,7 +1200,22 @@ class EventServiceManager +@@ -1163,7 +1159,22 @@ class EventServiceManager #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES void cacheLastEventTimestamp() { @@ -87,7 +87,7 @@ index 430767a..53ed3f6 100644 std::ifstream logStream(redfishEventLogFile); if (!logStream.good()) { -@@ -1212,27 +1223,44 @@ class EventServiceManager +@@ -1171,27 +1182,44 @@ class EventServiceManager return; } std::string logEntry; @@ -143,7 +143,7 @@ index 430767a..53ed3f6 100644 std::ifstream logStream(redfishEventLogFile); if (!logStream.good()) { -@@ -1242,27 +1270,21 @@ class EventServiceManager +@@ -1201,27 +1229,21 @@ class EventServiceManager std::vector eventRecords; @@ -178,7 +178,7 @@ index 430767a..53ed3f6 100644 std::string timestamp; std::string messageID; -@@ -1274,6 +1296,16 @@ class EventServiceManager +@@ -1233,6 +1255,16 @@ class EventServiceManager continue; } @@ -195,7 +195,7 @@ index 430767a..53ed3f6 100644 std::string registryName; std::string messageKey; event_log::getRegistryAndMessageKey(messageID, registryName, -@@ -1283,11 +1315,23 @@ class EventServiceManager +@@ -1242,11 +1274,23 @@ class EventServiceManager continue; } @@ -221,5 +221,5 @@ index 430767a..53ed3f6 100644 { std::shared_ptr entry = it.second; -- -2.25.1 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch index f53b7013f..c19691cdc 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Add-support-for-MetricDefinition-scheme.patch @@ -1,12 +1,20 @@ -From e37e30943fcb1ba504658ed07d69f950ccf44585 Mon Sep 17 00:00:00 2001 +From 80608f0d72da62426bb00e03a42fbf5daed931c9 Mon Sep 17 00:00:00 2001 From: Krzysztof Grobelny Date: Tue, 13 Apr 2021 13:00:18 +0000 Subject: [PATCH] Add support for MetricDefinition scheme Added MetricDefinition node to Redfish code. Now user is able to list all available metrics in OpenBMC that are supported by Telemetry -service. Metrics are grouped by following categories: temperature, -power, voltage, current, fan_tach, fan_pwm, utilization. +service. Metrics are grouped by reading type. + +MetricDefinitions contains all physical sensors supported by redfish, +algorithm iterates through all chassis and collects results for each +node available in that chassis (Power, Thermal, Sensors). + +When https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/40169 will +be merge it will be possible to optimize this algorithm to only get +sensors from Sensors node. Currently Sensors node doesn't contain all +available sensors. Tested: - MetricDefinitions response is filled with existing sensors, it works @@ -14,18 +22,98 @@ Tested: - Validated a presence of MetricDefinition members and its attributes - Successfully passed RedfishServiceValidator.py using witherspoon image on QEMU + - Tested using following GET,POST requests + +GET /redfish/v1/TelemetryService/MetricDefinitions +{ + "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions", + "@odata.type": "#MetricDefinitionCollection.MetricDefinitionCollection", + "Members": [ + { + "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Rotational" + }, + { + "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Percent" + }, + { + "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Temperature" + }, + { + "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Power" + }, + { + "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/AirFlow" + } + ], + "Members@odata.count": 5, + "Name": "Metric Definition Collection" +} + +GET /redfish/v1/TelemetryService/MetricDefinitions/Rotational +{ + "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Rotational", + "@odata.type": "#MetricDefinition.v1_0_3.MetricDefinition", + "Id": "Rotational", + "Implementation": "PhysicalSensor", + "IsLinear": true, + "MetricDataType": "Decimal", + "MetricProperties": [ + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/0/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/1/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/2/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/4/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/5/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/6/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/7/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/8/Reading", + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/9/Reading" + ], + "MetricType": "Numeric", + "Name": "Rotational", + "Units": "RPM" +} + +POST redfish/v1/TelemetryService/MetricReportDefinitions, body: +{ + "Id": "TestReport", + "Metrics": [ + { + "MetricId": "TestMetric", + "MetricProperties": [ + "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading", + ] + } + ], + "MetricReportDefinitionType": "OnRequest", + "ReportActions": [ + "RedfishEvent", + "LogToMetricReportsCollection" + ] +} +{ + "@Message.ExtendedInfo": [ + { + "@odata.type": "#Message.v1_1_1.Message", + "Message": "The resource has been created successfully", + "MessageArgs": [], + "MessageId": "Base.1.8.1.Created", + "MessageSeverity": "OK", + "Resolution": "None" + } + ] +} Signed-off-by: Wludzik, Jozef Signed-off-by: Krzysztof Grobelny Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00 --- redfish-core/include/redfish.hpp | 3 + - .../include/utils/get_chassis_names.hpp | 58 +++++ + .../include/utils/get_chassis_names.hpp | 58 ++++ .../include/utils/telemetry_utils.hpp | 2 + - redfish-core/lib/metric_definition.hpp | 242 ++++++++++++++++++ - redfish-core/lib/sensors.hpp | 25 +- + redfish-core/lib/metric_definition.hpp | 258 ++++++++++++++++++ redfish-core/lib/telemetry_service.hpp | 2 + - 6 files changed, 320 insertions(+), 12 deletions(-) + 5 files changed, 323 insertions(+) create mode 100644 redfish-core/include/utils/get_chassis_names.hpp create mode 100644 redfish-core/lib/metric_definition.hpp @@ -129,10 +217,10 @@ index 5872350..1b4f75d 100644 constexpr const char* metricReportUri = diff --git a/redfish-core/lib/metric_definition.hpp b/redfish-core/lib/metric_definition.hpp new file mode 100644 -index 0000000..2443996 +index 0000000..019168b --- /dev/null +++ b/redfish-core/lib/metric_definition.hpp -@@ -0,0 +1,242 @@ +@@ -0,0 +1,258 @@ +#pragma once + +#include "async_resp.hpp" @@ -140,12 +228,34 @@ index 0000000..2443996 +#include "utils/get_chassis_names.hpp" +#include "utils/telemetry_utils.hpp" + ++#include ++ +namespace redfish +{ + +namespace telemetry +{ + ++bool containsOdata(const nlohmann::json& json, const std::string& odataId) ++{ ++ const auto it = std::find_if( ++ json.begin(), json.end(), [&odataId](const nlohmann::json& item) { ++ auto kt = item.find("@odata.id"); ++ if (kt == item.end()) ++ { ++ return false; ++ } ++ const std::string* value = kt->get_ptr(); ++ if (!value) ++ { ++ return false; ++ } ++ return *value == odataId; ++ }); ++ ++ return it != json.end(); ++} ++ +void addMembers(crow::Response& res, + const boost::container::flat_map& el) +{ @@ -168,23 +278,7 @@ index 0000000..2443996 + std::string(telemetry::metricDefinitionUri) + + sensors::toReadingType(type); + -+ const auto it = std::find_if(members.begin(), members.end(), -+ [&odataId](const nlohmann::json& item) { -+ auto kt = item.find("@odata.id"); -+ if (kt == item.end()) -+ { -+ return false; -+ } -+ const std::string* value = -+ kt->get_ptr(); -+ if (!value) -+ { -+ return false; -+ } -+ return *value == odataId; -+ }); -+ -+ if (it == members.end()) ++ if (!containsOdata(members, odataId)) + { + members.push_back({{"@odata.id", odataId}}); + } @@ -193,15 +287,76 @@ index 0000000..2443996 + } +} + ++template ++inline void mapRedfishUriToDbusPath(Callback&& callback) ++{ ++ utils::getChassisNames([callback = std::move(callback)]( ++ boost::system::error_code ec, ++ const std::vector& chassisNames) { ++ if (ec) ++ { ++ BMCWEB_LOG_ERROR << "getChassisNames error: " << ec.value(); ++ callback(ec, {}); ++ return; ++ } ++ ++ auto handleRetrieveUriToDbusMap = ++ [callback = std::move(callback)]( ++ const boost::beast::http::status status, ++ const boost::container::flat_map& ++ uriToDbus) { ++ if (status != boost::beast::http::status::ok) ++ { ++ BMCWEB_LOG_ERROR << "Failed to retrieve URI to dbus " ++ "sensors map with err " ++ << static_cast(status); ++ callback(boost::system::errc::make_error_code( ++ boost::system::errc::io_error), ++ {}); ++ return; ++ } ++ ++ callback(boost::system::errc::make_error_code( ++ boost::system::errc::success), ++ uriToDbus); ++ }; ++ ++ for (const std::string& chassisName : chassisNames) ++ { ++ for (const auto& [sensorNode, dbusPaths] : sensors::dbus::paths) ++ { ++ retrieveUriToDbusMap(chassisName, sensorNode.data(), ++ handleRetrieveUriToDbusMap); ++ } ++ } ++ }); ++} ++ +} // namespace telemetry + +inline void requestRoutesMetricDefinitionCollection(App& app) +{ + BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/MetricDefinitions/") -+ .privileges({{"Login"}}) ++ .privileges(privileges::getTelemetryService) + .methods(boost::beast::http::verb::get)( + [](const crow::Request&, + const std::shared_ptr& asyncResp) { ++ telemetry::mapRedfishUriToDbusPath( ++ [asyncResp](boost::system::error_code ec, ++ const boost::container::flat_map< ++ std::string, std::string>& uriToDbus) { ++ if (ec) ++ { ++ messages::internalError(asyncResp->res); ++ BMCWEB_LOG_ERROR ++ << "mapRedfishUriToDbusPath error: " ++ << ec.value(); ++ return; ++ } ++ ++ telemetry::addMembers(asyncResp->res, uriToDbus); ++ }); ++ + asyncResp->res.jsonValue["@odata.type"] = + "#MetricDefinitionCollection." + "MetricDefinitionCollection"; @@ -211,49 +366,6 @@ index 0000000..2443996 + "Metric Definition Collection"; + asyncResp->res.jsonValue["Members"] = nlohmann::json::array(); + asyncResp->res.jsonValue["Members@odata.count"] = 0; -+ -+ utils::getChassisNames( -+ [asyncResp](boost::system::error_code ec, -+ const std::vector& chassisNames) { -+ if (ec) -+ { -+ messages::internalError(asyncResp->res); -+ BMCWEB_LOG_ERROR << "getChassisNames error: " -+ << ec.value(); -+ return; -+ } -+ -+ auto handleRetrieveUriToDbusMap = -+ [asyncResp]( -+ const boost::beast::http::status status, -+ const boost::container::flat_map< -+ std::string, std::string>& uriToDbus) { -+ if (status != boost::beast::http::status::ok) -+ { -+ BMCWEB_LOG_ERROR -+ << "Failed to retrieve URI to dbus " -+ "sensors map with err " -+ << static_cast(status); -+ messages::internalError(asyncResp->res); -+ return; -+ } -+ telemetry::addMembers(asyncResp->res, -+ uriToDbus); -+ }; -+ -+ for (const std::string& chassisName : chassisNames) -+ { -+ for (const auto& [sensorNode, _] : -+ sensors::dbus::paths) -+ { -+ BMCWEB_LOG_DEBUG << "Chassis: " << chassisName -+ << " sensor: " << sensorNode; -+ retrieveUriToDbusMap( -+ chassisName, sensorNode.data(), -+ handleRetrieveUriToDbusMap); -+ } -+ } -+ }); + }); +} + @@ -298,12 +410,29 @@ index 0000000..2443996 + } +} + ++inline const char* readingTypeToReadingUnits(const std::string& readingType) ++{ ++ for (const auto& [node, paths] : sensors::dbus::paths) ++ { ++ for (const char* path : paths) ++ { ++ const sdbusplus::message::object_path sensorPath = ++ sdbusplus::message::object_path(path); ++ if (sensors::toReadingType(sensorPath.filename()) == readingType) ++ { ++ return sensors::toReadingUnits(sensorPath.filename()); ++ } ++ } ++ } ++ return ""; ++} ++ +} // namespace telemetry + +inline void requestRoutesMetricDefinition(App& app) +{ + BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/MetricDefinitions//") -+ .privileges({{"Login"}}) ++ .privileges(privileges::getTelemetryService) + .methods(boost::beast::http::verb::get)( + [](const crow::Request&, + const std::shared_ptr& asyncResp, @@ -315,142 +444,41 @@ index 0000000..2443996 + return; + } + -+ asyncResp->res.jsonValue["MetricProperties"] = -+ nlohmann::json::array(); -+ asyncResp->res.jsonValue["Id"] = readingType; -+ asyncResp->res.jsonValue["Name"] = readingType; -+ asyncResp->res.jsonValue["@odata.id"] = -+ telemetry::metricDefinitionUri + readingType; -+ asyncResp->res.jsonValue["@odata.type"] = -+ "#MetricDefinition.v1_0_3.MetricDefinition"; -+ asyncResp->res.jsonValue["MetricDataType"] = "Decimal"; -+ asyncResp->res.jsonValue["MetricType"] = "Numeric"; -+ asyncResp->res.jsonValue["IsLinear"] = true; -+ asyncResp->res.jsonValue["Implementation"] = "PhysicalSensor"; -+ asyncResp->res.jsonValue["Units"] = -+ sensors::toReadingUnits(readingType); -+ -+ utils::getChassisNames( -+ [asyncResp, readingType]( -+ boost::system::error_code ec, -+ const std::vector& chassisNames) { ++ telemetry::mapRedfishUriToDbusPath( ++ [asyncResp, ++ readingType](boost::system::error_code ec, ++ const boost::container::flat_map< ++ std::string, std::string>& uriToDbus) { + if (ec) + { + messages::internalError(asyncResp->res); -+ BMCWEB_LOG_ERROR << "getChassisNames error: " -+ << ec.value(); ++ BMCWEB_LOG_ERROR ++ << "mapRedfishUriToDbusPath error: " ++ << ec.value(); + return; + } + -+ auto handleRetrieveUriToDbusMap = -+ [asyncResp, readingType]( -+ const boost::beast::http::status status, -+ const boost::container::flat_map< -+ std::string, std::string>& uriToDbus) { -+ if (status != boost::beast::http::status::ok) -+ { -+ BMCWEB_LOG_ERROR -+ << "Failed to retrieve URI to dbus " -+ "sensors map with err " -+ << static_cast(status); -+ messages::internalError(asyncResp->res); -+ return; -+ } -+ telemetry::addMetricProperty( -+ *asyncResp, readingType, uriToDbus); -+ }; -+ -+ for (const std::string& chassisName : chassisNames) -+ { -+ for (const auto& [sensorNode, dbusPaths] : -+ sensors::dbus::paths) -+ { -+ retrieveUriToDbusMap( -+ chassisName, sensorNode.data(), -+ handleRetrieveUriToDbusMap); -+ } -+ } ++ asyncResp->res.jsonValue["Id"] = readingType; ++ asyncResp->res.jsonValue["Name"] = readingType; ++ asyncResp->res.jsonValue["@odata.id"] = ++ telemetry::metricDefinitionUri + readingType; ++ asyncResp->res.jsonValue["@odata.type"] = ++ "#MetricDefinition.v1_0_3.MetricDefinition"; ++ asyncResp->res.jsonValue["MetricDataType"] = "Decimal"; ++ asyncResp->res.jsonValue["MetricType"] = "Numeric"; ++ asyncResp->res.jsonValue["IsLinear"] = true; ++ asyncResp->res.jsonValue["Implementation"] = ++ "PhysicalSensor"; ++ asyncResp->res.jsonValue["Units"] = ++ telemetry::readingTypeToReadingUnits(readingType); ++ ++ telemetry::addMetricProperty(*asyncResp, readingType, ++ uriToDbus); + }); + }); +} + +} // namespace redfish -diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp -index d986565..bccbb94 100644 ---- a/redfish-core/lib/sensors.hpp -+++ b/redfish-core/lib/sensors.hpp -@@ -111,46 +111,47 @@ inline const char* toReadingType(const std::string& sensorType) - return ""; - } - --inline const char* toReadingUnits(const std::string& sensorType) -+inline const char* toReadingUnits(const std::string& readingType) - { -- if (sensorType == "voltage") -+ if (readingType == "Voltage") - { - return "V"; - } -- if (sensorType == "power") -+ if (readingType == "Power") - { - return "W"; - } -- if (sensorType == "current") -+ if (readingType == "Current") - { - return "A"; - } -- if (sensorType == "fan_tach") -+ if (readingType == "Rotational") - { - return "RPM"; - } -- if (sensorType == "temperature") -+ if (readingType == "Temperature") - { - return "Cel"; - } -- if (sensorType == "fan_pwm" || sensorType == "utilization") -+ if (readingType == "Percent") - { - return "%"; - } -- if (sensorType == "altitude") -+ if (readingType == "Altitude") - { - return "m"; - } -- if (sensorType == "airflow") -+ if (readingType == "AirFlow") - { - return "cft_i/min"; - } -- if (sensorType == "energy") -+ if (readingType == "EnergyJoules") - { - return "J"; - } - return ""; - } -+ - } // namespace sensors - - /** -@@ -953,11 +954,11 @@ inline void objectInterfacesToJson( - sensorJson["ReadingType"] = readingType; - } - -- const std::string& readingUnits = sensors::toReadingUnits(sensorType); -+ const std::string& readingUnits = sensors::toReadingUnits(readingType); - if (readingUnits.empty()) - { - BMCWEB_LOG_ERROR << "Redfish cannot map reading unit for " -- << sensorType; -+ << readingType; - } - else - { diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp index ad86d5c..c4962e9 100644 --- a/redfish-core/lib/telemetry_service.hpp diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch index 0ca58a114..d32c85356 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Sync-Telmetry-service-with-EventService.patch @@ -1,4 +1,4 @@ -From 277d261ef3b1723c9d198baf4b84d2e01a7460b8 Mon Sep 17 00:00:00 2001 +From 77e8a0b5037a555b1520823b667595ac8780c675 Mon Sep 17 00:00:00 2001 From: "Wludzik, Jozef" Date: Tue, 15 Dec 2020 12:30:31 +0100 Subject: [PATCH] Sync Telmetry service with EventService @@ -22,7 +22,7 @@ Signed-off-by: Wludzik, Jozef 2 files changed, 69 insertions(+), 115 deletions(-) diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp -index 11190ef..ffe9435 100644 +index d89b789..4faaddd 100644 --- a/redfish-core/include/event_service_manager.hpp +++ b/redfish-core/include/event_service_manager.hpp @@ -14,6 +14,7 @@ @@ -33,7 +33,7 @@ index 11190ef..ffe9435 100644 #include "registries.hpp" #include "registries/base_message_registry.hpp" #include "registries/openbmc_message_registry.hpp" -@@ -522,47 +523,32 @@ class Subscription +@@ -511,47 +512,32 @@ class Subscription : public persistent_data::UserSubscription } #endif @@ -92,7 +92,7 @@ index 11190ef..ffe9435 100644 this->sendEvent( msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace)); } -@@ -1358,75 +1344,6 @@ class EventServiceManager +@@ -1317,75 +1303,6 @@ class EventServiceManager } #endif @@ -168,7 +168,7 @@ index 11190ef..ffe9435 100644 void unregisterMetricReportSignal() { if (matchTelemetryMonitor) -@@ -1446,9 +1363,11 @@ class EventServiceManager +@@ -1405,9 +1322,11 @@ class EventServiceManager } BMCWEB_LOG_DEBUG << "Metrics report signal - Register"; @@ -183,7 +183,7 @@ index 11190ef..ffe9435 100644 matchTelemetryMonitor = std::make_shared( *crow::connections::systemBus, matchStr, -@@ -1459,10 +1378,43 @@ class EventServiceManager +@@ -1418,10 +1337,43 @@ class EventServiceManager return; } @@ -232,10 +232,10 @@ index 11190ef..ffe9435 100644 } diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp -index 66f4f93..a43f6a6 100644 +index 63c8c19..7fe281d 100644 --- a/redfish-core/lib/metric_report.hpp +++ b/redfish-core/lib/metric_report.hpp -@@ -32,16 +32,14 @@ inline nlohmann::json toMetricValues(const Readings& readings) +@@ -33,16 +33,14 @@ inline nlohmann::json toMetricValues(const Readings& readings) return metricValues; } @@ -258,7 +258,7 @@ index 66f4f93..a43f6a6 100644 telemetry::metricReportDefinitionUri + id; const TimestampReadings* timestampReadings = -@@ -49,14 +47,14 @@ inline void fillReport(const std::shared_ptr& asyncResp, +@@ -50,14 +48,14 @@ inline void fillReport(const std::shared_ptr& asyncResp, if (!timestampReadings) { BMCWEB_LOG_ERROR << "Property type mismatch or property is missing"; @@ -277,7 +277,7 @@ index 66f4f93..a43f6a6 100644 } } // namespace telemetry -@@ -117,7 +115,11 @@ inline void requestRoutesMetricReport(App& app) +@@ -118,7 +116,11 @@ inline void requestRoutesMetricReport(App& app) return; } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch deleted file mode 100644 index 987a43b4c..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-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/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch new file mode 100644 index 000000000..20bcbabfa --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch @@ -0,0 +1,301 @@ +From fca6f5b951a363916a83a25f6578f95a6cf32a3e Mon Sep 17 00:00:00 2001 +From: Krzysztof Grobelny +Date: Thu, 17 Jun 2021 13:37:57 +0000 +Subject: [PATCH] Switched bmcweb to use new telemetry service API + +Added support for multiple MetricProperties. Added support for new +parameters: CollectionTimeScope, CollectionDuration. + +Tested: + - It is possible to create MetricReportDefinitions with multiple + MetricProperties. + - Stub values for new parameters are correctly passed to telemetry + service. + - All existing telemetry service functionalities remain unchanged. + +Change-Id: I2cd17069e3ea015c8f5571c29278f1d50536272a +Signed-off-by: Krzysztof Grobelny +--- + redfish-core/lib/metric_report_definition.hpp | 212 ++++++++++-------- + 1 file changed, 114 insertions(+), 98 deletions(-) + +diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp +index a0c4f1d..7c26787 100644 +--- a/redfish-core/lib/metric_report_definition.hpp ++++ b/redfish-core/lib/metric_report_definition.hpp +@@ -7,6 +7,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -17,87 +19,90 @@ namespace redfish + namespace telemetry + { + +-using ReadingParameters = +- std::vector>; ++using ReadingParameters = std::vector< ++ std::tuple, std::string, ++ std::string, std::string, std::string, uint64_t>>; + + inline void fillReportDefinition( + const std::shared_ptr& asyncResp, const std::string& id, + const std::vector< +- std::pair>>& ret) ++ std::pair>>& ++ properties) + { +- asyncResp->res.jsonValue["@odata.type"] = +- "#MetricReportDefinition.v1_3_0.MetricReportDefinition"; +- asyncResp->res.jsonValue["@odata.id"] = +- telemetry::metricReportDefinitionUri + id; +- asyncResp->res.jsonValue["Id"] = id; +- asyncResp->res.jsonValue["Name"] = id; +- asyncResp->res.jsonValue["MetricReport"]["@odata.id"] = +- telemetry::metricReportUri + id; +- asyncResp->res.jsonValue["Status"]["State"] = "Enabled"; +- asyncResp->res.jsonValue["ReportUpdates"] = "Overwrite"; +- +- const bool* emitsReadingsUpdate = nullptr; +- const bool* logToMetricReportsCollection = nullptr; +- const ReadingParameters* readingParams = nullptr; +- const std::string* reportingType = nullptr; +- const uint64_t* interval = nullptr; +- for (const auto& [key, var] : ret) ++ try + { +- if (key == "EmitsReadingsUpdate") ++ bool emitsReadingsUpdate = false; ++ bool logToMetricReportsCollection = false; ++ ReadingParameters readingParams; ++ std::string reportingType; ++ uint64_t interval = 0u; ++ ++ sdbusplus::unpackProperties( ++ properties, "EmitsReadingsUpdate", emitsReadingsUpdate, ++ "LogToMetricReportsCollection", logToMetricReportsCollection, ++ "ReadingParametersFutureVersion", readingParams, "ReportingType", ++ reportingType, "Interval", interval); ++ ++ std::vector redfishReportActions; ++ redfishReportActions.reserve(2); ++ if (emitsReadingsUpdate) + { +- emitsReadingsUpdate = std::get_if(&var); ++ redfishReportActions.emplace_back("RedfishEvent"); + } +- else if (key == "LogToMetricReportsCollection") ++ if (logToMetricReportsCollection) + { +- logToMetricReportsCollection = std::get_if(&var); ++ redfishReportActions.emplace_back("LogToMetricReportsCollection"); + } +- else if (key == "ReadingParameters") +- { +- readingParams = std::get_if(&var); +- } +- else if (key == "ReportingType") +- { +- reportingType = std::get_if(&var); +- } +- else if (key == "Interval") ++ ++ nlohmann::json metrics = nlohmann::json::array(); ++ for (auto& [sensorPath, operationType, id, metadata, ++ collectionTimeScope, collectionDuration] : readingParams) + { +- interval = std::get_if(&var); ++ std::vector metricProperties; ++ ++ nlohmann::json parsedMetadata = nlohmann::json::parse(metadata); ++ if (!json_util::readJson(parsedMetadata, asyncResp->res, ++ "MetricProperties", metricProperties)) ++ { ++ BMCWEB_LOG_ERROR << "Failed to read metadata"; ++ messages::internalError(asyncResp->res); ++ return; ++ } ++ ++ metrics.push_back({ ++ {"MetricId", id}, ++ {"MetricProperties", std::move(metricProperties)}, ++ }); + } +- } +- if (!emitsReadingsUpdate || !logToMetricReportsCollection || +- !readingParams || !reportingType || !interval) +- { +- BMCWEB_LOG_ERROR << "Property type mismatch or property is missing"; +- messages::internalError(asyncResp->res); +- return; +- } + +- std::vector redfishReportActions; +- redfishReportActions.reserve(2); +- if (*emitsReadingsUpdate) +- { +- redfishReportActions.emplace_back("RedfishEvent"); ++ asyncResp->res.jsonValue["@odata.type"] = ++ "#MetricReportDefinition.v1_3_0.MetricReportDefinition"; ++ asyncResp->res.jsonValue["@odata.id"] = ++ telemetry::metricReportDefinitionUri + id; ++ asyncResp->res.jsonValue["Id"] = id; ++ asyncResp->res.jsonValue["Name"] = id; ++ asyncResp->res.jsonValue["MetricReport"]["@odata.id"] = ++ telemetry::metricReportUri + id; ++ asyncResp->res.jsonValue["Status"]["State"] = "Enabled"; ++ asyncResp->res.jsonValue["ReportUpdates"] = "Overwrite"; ++ asyncResp->res.jsonValue["Metrics"] = metrics; ++ asyncResp->res.jsonValue["MetricReportDefinitionType"] = reportingType; ++ asyncResp->res.jsonValue["ReportActions"] = redfishReportActions; ++ asyncResp->res.jsonValue["Schedule"]["RecurrenceInterval"] = ++ time_utils::toDurationString(std::chrono::milliseconds(interval)); + } +- if (*logToMetricReportsCollection) ++ catch (const sdbusplus::exception::UnpackPropertyError& error) + { +- redfishReportActions.emplace_back("LogToMetricReportsCollection"); ++ BMCWEB_LOG_ERROR << error.what() << ", property: " ++ << error.propertyName + ", reason: " << error.reason; ++ messages::internalError(asyncResp->res); + } +- +- nlohmann::json metrics = nlohmann::json::array(); +- for (auto& [sensorPath, operationType, id, metadata] : *readingParams) ++ catch (const nlohmann::json::parse_error& e) + { +- metrics.push_back({ +- {"MetricId", id}, +- {"MetricProperties", {metadata}}, +- }); ++ BMCWEB_LOG_ERROR << "Failed to parse metadata: " << e.what(); ++ messages::internalError(asyncResp->res); + } +- asyncResp->res.jsonValue["Metrics"] = metrics; +- asyncResp->res.jsonValue["MetricReportDefinitionType"] = *reportingType; +- asyncResp->res.jsonValue["ReportActions"] = redfishReportActions; +- asyncResp->res.jsonValue["Schedule"]["RecurrenceInterval"] = +- time_utils::toDurationString(std::chrono::milliseconds(*interval)); + } + + struct AddReportArgs +@@ -275,6 +280,11 @@ class AddReport + + for (const auto& [id, uris] : args.metrics) + { ++ std::vector dbusPaths; ++ dbusPaths.reserve(uris.size()); ++ nlohmann::json metadata; ++ metadata["MetricProperties"] = nlohmann::json::array(); ++ + for (size_t i = 0; i < uris.size(); i++) + { + const std::string& uri = uris[i]; +@@ -291,8 +301,12 @@ class AddReport + } + + const std::string& dbusPath = el->second; +- readingParams.emplace_back(dbusPath, "SINGLE", id, uri); ++ dbusPaths.emplace_back(dbusPath); ++ metadata["MetricProperties"].emplace_back(uri); + } ++ ++ readingParams.emplace_back(dbusPaths, "SINGLE", id, metadata.dump(), ++ "Point", 0u); + } + const std::shared_ptr aResp = asyncResp; + crow::connections::systemBus->async_method_call( +@@ -330,10 +344,10 @@ class AddReport + messages::created(aResp->res); + }, + telemetry::service, "/xyz/openbmc_project/Telemetry/Reports", +- "xyz.openbmc_project.Telemetry.ReportManager", "AddReport", +- "TelemetryService/" + args.name, args.reportingType, +- args.emitsReadingsUpdate, args.logToMetricReportsCollection, +- args.interval, readingParams); ++ "xyz.openbmc_project.Telemetry.ReportManager", ++ "AddReportFutureVersion", "TelemetryService/" + args.name, ++ args.reportingType, args.emitsReadingsUpdate, ++ args.logToMetricReportsCollection, args.interval, readingParams); + } + + void insert(const boost::container::flat_map& el) +@@ -415,37 +429,39 @@ inline void requestRoutesMetricReportDefinition(App& app) + BMCWEB_ROUTE(app, + "/redfish/v1/TelemetryService/MetricReportDefinitions//") + .privileges(redfish::privileges::getMetricReportDefinition) +- .methods(boost::beast::http::verb::get)( +- [](const crow::Request&, +- const std::shared_ptr& asyncResp, +- const std::string& id) { +- crow::connections::systemBus->async_method_call( +- [asyncResp, id]( +- const boost::system::error_code ec, +- const std::vector>>& ret) { +- if (ec.value() == EBADR || +- ec == boost::system::errc::host_unreachable) +- { +- messages::resourceNotFound( +- asyncResp->res, "MetricReportDefinition", id); +- return; +- } +- if (ec) +- { +- BMCWEB_LOG_ERROR << "respHandler DBus error " << ec; +- messages::internalError(asyncResp->res); +- return; +- } ++ .methods( ++ boost::beast::http::verb::get)([](const crow::Request&, ++ const std::shared_ptr< ++ bmcweb::AsyncResp>& asyncResp, ++ const std::string& id) { ++ sdbusplus::asio::getAllProperties( ++ *crow::connections::systemBus, telemetry::service, ++ telemetry::getDbusReportPath(id), telemetry::reportInterface, ++ [asyncResp, ++ id](boost::system::error_code ec, ++ const std::vector>>& ++ properties) { ++ if (ec.value() == EBADR || ++ ec == boost::system::errc::host_unreachable) ++ { ++ messages::resourceNotFound( ++ asyncResp->res, "MetricReportDefinition", id); ++ return; ++ } ++ if (ec) ++ { ++ BMCWEB_LOG_ERROR << "respHandler DBus error " << ec; ++ messages::internalError(asyncResp->res); ++ return; ++ } ++ ++ telemetry::fillReportDefinition(asyncResp, id, properties); ++ }); ++ }); + +- telemetry::fillReportDefinition(asyncResp, id, ret); +- }, +- telemetry::service, telemetry::getDbusReportPath(id), +- "org.freedesktop.DBus.Properties", "GetAll", +- telemetry::reportInterface); +- }); + BMCWEB_ROUTE(app, + "/redfish/v1/TelemetryService/MetricReportDefinitions//") + .privileges(redfish::privileges::deleteMetricReportDefinitionCollection) +-- +2.25.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch new file mode 100644 index 000000000..3d60ae293 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch @@ -0,0 +1,267 @@ +From 79b3d35b864a2b545b4c9b2ac9390ea5dec169f5 Mon Sep 17 00:00:00 2001 +From: Szymon Dompke +Date: Mon, 28 Jun 2021 11:10:23 +0200 +Subject: [PATCH] Add support for MetricDefinition property in MetricReport + +Added MetricDefinition as part of MetricValues array returned by +MetricReport. It contains single @odata.id with URI to proper +MetricDefinition resource - depending on MetricProperty. + +Testing done: +- GET request on redfish/v1/TelemetryService/MetricReports + got response with MetricDefinition and proper id inside + MetricValues array. + +Testing steps: +1. POST on redfish/v1/TelemetryService/MetricReportDefinitions + with body: +{ + "Id": "PeriodicReport_1", + "MetricReportDefinitionType": "Periodic", + "ReportActions": [ + "LogToMetricReportsCollection", + "RedfishEvent" + ], + "Metrics": [ + { + "MetricId": "sensor_1", + "MetricProperties": [ + "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading" + ] + } + ], + "Schedule": { + "RecurrenceInterval": "PT10S" + } +} + +2. GET on redfish/v1/TelemetryService/MetricReports/PeriodicReport_1 + should return: +{ + "@odata.id": + "/redfish/v1/TelemetryService/MetricReports/PeriodicReport_1", + "@odata.type": "#MetricReport.v1_3_0.MetricReport", + "Id": "PeriodicReport_1", + "MetricReportDefinition": { + "@odata.id": + "/redfish/v1/TelemetryService/MetricReportDefinitions/PeriodicReport_1" + }, + "MetricValues": [ + { + "MetricDefinition": { + "@odata.id": + "/redfish/v1/TelemetryService/MetricDefinitions/Rotational" + }, + "MetricId": "sensor_1", + "MetricProperty": + "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading", + "MetricValue": "nan", + "Timestamp": "1970-01-01T00:03:21+00:00" + } + ], + "Name": "PeriodicReport_1", + "Timestamp": "1970-01-01T00:03:21+00:00" +} + +Change-Id: I7181c612f9b443015d551259bae25303aa436822 +Signed-off-by: Szymon Dompke +--- + meson.build | 4 +- + .../include/utils/telemetry_utils.hpp | 40 ++++++++++++ + redfish-core/lib/metric_report.hpp | 64 +++++++++++++++---- + redfish-core/lib/sensors.hpp | 2 + + 4 files changed, 95 insertions(+), 15 deletions(-) + +diff --git a/meson.build b/meson.build +index f6a66f1..6b5d9af 100644 +--- a/meson.build ++++ b/meson.build +@@ -355,6 +355,8 @@ srcfiles_unittest = ['include/ut/dbus_utility_test.cpp', + 'redfish-core/ut/time_utils_test.cpp', + 'http/ut/utility_test.cpp'] + ++srcfiles_unittest_dependencies = ['redfish-core/src/error_messages.cpp'] ++ + # Gather the Configuration data + + conf_data = configuration_data() +@@ -412,7 +414,7 @@ executable('bmcweb',srcfiles_bmcweb, + if(get_option('tests').enabled()) + foreach src_test : srcfiles_unittest + testname = src_test.split('/')[-1].split('.')[0] +- test(testname,executable(testname,src_test, ++ test(testname,executable(testname,[src_test] + srcfiles_unittest_dependencies, + include_directories : incdir, + install_dir: bindir, + dependencies: [ +diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp +index 1b4f75d..c0c5ba3 100644 +--- a/redfish-core/include/utils/telemetry_utils.hpp ++++ b/redfish-core/include/utils/telemetry_utils.hpp +@@ -17,6 +17,46 @@ constexpr const char* metricReportDefinitionUri = + constexpr const char* metricReportUri = + "/redfish/v1/TelemetryService/MetricReports/"; + ++inline std::optional ++ getMetadataJson(const std::string& metadataStr) ++{ ++ std::optional res = ++ nlohmann::json::parse(metadataStr, nullptr, false); ++ if (res->is_discarded()) ++ { ++ BMCWEB_LOG_ERROR << "Malformed reading metatadata JSON provided by " ++ "telemetry service."; ++ return std::nullopt; ++ } ++ return res; ++} ++ ++inline std::optional ++ readStringFromMetadata(const nlohmann::json& metadataJson, const char* key) ++{ ++ std::optional res; ++ if (auto it = metadataJson.find(key); it != metadataJson.end()) ++ { ++ if (const std::string* value = it->get_ptr()) ++ { ++ res = *value; ++ } ++ else ++ { ++ BMCWEB_LOG_ERROR << "Incorrect reading metatadata JSON provided by " ++ "telemetry service. Missing key '" ++ << key << "'."; ++ } ++ } ++ else ++ { ++ BMCWEB_LOG_ERROR << "Incorrect reading metatadata JSON provided by " ++ "telemetry service. Key '" ++ << key << "' has a wrong type."; ++ } ++ return res; ++} ++ + inline void + getReportCollection(const std::shared_ptr& asyncResp, + const std::string& uri) +diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp +index 7fe281d..13bf792 100644 +--- a/redfish-core/lib/metric_report.hpp ++++ b/redfish-core/lib/metric_report.hpp +@@ -1,5 +1,6 @@ + #pragma once + ++#include "sensors.hpp" + #include "utils/telemetry_utils.hpp" + + #include +@@ -15,34 +16,56 @@ using Readings = + std::vector>; + using TimestampReadings = std::tuple; + +-inline nlohmann::json toMetricValues(const Readings& readings) ++inline bool fillMetricValues(nlohmann::json& metricValues, ++ const Readings& readings) + { +- nlohmann::json metricValues = nlohmann::json::array_t(); +- +- for (auto& [id, metadata, sensorValue, timestamp] : readings) ++ for (auto& [id, metadataStr, sensorValue, timestamp] : readings) + { ++ std::optional readingMetadataJson = ++ getMetadataJson(metadataStr); ++ if (!readingMetadataJson) ++ { ++ return false; ++ } ++ ++ std::optional sensorDbusPath = ++ readStringFromMetadata(*readingMetadataJson, "SensorDbusPath"); ++ if (!sensorDbusPath) ++ { ++ return false; ++ } ++ ++ std::optional sensorRedfishUri = ++ readStringFromMetadata(*readingMetadataJson, "SensorRedfishUri"); ++ if (!sensorRedfishUri) ++ { ++ return false; ++ } ++ ++ std::string metricDefinition = ++ std::string(metricDefinitionUri) + ++ sensors::toReadingType( ++ sdbusplus::message::object_path(*sensorDbusPath) ++ .parent_path() ++ .filename()); ++ + metricValues.push_back({ ++ {"MetricDefinition", ++ nlohmann::json{{"@odata.id", metricDefinition}}}, + {"MetricId", id}, +- {"MetricProperty", metadata}, ++ {"MetricProperty", *sensorRedfishUri}, + {"MetricValue", std::to_string(sensorValue)}, + {"Timestamp", + crow::utility::getDateTime(static_cast(timestamp))}, + }); + } + +- return metricValues; ++ return true; + } + + inline bool fillReport(nlohmann::json& json, const std::string& id, + const std::variant& var) + { +- json["@odata.type"] = "#MetricReport.v1_3_0.MetricReport"; +- json["@odata.id"] = telemetry::metricReportUri + id; +- json["Id"] = id; +- json["Name"] = id; +- json["MetricReportDefinition"]["@odata.id"] = +- telemetry::metricReportDefinitionUri + id; +- + const TimestampReadings* timestampReadings = + std::get_if(&var); + if (!timestampReadings) +@@ -52,9 +75,22 @@ inline bool fillReport(nlohmann::json& json, const std::string& id, + } + + const auto& [timestamp, readings] = *timestampReadings; ++ nlohmann::json metricValues = nlohmann::json::array(); ++ if (!fillMetricValues(metricValues, readings)) ++ { ++ return false; ++ } ++ ++ json["@odata.type"] = "#MetricReport.v1_3_0.MetricReport"; ++ json["@odata.id"] = telemetry::metricReportUri + id; ++ json["Id"] = id; ++ json["Name"] = id; ++ json["MetricReportDefinition"]["@odata.id"] = ++ telemetry::metricReportDefinitionUri + id; + json["Timestamp"] = + crow::utility::getDateTime(static_cast(timestamp)); +- json["MetricValues"] = toMetricValues(readings); ++ json["MetricValues"] = metricValues; ++ + return true; + } + } // namespace telemetry +diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp +index cb7ea15..44c2129 100644 +--- a/redfish-core/lib/sensors.hpp ++++ b/redfish-core/lib/sensors.hpp +@@ -21,6 +21,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + +-- +2.25.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-event-service-fix-added-Context-field-to-response.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-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/0004-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/0005-Add-DELETE-method-for-MetricReport.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch new file mode 100644 index 000000000..aabe500f5 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Add-DELETE-method-for-MetricReport.patch @@ -0,0 +1,132 @@ +From 4cf883dba6e16c56d04dbd092d30c9a13d5a5eb4 Mon Sep 17 00:00:00 2001 +From: Lukasz Kazmierczak +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-Switched-bmcweb-to-use-new-telemetry-service-API.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch deleted file mode 100644 index 4e326ff88..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch +++ /dev/null @@ -1,301 +0,0 @@ -From 51869fd549cd826981ad30c6cdea4c4e94a972db Mon Sep 17 00:00:00 2001 -From: Krzysztof Grobelny -Date: Thu, 17 Jun 2021 13:37:57 +0000 -Subject: [PATCH] Switched bmcweb to use new telemetry service API - -Added support for multiple MetricProperties. Added support for new -parameters: CollectionTimeScope, CollectionDuration. - -Tested: - - It is possible to create MetricReportDefinitions with multiple - MetricProperties. - - Stub values for new parameters are correctly passed to telemetry - service. - - All existing telemetry service functionalities remain unchanged. - -Change-Id: I2cd17069e3ea015c8f5571c29278f1d50536272a -Signed-off-by: Krzysztof Grobelny ---- - redfish-core/lib/metric_report_definition.hpp | 212 ++++++++++-------- - 1 file changed, 114 insertions(+), 98 deletions(-) - -diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp -index a0c4f1d..7c26787 100644 ---- a/redfish-core/lib/metric_report_definition.hpp -+++ b/redfish-core/lib/metric_report_definition.hpp -@@ -7,6 +7,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -17,87 +19,90 @@ namespace redfish - namespace telemetry - { - --using ReadingParameters = -- std::vector>; -+using ReadingParameters = std::vector< -+ std::tuple, std::string, -+ std::string, std::string, std::string, uint64_t>>; - - inline void fillReportDefinition( - const std::shared_ptr& asyncResp, const std::string& id, - const std::vector< -- std::pair>>& ret) -+ std::pair>>& -+ properties) - { -- asyncResp->res.jsonValue["@odata.type"] = -- "#MetricReportDefinition.v1_3_0.MetricReportDefinition"; -- asyncResp->res.jsonValue["@odata.id"] = -- telemetry::metricReportDefinitionUri + id; -- asyncResp->res.jsonValue["Id"] = id; -- asyncResp->res.jsonValue["Name"] = id; -- asyncResp->res.jsonValue["MetricReport"]["@odata.id"] = -- telemetry::metricReportUri + id; -- asyncResp->res.jsonValue["Status"]["State"] = "Enabled"; -- asyncResp->res.jsonValue["ReportUpdates"] = "Overwrite"; -- -- const bool* emitsReadingsUpdate = nullptr; -- const bool* logToMetricReportsCollection = nullptr; -- const ReadingParameters* readingParams = nullptr; -- const std::string* reportingType = nullptr; -- const uint64_t* interval = nullptr; -- for (const auto& [key, var] : ret) -+ try - { -- if (key == "EmitsReadingsUpdate") -+ bool emitsReadingsUpdate = false; -+ bool logToMetricReportsCollection = false; -+ ReadingParameters readingParams; -+ std::string reportingType; -+ uint64_t interval = 0u; -+ -+ sdbusplus::unpackProperties( -+ properties, "EmitsReadingsUpdate", emitsReadingsUpdate, -+ "LogToMetricReportsCollection", logToMetricReportsCollection, -+ "ReadingParametersFutureVersion", readingParams, "ReportingType", -+ reportingType, "Interval", interval); -+ -+ std::vector redfishReportActions; -+ redfishReportActions.reserve(2); -+ if (emitsReadingsUpdate) - { -- emitsReadingsUpdate = std::get_if(&var); -+ redfishReportActions.emplace_back("RedfishEvent"); - } -- else if (key == "LogToMetricReportsCollection") -+ if (logToMetricReportsCollection) - { -- logToMetricReportsCollection = std::get_if(&var); -+ redfishReportActions.emplace_back("LogToMetricReportsCollection"); - } -- else if (key == "ReadingParameters") -- { -- readingParams = std::get_if(&var); -- } -- else if (key == "ReportingType") -- { -- reportingType = std::get_if(&var); -- } -- else if (key == "Interval") -+ -+ nlohmann::json metrics = nlohmann::json::array(); -+ for (auto& [sensorPath, operationType, id, metadata, -+ collectionTimeScope, collectionDuration] : readingParams) - { -- interval = std::get_if(&var); -+ std::vector metricProperties; -+ -+ nlohmann::json parsedMetadata = nlohmann::json::parse(metadata); -+ if (!json_util::readJson(parsedMetadata, asyncResp->res, -+ "MetricProperties", metricProperties)) -+ { -+ BMCWEB_LOG_ERROR << "Failed to read metadata"; -+ messages::internalError(asyncResp->res); -+ return; -+ } -+ -+ metrics.push_back({ -+ {"MetricId", id}, -+ {"MetricProperties", std::move(metricProperties)}, -+ }); - } -- } -- if (!emitsReadingsUpdate || !logToMetricReportsCollection || -- !readingParams || !reportingType || !interval) -- { -- BMCWEB_LOG_ERROR << "Property type mismatch or property is missing"; -- messages::internalError(asyncResp->res); -- return; -- } - -- std::vector redfishReportActions; -- redfishReportActions.reserve(2); -- if (*emitsReadingsUpdate) -- { -- redfishReportActions.emplace_back("RedfishEvent"); -+ asyncResp->res.jsonValue["@odata.type"] = -+ "#MetricReportDefinition.v1_3_0.MetricReportDefinition"; -+ asyncResp->res.jsonValue["@odata.id"] = -+ telemetry::metricReportDefinitionUri + id; -+ asyncResp->res.jsonValue["Id"] = id; -+ asyncResp->res.jsonValue["Name"] = id; -+ asyncResp->res.jsonValue["MetricReport"]["@odata.id"] = -+ telemetry::metricReportUri + id; -+ asyncResp->res.jsonValue["Status"]["State"] = "Enabled"; -+ asyncResp->res.jsonValue["ReportUpdates"] = "Overwrite"; -+ asyncResp->res.jsonValue["Metrics"] = metrics; -+ asyncResp->res.jsonValue["MetricReportDefinitionType"] = reportingType; -+ asyncResp->res.jsonValue["ReportActions"] = redfishReportActions; -+ asyncResp->res.jsonValue["Schedule"]["RecurrenceInterval"] = -+ time_utils::toDurationString(std::chrono::milliseconds(interval)); - } -- if (*logToMetricReportsCollection) -+ catch (const sdbusplus::exception::UnpackPropertyError& error) - { -- redfishReportActions.emplace_back("LogToMetricReportsCollection"); -+ BMCWEB_LOG_ERROR << error.what() << ", property: " -+ << error.propertyName + ", reason: " << error.reason; -+ messages::internalError(asyncResp->res); - } -- -- nlohmann::json metrics = nlohmann::json::array(); -- for (auto& [sensorPath, operationType, id, metadata] : *readingParams) -+ catch (const nlohmann::json::parse_error& e) - { -- metrics.push_back({ -- {"MetricId", id}, -- {"MetricProperties", {metadata}}, -- }); -+ BMCWEB_LOG_ERROR << "Failed to parse metadata: " << e.what(); -+ messages::internalError(asyncResp->res); - } -- asyncResp->res.jsonValue["Metrics"] = metrics; -- asyncResp->res.jsonValue["MetricReportDefinitionType"] = *reportingType; -- asyncResp->res.jsonValue["ReportActions"] = redfishReportActions; -- asyncResp->res.jsonValue["Schedule"]["RecurrenceInterval"] = -- time_utils::toDurationString(std::chrono::milliseconds(*interval)); - } - - struct AddReportArgs -@@ -275,6 +280,11 @@ class AddReport - - for (const auto& [id, uris] : args.metrics) - { -+ std::vector dbusPaths; -+ dbusPaths.reserve(uris.size()); -+ nlohmann::json metadata; -+ metadata["MetricProperties"] = nlohmann::json::array(); -+ - for (size_t i = 0; i < uris.size(); i++) - { - const std::string& uri = uris[i]; -@@ -291,8 +301,12 @@ class AddReport - } - - const std::string& dbusPath = el->second; -- readingParams.emplace_back(dbusPath, "SINGLE", id, uri); -+ dbusPaths.emplace_back(dbusPath); -+ metadata["MetricProperties"].emplace_back(uri); - } -+ -+ readingParams.emplace_back(dbusPaths, "SINGLE", id, metadata.dump(), -+ "Point", 0u); - } - const std::shared_ptr aResp = asyncResp; - crow::connections::systemBus->async_method_call( -@@ -330,10 +344,10 @@ class AddReport - messages::created(aResp->res); - }, - telemetry::service, "/xyz/openbmc_project/Telemetry/Reports", -- "xyz.openbmc_project.Telemetry.ReportManager", "AddReport", -- "TelemetryService/" + args.name, args.reportingType, -- args.emitsReadingsUpdate, args.logToMetricReportsCollection, -- args.interval, readingParams); -+ "xyz.openbmc_project.Telemetry.ReportManager", -+ "AddReportFutureVersion", "TelemetryService/" + args.name, -+ args.reportingType, args.emitsReadingsUpdate, -+ args.logToMetricReportsCollection, args.interval, readingParams); - } - - void insert(const boost::container::flat_map& el) -@@ -415,37 +429,39 @@ inline void requestRoutesMetricReportDefinition(App& app) - BMCWEB_ROUTE(app, - "/redfish/v1/TelemetryService/MetricReportDefinitions//") - .privileges(redfish::privileges::getMetricReportDefinition) -- .methods(boost::beast::http::verb::get)( -- [](const crow::Request&, -- const std::shared_ptr& asyncResp, -- const std::string& id) { -- crow::connections::systemBus->async_method_call( -- [asyncResp, id]( -- const boost::system::error_code ec, -- const std::vector>>& ret) { -- if (ec.value() == EBADR || -- ec == boost::system::errc::host_unreachable) -- { -- messages::resourceNotFound( -- asyncResp->res, "MetricReportDefinition", id); -- return; -- } -- if (ec) -- { -- BMCWEB_LOG_ERROR << "respHandler DBus error " << ec; -- messages::internalError(asyncResp->res); -- return; -- } -+ .methods( -+ boost::beast::http::verb::get)([](const crow::Request&, -+ const std::shared_ptr< -+ bmcweb::AsyncResp>& asyncResp, -+ const std::string& id) { -+ sdbusplus::asio::getAllProperties( -+ *crow::connections::systemBus, telemetry::service, -+ telemetry::getDbusReportPath(id), telemetry::reportInterface, -+ [asyncResp, -+ id](boost::system::error_code ec, -+ const std::vector>>& -+ properties) { -+ if (ec.value() == EBADR || -+ ec == boost::system::errc::host_unreachable) -+ { -+ messages::resourceNotFound( -+ asyncResp->res, "MetricReportDefinition", id); -+ return; -+ } -+ if (ec) -+ { -+ BMCWEB_LOG_ERROR << "respHandler DBus error " << ec; -+ messages::internalError(asyncResp->res); -+ return; -+ } -+ -+ telemetry::fillReportDefinition(asyncResp, id, properties); -+ }); -+ }); - -- telemetry::fillReportDefinition(asyncResp, id, ret); -- }, -- telemetry::service, telemetry::getDbusReportPath(id), -- "org.freedesktop.DBus.Properties", "GetAll", -- telemetry::reportInterface); -- }); - BMCWEB_ROUTE(app, - "/redfish/v1/TelemetryService/MetricReportDefinitions//") - .privileges(redfish::privileges::deleteMetricReportDefinitionCollection) --- -2.25.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch new file mode 100644 index 000000000..0646aba5c --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-GET-method-for-TriggerCollection.patch @@ -0,0 +1,313 @@ +From a1e89d356ba5ed594a1494efe8257946e1062396 Mon Sep 17 00:00:00 2001 +From: Lukasz Kazmierczak +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-support-for-MetricDefinition-property-in-MetricReport.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch deleted file mode 100644 index d3a7c0a35..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch +++ /dev/null @@ -1,268 +0,0 @@ -From d37ba16f837380ea5fbd7fae2d0f2e229c601754 Mon Sep 17 00:00:00 2001 -From: Szymon Dompke -Date: Mon, 28 Jun 2021 11:10:23 +0200 -Subject: [PATCH] Add support for MetricDefinition property in MetricReport - -Added MetricDefinition as part of MetricValues array returned by -MetricReport. It contains single @odata.id with URI to proper -MetricDefinition resource - depending on MetricProperty. - -Testing done: -- GET request on redfish/v1/TelemetryService/MetricReports - got response with MetricDefinition and proper id inside - MetricValues array. - -Testing steps: -1. POST on redfish/v1/TelemetryService/MetricReportDefinitions - with body: -{ - "Id": "PeriodicReport_1", - "MetricReportDefinitionType": "Periodic", - "ReportActions": [ - "LogToMetricReportsCollection", - "RedfishEvent" - ], - "Metrics": [ - { - "MetricId": "sensor_1", - "MetricProperties": [ - "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading" - ] - } - ], - "Schedule": { - "RecurrenceInterval": "PT10S" - } -} - -2. GET on redfish/v1/TelemetryService/MetricReports/PeriodicReport_1 - should return: -{ - "@odata.id": - "/redfish/v1/TelemetryService/MetricReports/PeriodicReport_1", - "@odata.type": "#MetricReport.v1_3_0.MetricReport", - "Id": "PeriodicReport_1", - "MetricReportDefinition": { - "@odata.id": - "/redfish/v1/TelemetryService/MetricReportDefinitions/PeriodicReport_1" - }, - "MetricValues": [ - { - "MetricDefinition": { - "@odata.id": - "/redfish/v1/TelemetryService/MetricDefinitions/Rotational" - }, - "MetricId": "sensor_1", - "MetricProperty": - "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading", - "MetricValue": "nan", - "Timestamp": "1970-01-01T00:03:21+00:00" - } - ], - "Name": "PeriodicReport_1", - "Timestamp": "1970-01-01T00:03:21+00:00" -} - -Change-Id: I7181c612f9b443015d551259bae25303aa436822 -Signed-off-by: Szymon Dompke ---- - meson.build | 4 +- - .../include/utils/telemetry_utils.hpp | 40 ++++++++++++ - redfish-core/lib/metric_report.hpp | 64 +++++++++++++++---- - redfish-core/lib/sensors.hpp | 2 + - 4 files changed, 95 insertions(+), 15 deletions(-) - -diff --git a/meson.build b/meson.build -index bdc514b..aadfd7d 100644 ---- a/meson.build -+++ b/meson.build -@@ -354,6 +354,8 @@ srcfiles_unittest = ['include/ut/dbus_utility_test.cpp', - 'redfish-core/ut/time_utils_test.cpp', - 'http/ut/utility_test.cpp'] - -+srcfiles_unittest_dependencies = ['redfish-core/src/error_messages.cpp'] -+ - # Gather the Configuration data - - conf_data = configuration_data() -@@ -411,7 +413,7 @@ executable('bmcweb',srcfiles_bmcweb, - if(get_option('tests').enabled()) - foreach src_test : srcfiles_unittest - testname = src_test.split('/')[-1].split('.')[0] -- test(testname,executable(testname,src_test, -+ test(testname,executable(testname,[src_test] + srcfiles_unittest_dependencies, - include_directories : incdir, - install_dir: bindir, - dependencies: [ -diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp -index 1b4f75d..c0c5ba3 100644 ---- a/redfish-core/include/utils/telemetry_utils.hpp -+++ b/redfish-core/include/utils/telemetry_utils.hpp -@@ -17,6 +17,46 @@ constexpr const char* metricReportDefinitionUri = - constexpr const char* metricReportUri = - "/redfish/v1/TelemetryService/MetricReports/"; - -+inline std::optional -+ getMetadataJson(const std::string& metadataStr) -+{ -+ std::optional res = -+ nlohmann::json::parse(metadataStr, nullptr, false); -+ if (res->is_discarded()) -+ { -+ BMCWEB_LOG_ERROR << "Malformed reading metatadata JSON provided by " -+ "telemetry service."; -+ return std::nullopt; -+ } -+ return res; -+} -+ -+inline std::optional -+ readStringFromMetadata(const nlohmann::json& metadataJson, const char* key) -+{ -+ std::optional res; -+ if (auto it = metadataJson.find(key); it != metadataJson.end()) -+ { -+ if (const std::string* value = it->get_ptr()) -+ { -+ res = *value; -+ } -+ else -+ { -+ BMCWEB_LOG_ERROR << "Incorrect reading metatadata JSON provided by " -+ "telemetry service. Missing key '" -+ << key << "'."; -+ } -+ } -+ else -+ { -+ BMCWEB_LOG_ERROR << "Incorrect reading metatadata JSON provided by " -+ "telemetry service. Key '" -+ << key << "' has a wrong type."; -+ } -+ return res; -+} -+ - inline void - getReportCollection(const std::shared_ptr& asyncResp, - const std::string& uri) -diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp -index 7fe281d..13bf792 100644 ---- a/redfish-core/lib/metric_report.hpp -+++ b/redfish-core/lib/metric_report.hpp -@@ -1,5 +1,6 @@ - #pragma once - -+#include "sensors.hpp" - #include "utils/telemetry_utils.hpp" - - #include -@@ -15,34 +16,56 @@ using Readings = - std::vector>; - using TimestampReadings = std::tuple; - --inline nlohmann::json toMetricValues(const Readings& readings) -+inline bool fillMetricValues(nlohmann::json& metricValues, -+ const Readings& readings) - { -- nlohmann::json metricValues = nlohmann::json::array_t(); -- -- for (auto& [id, metadata, sensorValue, timestamp] : readings) -+ for (auto& [id, metadataStr, sensorValue, timestamp] : readings) - { -+ std::optional readingMetadataJson = -+ getMetadataJson(metadataStr); -+ if (!readingMetadataJson) -+ { -+ return false; -+ } -+ -+ std::optional sensorDbusPath = -+ readStringFromMetadata(*readingMetadataJson, "SensorDbusPath"); -+ if (!sensorDbusPath) -+ { -+ return false; -+ } -+ -+ std::optional sensorRedfishUri = -+ readStringFromMetadata(*readingMetadataJson, "SensorRedfishUri"); -+ if (!sensorRedfishUri) -+ { -+ return false; -+ } -+ -+ std::string metricDefinition = -+ std::string(metricDefinitionUri) + -+ sensors::toReadingType( -+ sdbusplus::message::object_path(*sensorDbusPath) -+ .parent_path() -+ .filename()); -+ - metricValues.push_back({ -+ {"MetricDefinition", -+ nlohmann::json{{"@odata.id", metricDefinition}}}, - {"MetricId", id}, -- {"MetricProperty", metadata}, -+ {"MetricProperty", *sensorRedfishUri}, - {"MetricValue", std::to_string(sensorValue)}, - {"Timestamp", - crow::utility::getDateTime(static_cast(timestamp))}, - }); - } - -- return metricValues; -+ return true; - } - - inline bool fillReport(nlohmann::json& json, const std::string& id, - const std::variant& var) - { -- json["@odata.type"] = "#MetricReport.v1_3_0.MetricReport"; -- json["@odata.id"] = telemetry::metricReportUri + id; -- json["Id"] = id; -- json["Name"] = id; -- json["MetricReportDefinition"]["@odata.id"] = -- telemetry::metricReportDefinitionUri + id; -- - const TimestampReadings* timestampReadings = - std::get_if(&var); - if (!timestampReadings) -@@ -52,9 +75,22 @@ inline bool fillReport(nlohmann::json& json, const std::string& id, - } - - const auto& [timestamp, readings] = *timestampReadings; -+ nlohmann::json metricValues = nlohmann::json::array(); -+ if (!fillMetricValues(metricValues, readings)) -+ { -+ return false; -+ } -+ -+ json["@odata.type"] = "#MetricReport.v1_3_0.MetricReport"; -+ json["@odata.id"] = telemetry::metricReportUri + id; -+ json["Id"] = id; -+ json["Name"] = id; -+ json["MetricReportDefinition"]["@odata.id"] = -+ telemetry::metricReportDefinitionUri + id; - json["Timestamp"] = - crow::utility::getDateTime(static_cast(timestamp)); -- json["MetricValues"] = toMetricValues(readings); -+ json["MetricValues"] = metricValues; -+ - return true; - } - } // namespace telemetry -diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp -index bccbb94..3e1d003 100644 ---- a/redfish-core/lib/sensors.hpp -+++ b/redfish-core/lib/sensors.hpp -@@ -21,6 +21,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - --- -2.25.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch deleted file mode 100644 index 1cdd59d4b..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 872a7bdb9c272944914d7c5babc751e6bb33afec Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Adrian=20Ambro=C5=BCewicz?= -Date: Tue, 3 Aug 2021 13:59:31 +0200 -Subject: [PATCH] Generalize ReadingType in MetricDefinition - -Recent addition of PMT required adding new type of sensor 'count', which -doesnt comply with any of Redfish-defined Sensor.ReadingType values. - -To support property of this kind MetricDefinition implementation was -altered to support sensor types not covered by Redfish types by -a 'fallback' to direct usage of sensor type. Populating 'Units' was also -modified, so it won't be shown if value does not have any units mapped. - -Testing: -- PMT counters are shown properly in MetricDefinitions/Count -- Redfish Validator passes ---- - redfish-core/lib/metric_definition.hpp | 63 ++++++++++++++++---------- - 1 file changed, 39 insertions(+), 24 deletions(-) - -diff --git a/redfish-core/lib/metric_definition.hpp b/redfish-core/lib/metric_definition.hpp -index 2443996..fcab44d 100644 ---- a/redfish-core/lib/metric_definition.hpp -+++ b/redfish-core/lib/metric_definition.hpp -@@ -11,6 +11,18 @@ namespace redfish - namespace telemetry - { - -+std::string groupName(const std::string& sensorType) -+{ -+ std::string group = sensors::toReadingType(sensorType); -+ if (group.empty()) -+ { -+ // Fallback for types not covered by standard Redfish Sensor.ReadingType -+ group = sensorType; -+ group[0] = static_cast(std::toupper(group[0])); -+ } -+ return group; -+} -+ - void addMembers(crow::Response& res, - const boost::container::flat_map& el) - { -@@ -30,8 +42,7 @@ void addMembers(crow::Response& res, - nlohmann::json& members = res.jsonValue["Members"]; - - const std::string odataId = -- std::string(telemetry::metricDefinitionUri) + -- sensors::toReadingType(type); -+ std::string(telemetry::metricDefinitionUri) + groupName(type); - - const auto it = std::find_if(members.begin(), members.end(), - [&odataId](const nlohmann::json& item) { -@@ -125,15 +136,15 @@ inline void requestRoutesMetricDefinitionCollection(App& app) - namespace telemetry - { - --bool isSensorIdSupported(std::string_view readingType) -+bool isSensorIdSupported(std::string_view group) - { - for (const std::pair>& - typeToPaths : sensors::dbus::paths) - { - for (const char* supportedPath : typeToPaths.second) - { -- if (readingType == -- sensors::toReadingType( -+ if (group == -+ groupName( - sdbusplus::message::object_path(supportedPath).filename())) - { - return true; -@@ -144,7 +155,7 @@ bool isSensorIdSupported(std::string_view readingType) - } - - void addMetricProperty( -- bmcweb::AsyncResp& asyncResp, const std::string& readingType, -+ bmcweb::AsyncResp& asyncResp, const std::string& group, - const boost::container::flat_map& el) - { - nlohmann::json& metricProperties = -@@ -155,7 +166,7 @@ void addMetricProperty( - std::string sensorId; - if (dbus::utility::getNthStringFromPath(dbusSensor, 3, sensorId)) - { -- if (sensors::toReadingType(sensorId) == readingType) -+ if (groupName(sensorId) == group) - { - metricProperties.push_back(redfishSensor); - } -@@ -172,33 +183,37 @@ inline void requestRoutesMetricDefinition(App& app) - .methods(boost::beast::http::verb::get)( - [](const crow::Request&, - const std::shared_ptr& asyncResp, -- const std::string& readingType) { -- if (!telemetry::isSensorIdSupported(readingType)) -+ const std::string& group) { -+ if (!telemetry::isSensorIdSupported(group)) - { - messages::resourceNotFound(asyncResp->res, -- "MetricDefinition", readingType); -+ "MetricDefinition", group); - return; - } - - asyncResp->res.jsonValue["MetricProperties"] = - nlohmann::json::array(); -- asyncResp->res.jsonValue["Id"] = readingType; -- asyncResp->res.jsonValue["Name"] = readingType; -+ asyncResp->res.jsonValue["Id"] = group; -+ asyncResp->res.jsonValue["Name"] = group; - asyncResp->res.jsonValue["@odata.id"] = -- telemetry::metricDefinitionUri + readingType; -+ telemetry::metricDefinitionUri + group; - asyncResp->res.jsonValue["@odata.type"] = - "#MetricDefinition.v1_0_3.MetricDefinition"; - asyncResp->res.jsonValue["MetricDataType"] = "Decimal"; - asyncResp->res.jsonValue["MetricType"] = "Numeric"; - asyncResp->res.jsonValue["IsLinear"] = true; - asyncResp->res.jsonValue["Implementation"] = "PhysicalSensor"; -- asyncResp->res.jsonValue["Units"] = -- sensors::toReadingUnits(readingType); -+ -+ std::string readingUnits = sensors::toReadingUnits(group); -+ if (!readingUnits.empty()) -+ { -+ asyncResp->res.jsonValue["Units"] = readingUnits; -+ } - - utils::getChassisNames( -- [asyncResp, readingType]( -- boost::system::error_code ec, -- const std::vector& chassisNames) { -+ [asyncResp, -+ group](boost::system::error_code ec, -+ const std::vector& chassisNames) { - if (ec) - { - messages::internalError(asyncResp->res); -@@ -208,10 +223,10 @@ inline void requestRoutesMetricDefinition(App& app) - } - - auto handleRetrieveUriToDbusMap = -- [asyncResp, readingType]( -- const boost::beast::http::status status, -- const boost::container::flat_map< -- std::string, std::string>& uriToDbus) { -+ [asyncResp, -+ group](const boost::beast::http::status status, -+ const boost::container::flat_map< -+ std::string, std::string>& uriToDbus) { - if (status != boost::beast::http::status::ok) - { - BMCWEB_LOG_ERROR -@@ -221,8 +236,8 @@ inline void requestRoutesMetricDefinition(App& app) - messages::internalError(asyncResp->res); - return; - } -- telemetry::addMetricProperty( -- *asyncResp, readingType, uriToDbus); -+ telemetry::addMetricProperty(*asyncResp, group, -+ uriToDbus); - }; - - for (const std::string& chassisName : chassisNames) --- -2.25.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/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 new file mode 100644 index 000000000..987a43b4c --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0007-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/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 new file mode 100644 index 000000000..ffab743f6 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0008-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/0009-Generalize-ReadingType-in-MetricDefinition.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch new file mode 100644 index 000000000..bd6e64346 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch @@ -0,0 +1,93 @@ +From d9baec3ccdff5ed4d1620f374a252c769de5b45b Mon Sep 17 00:00:00 2001 +From: Krzysztof Grobelny +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 cd15a815c..8dab07e2b 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/README @@ -3,22 +3,28 @@ Until change is integrated they will be manually merged here to enable feature i Current revisions: - Add support for MetricDefinition scheme - https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/89 + https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33363/93 - Sync Telmetry service with EventService - https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/36 - -- LogService field, actual implementation will be upstreamed with triggers feature - file://telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch - -- Event service fix for Context field - file://telemetry/0004-event-service-fix-added-Context-field-to-response.patch + https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38798/40 - Switched bmcweb to use new telemetry service API - https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44270/4 + https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44270/5 - Add support for MetricDefinition property in MetricReport - https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44512/8 + https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44512/9 + +- Add DELETE method for MetricReport + https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/45688/5 + +- Add GET method for TriggerCollection + file://telemetry/0006-Add-GET-method-for-TriggerCollection.patch + +- LogService field, actual implementation will be upstreamed with triggers feature + file://telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch + +- Event service fix for Context field + file://telemetry/0008-event-service-fix-added-Context-field-to-response.patch - Generalize ReadingType in MetricDefinition - file://telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch \ No newline at end of file + file://telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch index b29082dce..439b05b3c 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0004-Invalid-status-code-from-InsertMedia-REST-methods.patch @@ -1,4 +1,4 @@ -From 95f7ca477a8353fa7b99f463de9ee310dda13735 Mon Sep 17 00:00:00 2001 +From 437a2a854303ed4e05344684b1990806464268cd Mon Sep 17 00:00:00 2001 From: Krzysztof Grobelny Date: Thu, 1 Jul 2021 10:08:27 +0000 Subject: [PATCH] Invalid status code from InsertMedia REST methods GET, PUT, @@ -10,15 +10,16 @@ Not allowed for Legacy and Not found for Proxy. Change-Id: Ib4c0a3e9a2a8853caa74c59239d9fcfed99c5e8b Signed-off-by: Alicja Rybak +Signed-off-by: P Dheeraj Srujan Kumar --- - redfish-core/lib/virtual_media.hpp | 129 +++++++++++++++++++++++++++++ - 1 file changed, 129 insertions(+) + redfish-core/lib/virtual_media.hpp | 137 +++++++++++++++++++++++++++++ + 1 file changed, 137 insertions(+) diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp -index a834c69..186c04b 100644 +index 3b9f7ef..7d77b9f 100644 --- a/redfish-core/lib/virtual_media.hpp +++ b/redfish-core/lib/virtual_media.hpp -@@ -28,6 +28,109 @@ +@@ -30,6 +30,117 @@ namespace redfish { @@ -50,6 +51,14 @@ index a834c69..186c04b 100644 + + return; + } ++ ++ if (getObjectType.size() == 0) ++ { ++ BMCWEB_LOG_ERROR << "ObjectMapper : No Service found"; ++ aResp->res.result(boost::beast::http::status::not_found); ++ return; ++ } ++ + std::string service = getObjectType.begin()->first; + BMCWEB_LOG_DEBUG << "GetObjectType: " << service; + @@ -128,7 +137,7 @@ index a834c69..186c04b 100644 /** * @brief Function extracts transfer protocol name from URI. */ -@@ -829,6 +932,32 @@ inline void doVmAction(const std::shared_ptr& asyncResp, +@@ -844,6 +955,32 @@ inline void doVmAction(const std::shared_ptr& asyncResp, inline void requestNBDVirtualMediaRoutes(App& app) { @@ -160,7 +169,7 @@ index a834c69..186c04b 100644 + BMCWEB_ROUTE(app, "/redfish/v1/Managers//VirtualMedia//Actions/" "VirtualMedia.InsertMedia") - .privileges({{"ConfigureManager"}}) + .privileges(redfish::privileges::postVirtualMedia) -- -2.25.1 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend index b448121bf..0a7d18085 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -1,16 +1,16 @@ SRC_URI = "git://github.com/openbmc/bmcweb.git" -SRCREV = "e6a716506447d2d03b99f1cd2007e207a6dfcae0" +SRCREV = "abb93cdd0a49be03bf2fe95f07823686b289ecd5" DEPENDS += "boost-url" -RDEPENDS_${PN} += "phosphor-nslcd-authority-cert-config" +RDEPENDS:${PN} += "phosphor-nslcd-authority-cert-config" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" # add a user called bmcweb for the server to assume # bmcweb is part of group shadow for non-root pam authentication -USERADD_PARAM_${PN} = "-r -s /usr/sbin/nologin -d /home/bmcweb -m -G shadow bmcweb" +USERADD_PARAM:${PN} = "-r -s /usr/sbin/nologin -d /home/bmcweb -m -G shadow bmcweb" -GROUPADD_PARAM_${PN} = "web; redfish " +GROUPADD_PARAM:${PN} = "web; redfish " SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \ file://0002-Use-chip-id-based-UUID-for-Service-Root.patch \ @@ -28,7 +28,6 @@ SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \ file://0021-Add-message-registry-entry-for-FirmwareResiliencyErr.patch \ file://0023-Add-get-IPMI-session-id-s-to-Redfish.patch \ file://0024-Add-count-sensor-type.patch \ - file://0025-Revert-Support-new-boot-override-setting-design.patch \ " # OOB Bios Config: @@ -63,15 +62,17 @@ SRC_URI += "file://eventservice/0001-EventService-Fix-retry-handling-for-http-cl # Temporary downstream mirror of upstream patches, see telemetry\README for details SRC_URI += " file://telemetry/0001-Add-support-for-MetricDefinition-scheme.patch \ file://telemetry/0002-Sync-Telmetry-service-with-EventService.patch \ - file://telemetry/0003-Revert-Remove-LogService-from-TelemetryService.patch \ - file://telemetry/0004-event-service-fix-added-Context-field-to-response.patch \ - file://telemetry/0005-Switched-bmcweb-to-use-new-telemetry-service-API.patch \ - file://telemetry/0006-Add-support-for-MetricDefinition-property-in-MetricReport.patch \ - file://telemetry/0007-Generalize-ReadingType-in-MetricDefinition.patch \ + file://telemetry/0003-Switched-bmcweb-to-use-new-telemetry-service-API.patch \ + file://telemetry/0004-Add-support-for-MetricDefinition-property-in-MetricReport.patch \ + file://telemetry/0005-Add-DELETE-method-for-MetricReport.patch \ + file://telemetry/0006-Add-GET-method-for-TriggerCollection.patch \ + file://telemetry/0007-Revert-Remove-LogService-from-TelemetryService.patch \ + file://telemetry/0008-event-service-fix-added-Context-field-to-response.patch \ + file://telemetry/0009-Generalize-ReadingType-in-MetricDefinition.patch \ " # Temporary fix: Move it to service file -do_install_append() { +do_install:append() { install -d ${D}/var/lib/bmcweb install -d ${D}/etc/ssl/certs/authority } @@ -84,6 +85,6 @@ EXTRA_OEMESON += " -Dvm-nbdproxy=enabled" # Disable dependency on external nbd-proxy application EXTRA_OEMESON += " -Dvm-websocket=disabled" -RDEPENDS_${PN}_remove += "jsnbd" +RDEPENDS:${PN}:remove += "jsnbd" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend index 616fb9a75..73c3f2190 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend @@ -1,17 +1,17 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " file://dev_id.json \ file://channel_access.json \ file://channel_config.json \ file://master_write_read_white_list.json \ " -FILES_${PN} += " \ +FILES:${PN} += " \ ${datadir}/ipmi-providers/channel_access.json \ ${datadir}/ipmi-providers/channel_config.json \ ${datadir}/ipmi-providers/master_write_read_white_list.json \ " -do_install_append() { +do_install:append() { install -m 0644 -D ${WORKDIR}/channel_access.json \ ${D}${datadir}/ipmi-providers/channel_access.json install -m 0644 -D ${WORKDIR}/channel_config.json \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend index 2d892ad1a..3a2cf0e01 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " file://config.yaml" #override source file before it is used for final FRU file (merged from multiple sources) diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch index bf1928825..112c1ffab 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch @@ -1,4 +1,4 @@ -From 16eb5d80893406739518e7a56eb5191aa7e68257 Mon Sep 17 00:00:00 2001 +From 99f63d2af9f45badaa8aff4ef958443bea62ede8 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Mon, 3 Jun 2019 17:01:47 -0700 Subject: [PATCH] Update IPMI Chassis Control command @@ -21,22 +21,22 @@ ipmitool power soft: soft power-off requested from system software Change-Id: Ic9fba3ca4abd9a758eb88f1e6ee09f7ca64ff80a Signed-off-by: Jason M. Bills --- - chassishandler.cpp | 206 +++++++++++---------------------------------- - 1 file changed, 50 insertions(+), 156 deletions(-) + chassishandler.cpp | 204 +++++++++++---------------------------------- + 1 file changed, 48 insertions(+), 156 deletions(-) diff --git a/chassishandler.cpp b/chassishandler.cpp -index 4ca981d..cd0a13d 100644 +index dfbe004be490..cd0ba3402f84 100644 --- a/chassishandler.cpp +++ b/chassishandler.cpp -@@ -31,6 +31,7 @@ - #include +@@ -32,6 +32,7 @@ #include + #include #include +#include #include #include -@@ -813,59 +814,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout, +@@ -815,59 +816,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout, //------------------------------------------ // Calls into Host State Manager Dbus object //------------------------------------------ @@ -137,8 +137,8 @@ index 4ca981d..cd0a13d 100644 } //------------------------------------------ -@@ -1298,76 +1303,6 @@ ipmi::RspType ipmiChassisControl(uint8_t chassisControl) +@@ -1384,66 +1319,22 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl) switch (chassisControl) { case CMD_POWER_ON: @@ -259,9 +259,10 @@ index 4ca981d..cd0a13d 100644 break; - case CMD_HARD_RESET: +- rc = initiate_state_transition( + rc = initiateHostStateTransition( -+ State::Host::Transition::ForceWarmReboot); -+ break; + State::Host::Transition::ForceWarmReboot); + break; case CMD_POWER_CYCLE: - // SPEC has a section that says certain implementations can trigger - // PowerOn if power is Off when a command to power cycle is diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch deleted file mode 100644 index ff1d0baea..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 90df4bce744fdff6de98f63a320c50e24d40a0d4 Mon Sep 17 00:00:00 2001 -From: Jayaprakash Mutyala -Date: Mon, 2 Aug 2021 16:16:50 +0000 -Subject: [PATCH] Fix for BIOS boot type Legacy - -If user trying to set BIOS boot type as Legacy in Set System boot -options IPMI command is getting success for boot option parameter 5 -(boot flags). -Legacy boot type is not supported in Intel platforms, so returning -InvalidFieldRequest. This can't be pushed to upstream as OEM's in -community supports it. - -Tested: -Verified using IPMI commands. -//Set system boot options -Command : ipmitool raw 0x00 0x08 0x05 0x80 0x18 0x00 0x00 0x00 -Response: Unable to send RAW command (channel=0x0 netfn=0x0 lun=0x0 - cmd=0x8 rsp=0xcc): Invalid data field in request -Command: ipmitool raw 0x00 0x08 0x05 0xa0 0x18 0x00 0x00 0x00 -Response: //Success -//Get System boot options -Command : ipmitool raw 0x00 0x09 0x05 0x00 0x00 -Response: 01 05 a0 18 00 00 00 - -Signed-off-by: Jayaprakash Mutyala ---- - chassishandler.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/chassishandler.cpp b/chassishandler.cpp -index f7820af..abc84b6 100644 ---- a/chassishandler.cpp -+++ b/chassishandler.cpp -@@ -1875,6 +1875,14 @@ ipmi::RspType<> ipmiChassisSetSysBootOptions(ipmi::Context::ptr ctx, - { - return ipmi::responseInvalidFieldRequest(); - } -+ constexpr auto biosBootTypeLegacy = 0; -+ if (biosBootType == biosBootTypeLegacy) -+ { -+ // return error if BIOS boot type is legacy -+ log("ipmiChassisSetSysBootOptions: BIOS boot type " -+ "Legacy is not supported"); -+ return ipmi::responseInvalidFieldRequest(); -+ } - - using namespace chassis::internal; - using namespace chassis::internal::cache; --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend index 84ae31e5c..c40ecad7e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" SRC_URI += "file://phosphor-ipmi-host.service \ @@ -8,33 +8,32 @@ SRC_URI += "file://phosphor-ipmi-host.service \ file://0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch \ file://0062-Update-IPMI-Chassis-Control-command.patch \ file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \ - file://0064-chassishandler-Fix-for-BIOS-boot-type-Legacy.patch \ " -EXTRA_OECONF_append = " --disable-i2c-whitelist-check" -EXTRA_OECONF_append = " --enable-transport-oem=yes" -EXTRA_OECONF_append = " --disable-boot-flag-safe-mode-support" -EXTRA_OECONF_append = " --disable-ipmi-whitelist" +EXTRA_OECONF:append = " --disable-i2c-whitelist-check" +EXTRA_OECONF:append = " --enable-transport-oem=yes" +EXTRA_OECONF:append = " --disable-boot-flag-safe-mode-support" +EXTRA_OECONF:append = " --disable-ipmi-whitelist" -RDEPENDS_${PN}_remove = "clear-once" +RDEPENDS:${PN}:remove = "clear-once" # remove the softpoweroff service since we do not need it -SYSTEMD_SERVICE_${PN}_remove += " \ +SYSTEMD_SERVICE:${PN}:remove += " \ xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" -SYSTEMD_LINK_${PN}_remove += " \ +SYSTEMD_LINK_${PN}:remove += " \ ../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service:obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \ " -FILES_${PN}_remove = " \ - ${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/ \ - ${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \ +FILES:${PN}:remove = " \ + ${D}${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/ \ + ${D}${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \ " -do_compile_prepend(){ +do_compile:prepend(){ cp -f ${PROJECT_SRC_DIR}/transporthandler_oem.cpp ${S} } -do_install_append(){ +do_install:append(){ rm -f ${D}/${bindir}/phosphor-softpoweroff rm -f ${S}/transporthandler_oem.cpp } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend index a83e1f670..465bd4c64 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend @@ -1,12 +1,12 @@ SRC_URI = "git://github.com/openbmc/ipmbbridge.git" -SRCREV = "8fe0abe6d9f69f735e93d7055687fce4b56e80bf" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRCREV = "bd78df6be9f677136ca190d50101c328267ddcd2" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-Add-dbus-method-SlotIpmbRequest.patch \ file://0002-Add-log-count-limitation-to-requestAdd.patch \ file://ipmb-channels.json \ " -do_install_append() { +do_install:append() { install -D ${WORKDIR}/ipmb-channels.json \ ${D}/usr/share/ipmbbridge } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend index a84352929..08b96ad71 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" #SYSTEMD_SUBSTITUTIONS_remove = "KCS_DEVICE:${KCS_DEVICE}:${DBUS_SERVICE_${PN}}" @@ -8,14 +8,14 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" # Replace the '-' to '_', since Dbus object/interface names do not allow '-'. KCS_DEVICE = "ipmi_kcs3" SMM_DEVICE = "ipmi_kcs4" -SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service " +SYSTEMD_SERVICE:${PN}:append = " ${PN}@${SMM_DEVICE}.service " SRC_URI = "git://github.com/openbmc/kcsbridge.git" SRCREV = "03e6defcbca99c9c00cd37c4afb1d2b415a92acd" SRC_URI += "file://99-ipmi-kcs.rules" -do_install_append() { +do_install:append() { install -d ${D}${base_libdir}/udev/rules.d install -m 0644 ${WORKDIR}/99-ipmi-kcs.rules ${D}${base_libdir}/udev/rules.d/ } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch index da173704b..7b690998f 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch @@ -1,4 +1,4 @@ -From a36f181163974b2da0a954fc97a89fb2cdbd7287 Mon Sep 17 00:00:00 2001 +From adabdfa46aa0db56f40030c7077f991ba1987b04 Mon Sep 17 00:00:00 2001 From: Cheng C Yang Date: Tue, 30 Apr 2019 05:35:31 +0800 Subject: [PATCH] Remove Get SOL Config Command from Netipmid @@ -28,21 +28,21 @@ Payload Port : 623 Signed-off-by: Cheng C Yang --- - command/sol_cmds.cpp | 91 ---------------------------- - command/sol_cmds.hpp | 168 --------------------------------------------------- + command/sol_cmds.cpp | 86 ---------------------- + command/sol_cmds.hpp | 168 ------------------------------------------- sol_module.cpp | 6 -- - 3 files changed, 265 deletions(-) + 3 files changed, 260 deletions(-) diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp -index 804b5ea..8b2d041 100644 +index 81dfc993236c..be2cc81fc9cc 100644 --- a/command/sol_cmds.cpp +++ b/command/sol_cmds.cpp -@@ -65,97 +65,6 @@ void activating(uint8_t payloadInstance, uint32_t sessionID) +@@ -69,92 +69,6 @@ void activating(uint8_t payloadInstance, uint32_t sessionID) outPayload); } -std::vector getConfParams(const std::vector& inPayload, -- const message::Handler& handler) +- std::shared_ptr& handler) -{ - std::vector outPayload(sizeof(GetConfParamsResponse)); - auto request = @@ -60,23 +60,22 @@ index 804b5ea..8b2d041 100644 - { - case Parameter::PROGRESS: - { -- outPayload.push_back( -- std::get(singletonPool).progress); +- outPayload.push_back(sol::Manager::get().progress); - break; - } - case Parameter::ENABLE: - { -- outPayload.push_back(std::get(singletonPool).enable); +- outPayload.push_back(sol::Manager::get().enable); - break; - } - case Parameter::AUTHENTICATION: - { - Auth value{0}; - -- value.encrypt = std::get(singletonPool).forceEncrypt; -- value.auth = std::get(singletonPool).forceAuth; -- value.privilege = static_cast( -- std::get(singletonPool).solMinPrivilege); +- value.encrypt = sol::Manager::get().forceEncrypt; +- value.auth = sol::Manager::get().forceAuth; +- value.privilege = +- static_cast(sol::Manager::get().solMinPrivilege); - auto buffer = reinterpret_cast(&value); - - std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload)); @@ -86,11 +85,9 @@ index 804b5ea..8b2d041 100644 - { - Accumulate value{0}; - -- value.interval = std::get(singletonPool) -- .accumulateInterval.count() / +- value.interval = sol::Manager::get().accumulateInterval.count() / - sol::accIntervalFactor; -- value.threshold = -- std::get(singletonPool).sendThreshold; +- value.threshold = sol::Manager::get().sendThreshold; - auto buffer = reinterpret_cast(&value); - - std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload)); @@ -100,10 +97,9 @@ index 804b5ea..8b2d041 100644 - { - Retry value{0}; - -- value.count = std::get(singletonPool).retryCount; -- value.interval = -- std::get(singletonPool).retryInterval.count() / -- sol::retryIntervalFactor; +- value.count = sol::Manager::get().retryCount; +- value.interval = sol::Manager::get().retryInterval.count() / +- sol::retryIntervalFactor; - auto buffer = reinterpret_cast(&value); - - std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload)); @@ -119,8 +115,7 @@ index 804b5ea..8b2d041 100644 - } - case Parameter::CHANNEL: - { -- outPayload.push_back( -- std::get(singletonPool).channel); +- outPayload.push_back(sol::Manager::get().channel); - break; - } - case Parameter::NVBITRATE: @@ -136,7 +131,7 @@ index 804b5ea..8b2d041 100644 } // namespace sol diff --git a/command/sol_cmds.hpp b/command/sol_cmds.hpp -index 182b73e..10cbf25 100644 +index 3e05e0fc035f..9aedfddf0d39 100644 --- a/command/sol_cmds.hpp +++ b/command/sol_cmds.hpp @@ -62,174 +62,6 @@ struct ActivatingRequest @@ -266,7 +261,7 @@ index 182b73e..10cbf25 100644 - * @return Response data for the command. - */ -std::vector setConfParams(const std::vector& inPayload, -- const message::Handler& handler); +- std::shared_ptr& handler); - -/** @struct GetConfParamsRequest - * @@ -309,16 +304,16 @@ index 182b73e..10cbf25 100644 - * @return Response data for the command. - */ -std::vector getConfParams(const std::vector& inPayload, -- const message::Handler& handler); +- std::shared_ptr& handler); - } // namespace command } // namespace sol diff --git a/sol_module.cpp b/sol_module.cpp -index 2b1fb46..6da82c0 100644 +index d9a9a7c9551f..21196d8a2cbf 100644 --- a/sol_module.cpp +++ b/sol_module.cpp -@@ -42,12 +42,6 @@ void registerCommands() +@@ -41,12 +41,6 @@ void registerCommands() &getPayloadInfo, session::Privilege::USER, false}, @@ -332,5 +327,5 @@ index 2b1fb46..6da82c0 100644 for (const auto& iter : commands) -- -2.7.4 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend index 759306cd0..bde839859 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend @@ -3,21 +3,21 @@ inherit useradd # TODO: This should be removed, once up-stream bump up # issue is resolved SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid" -SRCREV = "b88599a2cef6b4fd2272f065a37ce0f70ca8dd38" +SRCREV = "1c5b3ab05817d62a11f75c2a90b6891b18bf62cc" USERADD_PACKAGES = "${PN}" # add a group called ipmi -GROUPADD_PARAM_${PN} = "ipmi " +GROUPADD_PARAM:${PN} = "ipmi " # Default rmcpp iface is eth0; channel 1 # Add channel 2 instance (eth1) RMCPP_EXTRA = "eth1" -SYSTEMD_SERVICE_${PN} += " \ +SYSTEMD_SERVICE:${PN} += " \ ${PN}@${RMCPP_EXTRA}.service \ ${PN}@${RMCPP_EXTRA}.socket \ " -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += " file://10-nice-rules.conf \ file://0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch \ @@ -25,7 +25,7 @@ SRC_URI += " file://10-nice-rules.conf \ file://0012-rakp12-Add-username-to-SessionInfo-interface.patch \ " -do_install_append() { +do_install:append() { mkdir -p ${D}${sysconfdir}/systemd/system/phosphor-ipmi-net@.service.d/ install -m 0644 ${WORKDIR}/10-nice-rules.conf ${D}${sysconfdir}/systemd/system/phosphor-ipmi-net@.service.d/ } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend index 72d991c7e..4fc41d058 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%.bbappend @@ -1 +1 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb index d5c1888b3..3be0d30b4 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb @@ -3,13 +3,13 @@ DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicat with Management Engine via IPMB" SRC_URI = "git://github.com/Intel-BMC/node-manager;protocol=ssh" -SRCREV = "23590b428ea26e0ed4b8225015471b962e3b3704" +SRCREV = "928d0994c7d8c1cc20dc69b763ecd62dcf8ab276" PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" -SYSTEMD_SERVICE_${PN} = "node-manager-proxy.service" +SYSTEMD_SERVICE:${PN} = "node-manager-proxy.service" DEPENDS = "sdbusplus \ phosphor-logging \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb index a1d20c2bc..21557d96b 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/id-led-off_git.bb @@ -8,11 +8,11 @@ SRC_URI = "file://id-led-off.sh \ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" inherit systemd -FILES_${PN} += "${systemd_system_unitdir}/id-led-off.service" +FILES:${PN} += "${systemd_system_unitdir}/id-led-off.service" do_install() { install -d ${D}${systemd_system_unitdir} @@ -21,4 +21,4 @@ do_install() { install -m 0755 ${S}/id-led-off.sh ${D}/${bindir}/id-led-off.sh } -SYSTEMD_SERVICE_${PN} += " id-led-off.service" +SYSTEMD_SERVICE:${PN} += " id-led-off.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend index 83fd20bdb..132fe2337 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend @@ -1,12 +1,12 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -RDEPENDS_${PN}_remove = "clear-once" +RDEPENDS:${PN}:remove = "clear-once" -do_compile_prepend(){ +do_compile:prepend(){ install -m 0644 ${STAGING_DATADIR_NATIVE}/${PN}/led.yaml ${S} } -do_install_append(){ +do_install:append(){ rm -f ${S}/led.yaml } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb index c47a581f6..2468a487d 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-nl/multi-node-nl.bb @@ -3,8 +3,8 @@ DESCRIPTION = "New systemd target for non-legacy nodes on multi-node platform" inherit systemd -SYSTEMD_SERVICE_${PN} = "multi-node-nl.target" -SYSTEMD_SERVICE_${PN} += "nonLegacyNode.service" +SYSTEMD_SERVICE:${PN} = "multi-node-nl.target" +SYSTEMD_SERVICE:${PN} += "nonLegacyNode.service" S = "${WORKDIR}" SRC_URI = "file://multi-node-nl.target \ @@ -15,9 +15,9 @@ SRC_URI = "file://multi-node-nl.target \ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS_${PN} = "bash" +RDEPENDS:${PN} = "bash" -do_install_append() { +do_install:append() { install -d ${D}${bindir} install -m 0755 ${S}/nonLegacyNode.sh ${D}/${bindir}/nonLegacyNode.sh diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend index 15673c0bf..119cd9657 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/peci/peci-pcie_%.bbappend @@ -1,5 +1,5 @@ SRC_URI = "git://github.com/openbmc/peci-pcie" -SRCREV = "6f55203b70316baec228073abcd581b64985af93" +SRCREV = "8e96603605eebd574bb00cd35e7fa118071aeeae" EXTRA_OECMAKE += "-DWAIT_FOR_OS_STANDBY=1 -DUSE_RDENDPOINTCFG=1" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb index 3ca492ebd..5a6191fcd 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb @@ -13,6 +13,6 @@ SRC_URI = "git://github.com/openbmc/phosphor-u-boot-env-mgr.git;protocol=ssh" SRCREV = "1979d3b31a96e9359402ac4d7867ec5dddbece7e" inherit cmake systemd -SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service" +SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service" DEPENDS = "boost sdbusplus phosphor-logging" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb index 4a8a5068b..770870f1e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libmctp-intel_git.bb @@ -1,8 +1,8 @@ -SUMMARY = "libmctp_intel" +SUMMARY = "libmctp:intel" DESCRIPTION = "Implementation of MCTP(DMTF DSP0236)" SRC_URI = "git://github.com/Intel-BMC/libmctp.git;protocol=ssh" -SRCREV = "5126468ca6c3ae139d1ab9853074246bbe70dd74" +SRCREV = "52117fa04e6afabe8eb1285c702f1400fecfb992" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb index caa3cc915..03d4d5ee9 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/libpldm-intel_git.bb @@ -2,7 +2,7 @@ SUMMARY = "libpldm_intel" DESCRIPTION = "Provides encode/decode APIs for PLDM specifications" SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0" +SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c" S = "${WORKDIR}/git/libpldm_intel" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb index 7fb440c68..2fa3f8df1 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-emulator.bb @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=bcd9ada3a943f58551867d72893cc9ab" SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0" +SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c" S = "${WORKDIR}/git/mctp_emulator" @@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}" inherit cmake systemd -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += " \ libmctp-intel \ @@ -27,4 +27,4 @@ DEPENDS += " \ gtest \ " -SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.mctp-emulator.service" +SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.mctp-emulator.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb index f616a9d5d..1ad4f6e2a 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=bcd9ada3a943f58551867d72893cc9ab" SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0" +SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c" S = "${WORKDIR}/git/mctp_wrapper" @@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}" inherit cmake systemd -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += " \ libmctp-intel \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb index 299e4f006..4e8315047 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PN}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0" +SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c" S = "${WORKDIR}/git" @@ -15,7 +15,7 @@ OECMAKE_SOURCEPATH = "${S}/${PN}" inherit cmake systemd -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += " \ libmctp-intel \ @@ -30,5 +30,5 @@ DEPENDS += " \ phosphor-dbus-interfaces \ udev \ " -FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.mctpd@.service" -FILES_${PN} += "/usr/share/mctp/mctp_config.json" +FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.mctpd@.service" +FILES:${PN} += "/usr/share/mctp/mctp_config.json" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb index 936cd7bd3..b0139297d 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=615045c30a05cde5c0e924854d43c327" SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0" +SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c" S = "${WORKDIR}/git/mctpwplus" @@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}" inherit cmake -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += " \ systemd \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb index 489ea8117..351d584d1 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb @@ -5,13 +5,13 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "git://github.com/Intel-BMC/nvme-mi.git;protocol=ssh" -SRCREV = "b0b93949733398d56b2bda5ef57c8a50a477ff47" +SRCREV = "29b49789236b89910af816e4606aab4126a56a4b" S = "${WORKDIR}/git" PV = "1.0+git${SRCPV}" inherit meson systemd -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.nvme-mi.service" +SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.nvme-mi.service" DEPENDS = "boost sdbusplus systemd phosphor-logging mctpwplus googletest nlohmann-json" EXTRA_OEMESON = "-Dyocto_dep='enabled'" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb index 1428e0f15..ffef31185 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI += "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0" +SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c" S = "${WORKDIR}/git/pldmd" @@ -13,7 +13,7 @@ PV = "1.0+git${SRCPV}" inherit cmake systemd -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += " \ libpldm-intel \ @@ -27,5 +27,5 @@ DEPENDS += " \ mctpwplus \ " -FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pldmd.service" -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.pldmd.service" +FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pldmd.service" +SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.pldmd.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb index c7be89f41..485dcf4db 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pmci-launcher.bb @@ -5,7 +5,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" -SRCREV = "a328510479aad6fd97e958759522ec9bcdc9e8d0" +SRCREV = "02b272fb17a5fe835311818e9194eb0cd49db20c" S = "${WORKDIR}/git/pmci_launcher" @@ -19,5 +19,5 @@ DEPENDS += " \ phosphor-logging \ boost \ " -FILES_${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pmci-launcher.service" -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.pmci-launcher.service" +FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.pmci-launcher.service" +SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.pmci-launcher.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend index 410775ee3..76b60aa8e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts.bbappend @@ -1,5 +1,5 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI = "file://init" -RDEPENDS_${PN} += "bash" +RDEPENDS:${PN} += "bash" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb index 7138e8628..a7df530cd 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb @@ -13,6 +13,6 @@ SRC_URI = "git://github.com/Intel-BMC/provisioning-mode-manager.git;protocol=ssh SRCREV = "ea03e4e87f5d5f0d873624b46ebc3deabb8d6ebe" inherit cmake systemd -SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.RestrictionMode.Manager.service" +SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.RestrictionMode.Manager.service" DEPENDS = "boost sdbusplus phosphor-logging" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb index 3fab0ae54..783dea029 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb @@ -12,7 +12,7 @@ inherit cmake systemd SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" SRCREV = "bee56d62b209088454d166d1efae4825a2b175df" -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.SecurityManager.service" +SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.SecurityManager.service" DEPENDS += " \ systemd \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend index 18be4b189..1fcbd958e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend @@ -1,4 +1,4 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git" -SRCREV = "e9da2599f10f1b696f61c97f8c8036acfde05e18" +SRCREV = "a138ebd3c759f95c53d61170c05e69bf31718114" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch index 6815b5563..1cba1095d 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Fix-missing-threshold-de-assert-event-when-threshold.patch @@ -1,4 +1,4 @@ -From 235bb8a9b809c2449e3f5bf4e999db881012c144 Mon Sep 17 00:00:00 2001 +From db4353de222b51726c8e3c765cc8f1df4ad67687 Mon Sep 17 00:00:00 2001 From: Zhikui Ren Date: Tue, 22 Jun 2021 11:35:12 -0700 Subject: [PATCH] Fix missing de-assert event when threshold changes @@ -42,8 +42,8 @@ Signed-off-by: Zhikui Ren --- include/Thresholds.hpp | 2 +- include/sensor.hpp | 2 ++ - src/Thresholds.cpp | 17 ++++++++++++++--- - 3 files changed, 17 insertions(+), 4 deletions(-) + src/Thresholds.cpp | 20 ++++++++++++++++---- + 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/Thresholds.hpp b/include/Thresholds.hpp index af63f72..fd507d0 100644 @@ -79,7 +79,7 @@ index b98241b..6235674 100644 } diff --git a/src/Thresholds.cpp b/src/Thresholds.cpp -index bbe8e20..78ded55 100644 +index 821083a..da0d650 100644 --- a/src/Thresholds.cpp +++ b/src/Thresholds.cpp @@ -418,10 +418,19 @@ bool checkThresholds(Sensor* sensor) @@ -103,7 +103,22 @@ index bbe8e20..78ded55 100644 if (change.threshold.level == thresholds::Level::CRITICAL && change.asserted) { -@@ -473,7 +482,7 @@ void checkThresholdsPowerDelay(const std::weak_ptr& weakSensor, +@@ -443,6 +452,7 @@ void checkThresholdsPowerDelay(const std::weak_ptr& weakSensor, + + Sensor* sensor = sensorPtr.get(); + std::vector changes = checkThresholds(sensor, sensor->value); ++ bool forceAssert = !sensor->hadValidValue; + for (const auto& change : changes) + { + // When CPU is powered off, some volatges are expected to +@@ -467,13 +477,13 @@ void checkThresholdsPowerDelay(const std::weak_ptr& weakSensor, + } + } + assertThresholds(sensor, change.assertValue, change.threshold.level, +- change.threshold.direction, change.asserted); ++ change.threshold.direction, change.asserted, forceAssert); + } + } void assertThresholds(Sensor* sensor, double assertValue, thresholds::Level level, thresholds::Direction direction, @@ -112,7 +127,7 @@ index bbe8e20..78ded55 100644 { std::string property; std::shared_ptr interface; -@@ -513,7 +522,9 @@ void assertThresholds(Sensor* sensor, double assertValue, +@@ -513,7 +523,9 @@ void assertThresholds(Sensor* sensor, double assertValue, return; } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch new file mode 100644 index 000000000..737ba9128 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch @@ -0,0 +1,147 @@ +From 262682632ee493d0b6593540cfc902d11286b7c3 Mon Sep 17 00:00:00 2001 +From: Iwona Winiarska +Date: Tue, 13 Jul 2021 15:16:16 +0200 +Subject: [PATCH] CPUSensor: Create CPUConfig for each PECI adapter + +Currently CPUSensor is based on configuration that defines CPUs for the +specific PECI adapter (usually peci-wire). As a consequence, MFD devices +are created only for the defined adapter. + +Since duplicating static CPU records in configuration file for other +PECI adapters may be confusing to users, let's add CPUConfig for other +PECI adapters dynamically by detecting if there is more than one PECI +adapter driver bound in the system. + +Please note, that this change is limited to enabling HWMON driver, +sensors for all adapters will not be exposed on D-Bus. + +Tested: +No changes if only one PECI interface is available, HWMON drivers +creation will be based on provided configuration. +When both peci-aspeed (peci-wire) and peci-mctp are bound in the system, +HWMON drivers are created for each PECI interface. + +Signed-off-by: Iwona Winiarska +--- + src/CPUSensorMain.cpp | 90 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 90 insertions(+) + +diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp +index 744ca50..6850df7 100644 +--- a/src/CPUSensorMain.cpp ++++ b/src/CPUSensorMain.cpp +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -658,6 +659,91 @@ void detectCpuAsync( + }); + } + ++std::optional getPeciDeviceNum(const fs::path& peciAdapterNamePath) ++{ ++ fs::path::iterator it = peciAdapterNamePath.begin(); ++ std::advance(it, 5); // /sys/bus/peci/devices/peci-xxxx ++ std::string peciDeviceName = *it; ++ auto pos = peciDeviceName.find('-'); ++ if (pos == std::string::npos) ++ { ++ std::cerr << "Incorrect PECI device name: " << peciDeviceName << "\n"; ++ return std::nullopt; ++ } ++ ++ try ++ { ++ return std::stoull(peciDeviceName.substr(pos + 1, 1)); ++ } ++ catch (std::logic_error&) ++ { ++ return std::nullopt; ++ } ++} ++ ++std::optional ++ readPeciAdapterNameFromFile(const fs::path& peciAdapterNamePath) ++{ ++ std::ifstream nameFile(peciAdapterNamePath); ++ if (!nameFile.good()) ++ { ++ std::cerr << "Cannot read: " << peciAdapterNamePath << "\n"; ++ return std::nullopt; ++ } ++ ++ std::string peciAdapterName; ++ std::getline(nameFile, peciAdapterName); ++ nameFile.close(); ++ if (peciAdapterName.empty()) ++ { ++ return std::nullopt; ++ } ++ ++ auto pos = peciAdapterName.find('-'); ++ peciAdapterName = peciAdapterName.substr(pos + 1); ++ ++ return peciAdapterName; ++} ++ ++void addConfigsForOtherPeciAdapters( ++ boost::container::flat_set& cpuConfigs, uint64_t& bus, ++ uint64_t& addr, std::string& name, const State& state) ++{ ++ std::vector peciAdapterNamePaths; ++ if (!findFiles(fs::path(peciDevPath), R"(peci-\d+/name$)", ++ peciAdapterNamePaths, 1)) ++ { ++ std::cerr << "No PECI adapters in system\n"; ++ return; ++ } ++ ++ for (const fs::path& peciAdapterNamePath : peciAdapterNamePaths) ++ { ++ std::optional peciDeviceNum = ++ getPeciDeviceNum(peciAdapterNamePath); ++ if (!peciDeviceNum || peciDeviceNum == bus) ++ { ++ continue; ++ } ++ ++ std::optional peciAdapterName = ++ readPeciAdapterNameFromFile(peciAdapterNamePath); ++ if (!peciAdapterName) ++ { ++ continue; ++ } ++ ++ // Change result for peci-aspeed ++ if (peciAdapterName->compare("bus") == 0) ++ { ++ peciAdapterName = "wire"; ++ } ++ ++ cpuConfigs.emplace(*peciDeviceNum, addr, name + "_" + *peciAdapterName, ++ state); ++ } ++} ++ + bool getCpuConfig(std::shared_ptr& systemBus, + boost::container::flat_set& cpuConfigs, + ManagedObjectType& sensorConfigs, boost::asio::io_service& io, +@@ -789,7 +875,11 @@ bool getCpuConfig(std::shared_ptr& systemBus, + std::cout << "name: " << name << "\n"; + std::cout << "type: " << type << "\n"; + } ++ + cpuConfigs.emplace(bus, addr, name, State::OFF); ++ ++ addConfigsForOtherPeciAdapters(cpuConfigs, bus, addr, name, ++ State::OFF); + } + } + } +-- +2.31.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend index fbaf497b3..b54b8e974 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend @@ -1,7 +1,7 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" -SRCREV = "5cf0f99210890d0cd52d5929e919316d238a5701" +SRCREV = "5ab424a6a4ea56e5fbfad5a1813bed7bfabbd399" #SRC_URI = "git://github.com/openbmc/dbus-sensors.git" SRC_URI += "\ @@ -14,9 +14,10 @@ SRC_URI += "\ file://0006-CPUSensor-create-RequirediTempSensor-if-defined.patch \ file://0007-Add-support-for-the-energy-hwmon-type.patch \ file://0008-CPUSensor-additional-debug-message.patch \ + file://0009-CPUSensor-Create-CPUConfig-for-each-PECI-adapter.patch \ " -DEPENDS_append = " libgpiod libmctp" +DEPENDS:append = " libgpiod libmctp" PACKAGECONFIG += " \ adcsensor \ @@ -35,11 +36,11 @@ PACKAGECONFIG[nvmesensor] = "-Dnvme=enabled, -Dnvme=disabled" # Enable Validation unsecure based on IMAGE_FEATURES EXTRA_OEMESON += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-Dvalidate-unsecure-feature=enabled', '', d)}" -SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'nvmesensor', \ +SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'nvmesensor', \ 'xyz.openbmc_project.nvmesensor.service', \ '', d)}" -do_install_append() { +do_install:append() { svc="xyz.openbmc_project.intrusionsensor.service" srcf="${WORKDIR}/intrusionsensor-depend-on-networkd.conf" dstf="${D}/etc/systemd/system/${svc}.d/10-depend-on-networkd.conf" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb index 275963595..703cbb803 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb @@ -1,13 +1,13 @@ SUMMARY = "Settings" SRC_URI = "git://github.com/Intel-BMC/settings.git;protocol=ssh" -SRCREV = "1a39605ff52db92048df733181eda8fcfe18ce2f" +SRCREV = "85a8be9a3fb8ef4726899b28f10fb9afa6fa9e89" PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Settings.service" +SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Settings.service" DEPENDS = "boost \ nlohmann-json \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb index e566f3ea6..26d1364f6 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb @@ -14,7 +14,7 @@ SRCREV = "5f413eec673f3e6e5e754e2c55048abf0a146e5b" EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}" inherit cmake systemd -SYSTEMD_SERVICE_${PN} = "specialmodemgr.service" +SYSTEMD_SERVICE:${PN} = "specialmodemgr.service" DEPENDS += " \ systemd \ @@ -23,7 +23,7 @@ DEPENDS += " \ boost \ libpam \ " -RDEPENDS_${PN} += " \ +RDEPENDS:${PN} += " \ libsystemd \ sdbusplus \ phosphor-logging \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend index aef2a020f..b7e8c0b22 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPENDS += "gtest" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb index 635d0a136..0483ced61 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb @@ -11,7 +11,7 @@ SRCREV = "1a9dde9b193a34392ab11a14d9cd0310f9abb930" S = "${WORKDIR}/git/callback-manager" -SYSTEMD_SERVICE_${PN} += "callback-manager.service" +SYSTEMD_SERVICE:${PN} += "callback-manager.service" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENCE;md5=7becf906c8f8d03c237bad13bc3dac53" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend index b9a65cc75..68e8ee6ac 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend @@ -1,5 +1,5 @@ SRC_URI = "git://github.com/openbmc/telemetry.git" -SRCREV = "a74e44f6ef7db43d38eb600fbfee152b31b30514" +SRCREV = "93064d8fcef2c6fde1f61c0cedacb46b21eab039" EXTRA_OEMESON += " -Dmax-reports=10" EXTRA_OEMESON += " -Dmax-reading-parameters=200" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend index c0d4215a0..718829194 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend @@ -1,7 +1,7 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI = "git://github.com/openbmc/phosphor-user-manager" -SRCREV = "607ed50ae1c4817969a117d951a3e90f686fbde0" +SRCREV = "372c5668c0ed893f53edc0f9fa880cb50b48f203" EXTRA_OECONF += "${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], '', '--disable-root_user_mgmt', d)}" @@ -10,7 +10,7 @@ SRC_URI += " \ file://0006-Use-groupmems-instead-of-getgrnam_r-due-to-overlay.patch \ " -FILES_${PN} += "/dbus-1/system.d/phosphor-nslcd-cert-config.conf" -FILES_${PN} += "/usr/share/phosphor-certificate-manager/nslcd" -FILES_${PN} += "\ +FILES:${PN} += "/dbus-1/system.d/phosphor-nslcd-cert-config.conf" +FILES:${PN} += "/usr/share/phosphor-certificate-manager/nslcd" +FILES:${PN} += "\ /lib/systemd/system/multi-user.target.wants/phosphor-certificate-manager@nslcd.service" \ No newline at end of file diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb index e568ea5d2..b8aedc6ee 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb @@ -10,11 +10,11 @@ PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" -SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.VirtualMedia.service" +SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.VirtualMedia.service" DEPENDS = "udev boost nlohmann-json systemd sdbusplus" -RDEPENDS_${PN} = "nbd-client nbdkit" +RDEPENDS:${PN} = "nbd-client nbdkit" inherit cmake systemd diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb index d6ff9f7a4..706e08646 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb @@ -25,7 +25,7 @@ DEPENDS += " \ boost \ " -RDEPENDS_${PN} += " \ +RDEPENDS:${PN} += " \ libsystemd \ sdbusplus \ phosphor-logging \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch index 07ac95c89..48bc4a086 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch @@ -1,4 +1,4 @@ -From 5760937ef1ae9a4610b47ba64fdebe594fc2c9df Mon Sep 17 00:00:00 2001 +From a7d1d3770a650df8fe61d594885fcb388ac2ca42 Mon Sep 17 00:00:00 2001 From: James Feist Date: Mon, 17 Jun 2019 12:00:58 -0700 Subject: [PATCH] Customize phosphor-watchdog for Intel platforms @@ -22,30 +22,26 @@ Signed-off-by: Sunita Kumari %% original patch: 0001-Customize-phosphor-watchdog-for-Intel-platforms.patch --- - src/watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++--- - src/watchdog.hpp | 23 ++++- - 2 files changed, 242 insertions(+), 11 deletions(-) + src/watchdog.cpp | 229 ++++++++++++++++++++++++++++++++++++++++++++--- + src/watchdog.hpp | 22 ++++- + 2 files changed, 240 insertions(+), 11 deletions(-) diff --git a/src/watchdog.cpp b/src/watchdog.cpp -index 57e905059153..1204db4cab0f 100644 +index 7de98ae3e70f..f96faebc7368 100644 --- a/src/watchdog.cpp +++ b/src/watchdog.cpp -@@ -1,11 +1,14 @@ - #include "watchdog.hpp" - -+#include -+ - #include - #include +@@ -5,8 +5,10 @@ #include #include #include ++#include + #include #include +#include namespace phosphor { -@@ -18,10 +21,86 @@ using namespace phosphor::logging; +@@ -19,10 +21,86 @@ using namespace phosphor::logging; using sdbusplus::exception::SdBusError; using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; @@ -136,7 +132,7 @@ index 57e905059153..1204db4cab0f 100644 void Watchdog::resetTimeRemaining(bool enableWatchdog) { -@@ -107,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value) +@@ -108,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value) // Optional callback function on timer expiration void Watchdog::timeOutHandler() { @@ -249,7 +245,7 @@ index 57e905059153..1204db4cab0f 100644 auto target = actionTargetMap.find(action); if (target == actionTargetMap.end()) -@@ -133,12 +310,45 @@ void Watchdog::timeOutHandler() +@@ -147,12 +323,45 @@ void Watchdog::timeOutHandler() try { @@ -301,16 +297,15 @@ index 57e905059153..1204db4cab0f 100644 catch (const SdBusError& e) { diff --git a/src/watchdog.hpp b/src/watchdog.hpp -index 7de9bb38419c..b004b7ab4e3f 100644 +index 736e71f68fcc..79158f192f40 100644 --- a/src/watchdog.hpp +++ b/src/watchdog.hpp -@@ -68,7 +68,18 @@ class Watchdog : public WatchdogInherits - WatchdogInherits(bus, objPath), +@@ -73,7 +73,17 @@ class Watchdog : public WatchdogInherits bus(bus), actionTargetMap(std::move(actionTargetMap)), fallback(std::move(fallback)), minInterval(minInterval), -- timer(event, std::bind(&Watchdog::timeOutHandler, this)) -+ timer(event, std::bind(&Watchdog::timeOutHandler, this)), -+ powerStateChangedSignal( + timer(event, std::bind(&Watchdog::timeOutHandler, this)), +- objPath(objPath) ++ objPath(objPath), powerStateChangedSignal( + bus, + sdbusplus::bus::match::rules::propertiesChanged( + "/xyz/openbmc_project/state/host0", @@ -322,9 +317,9 @@ index 7de9bb38419c..b004b7ab4e3f 100644 + powerStateChangedHandler(props); + }) { - // We set the watchdog interval with the default value. - interval(interval()); -@@ -77,6 +88,12 @@ class Watchdog : public WatchdogInherits + // Use default if passed in otherwise just use default that comes + // with object +@@ -90,6 +100,12 @@ class Watchdog : public WatchdogInherits tryFallbackOrDisable(); } @@ -337,7 +332,7 @@ index 7de9bb38419c..b004b7ab4e3f 100644 /** @brief Resets the TimeRemaining to the configured Interval * Optionally enables the watchdog. * -@@ -165,6 +182,10 @@ class Watchdog : public WatchdogInherits +@@ -178,6 +194,10 @@ class Watchdog : public WatchdogInherits /** @brief Contained timer object */ sdeventplus::utility::Timer timer; diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend index 75f04e2ab..ad2984fa9 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend @@ -1,8 +1,8 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" SRC_URI += "file://0001-Customize-phosphor-watchdog-for-Intel-platforms.patch \ " # Remove the override to keep service running after DC cycle -SYSTEMD_OVERRIDE_${PN}_remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf" -SYSTEMD_SERVICE_${PN} = "phosphor-watchdog.service" +SYSTEMD_OVERRIDE_${PN}:remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf" +SYSTEMD_SERVICE:${PN} = "phosphor-watchdog.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb index addd1ccb2..b5724710e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb @@ -8,5 +8,5 @@ inherit obmc-phosphor-systemd LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -SYSTEMD_SERVICE_${PN} += "system-watchdog.service" +SYSTEMD_SERVICE:${PN} += "system-watchdog.service" SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/system-watchdog/system-watchdog.conf" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend index 36b155fe9..a403c4ec8 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend @@ -1,4 +1,4 @@ SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2" -FILESEXTRAPATHS_prepend_intel := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend:intel := "${THISDIR}/${PN}:" SRCREV = "2397c142c0d75c7705757a52848945b00928232d" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend index cf54a7906..8c3c21530 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend @@ -1,7 +1,7 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/webui-vue.git" -SRCREV = "03dc2b7b9f0672aac84349fbc77aab55403447e0" +SRCREV = "bfb346946727f09d99c1710e0443dcda2e8544a5" -do_compile_prepend() { +do_compile:prepend() { cp -vf ${S}/.env.intel ${S}/.env } diff --git a/meta-openbmc-mods/meta-common/recipes-security/sssd/sssd_%.bbappend b/meta-openbmc-mods/meta-common/recipes-security/sssd/sssd_%.bbappend index 03965ce72..2c58c6321 100644 --- a/meta-openbmc-mods/meta-common/recipes-security/sssd/sssd_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-security/sssd/sssd_%.bbappend @@ -1,6 +1,6 @@ inherit obmc-phosphor-systemd -FILESEXTRAPATHS_append := "${THISDIR}/files:" +FILESEXTRAPATHS:append := "${THISDIR}/files:" SRC_URI += "file://sssd.conf \ file://nscd.conf \ file://locked_groups \ @@ -12,7 +12,7 @@ SYSTEMD_AUTO_ENABLE = "enable" EXTRA_OECONF += " --enable-pammoddir=${base_libdir}/security" -do_install_append() { +do_install:append() { # sssd creates also the /var/run link. Need to remove it to avoid conflicts # with the one created by base-files recipe. rm -rf ${D}/var/run @@ -22,5 +22,5 @@ do_install_append() { install -m 0644 ${WORKDIR}/ldb.sh ${D}${sysconfdir}/profile.d } -FILES_${PN} += " /lib/security/pam_sss.so " +FILES:${PN} += " /lib/security/pam_sss.so " diff --git a/meta-openbmc-mods/meta-common/recipes-support/avro/avro-c++_git.bb b/meta-openbmc-mods/meta-common/recipes-support/avro/avro-c++_git.bb index af8aad522..00c3e6089 100644 --- a/meta-openbmc-mods/meta-common/recipes-support/avro/avro-c++_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-support/avro/avro-c++_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=43abf34d8b9908494f83c55d213a7f89" DEPENDS = "boost" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" BRANCH = "master" SRCREV = "f4e2ebaadaf6e6d99b59882233f8024243adb55d" diff --git a/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend b/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend index c24249bcf..3dbfd7822 100644 --- a/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend @@ -1,7 +1,8 @@ -FILES_${PN} += "/usr/lib/libboost_chrono.so* \ +FILES:${PN} += "/usr/lib/libboost_chrono.so* \ + /usr/lib/libboost_atomic.so* \ /usr/lib/libboost_context.so* \ /usr/lib/libboost_thread.so*" -BOOST_LIBS_intel += "iostreams coroutine filesystem program_options regex system" +BOOST_LIBS:intel += "iostreams coroutine filesystem program_options regex system" -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/meta-openbmc-mods/meta-common/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/meta-openbmc-mods/meta-common/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch new file mode 100644 index 000000000..a7db1b3c9 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch @@ -0,0 +1,44 @@ +From ed70f0623708b8a6c1f58a5d243d87c5ff45b24d Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Tue, 26 Apr 2016 13:13:01 +0800 +Subject: [PATCH] replace krb5-config with pkg-config + +Upstream-Status: Pending + +Signed-off-by: Roy Li + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5569a26..56b0380 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -1290,7 +1290,7 @@ AC_ARG_WITH(gssapi, + fi + ]) + +-: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"} ++KRB5CONFIG=`which pkg-config` + + save_CPPFLAGS="$CPPFLAGS" + AC_MSG_CHECKING([if GSS-API support is requested]) +@@ -1301,7 +1301,7 @@ if test x"$want_gss" = xyes; then + if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then + GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` + elif test -f "$KRB5CONFIG"; then +- GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi` ++ GSSAPI_INCS=`$KRB5CONFIG --cflags mit-krb5-gssapi` + elif test "$GSSAPI_ROOT" != "yes"; then + GSSAPI_INCS="-I$GSSAPI_ROOT/include" + fi +@@ -1394,7 +1394,7 @@ if test x"$want_gss" = xyes; then + elif test -f "$KRB5CONFIG"; then + dnl krb5-config doesn't have --libs-only-L or similar, put everything + dnl into LIBS +- gss_libs=`$KRB5CONFIG --libs gssapi` ++ gss_libs=`$KRB5CONFIG --libs mit-krb5-gssapi` + LIBS="$gss_libs $LIBS" + else + case $host in diff --git a/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.78.0.bb b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.78.0.bb new file mode 100644 index 000000000..5b62fe2e7 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.78.0.bb @@ -0,0 +1,89 @@ +SUMMARY = "Command line tool and library for client-side URL transfers" +DESCRIPTION = "It uses URL syntax to transfer data to and from servers. \ +curl is a widely used because of its ability to be flexible and complete \ +complex tasks. For example, you can use curl for things like user authentication, \ +HTTP post, SSL connections, proxy support, FTP uploads, and more!" +HOMEPAGE = "http://curl.haxx.se/" +BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker" +SECTION = "console/network" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=425f6fdc767cc067518eef9bbdf4ab7b" + +SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \ + file://0001-replace-krb5-config-with-pkg-config.patch \ +" + +SRC_URI[sha256sum] = "98530b317dc95ccb324bbe4f834f07bb642fbc393b794ddf3434f246a71ea44a" + +# Curl has used many names over the years... +CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl" + +inherit autotools pkgconfig binconfig multilib_header + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} ssl libidn proxy threaded-resolver verbose zlib" +PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib" +PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib" + +# 'ares' and 'threaded-resolver' are mutually exclusive +PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver" +PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" +PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" +PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," +PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" +PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," +PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" +PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap," +PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps," +PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl" +PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" +PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" +PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" +PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," +PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" +PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," +PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," +PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" +PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," +PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," +PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," +PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" +PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" +PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," +PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," +PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares" +PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" +PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" + +EXTRA_OECONF = " \ + --disable-libcurl-option \ + --disable-ntlm-wb \ + --enable-crypto-auth \ + --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ + --without-libpsl \ + --enable-debug \ + --enable-optimize \ + --disable-curldebug \ +" + +do_install:append:class-target() { + # cleanup buildpaths from curl-config + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + ${D}${bindir}/curl-config +} + +PACKAGES =+ "lib${BPN}" + +FILES_lib${BPN} = "${libdir}/lib*.so.*" +RRECOMMENDS_lib${BPN} += "ca-certificates" + +FILES_${PN} += "${datadir}/zsh" + +inherit multilib_script +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb index f8f336008..957650b3b 100644 --- a/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb +++ b/meta-openbmc-mods/meta-common/recipes-support/nettle/nettle_3.7.2.bb @@ -20,7 +20,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://check-header-files-of-openssl-only-if-enable_.patch \ " -SRC_URI_append_class-target = "\ +SRC_URI:append:class-target = "\ file://dlopen-test.patch \ " @@ -38,7 +38,7 @@ do_compile_ptest() { oe_runmake buildtest } -do_install_append() { +do_install:append() { oe_multilib_header nettle/version.h } @@ -51,7 +51,7 @@ do_install_ptest() { install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ } -RDEPENDS_${PN}-ptest += "${PN}-dev" -INSANE_SKIP_${PN}-ptest += "dev-deps" +RDEPENDS:${PN}-ptest += "${PN}-dev" +INSANE_SKIP:${PN}-ptest += "dev-deps" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openbmc-mods/meta-common/recipes-support/rng-tools/rng-tools_6.7.bb b/meta-openbmc-mods/meta-common/recipes-support/rng-tools/rng-tools_6.7.bb index b4e453f67..3bbdcc351 100644 --- a/meta-openbmc-mods/meta-common/recipes-support/rng-tools/rng-tools_6.7.bb +++ b/meta-openbmc-mods/meta-common/recipes-support/rng-tools/rng-tools_6.7.bb @@ -21,7 +21,7 @@ S = "${WORKDIR}/git" inherit autotools update-rc.d systemd pkgconfig PACKAGECONFIG ??= "libgcrypt libjitterentropy" -PACKAGECONFIG_libc-musl = "libargp libjitterentropy" +PACKAGECONFIG:libc-musl = "libargp libjitterentropy" PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," @@ -32,14 +32,14 @@ PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 INITSCRIPT_NAME = "rng-tools" INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ." -SYSTEMD_SERVICE_${PN} = "rngd.service" +SYSTEMD_SERVICE:${PN} = "rngd.service" # Refer autogen.sh in rng-tools -do_configure_prepend() { +do_configure:prepend() { cp ${S}/README.md ${S}/README } -do_install_append() { +do_install:append() { install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools install -Dm 0644 ${WORKDIR}/rngd.service \ diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/dimmsensor/dimmsensor.bb b/meta-openbmc-mods/meta-common/recipes-utilities/dimmsensor/dimmsensor.bb index 78240c0f4..0a6cbee25 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/dimmsensor/dimmsensor.bb +++ b/meta-openbmc-mods/meta-common/recipes-utilities/dimmsensor/dimmsensor.bb @@ -13,5 +13,5 @@ S = "${WORKDIR}" inherit cmake # linux-libc-headers guides this way to include custom uapi headers -CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" +CXXFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" do_configure[depends] += "virtual/kernel:do_shared_workdir" diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb b/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb index 89dbf1d68..89246bbdf 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb +++ b/meta-openbmc-mods/meta-common/recipes-utilities/i3c-tools/i3c-tools.bb @@ -19,7 +19,7 @@ SRC_URI += "\ file://CMakeLists.txt \ " -do_configure_prepend() { +do_configure:prepend() { cp -f ${WORKDIR}/CMakeLists.txt ${S} } diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_cmds.c b/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_cmds.c index bc215f60b..ff9498696 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_cmds.c +++ b/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_cmds.c @@ -342,6 +342,27 @@ static void SIOSetBMCSCIEvent(unsigned short set) close(fd); } +static void SIOSetBMCSMIEvent(unsigned short set) +{ + int fd; + struct sio_ioctl_data sio_data; + + fd = open(SIO_DEVICE_NAME, O_RDWR | O_CLOEXEC); + if (fd < 0) { + printf("Error open %s\n", SIO_DEVICE_NAME); + exit(1); + } + + sio_data.sio_cmd = SIO_SET_BMC_SMI_EVENT; + sio_data.param = set; + + if (ioctl(fd, SIO_IOC_COMMAND, &sio_data) == 0) + printf("BMC SMI event is %s\n", + sio_data.data ? "set" : "cleared"); + + close(fd); +} + /*********************************************************************************/ #if SUPPORT_MAILBOX @@ -413,6 +434,8 @@ static void usage(void) "\tlpc_cmds sio get_pfail_status\n" "\tlpc_cmds sio set_bmc_sci_event\n" "\tlpc_cmds sio clear_bmc_sci_event\n" + "\tlpc_cmds sio set_bmc_smi_event\n" + "\tlpc_cmds sio clear_bmc_smi_event\n" "\n" #if SUPPORT_KCS_ADDR_CMD "\tlpc_cmds kcs [1 ~ 4] (getaddr / setaddr / quiet)\n" @@ -472,6 +495,10 @@ int main(int argc, char** argv) SIOSetBMCSCIEvent(1); else if (strcmp(argv[2], "clear_bmc_sci_event") == 0) SIOSetBMCSCIEvent(0); + else if (strcmp(argv[2], "set_bmc_smi_event") == 0) + SIOSetBMCSMIEvent(1); + else if (strcmp(argv[2], "clear_bmc_smi_event") == 0) + SIOSetBMCSMIEvent(0); } else if (strcmp(cmd, "kcs") == 0) { int ifc; diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_drv.h b/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_drv.h index 793e8b49c..354210c8b 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_drv.h +++ b/meta-openbmc-mods/meta-common/recipes-utilities/lpc-cmds/files/lpc_drv.h @@ -56,6 +56,7 @@ enum SIO_CMD { SIO_GET_PWRBTN_OVERRIDE, SIO_GET_PFAIL_STATUS, /* Start from AC Loss */ SIO_SET_BMC_SCI_EVENT, + SIO_SET_BMC_SMI_EVENT, SIO_MAX_CMD }; diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0003-Add-support-for-tls13-ciphers.patch b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0003-Add-support-for-tls13-ciphers.patch new file mode 100644 index 000000000..398cef63c --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0003-Add-support-for-tls13-ciphers.patch @@ -0,0 +1,39 @@ +diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c +index fad84140..d3dc3bde 100644 +--- a/plugins/curl/curl.c ++++ b/plugins/curl/curl.c +@@ -85,6 +85,7 @@ const char *proxy_user = NULL; + bool sslverify = true; + const char *ssl_version = NULL; + const char *ssl_cipher_list = NULL; ++const char *tls13_ciphers = NULL; + bool tcp_keepalive = false; + bool tcp_nodelay = true; + uint32_t timeout = 0; +@@ -309,6 +310,9 @@ curl_config (const char *key, const char *value) + else if (strcmp (key, "ssl-cipher-list") == 0) + ssl_cipher_list = value; + ++ else if (strcmp (key, "tls13-ciphers") == 0) ++ tls13_ciphers = value; ++ + else if (strcmp (key, "tcp-keepalive") == 0) { + r = nbdkit_parse_bool (value); + if (r == -1) +@@ -413,6 +417,7 @@ curl_config_complete (void) + "sslverify=false Do not verify SSL certificate of remote host.\n" \ + "ssl-version= Specify preferred TLS/SSL version.\n " \ + "ssl-cipher-list=C1:C2:.. Specify TLS/SSL cipher suites to be used.\n" \ ++ "tls13-ciphers=C1:C2:.. Specify TLS 1.3 cipher suites to be used.\n" \ + "tcp-keepalive=true Enable TCP keepalives.\n" \ + "tcp-nodelay=false Disable Nagle’s algorithm.\n" \ + "unix-socket-path= Open Unix domain socket instead of TCP/IP.\n" \ +@@ -550,6 +555,8 @@ curl_open (int readonly) + } + if (ssl_cipher_list) + curl_easy_setopt (h->c, CURLOPT_SSL_CIPHER_LIST, ssl_cipher_list); ++ if (tls13_ciphers) ++ curl_easy_setopt (h->c, CURLOPT_TLS13_CIPHERS, tls13_ciphers); + if (tcp_keepalive) + curl_easy_setopt (h->c, CURLOPT_TCP_KEEPALIVE, 1L); + if (!tcp_nodelay) diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0004-Handle-empty-CAInfo-in-curl-plugin-correctly.patch b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0004-Handle-empty-CAInfo-in-curl-plugin-correctly.patch new file mode 100644 index 000000000..867f2e166 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit/0004-Handle-empty-CAInfo-in-curl-plugin-correctly.patch @@ -0,0 +1,35 @@ +From f86b22a450589cdcac6bb3afa1818dfa6d2eefe4 Mon Sep 17 00:00:00 2001 +From: Wiktor Golgowski +Date: Fri, 27 Aug 2021 17:39:59 +0200 +Subject: [PATCH] Handle empty CAInfo in curl plugin correctly. + +Recent change in libcurl causes CAINFO option to be set when +the library is compiled. If we do not want to use the default +certificate store, we set the option to an empty string. +This change recognizes zero-length CAInfo and clears the libcurl +option. + +Signed-off-by: Wiktor Golgowski +--- + plugins/curl/curl.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c +index fad84140..176f9a1f 100644 +--- a/plugins/curl/curl.c ++++ b/plugins/curl/curl.c +@@ -498,8 +498,12 @@ curl_open (int readonly) + curl_easy_setopt (h->c, CURLOPT_FAILONERROR, 1L); + + /* Options. */ +- if (cainfo) +- curl_easy_setopt (h->c, CURLOPT_CAINFO, cainfo); ++ if (cainfo) { ++ if (strlen (cainfo) == 0) ++ curl_easy_setopt (h->c, CURLOPT_CAINFO, NULL); ++ else ++ curl_easy_setopt (h->c, CURLOPT_CAINFO, cainfo); ++ } + if (capath) + curl_easy_setopt (h->c, CURLOPT_CAPATH, capath); + if (cookie) diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb index 89072b090..f7d690ff8 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-utilities/nbdkit/nbdkit_git.bb @@ -12,6 +12,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f9dcc2d8acdde215fa4bd6ac12bb14f0" SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https" SRC_URI += "file://0001-Force-nbdkit-to-send-PATCH-as-upload-method.patch" SRC_URI += "file://0002-Add-support-for-ssl-config.patch" +SRC_URI += "file://0003-Add-support-for-tls13-ciphers.patch" +SRC_URI += "file://0004-Handle-empty-CAInfo-in-curl-plugin-correctly.patch" PV = "1.25.5+git${SRCPV}" SRCREV = "c828c6d48ff6b69454cad98054a1920d03c4b4c7" @@ -29,7 +31,7 @@ EXTRA_OECONF = "--disable-python --disable-perl --disable-ocaml \ --disable-lua --disable-vddk --without-libvirt \ --without-libguestfs" -do_install_append() { +do_install:append() { rm -f ${D}/usr/share/bash-completion/completions/nbdkit rmdir ${D}/usr/share/bash-completion/completions rmdir ${D}/usr/share/bash-completion diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/peci-hwmon-test/peci-hwmon-test.bb b/meta-openbmc-mods/meta-common/recipes-utilities/peci-hwmon-test/peci-hwmon-test.bb index b3b4096a6..e8506d3e0 100644 --- a/meta-openbmc-mods/meta-common/recipes-utilities/peci-hwmon-test/peci-hwmon-test.bb +++ b/meta-openbmc-mods/meta-common/recipes-utilities/peci-hwmon-test/peci-hwmon-test.bb @@ -6,7 +6,7 @@ SRC_URI = "\ " LICENSE = "CLOSED" -RDEPENDS_${PN} += "python" +RDEPENDS:${PN} += "python" S = "${WORKDIR}" 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 6a25bc6e1..e696d4bee 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,8 +1,8 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh" -SRCREV = "ec972d8b56fe84f8aa6d18f63e64e3fb0e7a9eaf" +SRCREV = "6b8e3e0d7f9d7bafe2b9addf4c52217339999974" -FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" SRC_URI += " \ file://0001-Extend-VR-Watchdog-timeout.patch \ diff --git a/meta-openbmc-mods/meta-wht/conf/layer.conf b/meta-openbmc-mods/meta-wht/conf/layer.conf index a639b642b..1724b07f0 100644 --- a/meta-openbmc-mods/meta-wht/conf/layer.conf +++ b/meta-openbmc-mods/meta-wht/conf/layer.conf @@ -9,6 +9,6 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "wht" BBFILE_PATTERN_wht = "^${LAYERDIR}/" BBFILE_PRIORITY_wht = "11" -LAYERSERIES_COMPAT_wht = "gatesgarth hardknott" +LAYERSERIES_COMPAT_wht = "gatesgarth hardknott honister" PRODUCT_GENERATION = "wht" diff --git a/meta-openbmc-mods/meta-wht/conf/local.conf.sample b/meta-openbmc-mods/meta-wht/conf/local.conf.sample index 5e6ed9fb3..202c5bca7 100644 --- a/meta-openbmc-mods/meta-wht/conf/local.conf.sample +++ b/meta-openbmc-mods/meta-wht/conf/local.conf.sample @@ -3,11 +3,11 @@ MACHINE ??= "intel-ast2500" #SSTATE_DIR ?= "/~YoctoSstate-cache" DISTRO ?= "openbmc-phosphor" PACKAGE_CLASSES ?= "package_rpm" -SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*" +SANITY_TESTED_DISTROS:append ?= " RedHatEnterpriseWorkstation-6.*" EXTRA_IMAGE_FEATURES = "validation-unsecure" # Uncomment the following line to enable debug features / default user account. #EXTRA_IMAGE_FEATURES += "debug-tweaks" -USER_CLASSES ?= "buildstats image-prelink" +USER_CLASSES ?= "buildstats" PATCHRESOLVE = "noop" # PFR image Build @@ -15,7 +15,7 @@ PATCHRESOLVE = "noop" # for building Intel PFR compliant images. #IMAGE_FSTYPES += "intel-pfr" -BB_DISKMON_DIRS = "\ +BB_DISKMON_DIRS ??= "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ diff --git a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor_%.bbappend b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor_%.bbappend index 638d833a8..14b3885cb 100644 --- a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor_%.bbappend +++ b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" SRC_URI += " \ file://0001-Configure-host-error-monitors-for-meta-wht.patch \ diff --git a/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci_%.bbappend b/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci_%.bbappend index 575cfea24..c5716d9b1 100644 --- a/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci_%.bbappend +++ b/meta-openbmc-mods/meta-wht/recipes-core/libpeci/libpeci_%.bbappend @@ -1,8 +1,8 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" SRC_URI += "file://99-peci.rules" -do_install_append() { +do_install:append() { install -d ${D}/lib/udev/rules.d install -m 0644 ${WORKDIR}/99-peci.rules ${D}/lib/udev/rules.d } diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bbappend b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bbappend index 55cc619ce..2955dabd3 100644 --- a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bbappend +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bbappend @@ -1,6 +1,6 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" -SRC_URI_append = " \ +SRC_URI:append = " \ file://pfr_manifest.json \ file://pfm_config.xml \ file://bmc_config.xml \ @@ -10,7 +10,7 @@ SRC_URI_append = " \ file://rk_prv.pem \ " -do_install_append () { +do_install:append () { install -m 400 ${WORKDIR}/pfr_manifest.json ${D}/${datadir}/pfrconfig install -m 400 ${WORKDIR}/pfm_config.xml ${D}/${datadir}/pfrconfig/pfm_config.xml install -m 400 ${WORKDIR}/bmc_config.xml ${D}/${datadir}/pfrconfig/bmc_config.xml diff --git a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/bmc_config.xml b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/bmc_config.xml index 9e7d3f82d..36a35b447 100644 --- a/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/bmc_config.xml +++ b/meta-openbmc-mods/meta-wht/recipes-intel/intel-pfr/obmc-intel-pfr-image-native/bmc_config.xml @@ -1,48 +1,48 @@ - - - - 1 - - - 0xB6EAFD19 - 4 - - - - 0xF27F28D7 - - - 0xA757A046 - 0xC7B88C74 - -1 - -1 - rk_pub.pem - - - - 0x14711C2F - 0xC7B88C74 - 8 - 1 - csk_pub.pem - 0xDE64437D - sha256 - rk_prv.pem - - - - - 0x15364367 - 0xDE64437D - sha256 - csk_prv.pem - - - - - - 1024 - - 128 - - + + + + 1 + + + 0xB6EAFD19 + 4 + + + + 0xF27F28D7 + + + 0xA757A046 + 0xC7B88C74 + -1 + -1 + rk_pub.pem + + + + 0x14711C2F + 0xC7B88C74 + 8 + 1 + csk_pub.pem + 0xDE64437D + sha256 + rk_prv.pem + + + + + 0x15364367 + 0xDE64437D + sha256 + csk_prv.pem + + + + + + 1024 + + 128 + + 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 3251758e9..f9150385d 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}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " file://decodeBoardID.sh" +SRC_URI:append = " file://decodeBoardID.sh" diff --git a/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend index 03c685d1d..c088629fa 100644 --- a/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend +++ b/meta-openbmc-mods/meta-wht/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend @@ -1,8 +1,8 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " file://ipmb-channels.json" +SRC_URI:append = " file://ipmb-channels.json" -do_install_append(){ +do_install:append(){ install -m 0644 -D ${WORKDIR}/ipmb-channels.json \ ${D}/usr/share/ipmbbridge/ } diff --git a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf index 5d8689680..00a2e00a2 100644 --- a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf +++ b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf @@ -9,6 +9,6 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "wolfpass" BBFILE_PATTERN_wolfpass = "^${LAYERDIR}/" BBFILE_PRIORITY_wolfpass = "11" -LAYERSERIES_COMPAT_wolfpass = "gatesgarth hardknott" +LAYERSERIES_COMPAT_wolfpass = "gatesgarth hardknott honister" PRODUCT_GENERATION = "prl" diff --git a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample index 8b2d71b2e..7549e10c2 100644 --- a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample +++ b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample @@ -3,13 +3,13 @@ MACHINE ??= "intel-ast2500" #SSTATE_DIR ?= "/~YoctoSstate-cache" DISTRO ?= "openbmc-phosphor" PACKAGE_CLASSES ?= "package_rpm" -SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*" +SANITY_TESTED_DISTROS:append ?= " RedHatEnterpriseWorkstation-6.*" EXTRA_IMAGE_FEATURES = "validation-unsecure" # Uncomment the following line to enable debug features / default user account. #EXTRA_IMAGE_FEATURES += "debug-tweaks" -USER_CLASSES ?= "buildstats image-prelink" +USER_CLASSES ?= "buildstats" PATCHRESOLVE = "noop" -BB_DISKMON_DIRS = "\ +BB_DISKMON_DIRS ??= "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ 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 3251758e9..f9150385d 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}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " file://decodeBoardID.sh" +SRC_URI:append = " file://decodeBoardID.sh" -- cgit v1.2.3