From 0cfc19e6565d8e3a1aa563c59edb347f9128026f Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Mon, 8 Mar 2021 14:14:22 -0800 Subject: Update to internal 0.35 Signed-off-by: Jason M. Bills --- meta-openbmc-mods/conf/layer.conf | 2 +- meta-openbmc-mods/meta-ast2500/conf/layer.conf | 4 +- .../configuration/entity-manager_%.bbappend | 13 +- meta-openbmc-mods/meta-ast2600/conf/layer.conf | 4 +- .../linux/linux-aspeed/intel-ast2600.cfg | 4 +- .../meta-common-small/conf/layer.conf | 2 +- .../classes/obmc-phosphor-image-common.bbclass | 1 + meta-openbmc-mods/meta-common/conf/layer.conf | 2 +- .../recipes-connectivity/openssl/openssl_1.1.1g.bb | 211 --------- .../recipes-connectivity/openssl/openssl_1.1.1i.bb | 211 +++++++++ ...incorrect-UCS4-inner-loop-bounds-BZ-26923.patch | 151 +++++++ ...rrun-in-EUC-KR-conversion-module-BZ-24973.patch | 133 ++++++ .../recipes-core/glibc/glibc_%.bbappend | 5 + .../recipes-core/interfaces/libmctp_git.bb | 2 +- .../recipes-core/ipmi/intel-ipmi-oem_%.bbappend | 2 +- .../recipes-intel/intel-pfr/pfr-manager_%.bbappend | 2 +- .../packagegroups/packagegroup-obmc-apps.bbappend | 3 + .../recipes-intel/psu-manager/psu-manager.bb | 2 +- ...ci-Add-debug-printing-to-check-caller-PID.patch | 43 ++ ...add-AST2600-A0-specific-fix-into-mbox-dri.patch | 42 ++ .../recipes-kernel/linux/linux-aspeed_%.bbappend | 4 +- .../0004-Improved-IPv6-netmask-parsing.patch | 127 ++++++ .../network/phosphor-network_%.bbappend | 4 +- .../biosconfig-manager/biosconfig-manager_git.bb | 28 ++ ...001-Improve-initialization-of-I2C-sensors.patch | 475 +++++++++++++++++++++ .../configuration/entity-manager_%.bbappend | 4 +- ...rmware-activation-to-launch-fwupd.sh-thro.patch | 29 +- .../0016-Process-PLDM-image-type.patch | 18 +- ...001-Firmware-update-configuration-changes.patch | 82 ++-- ...2-Use-chip-id-based-UUID-for-Service-Root.patch | 6 +- ...-handle-device-or-resource-busy-exception.patch | 20 +- .../0005-EventService-https-client-support.patch | 30 +- ...-Define-Redfish-interface-Registries-Bios.patch | 2 +- ...OS-config-Add-support-for-PATCH-operation.patch | 9 +- .../0008-Add-support-to-ResetBios-action.patch | 8 +- ...0009-Add-support-to-ChangePassword-action.patch | 4 +- ...s-add-attributes-for-Manager.CommandShell.patch | 2 +- ...4-recommended-fixes-by-crypto-review-team.patch | 8 +- ...36-Fix-wrong-check-in-EventService-events.patch | 35 ++ ...sh-TelemetryService-schema-implementation.patch | 24 +- ...OST-and-DELETE-in-MetricReportDefinitions.patch | 12 +- ...3-Add-support-for-MetricDefinition-scheme.patch | 69 +-- ...4-Sync-Telmetry-service-with-EventService.patch | 12 +- .../recipes-phosphor/interfaces/bmcweb_%.bbappend | 3 +- .../0010-fix-get-system-GUID-ipmi-command.patch | 8 +- ...3-Fix-keep-looping-issue-when-entering-OS.patch | 10 +- ...-SetInProgress-to-get-set-boot-option-cmd.patch | 102 ----- ...ve-Set-SOL-config-parameter-to-host-ipmid.patch | 10 +- ...ve-Get-SOL-config-parameter-to-host-ipmid.patch | 12 +- .../0062-Update-IPMI-Chassis-Control-command.patch | 16 +- ...he-pre-timeout-interrupt-in-dbus-property.patch | 34 +- ...-IPv6-Router-Address-Configuration-comman.patch | 120 ++++++ .../ipmi/phosphor-ipmi-host_%.bbappend | 2 +- .../recipes-phosphor/pmci/libmctp-intel_git.bb | 2 +- .../recipes-phosphor/pmci/libpldm-intel_git.bb | 2 +- .../recipes-phosphor/pmci/mctp-emulator.bb | 2 +- .../recipes-phosphor/pmci/mctp-wrapper.bb | 2 +- .../meta-common/recipes-phosphor/pmci/mctpd.bb | 2 +- .../meta-common/recipes-phosphor/pmci/mctpwplus.bb | 24 ++ .../meta-common/recipes-phosphor/pmci/pldmd.bb | 3 +- .../recipes-phosphor/pmci/pmci-launcher.bb | 2 +- .../sel-logger/phosphor-sel-logger_%.bbappend | 2 +- ...eck-for-min-max-received-from-hwmon-files.patch | 108 +++++ .../0002-Fix-PECI-client-creation-flow.patch | 159 +++++++ .../sensors/dbus-sensors_%.bbappend | 4 +- .../recipes-phosphor/settings/settings_git.bb | 2 +- .../telemetry/telemetry_%.bbappend | 2 +- .../webui/phosphor-webui_%.bbappend | 2 +- .../recipes-phosphor/webui/webui-vue_%.bbappend | 2 +- .../0001-replace-krb5-config-with-pkg-config.patch | 44 ++ .../recipes-support/curl/curl_%.bbappend | 2 - .../recipes-support/curl/curl_7.74.0.bb | 85 ++++ .../meta-wht/conf/bblayers.conf.sample | 8 +- meta-openbmc-mods/meta-wht/conf/layer.conf | 4 +- ...ory-thermtrip-events-based-on-DIMM-status.patch | 42 +- ...-Add-a-workaround-for-spurious-CPU-errors.patch | 14 +- .../meta-wolfpass/conf/bblayers.conf.sample | 4 +- meta-openbmc-mods/meta-wolfpass/conf/layer.conf | 4 +- 78 files changed, 2108 insertions(+), 587 deletions(-) delete mode 100644 meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1g.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1i.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0031-iconv-Fix-incorrect-UCS4-inner-loop-bounds-BZ-26923.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0032-Fix-buffer-overrun-in-EUC-KR-conversion-module-BZ-24973.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-peci-Add-debug-printing-to-check-caller-PID.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-soc-aspeed-add-AST2600-A0-specific-fix-into-mbox-dri.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch mode change 100644 => 100755 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch mode change 100755 => 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-Fix-wrong-check-in-EventService-events.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0001-Add-check-for-min-max-received-from-hwmon-files.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-support/curl/curl_%.bbappend create mode 100644 meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.74.0.bb (limited to 'meta-openbmc-mods') diff --git a/meta-openbmc-mods/conf/layer.conf b/meta-openbmc-mods/conf/layer.conf index 3cda98b4e..1f69c2c1c 100644 --- a/meta-openbmc-mods/conf/layer.conf +++ b/meta-openbmc-mods/conf/layer.conf @@ -17,6 +17,6 @@ USERADDEXTENSION = "useradd-staticids" USERADD_UID_TABLES = "files/passwd" USERADD_GID_TABLES = "files/group" -LAYER_CONF_VERSION = "12" +LAYER_CONF_VERSION = "13" INTELBASE = '${@os.path.normpath("${LAYERDIR}/")}' diff --git a/meta-openbmc-mods/meta-ast2500/conf/layer.conf b/meta-openbmc-mods/meta-ast2500/conf/layer.conf index 544cacc05..8575749fd 100644 --- a/meta-openbmc-mods/meta-ast2500/conf/layer.conf +++ b/meta-openbmc-mods/meta-ast2500/conf/layer.conf @@ -7,8 +7,8 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "ast2500" -BBFILE_PATTERN_ast2500 = "" -BBFILE_PRIORITY_ast2500 = "4" +BBFILE_PATTERN_ast2500 = "^${LAYERDIR}/" +BBFILE_PRIORITY_ast2500 = "10" LAYERSERIES_COMPAT_ast2500 = "dunfell gatesgarth" INHERIT += "extrausers" 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 80aba4906..97102fdf1 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 @@ -16,6 +16,15 @@ RDEPENDS_${PN} += " default-fru" do_install_append() { install -d ${D}/usr/share/entity-manager/configurations - install -m 0444 ${WORKDIR}/*.json ${D}/usr/share/entity-manager/configurations - rm ${D}/usr/share/entity-manager/configurations/blocklist.json + 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 + install -m 0444 ${WORKDIR}/TNP-baseboard.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/FCXXPDBASSMBL_PDB.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/OPB2RH-Chassis.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/CYP-baseboard.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/J85894-HSBP.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/CPC-Baseboard.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/MIDPLANE-2U2X12SWITCH.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/WC-Chassis.json ${D}/usr/share/entity-manager/configurations + install -m 0444 ${WORKDIR}/blocklist.json ${D}/usr/share/entity-manager } diff --git a/meta-openbmc-mods/meta-ast2600/conf/layer.conf b/meta-openbmc-mods/meta-ast2600/conf/layer.conf index 967bff8c7..de7653037 100644 --- a/meta-openbmc-mods/meta-ast2600/conf/layer.conf +++ b/meta-openbmc-mods/meta-ast2600/conf/layer.conf @@ -7,8 +7,8 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "ast2600" -BBFILE_PATTERN_ast2600 = "" -BBFILE_PRIORITY_ast2600 = "4" +BBFILE_PATTERN_ast2600 = "^${LAYERDIR}/" +BBFILE_PRIORITY_ast2600 = "10" LAYERSERIES_COMPAT_ast2600 = "dunfell gatesgarth" INHERIT += "extrausers" diff --git a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg index df0d33883..4770e5825 100644 --- a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg +++ b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg @@ -4,11 +4,9 @@ CONFIG_SPI_ASPEED_SMC=y CONFIG_SPI_FMC=y CONFIG_I3C=y CONFIG_DW_I3C_MASTER=y -CONFIG_ASPEED_I3C_GLOBAL=y +CONFIG_ASPEED_I3C_MASTER=y CONFIG_I3CDEV=y -CONFIG_JTAG_ASPEED=n CONFIG_U_SERIAL_CONSOLE=n -CONFIG_KERNEL_LZO=y CONFIG_HIGHMEM=n CONFIG_I2C_SLAVE_MQUEUE=y CONFIG_PINCTRL_ASPEED_G6=y diff --git a/meta-openbmc-mods/meta-common-small/conf/layer.conf b/meta-openbmc-mods/meta-common-small/conf/layer.conf index 2c2bf025b..fd2746ef1 100644 --- a/meta-openbmc-mods/meta-common-small/conf/layer.conf +++ b/meta-openbmc-mods/meta-common-small/conf/layer.conf @@ -7,5 +7,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "common-small" BBFILE_PATTERN_common-small = "^${LAYERDIR}/" -BBFILE_PRIORITY_common-small = "10" +BBFILE_PRIORITY_common-small = "9" LAYERSERIES_COMPAT_common-small = "dunfell gatesgarth" 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 6d029c8b4..32d52e76a 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 @@ -74,6 +74,7 @@ IMAGE_INSTALL_append = " \ virtual-media \ enable-nics \ host-misc-comm-manager \ + biosconfig-manager \ telemetry \ i3c-tools \ " diff --git a/meta-openbmc-mods/meta-common/conf/layer.conf b/meta-openbmc-mods/meta-common/conf/layer.conf index 5b6da2d48..23382eda0 100644 --- a/meta-openbmc-mods/meta-common/conf/layer.conf +++ b/meta-openbmc-mods/meta-common/conf/layer.conf @@ -7,5 +7,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "common" BBFILE_PATTERN_common = "^${LAYERDIR}/" -BBFILE_PRIORITY_common = "10" +BBFILE_PRIORITY_common = "9" LAYERSERIES_COMPAT_common = "dunfell gatesgarth" diff --git a/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1g.bb b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1g.bb deleted file mode 100644 index 66fa8f7d0..000000000 --- a/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1g.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] = "ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46" - -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.1i.bb b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1i.bb new file mode 100644 index 000000000..a9120d136 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-connectivity/openssl/openssl_1.1.1i.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] = "e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242" + +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/glibc/glibc/0031-iconv-Fix-incorrect-UCS4-inner-loop-bounds-BZ-26923.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0031-iconv-Fix-incorrect-UCS4-inner-loop-bounds-BZ-26923.patch new file mode 100644 index 000000000..bb297d50b --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0031-iconv-Fix-incorrect-UCS4-inner-loop-bounds-BZ-26923.patch @@ -0,0 +1,151 @@ +From 228edd356f03bf62dcf2b1335f25d43c602ee68d Mon Sep 17 00:00:00 2001 +From: Michael Colavita +Date: Thu, 19 Nov 2020 11:44:40 -0500 +Subject: [PATCH] iconv: Fix incorrect UCS4 inner loop bounds (BZ#26923) + +Previously, in UCS4 conversion routines we limit the number of +characters we examine to the minimum of the number of characters in the +input and the number of characters in the output. This is not the +correct behavior when __GCONV_IGNORE_ERRORS is set, as we do not consume +an output character when we skip a code unit. Instead, track the input +and output pointers and terminate the loop when either reaches its +limit. + +This resolves assertion failures when resetting the input buffer in a step of +iconv, which assumes that the input will be fully consumed given sufficient +output space. +--- + iconv/Makefile | 2 +- + iconv/gconv_simple.c | 16 ++++---------- + iconv/tst-iconv8.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 55 insertions(+), 13 deletions(-) + create mode 100644 iconv/tst-iconv8.c + +diff --git a/iconv/Makefile b/iconv/Makefile +index 30bf996d3a..f9b51e23ec 100644 +--- a/iconv/Makefile ++++ b/iconv/Makefile +@@ -44,7 +44,7 @@ CFLAGS-linereader.c += -DNO_TRANSLITERATION + CFLAGS-simple-hash.c += -I../locale + + tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5 tst-iconv6 \ +- tst-iconv7 tst-iconv-mt tst-iconv-opt ++ tst-iconv7 tst-iconv8 tst-iconv-mt + + others = iconv_prog iconvconfig + install-others-programs = $(inst_bindir)/iconv +diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c +index d4797fba17..963b29f246 100644 +--- a/iconv/gconv_simple.c ++++ b/iconv/gconv_simple.c +@@ -239,11 +239,9 @@ ucs4_internal_loop (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + uint32_t inval; + +@@ -307,11 +305,9 @@ ucs4_internal_loop_unaligned (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + if (__glibc_unlikely (inptr[0] > 0x80)) + { +@@ -613,11 +609,9 @@ ucs4le_internal_loop (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + uint32_t inval; + +@@ -684,11 +678,9 @@ ucs4le_internal_loop_unaligned (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + if (__glibc_unlikely (inptr[3] > 0x80)) + { +diff --git a/iconv/tst-iconv8.c b/iconv/tst-iconv8.c +new file mode 100644 +index 0000000000..0b92b19f66 +--- /dev/null ++++ b/iconv/tst-iconv8.c +@@ -0,0 +1,50 @@ ++/* Test iconv behavior on UCS4 conversions with //IGNORE. ++ Copyright (C) 2020 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Derived from BZ #26923 */ ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ iconv_t cd = iconv_open ("UTF-8//IGNORE", "ISO-10646/UCS4/"); ++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); ++ ++ /* ++ * Convert sequence beginning with an irreversible character into buffer that ++ * is too small. ++ */ ++ char input[12] = "\xe1\x80\xa1" "AAAAAAAAA"; ++ char *inptr = input; ++ size_t insize = sizeof (input); ++ char output[6]; ++ char *outptr = output; ++ size_t outsize = sizeof (output); ++ ++ TEST_VERIFY (iconv (cd, &inptr, &insize, &outptr, &outsize) == -1); ++ TEST_VERIFY (errno == E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); ++ ++ return 0; ++} ++ ++#include +-- +2.27.0 + diff --git a/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0032-Fix-buffer-overrun-in-EUC-KR-conversion-module-BZ-24973.patch b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0032-Fix-buffer-overrun-in-EUC-KR-conversion-module-BZ-24973.patch new file mode 100644 index 000000000..82ae284d2 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc/0032-Fix-buffer-overrun-in-EUC-KR-conversion-module-BZ-24973.patch @@ -0,0 +1,133 @@ +From ee7a3144c9922808181009b7b3e50e852fb4999b Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Mon, 21 Dec 2020 08:56:43 +0530 +Subject: [PATCH] Fix buffer overrun in EUC-KR conversion module (bz #24973) + +The byte 0xfe as input to the EUC-KR conversion denotes a user-defined +area and is not allowed. The from_euc_kr function used to skip two bytes +when told to skip over the unknown designation, potentially running over +the buffer end. +--- + iconvdata/Makefile | 3 ++- + iconvdata/bug-iconv13.c | 53 +++++++++++++++++++++++++++++++++++++++++ + iconvdata/euc-kr.c | 6 +---- + iconvdata/ksc5601.h | 6 ++--- + 4 files changed, 59 insertions(+), 9 deletions(-) + create mode 100644 iconvdata/bug-iconv13.c + +diff --git a/iconvdata/Makefile b/iconvdata/Makefile +index 4ec2741cdc..85009f3390 100644 +--- a/iconvdata/Makefile ++++ b/iconvdata/Makefile +@@ -73,7 +73,8 @@ modules.so := $(addsuffix .so, $(modules)) + ifeq (yes,$(build-shared)) + tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ + tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \ +- bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 ++ bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \ ++ bug-iconv13 + ifeq ($(have-thread-library),yes) + tests += bug-iconv3 + endif +diff --git a/iconvdata/bug-iconv13.c b/iconvdata/bug-iconv13.c +new file mode 100644 +index 0000000000..87aaff398e +--- /dev/null ++++ b/iconvdata/bug-iconv13.c +@@ -0,0 +1,53 @@ ++/* bug 24973: Test EUC-KR module ++ Copyright (C) 2020 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ iconv_t cd = iconv_open ("UTF-8//IGNORE", "EUC-KR"); ++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); ++ ++ /* 0xfe (->0x7e : row 94) and 0xc9 (->0x49 : row 41) are user-defined ++ areas, which are not allowed and should be skipped over due to ++ //IGNORE. The trailing 0xfe also is an incomplete sequence, which ++ should be checked first. */ ++ char input[4] = { '\xc9', '\xa1', '\0', '\xfe' }; ++ char *inptr = input; ++ size_t insize = sizeof (input); ++ char output[4]; ++ char *outptr = output; ++ size_t outsize = sizeof (output); ++ ++ /* This used to crash due to buffer overrun. */ ++ TEST_VERIFY (iconv (cd, &inptr, &insize, &outptr, &outsize) == (size_t) -1); ++ TEST_VERIFY (errno == EINVAL); ++ /* The conversion should produce one character, the converted null ++ character. */ ++ TEST_VERIFY (sizeof (output) - outsize == 1); ++ ++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); ++ ++ return 0; ++} ++ ++#include +diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c +index b0d56cf3ee..1045bae926 100644 +--- a/iconvdata/euc-kr.c ++++ b/iconvdata/euc-kr.c +@@ -80,11 +80,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) + \ + if (ch <= 0x9f) \ + ++inptr; \ +- /* 0xfe(->0x7e : row 94) and 0xc9(->0x59 : row 41) are \ +- user-defined areas. */ \ +- else if (__builtin_expect (ch == 0xa0, 0) \ +- || __builtin_expect (ch > 0xfe, 0) \ +- || __builtin_expect (ch == 0xc9, 0)) \ ++ else if (__glibc_unlikely (ch == 0xa0)) \ + { \ + /* This is illegal. */ \ + STANDARD_FROM_LOOP_ERR_HANDLER (1); \ +diff --git a/iconvdata/ksc5601.h b/iconvdata/ksc5601.h +index d3eb3a4ff8..f5cdc72797 100644 +--- a/iconvdata/ksc5601.h ++++ b/iconvdata/ksc5601.h +@@ -50,15 +50,15 @@ ksc5601_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset) + unsigned char ch2; + int idx; + ++ if (avail < 2) ++ return 0; ++ + /* row 94(0x7e) and row 41(0x49) are user-defined area in KS C 5601 */ + + if (ch < offset || (ch - offset) <= 0x20 || (ch - offset) >= 0x7e + || (ch - offset) == 0x49) + return __UNKNOWN_10646_CHAR; + +- if (avail < 2) +- return 0; +- + ch2 = (*s)[1]; + if (ch2 < offset || (ch2 - offset) <= 0x20 || (ch2 - offset) >= 0x7f) + return __UNKNOWN_10646_CHAR; +-- +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 new file mode 100644 index 000000000..d458a6d94 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/glibc/glibc_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0031-iconv-Fix-incorrect-UCS4-inner-loop-bounds-BZ-26923.patch \ + file://0032-Fix-buffer-overrun-in-EUC-KR-conversion-module-BZ-24973.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 c7503ef35..f88f9957f 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 = "b9fd597ca42b290a97a259d2d5a089981c25e72c" +SRCREV = "192752301b9d98b8699e88ede61d75e96eaed4bb" PV = "0.1+git${SRCPV}" 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 f268ad691..995146b35 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,4 +2,4 @@ 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 = "6d6dc7ad721268a66adecca423716ce9fcf3838b" +SRCREV = "b910987a7d832e38e9342f0946aeb555a48f9cb0" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend index 3a1183f63..9a8fa44c0 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend @@ -1,5 +1,5 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/pfr-manager" -SRCREV = "0884191b6478bdd787852ab9d290caaeb7816454" +SRCREV = "f88197083c3372cfb9167347b3cf9cc26d488a4d" DEPENDS += " libgpiod \ " 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 1921d8e3a..7d61ea5c7 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,4 +1,7 @@ RDEPENDS_${PN}-extrasdevtools = "libgpiod-tools" RDEPENDS_${PN}-chassis-state-mgmt_remove = "obmc-phosphor-power" +RDEPENDS_${PN}-devtools_remove = "ffdc" + +PACKAGES_remove = "${PN}-debug-collector" 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 89dd97bf7..482738d25 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 @@ -2,7 +2,7 @@ SUMMARY = "Power supply manager for Intel based platform" DESCRIPTION = "Power supply manager which include PSU Cold Redundancy service" SRC_URI = "git://github.com/Intel-BMC/psu-manager.git;protocol=ssh" -SRCREV = "a6dcc49f7513789931099be7948ba5b6a39e9c20" +SRCREV = "d14c350c2dfcf9da3e6088ef29a8c5be4e40079b" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-peci-Add-debug-printing-to-check-caller-PID.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-peci-Add-debug-printing-to-check-caller-PID.patch new file mode 100644 index 000000000..0a7d4007f --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-peci-Add-debug-printing-to-check-caller-PID.patch @@ -0,0 +1,43 @@ +From 63d053b12cc7ca63a668872ce70e6592fe1dd7e5 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo +Date: Wed, 3 Feb 2021 16:18:37 -0800 +Subject: [PATCH] peci: Add debug printing to check caller PID + +This commit adds debug printing out to check caller PID for traffic +profiling. + +The printing can be enabled by this command: +echo -n 'file drivers/peci/peci-core.c line 218 +p' > /sys/kernel/debug/dynamic_debug/control +echo '8' > /proc/sys/kernel/printk + +Signed-off-by: Jae Hyun Yoo +--- + drivers/peci/peci-core.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/peci/peci-core.c b/drivers/peci/peci-core.c +index 0fc2f246ada8..0fdb26a15150 100644 +--- a/drivers/peci/peci-core.c ++++ b/drivers/peci/peci-core.c +@@ -193,6 +193,7 @@ static int __peci_xfer(struct peci_adapter *adapter, struct peci_xfer_msg *msg, + bool do_retry, bool has_aw_fcs) + { + uint interval_ms = PECI_DEV_RETRY_INTERVAL_MIN_MSEC; ++ char task_name[TASK_COMM_LEN]; + ulong timeout = jiffies; + u8 aw_fcs; + int ret; +@@ -213,6 +214,10 @@ static int __peci_xfer(struct peci_adapter *adapter, struct peci_xfer_msg *msg, + } + } + ++ get_task_comm(task_name, current); ++ dev_dbg(&adapter->dev, "%s is called by %s(%d) through %s\n", ++ __func__, task_name, current->pid, adapter->name); ++ + /* + * For some commands, the PECI originator may need to retry a command if + * the processor PECI client responds with a 0x8x completion code. In +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-soc-aspeed-add-AST2600-A0-specific-fix-into-mbox-dri.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-soc-aspeed-add-AST2600-A0-specific-fix-into-mbox-dri.patch new file mode 100644 index 000000000..1e1dac7a8 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-soc-aspeed-add-AST2600-A0-specific-fix-into-mbox-dri.patch @@ -0,0 +1,42 @@ +From ae96ce5f2a5bd76b234cea6fc3f0bf1df74387f3 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo +Date: Thu, 4 Feb 2021 00:29:55 -0800 +Subject: [PATCH] soc: aspeed: add AST2600 A0 specific fix into mbox driver + +AST2600 A0 has the same LPC mbox register structure with AST2500 +but AST2600 A1 and later revision is different so this commit adds +AST2600 A0 specific fix into the mbox driver. + +Signed-off-by: Jae Hyun Yoo +--- + drivers/soc/aspeed/aspeed-lpc-mbox.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/drivers/soc/aspeed/aspeed-lpc-mbox.c b/drivers/soc/aspeed/aspeed-lpc-mbox.c +index 8dd3345682c7..12bb436dda78 100644 +--- a/drivers/soc/aspeed/aspeed-lpc-mbox.c ++++ b/drivers/soc/aspeed/aspeed-lpc-mbox.c +@@ -363,6 +363,20 @@ static int aspeed_mbox_probe(struct platform_device *pdev) + return -EINVAL; + + config = match->data; ++ ++ if (of_device_is_compatible(pdev->dev.of_node, ++ "aspeed,ast2600-mbox")) { ++ #define REV_ID_IO_OFFSET 0x1e6e2014 ++ #define REV_ID_AST2600A0 0x05000303 ++ void __iomem *chip_id_base = devm_ioremap(&pdev->dev, ++ REV_ID_IO_OFFSET, ++ sizeof(u32)); ++ ++ if (!IS_ERR(chip_id_base) && ++ readl(chip_id_base) == REV_ID_AST2600A0) ++ config = &ast2500_config; ++ } ++ + memcpy(&mbox->configs, config, sizeof(mbox->configs)); + + rc = of_property_read_u32(dev->of_node, "reg", &mbox->base); +-- +2.17.1 + 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 b01cd0d24..b2865e511 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 @@ -4,7 +4,7 @@ KBRANCH = "dev-5.8-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.8-intel" -SRCREV="fc4c626deff9447cd5453b180826ed4f48fc828d" +SRCREV="0f6cc27c3bed1e633100e9ea8d8e0384ca51e613" do_compile_prepend(){ # device tree compiler flags @@ -13,6 +13,8 @@ do_compile_prepend(){ SRC_URI += " \ file://intel.cfg \ + file://0001-peci-Add-debug-printing-to-check-caller-PID.patch \ + file://0002-soc-aspeed-add-AST2600-A0-specific-fix-into-mbox-dri.patch \ " SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://0005-128MB-flashmap-for-PFR.patch', '', d)}" diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch new file mode 100644 index 000000000..d0ba59ccd --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0004-Improved-IPv6-netmask-parsing.patch @@ -0,0 +1,127 @@ +From 371fb36e7a92b4139022b568a278e7624727bbaf Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey +Date: Tue, 26 Jan 2021 15:02:54 -0800 +Subject: [PATCH] Improved IPv6 netmask parsing + +The subnet mask parsing in toV6CIDR only worked for very well behaved +subnet strings. This became apparent after the BMC received a DHCP +assigned IPv6 address with an Address Prefix equal to /128. Any +netmask values trailing the final ":" character were ignored. In +addition it assumed all subnet entries would be submitted in shorthand +form. + +The changes here handle mask values supplied following the final ":" +character. It also does more sanity checking on the incoming subnet +string. + +Tested: +Supplied the function with the following test patterns, and confirmed +the function returns accurate address prefix values. + ffff:ffff:: + ffff:fc00:: + ffff:0:0:0:0:0:0:0 + ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffc + ffff:0:0:6:0:0:0:0 + : + :: + +Change-Id: Ib2c73fe07a6a3f1c7a5f0e8f231dfef21badb3af +Signed-off-by: Johnathan Mantey + +%% original patch: 0004-Improved-IPv6-netmask-parsing.patch +--- + util.cpp | 67 ++++++++++++++++++++------------------------------------ + 1 file changed, 24 insertions(+), 43 deletions(-) + +diff --git a/util.cpp b/util.cpp +index 0c5dbff..c230221 100644 +--- a/util.cpp ++++ b/util.cpp +@@ -37,59 +37,40 @@ namespace fs = std::filesystem; + + uint8_t toV6Cidr(const std::string& subnetMask) + { +- uint8_t pos = 0; +- uint8_t prevPos = 0; +- uint8_t cidr = 0; +- uint16_t buff{}; +- do ++ struct in6_addr subnet; ++ int ret = inet_pton(AF_INET6, subnetMask.c_str(), &subnet); ++ if (ret != 1) + { +- // subnet mask look like ffff:ffff:: +- // or ffff:c000:: +- pos = subnetMask.find(":", prevPos); +- if (pos == std::string::npos) +- { +- break; +- } +- +- auto str = subnetMask.substr(prevPos, (pos - prevPos)); +- prevPos = pos + 1; ++ log("Invalid Mask", ++ entry("SUBNETMASK=%s", subnetMask.c_str())); ++ return 0; ++ } + +- // String length is 0 +- if (!str.length()) +- { +- return cidr; +- } +- // converts it into number. +- if (sscanf(str.c_str(), "%hx", &buff) <= 0) ++ uint8_t cidr = 0; ++ bool zeroesFound = false; ++ int bitsSet, trailingZeroes; ++ for (int lv = 0; lv < 4; lv++) ++ { ++ subnet.s6_addr32[lv] = be32toh(subnet.s6_addr32[lv]); ++ bitsSet = __builtin_popcount(subnet.s6_addr32[lv]); ++ if (zeroesFound && bitsSet) + { + log("Invalid Mask", + entry("SUBNETMASK=%s", subnetMask.c_str())); +- + return 0; + } ++ trailingZeroes = __builtin_ctz(subnet.s6_addr32[lv]); ++ zeroesFound |= trailingZeroes; + +- // convert the number into bitset +- // and check for how many ones are there. +- // if we don't have all the ones then make +- // sure that all the ones should be left justify. +- +- if (__builtin_popcount(buff) != 16) ++ if (bitsSet + trailingZeroes != 32) + { +- if (((sizeof(buff) * 8) - (__builtin_ctz(buff))) != +- __builtin_popcount(buff)) +- { +- log("Invalid Mask", +- entry("SUBNETMASK=%s", subnetMask.c_str())); +- +- return 0; +- } +- cidr += __builtin_popcount(buff); +- return cidr; ++ // There are '1' bits interspersed with '0' bits ++ log("Invalid Mask", ++ entry("SUBNETMASK=%s", subnetMask.c_str())); ++ return 0; + } +- +- cidr += 16; +- } while (1); +- ++ cidr += bitsSet; ++ } + return cidr; + } + } // anonymous namespace +-- +2.26.2 + 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 4f4030169..fd2f926c8 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 @@ -4,7 +4,9 @@ DEPENDS += "nlohmann-json boost" #todo: Appu, fix nobranch SRC_URI = "git://github.com/openbmc/phosphor-networkd" +SRC_URI += " file://0004-Improved-IPv6-netmask-parsing.patch \ + " -SRCREV = "ffcba341a893318588afe83e8d767d8c20fd9189" +SRCREV = "1b5ec9c5367947d19bdf6efd08251eeb55dd90f4" EXTRA_OECONF_append = " --enable-nic-ethtool=yes" 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 new file mode 100644 index 000000000..b91cc5e9e --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/biosconfig-manager/biosconfig-manager_git.bb @@ -0,0 +1,28 @@ +SUMMARY = "BIOS Config Manager daemon for managing the BIOS configuration" +DESCRIPTION = "To view and modify BIOS setup configuration remotely via BMC" + +PV = "1.0+git${SRCPV}" + +S = "${WORKDIR}/git" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" +inherit meson systemd + +SRC_URI = "git://github.com/openbmc/bios-settings-mgr.git" +SRCREV = "c0f926d6cbf9636a42f4bc3d33b9602e4633c478" + +SYSTEMD_SERVICE_${PN} += " \ + xyz.openbmc_project.biosconfig_manager.service \ + xyz.openbmc_project.biosconfig_password.service \ + " + +DEPENDS += " \ + systemd \ + sdbusplus \ + libgpiod \ + phosphor-logging \ + boost \ + nlohmann-json \ + libtinyxml2 \ + " diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch new file mode 100644 index 000000000..c518d943f --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Improve-initialization-of-I2C-sensors.patch @@ -0,0 +1,475 @@ +From 2048226878a80fefcbcbe999fd826cc7c02ed9e4 Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey +Date: Tue, 13 Oct 2020 15:00:51 -0700 +Subject: [PATCH] Improve initialization of I2C sensors + +After an AC cycle validation has witnessed some systems sensors are +missing. As Entity Manager begins the process of scanning for +sesnsors, and creating the hardware monitoring nodes, there are +occassionally some failures to correctly create the node. This +manifests itself by the 'dd' kernel driver emitting an -EBUSY error +message. Unfortunately the 'dd' driver also eats the error code, and +continues. This is by design. + +This commit modifies how the nodes are initialized. The steps taken: +1. Determine if the node is already present +2. Create the node if it is not +3. Set a timer, to give the kernel time to create the node +4. For those sensors that create a "hwmon" subdir, search for that +directory after the timer elapses. +5. If the subdir is not present, delete the device, and try again by +initiating another timer. +6. Continue until the subdir exists, or a retry count expires. + +Tested: +Ran AC cycles via a script. +After each cycle, wait for the SUT to DC on, and arrive at the EFI +Shell> propmt. +Issue "ipmitool sensor list", capturing the results +Search the list for all of the sensors that have been reported as +missing after AC cycles. + +Change-Id: I118df674162677d66e7d211b089430fce384086b +Signed-off-by: Johnathan Mantey +--- + include/devices.hpp | 153 +++++++++++++++++++---------------- + src/Overlay.cpp | 192 ++++++++++++++++++++++++++++++++++---------- + 2 files changed, 233 insertions(+), 112 deletions(-) + +diff --git a/include/devices.hpp b/include/devices.hpp +index acbfb95..1f25864 100644 +--- a/include/devices.hpp ++++ b/include/devices.hpp +@@ -31,99 +31,116 @@ struct CmpStr + + struct ExportTemplate + { +- ExportTemplate(const char* params, const char* dev) : +- parameters(params), device(dev){}; ++ ExportTemplate(const char* params, const char* dev, const char* constructor, ++ const char* destructor, bool createsHWMon) : ++ parameters(params), ++ devicePath(dev), add(constructor), remove(destructor), ++ createsHWMon(createsHWMon){}; + const char* parameters; +- const char* device; ++ const char* devicePath; ++ const char* add; ++ const char* remove; ++ bool createsHWMon; + }; + + const boost::container::flat_map + exportTemplates{ +- {{"24C02", ExportTemplate("24c02 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"24C64", ExportTemplate("24c64 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ {{"24C02", ++ ExportTemplate("24c02 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, ++ {"24C64", ++ ExportTemplate("24c64 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"ADM1272", +- ExportTemplate("adm1272 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"EEPROM", ExportTemplate("eeprom $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("adm1272 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, ++ {"EEPROM", ++ ExportTemplate("eeprom $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"EMC1412", +- ExportTemplate("emc1412 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("emc1412 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"EMC1413", +- ExportTemplate("emc1413 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("emc1413 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"EMC1414", +- ExportTemplate("emc1414 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"Gpio", ExportTemplate("$Index", "/sys/class/gpio/export")}, +- {"INA230", ExportTemplate("ina230 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("emc1414 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"Gpio", ExportTemplate("$Index", "/sys/class/gpio", "export", ++ "unexport", false)}, ++ {"INA230", ++ ExportTemplate("ina230 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"ISL68137", +- ExportTemplate("isl68137 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("isl68137 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"ISL68223", +- ExportTemplate("isl68223 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("isl68223 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"ISL69243", +- ExportTemplate("isl69243 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("isl69243 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX16601", +- ExportTemplate("max16601 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max16601 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX20710", +- ExportTemplate("max20710 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max20710 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX20730", +- ExportTemplate("max20730 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max20730 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX20734", +- ExportTemplate("max20734 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max20734 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX20796", +- ExportTemplate("max20796 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max20796 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX31725", +- ExportTemplate("max31725 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max31725 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX31730", +- ExportTemplate("max31730 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max31730 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX34451", +- ExportTemplate("max34451 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max34451 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX6654", +- ExportTemplate("max6654 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max6654 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"PCA9543Mux", +- ExportTemplate("pca9543 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9543 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9544Mux", +- ExportTemplate("pca9544 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9544 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9545Mux", +- ExportTemplate("pca9545 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9545 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9546Mux", +- ExportTemplate("pca9546 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9546 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9547Mux", +- ExportTemplate("pca9547 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"SBTSI", ExportTemplate("sbtsi $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"pmbus", ExportTemplate("pmbus $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP112", ExportTemplate("tmp112 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP175", ExportTemplate("tmp175 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP421", ExportTemplate("tmp421 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP441", ExportTemplate("tmp441 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9547 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, ++ {"SBTSI", ++ ExportTemplate("sbtsi $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"pmbus", ++ ExportTemplate("pmbus $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP112", ++ ExportTemplate("tmp112 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP175", ++ ExportTemplate("tmp175 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP421", ++ ExportTemplate("tmp421 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP441", ++ ExportTemplate("tmp441 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"TMP75", +- ExportTemplate("tmp75 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}}}; ++ ExportTemplate("tmp75 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}}}; + } // namespace devices +diff --git a/src/Overlay.cpp b/src/Overlay.cpp +index cb6ed10..7a3089e 100644 +--- a/src/Overlay.cpp ++++ b/src/Overlay.cpp +@@ -21,6 +21,8 @@ + #include "devices.hpp" + + #include ++#include ++#include + #include + #include + #include +@@ -32,6 +34,8 @@ + #include + #include + ++extern boost::asio::io_context io; ++ + constexpr const char* OUTPUT_DIR = "/tmp/overlays"; + constexpr const char* TEMPLATE_CHAR = "$"; + constexpr const char* HEX_FORMAT_STR = "0x"; +@@ -113,16 +117,149 @@ void linkMux(const std::string& muxName, size_t busIndex, size_t address, + } + } + ++static int deleteDevice(const std::string& devicePath, ++ std::shared_ptr address, ++ const std::string& destructor) ++{ ++ if (!address) ++ { ++ return -1; ++ } ++ std::filesystem::path deviceDestructor(devicePath); ++ deviceDestructor /= destructor; ++ std::ofstream deviceFile(deviceDestructor); ++ if (!deviceFile.good()) ++ { ++ std::cerr << "Error writing " << deviceDestructor << "\n"; ++ return -1; ++ } ++ deviceFile << std::to_string(*address); ++ deviceFile.close(); ++ return 0; ++} ++ ++static int createDevice(const std::string& devicePath, ++ const std::string& parameters, ++ const std::string& constructor) ++{ ++ std::filesystem::path deviceConstructor(devicePath); ++ deviceConstructor /= constructor; ++ std::ofstream deviceFile(deviceConstructor); ++ if (!deviceFile.good()) ++ { ++ std::cerr << "Error writing " << deviceConstructor << "\n"; ++ return -1; ++ } ++ deviceFile << parameters; ++ deviceFile.close(); ++ ++ return 0; ++} ++ ++static bool deviceIsCreated(const std::string& devicePath, ++ std::shared_ptr bus, ++ std::shared_ptr address, ++ const bool retrying) ++{ ++ // Prevent the device from being created a second time. ++ if (bus && address) ++ { ++ std::ostringstream hex; ++ hex << std::hex << *address; ++ std::string addressHex = hex.str(); ++ std::string busStr = std::to_string(*bus); ++ ++ if (std::filesystem::is_directory(devicePath)) ++ { ++ for (const auto& path : ++ std::filesystem::directory_iterator(devicePath)) ++ { ++ if (!std::filesystem::is_directory(path)) ++ { ++ continue; ++ } ++ ++ const std::string& directoryName = path.path().filename(); ++ if (boost::starts_with(directoryName, busStr) && ++ boost::ends_with(directoryName, addressHex)) ++ { ++ if (retrying) ++ { ++ // subsequent attempts should find the hwmon subdir. ++ std::filesystem::path hwmonDir(devicePath); ++ hwmonDir /= directoryName; ++ hwmonDir /= "hwmon"; ++ bool dirFound = ++ (std::filesystem::is_directory(hwmonDir)); ++ return dirFound; ++ } ++ else ++ { ++ return true; ++ } ++ } ++ } ++ return false; ++ } ++ } ++ return false; ++} ++ ++constexpr size_t totalBuildDeviceRetries = 5; ++static int buildDevice(const std::string& devicePath, ++ const std::string& parameters, ++ std::shared_ptr bus, ++ std::shared_ptr address, ++ const std::string& constructor, ++ const std::string& destructor, const bool createsHWMon, ++ const size_t retries = totalBuildDeviceRetries) ++{ ++ bool tryAgain = false; ++ if (!retries) ++ { ++ return -1; ++ } ++ ++ if (!deviceIsCreated(devicePath, bus, address, false)) ++ { ++ createDevice(devicePath, parameters, constructor); ++ tryAgain = true; ++ } ++ else if (createsHWMon && !deviceIsCreated(devicePath, bus, address, true)) ++ { ++ // device is present, hwmon subdir missing ++ deleteDevice(devicePath, address, destructor); ++ tryAgain = true; ++ } ++ ++ if (tryAgain) ++ { ++ std::shared_ptr createTimer = ++ std::make_shared(io); ++ createTimer->expires_after(std::chrono::milliseconds(500)); ++ createTimer->async_wait([createTimer, devicePath, parameters, bus, ++ address, constructor, destructor, createsHWMon, ++ retries](const boost::system::error_code&) { ++ buildDevice(devicePath, parameters, bus, address, constructor, ++ destructor, createsHWMon, retries - 1); ++ }); ++ } ++ return 0; ++} ++ + void exportDevice(const std::string& type, + const devices::ExportTemplate& exportTemplate, + const nlohmann::json& configuration) + { + + std::string parameters = exportTemplate.parameters; +- std::string device = exportTemplate.device; ++ std::string devicePath = exportTemplate.devicePath; ++ std::string constructor = exportTemplate.add; ++ std::string destructor = exportTemplate.remove; ++ bool createsHWMon = exportTemplate.createsHWMon; + std::string name = "unknown"; +- const uint64_t* bus = nullptr; +- const uint64_t* address = nullptr; ++ std::shared_ptr bus = nullptr; ++ std::shared_ptr address = nullptr; + const nlohmann::json::array_t* channels = nullptr; + + for (auto keyPair = configuration.begin(); keyPair != configuration.end(); +@@ -144,11 +281,13 @@ void exportDevice(const std::string& type, + + if (keyPair.key() == "Bus") + { +- bus = keyPair.value().get_ptr(); ++ bus = std::make_shared( ++ *keyPair.value().get_ptr()); + } + else if (keyPair.key() == "Address") + { +- address = keyPair.value().get_ptr(); ++ address = std::make_shared( ++ *keyPair.value().get_ptr()); + } + else if (keyPair.key() == "ChannelNames") + { +@@ -157,49 +296,14 @@ void exportDevice(const std::string& type, + } + boost::replace_all(parameters, TEMPLATE_CHAR + keyPair.key(), + subsituteString); +- boost::replace_all(device, TEMPLATE_CHAR + keyPair.key(), ++ boost::replace_all(devicePath, TEMPLATE_CHAR + keyPair.key(), + subsituteString); + } + +- // if we found bus and address we can attempt to prevent errors +- if (bus != nullptr && address != nullptr) +- { +- std::ostringstream hex; +- hex << std::hex << *address; +- const std::string& addressHex = hex.str(); +- std::string busStr = std::to_string(*bus); ++ int err = buildDevice(devicePath, parameters, bus, address, constructor, ++ destructor, createsHWMon); + +- std::filesystem::path devicePath(device); +- std::filesystem::path parentPath = devicePath.parent_path(); +- if (std::filesystem::is_directory(parentPath)) +- { +- for (const auto& path : +- std::filesystem::directory_iterator(parentPath)) +- { +- if (!std::filesystem::is_directory(path)) +- { +- continue; +- } +- +- const std::string& directoryName = path.path().filename(); +- if (boost::starts_with(directoryName, busStr) && +- boost::ends_with(directoryName, addressHex)) +- { +- return; // already exported +- } +- } +- } +- } +- +- std::ofstream deviceFile(device); +- if (!deviceFile.good()) +- { +- std::cerr << "Error writing " << device << "\n"; +- return; +- } +- deviceFile << parameters; +- deviceFile.close(); +- if (boost::ends_with(type, "Mux") && bus && address && channels) ++ if (!err && boost::ends_with(type, "Mux") && bus && address && channels) + { + linkMux(name, static_cast(*bus), static_cast(*address), + *channels); +-- +2.26.2 + 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 2f1f1dc6a..619c2f3d4 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend @@ -1,6 +1,8 @@ # this is here just to bump faster than upstream # SRC_URI = "git://github.com/openbmc/entity-manager.git" -SRCREV = "c7c5de795cf672797ae35965e95642dd1fc39363" +SRCREV = "2a9670820094a9a1847770597b713bf6fb3c08ba" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += " file://0001-Improve-initialization-of-I2C-sensors.patch" + 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 85ef5afcf..82ec8431d 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch @@ -1,7 +1,7 @@ -From 32d90301c494c1b43f8e1d74ac9e7c1dc2fe486a Mon Sep 17 00:00:00 2001 +From 05b893222a8586c51e6f66320067f13b2a89dd46 Mon Sep 17 00:00:00 2001 From: Jennifer Lee Date: Mon, 10 Dec 2018 10:36:44 -0800 -Subject: [PATCH 1/1] Modified firmware activation to launch fwupd.sh through +Subject: [PATCH] Modified firmware activation to launch fwupd.sh through non-ubi fs code path to match more closely to the upstream design - Added option FWUPD_SCRIPT to saperate intel customized code - Adopted @@ -12,15 +12,15 @@ Signed-off-by: Jennifer Lee Signed-off-by: James Feist --- - activation.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ + activation.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++- meson.build | 1 + meson_options.txt | 3 +++ - static/flash.cpp | 41 +++++++++++++++++++++++++++++++++++++++-- + static/flash.cpp | 42 ++++++++++++++++++++++++++++++++++++++++-- ubi/flash.cpp | 9 +++------ - 5 files changed, 91 insertions(+), 8 deletions(-) + 5 files changed, 91 insertions(+), 9 deletions(-) diff --git a/activation.cpp b/activation.cpp -index 291ce7c..f76018d 100644 +index c82e297..d690a39 100644 --- a/activation.cpp +++ b/activation.cpp @@ -88,7 +88,50 @@ auto Activation::activation(Activations value) -> Activations @@ -36,7 +36,7 @@ index 291ce7c..f76018d 100644 + + activationProgress = + std::make_unique(bus, path); -+ + +#ifdef WANT_SIGNATURE_VERIFY + fs::path uploadDir(IMG_UPLOAD_DIR); + if (!verifySignature(uploadDir / versionId, SIGNED_IMAGE_CONF_PATH)) @@ -60,7 +60,7 @@ index 291ce7c..f76018d 100644 + redundancyPriority = + std::make_unique(bus, path, *this, 0); + } - ++ + // Remove version object from image manager + Activation::deleteImageManagerObject(); + @@ -91,7 +91,7 @@ index 291ce7c..f76018d 100644 else { diff --git a/meson.build b/meson.build -index 62b9aeb..08d6f71 100644 +index c74a927..0e5f963 100644 --- a/meson.build +++ b/meson.build @@ -54,6 +54,7 @@ conf.set('MMC_LAYOUT', get_option('bmc-layout').contains('mmc')) @@ -103,7 +103,7 @@ index 62b9aeb..08d6f71 100644 # Configurable variables conf.set('ACTIVE_BMC_MAX_ALLOWED', get_option('active-bmc-max-allowed')) diff --git a/meson_options.txt b/meson_options.txt -index c9b7b33..4f7e62a 100644 +index d37e681..d86371b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -22,6 +22,9 @@ option('oe-sdk', type: 'feature', description: 'Enable OE SDK') @@ -117,7 +117,7 @@ index c9b7b33..4f7e62a 100644 option( 'active-bmc-max-allowed', type: 'integer', diff --git a/static/flash.cpp b/static/flash.cpp -index 9bb2bba..c4ff002 100644 +index 101828b..5506a59 100644 --- a/static/flash.cpp +++ b/static/flash.cpp @@ -22,9 +22,11 @@ namespace updater @@ -132,7 +132,7 @@ index 9bb2bba..c4ff002 100644 // For static layout code update, just put images in /run/initramfs. // It expects user to trigger a reboot and an updater script will program // the image to flash during reboot. -@@ -36,11 +38,46 @@ void Activation::flashWrite() +@@ -36,11 +38,47 @@ void Activation::flashWrite() fs::copy_file(uploadDir / versionId / bmcImage, toPath / bmcImage, fs::copy_options::overwrite_existing); } @@ -146,7 +146,8 @@ index 9bb2bba..c4ff002 100644 } -void Activation::onStateChanges(sdbusplus::message::message& /*msg*/) -+void Activation::onStateChanges(sdbusplus::message::message& msg) ++void Activation::onStateChanges(__attribute__((unused)) ++ sdbusplus::message::message& msg) { - // Empty +#ifndef FWUPD_SCRIPT @@ -182,7 +183,7 @@ index 9bb2bba..c4ff002 100644 } // namespace updater diff --git a/ubi/flash.cpp b/ubi/flash.cpp -index 5af2a17..ffa9348 100644 +index a263bfb..c58eefc 100644 --- a/ubi/flash.cpp +++ b/ubi/flash.cpp @@ -15,13 +15,10 @@ void Activation::flashWrite() diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0016-Process-PLDM-image-type.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0016-Process-PLDM-image-type.patch index c353a09b2..bc94f00af 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0016-Process-PLDM-image-type.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0016-Process-PLDM-image-type.patch @@ -1,4 +1,4 @@ -From aaebe1c3db71b7addbd3f1d1b2b5f83d7cba14e3 Mon Sep 17 00:00:00 2001 +From a78b7a609f58ac82623c357426ef0590d6d76971 Mon Sep 17 00:00:00 2001 From: Ayushi Smriti Date: Mon, 9 Nov 2020 23:04:58 +0530 Subject: [PATCH] Process PLDM image type @@ -24,15 +24,15 @@ intf got added. Signed-off-by: Ayushi Smriti --- - item_updater.cpp | 1 + + item_updater.cpp | 4 +- pfr_image_manager.cpp | 95 +++++++++++++++++++++++++++++++++++++++++-- pfr_image_manager.hpp | 6 +-- pldm.hpp | 21 ++++++++++ - 4 files changed, 117 insertions(+), 6 deletions(-) + 4 files changed, 119 insertions(+), 7 deletions(-) create mode 100644 pldm.hpp diff --git a/item_updater.cpp b/item_updater.cpp -index db255d6..2ed2a3c 100644 +index db255d6..7af80e3 100644 --- a/item_updater.cpp +++ b/item_updater.cpp @@ -67,6 +67,7 @@ void ItemUpdater::createActivation(sdbusplus::message::message& msg) @@ -43,6 +43,16 @@ index db255d6..2ed2a3c 100644 value == VersionPurpose::Other) { purpose = value; +@@ -397,7 +398,8 @@ void ItemUpdater::deleteAll() + } + + ItemUpdater::ActivationStatus +- ItemUpdater::validateSquashFSImage(const std::string& filePath) ++ ItemUpdater::validateSquashFSImage(__attribute__((unused)) ++ const std::string& filePath) + { + #ifndef PFR_UPDATE + bool valid = true; diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp index 178367f..c923494 100644 --- a/pfr_image_manager.cpp diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch old mode 100644 new mode 100755 index 022ffdc76..a802095d5 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-configuration-changes.patch @@ -1,7 +1,7 @@ -From 98a84ed284fe71e276d425dbe67a447b6fca1eff Mon Sep 17 00:00:00 2001 +From b831fbaf5c3ca346d2e701b021307ba219ca2ef8 Mon Sep 17 00:00:00 2001 From: Vikram Bodireddy Date: Wed, 18 Nov 2020 17:14:41 +0530 -Subject: [PATCH 01/10] Firmware update configuration changes +Subject: [PATCH] Firmware update configuration changes This commit will provide user to PATCH the below firmware update attributes before uploding the firmware image. @@ -42,16 +42,20 @@ Tested: Signed-off-by: Vikram Bodireddy %% original patch: 0001-Firmware-update-configuration-changes.patch + +Change-Id: I44e1743fd76aa37c7b8affa49a3e05f808187037 +Signed-off-by: Helen Huang --- - redfish-core/lib/update_service.hpp | 337 +++++++++++++++++++-- - .../v1/JsonSchemas/OemUpdateService/index.json | 69 +++++ - static/redfish/v1/schema/OemUpdateService_v1.xml | 40 +++ - 3 files changed, 416 insertions(+), 30 deletions(-) + redfish-core/lib/update_service.hpp | 339 ++++++++++++++++-- + static/redfish/v1/$metadata/index.xml | 3 + + .../JsonSchemas/OemUpdateService/index.json | 69 ++++ + .../redfish/v1/schema/OemUpdateService_v1.xml | 40 +++ + 4 files changed, 421 insertions(+), 30 deletions(-) create mode 100644 static/redfish/v1/JsonSchemas/OemUpdateService/index.json create mode 100644 static/redfish/v1/schema/OemUpdateService_v1.xml diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp -index ddb8b30..399321b 100644 +index 9e382ce..7dff5c9 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp @@ -32,6 +32,17 @@ static std::unique_ptr fwUpdateErrorMatcher; @@ -105,15 +109,15 @@ index ddb8b30..399321b 100644 + // to multiple targets for single image in future. For now, + // consider first target alone. crow::connections::systemBus->async_method_call( -- [](const boost::system::error_code error_code) { -- if (error_code) +- [](const boost::system::error_code errorCode) { +- if (errorCode) + [objPath, service, imgTarget{imgUriTargets[0]}]( + const boost::system::error_code ec, + const crow::openbmc_mapper::GetSubTreeType& subtree) { + if (ec || !subtree.size()) { -- BMCWEB_LOG_DEBUG << "error_code = " << error_code; -- BMCWEB_LOG_DEBUG << "error msg = " << error_code.message(); +- BMCWEB_LOG_DEBUG << "error_code = " << errorCode; +- BMCWEB_LOG_DEBUG << "error msg = " << errorCode.message(); + return; + } + @@ -219,17 +223,17 @@ index ddb8b30..399321b 100644 crow::connections::systemBus->async_method_call( - [objPath, asyncResp, + [objPath, asyncResp, imgTargets{imgUriTargets}, - req](const boost::system::error_code error_code, + req](const boost::system::error_code errorCode, const std::vector>>& objInfo) { - if (error_code) + if (errorCode) { -- BMCWEB_LOG_DEBUG << "error_code = " << error_code; +- BMCWEB_LOG_DEBUG << "error_code = " << errorCode; + BMCWEB_LOG_DEBUG + << "GetSoftwareObject path failed: error_code = " -+ << error_code; ++ << errorCode; BMCWEB_LOG_DEBUG << "error msg = " - << error_code.message(); + << errorCode.message(); if (asyncResp) @@ -115,7 +220,7 @@ static void softwareInterfaceAdded(const std::shared_ptr& asyncResp, // is added @@ -240,7 +244,7 @@ index ddb8b30..399321b 100644 if (asyncResp) { std::shared_ptr task = -@@ -245,8 +350,7 @@ static void softwareInterfaceAdded(const std::shared_ptr& asyncResp, +@@ -247,8 +352,7 @@ static void softwareInterfaceAdded(const std::shared_ptr& asyncResp, "xyz.openbmc_project.ObjectMapper", "/xyz/openbmc_project/object_mapper", "xyz.openbmc_project.ObjectMapper", "GetObject", objPath.str, @@ -250,7 +254,7 @@ index ddb8b30..399321b 100644 } } } -@@ -255,7 +359,8 @@ static void softwareInterfaceAdded(const std::shared_ptr& asyncResp, +@@ -257,7 +361,8 @@ static void softwareInterfaceAdded(const std::shared_ptr& asyncResp, // then no asyncResp updates will occur static void monitorForSoftwareAvailable( const std::shared_ptr& asyncResp, const crow::Request& req, @@ -260,7 +264,7 @@ index ddb8b30..399321b 100644 { // Only allow one FW update at a time if (fwUpdateInProgress != false) -@@ -295,9 +400,10 @@ static void monitorForSoftwareAvailable( +@@ -297,9 +402,10 @@ static void monitorForSoftwareAvailable( } }); @@ -273,7 +277,7 @@ index ddb8b30..399321b 100644 }; fwUpdateInProgress = true; -@@ -463,12 +569,15 @@ class UpdateServiceActionsSimpleUpdate : public Node +@@ -475,12 +581,15 @@ class UpdateServiceActionsSimpleUpdate : public Node std::string fwFile = imageURI.substr(separator + 1); BMCWEB_LOG_DEBUG << "Server: " << tftpServer + " File: " << fwFile; @@ -290,7 +294,7 @@ index ddb8b30..399321b 100644 // TFTP can take up to 10 minutes depending on image size and // connection speed. Return to caller as soon as the TFTP operation -@@ -502,7 +611,8 @@ class UpdateServiceActionsSimpleUpdate : public Node +@@ -514,7 +623,8 @@ class UpdateServiceActionsSimpleUpdate : public Node class UpdateService : public Node { public: @@ -300,7 +304,7 @@ index ddb8b30..399321b 100644 { entityPrivileges = { {boost::beast::http::verb::get, {{"Login"}}}, -@@ -514,6 +624,8 @@ class UpdateService : public Node +@@ -526,6 +636,8 @@ class UpdateService : public Node } private: @@ -309,7 +313,7 @@ index ddb8b30..399321b 100644 void doGet(crow::Response& res, const crow::Request&, const std::vector&) override { -@@ -524,6 +636,8 @@ class UpdateService : public Node +@@ -536,6 +648,8 @@ class UpdateService : public Node res.jsonValue["Description"] = "Service for Software Update"; res.jsonValue["Name"] = "Update Service"; res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService"; @@ -318,7 +322,7 @@ index ddb8b30..399321b 100644 // UpdateService cannot be disabled res.jsonValue["ServiceEnabled"] = true; res.jsonValue["FirmwareInventory"] = { -@@ -573,6 +687,29 @@ class UpdateService : public Node +@@ -585,6 +699,31 @@ class UpdateService : public Node "/xyz/openbmc_project/software/apply_time", "org.freedesktop.DBus.Properties", "Get", "xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime"); @@ -338,6 +342,8 @@ index ddb8b30..399321b 100644 + + if (b) + { ++ aResp->res.jsonValue["Oem"]["ApplyOptions"]["@odata.type"] = ++ "#OemUpdateService.ApplyOptions"; + aResp->res.jsonValue["Oem"]["ApplyOptions"]["ClearConfig"] = + *b; + } @@ -348,7 +354,7 @@ index ddb8b30..399321b 100644 } void doPatch(crow::Response& res, const crow::Request& req, -@@ -583,12 +720,61 @@ class UpdateService : public Node +@@ -595,12 +734,61 @@ class UpdateService : public Node std::shared_ptr asyncResp = std::make_shared(res); std::optional pushUriOptions; @@ -412,7 +418,7 @@ index ddb8b30..399321b 100644 if (pushUriOptions) { std::optional pushUriApplyTime; -@@ -653,6 +839,98 @@ class UpdateService : public Node +@@ -665,6 +853,98 @@ class UpdateService : public Node } } } @@ -511,7 +517,7 @@ index ddb8b30..399321b 100644 } void doPost(crow::Response& res, const crow::Request& req, -@@ -663,8 +941,8 @@ class UpdateService : public Node +@@ -675,8 +955,8 @@ class UpdateService : public Node std::shared_ptr asyncResp = std::make_shared(res); // Setup callback for when new software detected @@ -522,7 +528,7 @@ index ddb8b30..399321b 100644 std::string filepath( "/tmp/images/" + -@@ -749,7 +1027,7 @@ class SoftwareInventoryCollection : public Node +@@ -761,7 +1041,7 @@ class SoftwareInventoryCollection : public Node "/xyz/openbmc_project/object_mapper", "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/xyz/openbmc_project/software", static_cast(0), @@ -531,7 +537,7 @@ index ddb8b30..399321b 100644 } }; -@@ -931,7 +1209,7 @@ class SoftwareInventory : public Node +@@ -943,7 +1223,7 @@ class SoftwareInventory : public Node }, obj.second[0].first, obj.first, "org.freedesktop.DBus.Properties", "GetAll", @@ -540,7 +546,7 @@ index ddb8b30..399321b 100644 } if (!found) { -@@ -952,8 +1230,7 @@ class SoftwareInventory : public Node +@@ -964,8 +1244,7 @@ class SoftwareInventory : public Node "xyz.openbmc_project.ObjectMapper", "/xyz/openbmc_project/object_mapper", "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/", @@ -550,6 +556,20 @@ index ddb8b30..399321b 100644 } }; +diff --git a/static/redfish/v1/$metadata/index.xml b/static/redfish/v1/$metadata/index.xml +index e7f9d6d..bedc9e5 100644 +--- a/static/redfish/v1/$metadata/index.xml ++++ b/static/redfish/v1/$metadata/index.xml +@@ -2700,6 +2700,9 @@ + + + ++ ++ ++ + + + diff --git a/static/redfish/v1/JsonSchemas/OemUpdateService/index.json b/static/redfish/v1/JsonSchemas/OemUpdateService/index.json new file mode 100644 index 0000000..74e39cd @@ -672,5 +692,5 @@ index 0000000..cbb7aa4 + + -- -2.16.6 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch index 31f9abcd5..02f843bb8 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Use-chip-id-based-UUID-for-Service-Root.patch @@ -1,7 +1,7 @@ -From c61ac0a5cf825193f46c734f1db2f92a72d1f3c9 Mon Sep 17 00:00:00 2001 +From 034920eca21bc25899565484928ee72025e21ff8 Mon Sep 17 00:00:00 2001 From: Wiktor Golgowski Date: Thu, 30 Apr 2020 11:09:35 +0200 -Subject: [PATCH 02/10] Use chip id-based UUID for Service Root. +Subject: [PATCH] Use chip id-based UUID for Service Root. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -70,5 +70,5 @@ index 24f7afd..8826b06 100644 if (fileRevision < jsonRevision) { -- -2.16.6 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-bmcweb-handle-device-or-resource-busy-exception.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-bmcweb-handle-device-or-resource-busy-exception.patch index cd4a5317c..01c1c858c 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-bmcweb-handle-device-or-resource-busy-exception.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0004-bmcweb-handle-device-or-resource-busy-exception.patch @@ -1,7 +1,7 @@ -From 17d24c7ff9a533ef6ff0e86554840bf5e4a11782 Mon Sep 17 00:00:00 2001 +From 76480c6a5b1708113f28aecab32a85984371243c Mon Sep 17 00:00:00 2001 From: Karol Wachowski Date: Fri, 10 Jul 2020 09:54:06 +0000 -Subject: [PATCH 03/10] bmcweb handle device or resource busy exception +Subject: [PATCH] bmcweb handle device or resource busy exception Use async_method_call_timed() for mount/unmount dbus oprations. Long mount/unmount times are supported by VirtualMedia service, @@ -21,23 +21,23 @@ Tested: Verified that after mounting non-existing HTTPS resource Signed-off-by: Karol Wachowski Change-Id: Ica62c34db0cce24c4c6169fc661edfde49e948d0 --- - redfish-core/lib/virtual_media.hpp | 144 ++++++++++++++++++++++++++++--------- + redfish-core/lib/virtual_media.hpp | 144 ++++++++++++++++++++++------- 1 file changed, 110 insertions(+), 34 deletions(-) diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp -index 1336190..1a4a81d 100644 +index 95a8881..188248a 100644 --- a/redfish-core/lib/virtual_media.hpp +++ b/redfish-core/lib/virtual_media.hpp -@@ -23,6 +23,8 @@ - // for GetObjectType and ManagedObjectType +@@ -24,6 +24,8 @@ #include + #include +#include + namespace redfish { -@@ -121,6 +123,26 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface, +@@ -160,6 +162,26 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface, } } @@ -64,7 +64,7 @@ index 1336190..1a4a81d 100644 /** * @brief Fill template for Virtual Media Item. */ -@@ -811,22 +833,54 @@ class VirtualMediaActionInsertMedia : public Node +@@ -856,22 +878,54 @@ class VirtualMediaActionInsertMedia : public Node } crow::connections::systemBus->async_method_call( @@ -126,7 +126,7 @@ index 1336190..1a4a81d 100644 } }; -@@ -960,38 +1014,60 @@ class VirtualMediaActionEjectMedia : public Node +@@ -1003,38 +1057,60 @@ class VirtualMediaActionEjectMedia : public Node const std::string& service, const std::string& name, bool legacy) { @@ -215,5 +215,5 @@ index 1336190..1a4a81d 100644 }; -- -2.16.6 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch index 977a1c6fa..54f00aa39 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0005-EventService-https-client-support.patch @@ -1,7 +1,7 @@ -From f3ae6e96596eadf2a2df4bc723537a47cff13054 Mon Sep 17 00:00:00 2001 +From d340953bc925ff8535c5a8fac54db24b243ba8ad Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Mon, 19 Oct 2020 13:21:42 +0530 -Subject: [PATCH 04/10] EventService: https client support +Subject: [PATCH] EventService: https client support Add https client support for push style eventing. Using this BMC can push the event @@ -16,13 +16,14 @@ Tested: Change-Id: I44c3918b39baa2eb5fddda9d635f99aa280a422a Signed-off-by: AppaRao Puli +Signed-off-by: P Dheeraj Srujan Kumar --- - http/http_client.hpp | 367 ++++++++++++++++++------- - redfish-core/include/event_service_manager.hpp | 2 +- - 2 files changed, 264 insertions(+), 105 deletions(-) + http/http_client.hpp | 370 +++++++++++++----- + .../include/event_service_manager.hpp | 2 +- + 2 files changed, 267 insertions(+), 105 deletions(-) diff --git a/http/http_client.hpp b/http/http_client.hpp -index 5c7b13f..bd1e7b6 100644 +index 5c7b13f..d782dee 100644 --- a/http/http_client.hpp +++ b/http/http_client.hpp @@ -31,12 +31,17 @@ namespace crow @@ -190,7 +191,7 @@ index 5c7b13f..bd1e7b6 100644 } void sendMessage(const std::string& data) -@@ -107,100 +183,167 @@ class HttpClient : public std::enable_shared_from_this +@@ -107,100 +183,170 @@ class HttpClient : public std::enable_shared_from_this } state = ConnState::sendInProgress; @@ -312,6 +313,9 @@ index 5c7b13f..bd1e7b6 100644 + + parser.emplace(std::piecewise_construct, std::make_tuple()); + parser->body_limit(httpReadBodyLimit); ++ // Since these are all push style eventing, we are not ++ // bothered about response parsing. ++ parser->skip(true); + buffer.consume(buffer.size()); + + conn.expires_after(std::chrono::seconds(30)); @@ -424,7 +428,7 @@ index 5c7b13f..bd1e7b6 100644 BMCWEB_LOG_DEBUG << "requestDataQueue is empty\n"; return; } -@@ -232,6 +375,7 @@ class HttpClient : public std::enable_shared_from_this +@@ -232,6 +378,7 @@ class HttpClient : public std::enable_shared_from_this } if ((state == ConnState::connectFailed) || @@ -432,7 +436,7 @@ index 5c7b13f..bd1e7b6 100644 (state == ConnState::sendFailed) || (state == ConnState::recvFailed)) { -@@ -256,14 +400,18 @@ class HttpClient : public std::enable_shared_from_this +@@ -256,14 +403,18 @@ class HttpClient : public std::enable_shared_from_this << " seconds. RetryCount = " << retryCount; timer.expires_after(std::chrono::seconds(retryIntervalSecs)); timer.async_wait( @@ -454,7 +458,7 @@ index 5c7b13f..bd1e7b6 100644 connStateCheck(); return; -@@ -273,15 +421,21 @@ class HttpClient : public std::enable_shared_from_this +@@ -273,15 +424,21 @@ class HttpClient : public std::enable_shared_from_this { switch (state) { @@ -478,7 +482,7 @@ index 5c7b13f..bd1e7b6 100644 case ConnState::sendFailed: case ConnState::recvFailed: { -@@ -297,22 +451,22 @@ class HttpClient : public std::enable_shared_from_this +@@ -297,22 +454,22 @@ class HttpClient : public std::enable_shared_from_this sendMessage(data); break; } @@ -511,7 +515,7 @@ index 5c7b13f..bd1e7b6 100644 void sendData(const std::string& data) { -@@ -337,7 +491,12 @@ class HttpClient : public std::enable_shared_from_this +@@ -337,7 +494,12 @@ class HttpClient : public std::enable_shared_from_this void setHeaders( const std::vector>& httpHeaders) { @@ -539,5 +543,5 @@ index 54dafb4..f68ae1d 100644 Subscription(const std::shared_ptr& adaptor) : -- -2.16.6 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Define-Redfish-interface-Registries-Bios.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Define-Redfish-interface-Registries-Bios.patch index dd2f3483d..b2627644b 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Define-Redfish-interface-Registries-Bios.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Define-Redfish-interface-Registries-Bios.patch @@ -1,4 +1,4 @@ -From 5e3b0c1f8add50acca911a927ba8a1f4864cb315 Mon Sep 17 00:00:00 2001 +From c645c011bb3ea2a2aaf52560cb9fcc461d048cae Mon Sep 17 00:00:00 2001 From: Kuiying Wang Date: Fri, 4 Sep 2020 19:24:25 +0800 Subject: [PATCH] Define Redfish interface "/Registries/Bios" and enable diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch old mode 100755 new mode 100644 index 18403446d..6f3794478 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0007-BIOS-config-Add-support-for-PATCH-operation.patch @@ -1,4 +1,4 @@ -From 8f823ad555b67b228413a0fcb46771d86108dcb3 Mon Sep 17 00:00:00 2001 +From ad2b1c83bd9cb1bb6eb86bebd1867b0172e5a7a8 Mon Sep 17 00:00:00 2001 From: Kuiying Wang Date: Wed, 23 Dec 2020 16:50:45 +0800 Subject: [PATCH] BaseBiosTable: Add support for PATCH operation @@ -24,14 +24,13 @@ PATCH https://${bmc}/redfish/v1/Systems/system/Bios/Settings -d This makes use of the "Set" of "PendingAttributes" in the backend and that updates the BaseBiosTable. - Signed-off-by: Kuiying Wang --- redfish-core/lib/bios.hpp | 94 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp -index 9fe8c6e..e9c8969 100644 +index 5f8c91b..cf76fe0 100644 --- a/redfish-core/lib/bios.hpp +++ b/redfish-core/lib/bios.hpp @@ -96,6 +96,29 @@ static std::string mapAttrTypeToRedfish(const std::string_view typeDbus) @@ -64,7 +63,7 @@ index 9fe8c6e..e9c8969 100644 static std::string mapBoundTypeToRedfish(const std::string_view typeDbus) { std::string ret; -@@ -263,7 +286,9 @@ class BiosSettings : public Node +@@ -262,7 +285,9 @@ class BiosSettings : public Node BiosSettings(App& app) : Node(app, "/redfish/v1/Systems/system/Bios/Settings") { @@ -75,7 +74,7 @@ index 9fe8c6e..e9c8969 100644 } private: -@@ -361,6 +386,73 @@ class BiosSettings : public Node +@@ -359,6 +384,73 @@ class BiosSettings : public Node "/xyz/openbmc_project/bios_config/manager", std::array()); } diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch index 983eb170a..7e4e2e8d8 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch @@ -1,4 +1,4 @@ -From 2f5b401bb36be7a1f800bea20fb489a7b2ac6d45 Mon Sep 17 00:00:00 2001 +From a78eecb032eefeb84da3ec042700a40f55ae8f10 Mon Sep 17 00:00:00 2001 From: Kuiying Wang Date: Wed, 23 Dec 2020 22:47:56 +0800 Subject: [PATCH] Add support to ResetBios action @@ -16,10 +16,10 @@ Signed-off-by: Kuiying Wang 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp -index 4727ef2..888c511 100644 +index cf76fe0..7b6fc3d 100644 --- a/redfish-core/lib/bios.hpp +++ b/redfish-core/lib/bios.hpp -@@ -663,7 +663,7 @@ class BiosReset : public Node +@@ -643,7 +643,7 @@ class BiosReset : public Node Node(app, "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios/") { entityPrivileges = { @@ -28,7 +28,7 @@ index 4727ef2..888c511 100644 } private: -@@ -675,19 +675,23 @@ class BiosReset : public Node +@@ -655,19 +655,23 @@ class BiosReset : public Node const std::vector&) override { auto asyncResp = std::make_shared(res); diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0009-Add-support-to-ChangePassword-action.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0009-Add-support-to-ChangePassword-action.patch index c603615f1..976292197 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0009-Add-support-to-ChangePassword-action.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0009-Add-support-to-ChangePassword-action.patch @@ -1,4 +1,4 @@ -From 0192a2217eda578ca058cdc3a289ada3ee39e47a Mon Sep 17 00:00:00 2001 +From ede8454491b554c2494a61f42993fa2e39b4d865 Mon Sep 17 00:00:00 2001 From: Kuiying Wang Date: Wed, 23 Dec 2020 14:41:23 +0800 Subject: [PATCH] Add support to ChangePassword action @@ -49,7 +49,7 @@ index a8e5cf2..dabf78e 100644 nodes.emplace_back(std::make_unique(app)); nodes.emplace_back(std::make_unique(app)); diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp -index 7b4306b..52ee356 100644 +index 7b6fc3d..61b396b 100644 --- a/redfish-core/lib/bios.hpp +++ b/redfish-core/lib/bios.hpp @@ -186,6 +186,9 @@ class BiosService : public Node diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch index 520007d41..a9c46f487 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0010-managers-add-attributes-for-Manager.CommandShell.patch @@ -1,4 +1,4 @@ -From 01a5c12e350c04f8ed94c7e49a6030a4699eac6e Mon Sep 17 00:00:00 2001 +From a76314cd29f5cbcf19142b7120c5bf83358910fd Mon Sep 17 00:00:00 2001 From: Jayaprakash Mutyala Date: Mon, 28 Dec 2020 18:55:57 +0000 Subject: [PATCH] managers: add attributes for Manager.CommandShell diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0034-recommended-fixes-by-crypto-review-team.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0034-recommended-fixes-by-crypto-review-team.patch index f3235c7cf..5ffc259c0 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0034-recommended-fixes-by-crypto-review-team.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0034-recommended-fixes-by-crypto-review-team.patch @@ -1,4 +1,4 @@ -From a170675fafc1ee8bfee502672e65be9ad379a3d1 Mon Sep 17 00:00:00 2001 +From aaaa117817687a05284f8bfff07e2404e0d616b7 Mon Sep 17 00:00:00 2001 From: Radivoje Jovanovic Date: Thu, 10 Dec 2020 13:42:20 -0800 Subject: [PATCH] recommended fixes by crypto review team @@ -14,11 +14,11 @@ Signed-off-by: Radivoje Jovanovic 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp -index deb3a76..8063858 100644 +index 39e83d7..8de7349 100644 --- a/include/ssl_key_handler.hpp +++ b/include/ssl_key_handler.hpp -@@ -326,31 +326,34 @@ inline std::shared_ptr - mSslContext->use_private_key_file(ssl_pem_file, +@@ -381,31 +381,34 @@ inline std::shared_ptr + mSslContext->use_private_key_file(sslPemFile, boost::asio::ssl::context::pem); - // Set up EC curves to auto (boost asio doesn't have a method for this) diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-Fix-wrong-check-in-EventService-events.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-Fix-wrong-check-in-EventService-events.patch new file mode 100644 index 000000000..115a48112 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-Fix-wrong-check-in-EventService-events.patch @@ -0,0 +1,35 @@ +From 6a9f85f9050e2c0f38148e295d7e25f56d05c6de Mon Sep 17 00:00:00 2001 +From: AppaRao Puli +Date: Mon, 1 Feb 2021 23:45:53 +0000 +Subject: [PATCH] Fix wrong check in EventService events + +Sending async event logs to event listener is +broken due to commit 23a21a1cbed23ace4174664950e595df961e9e69. +Correct the check to make EventService back to functional +state. + +Tested: + - Redfish event logs are properly sent to subscribers. + +Signed-off-by: AppaRao Puli +Change-Id: If232846a2b0ac694205731a801e55dc4bd5e928a +--- + redfish-core/include/event_service_manager.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp +index 54dafb4..3db9f0c 100644 +--- a/redfish-core/include/event_service_manager.hpp ++++ b/redfish-core/include/event_service_manager.hpp +@@ -1208,7 +1208,7 @@ class EventServiceManager + + static void watchRedfishEventLogFile() + { +- if (inotifyConn) ++ if (!inotifyConn) + { + return; + } +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch index b1334a420..208831338 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch @@ -1,7 +1,7 @@ -From c7fce288802ece4a6e1ff71ee060a44e0b8fe992 Mon Sep 17 00:00:00 2001 +From d50e4ce193703c008d3293acd03e1c0542c0c215 Mon Sep 17 00:00:00 2001 From: "Wludzik, Jozef" Date: Mon, 27 Apr 2020 17:24:15 +0200 -Subject: [PATCH 1/4] Redfish TelemetryService schema implementation +Subject: [PATCH] Redfish TelemetryService schema implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -30,13 +30,13 @@ Signed-off-by: Adrian Ambrożewicz Signed-off-by: Krzysztof Grobelny Change-Id: Ie6b0b49f4ef5eeaef07d1209b6c349270c04d570 --- - redfish-core/include/redfish.hpp | 10 ++ - redfish-core/include/utils/telemetry_utils.hpp | 71 ++++++++++ - redfish-core/include/utils/time_utils.hpp | 78 +++++++++++ - redfish-core/lib/metric_report.hpp | 162 +++++++++++++++++++++ - redfish-core/lib/metric_report_definition.hpp | 186 +++++++++++++++++++++++++ - redfish-core/lib/service_root.hpp | 2 + - redfish-core/lib/telemetry_service.hpp | 93 +++++++++++++ + redfish-core/include/redfish.hpp | 10 + + .../include/utils/telemetry_utils.hpp | 71 +++++++ + redfish-core/include/utils/time_utils.hpp | 78 ++++++++ + redfish-core/lib/metric_report.hpp | 162 +++++++++++++++ + redfish-core/lib/metric_report_definition.hpp | 186 ++++++++++++++++++ + redfish-core/lib/service_root.hpp | 2 + + redfish-core/lib/telemetry_service.hpp | 93 +++++++++ 7 files changed, 602 insertions(+) create mode 100644 redfish-core/include/utils/telemetry_utils.hpp create mode 100644 redfish-core/include/utils/time_utils.hpp @@ -45,7 +45,7 @@ Change-Id: Ie6b0b49f4ef5eeaef07d1209b6c349270c04d570 create mode 100644 redfish-core/lib/telemetry_service.hpp diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp -index 54d5d0e..2587b37 100644 +index dabf78e..b366e24 100644 --- a/redfish-core/include/redfish.hpp +++ b/redfish-core/include/redfish.hpp @@ -25,6 +25,8 @@ @@ -65,7 +65,7 @@ index 54d5d0e..2587b37 100644 #include "../lib/thermal.hpp" #include "../lib/update_service.hpp" #ifdef BMCWEB_ENABLE_VM_NBDPROXY -@@ -207,6 +210,13 @@ class RedfishService +@@ -212,6 +215,13 @@ class RedfishService nodes.emplace_back(std::make_unique(app)); nodes.emplace_back(std::make_unique(app)); @@ -713,5 +713,5 @@ index 0000000..a6acc34 +}; +} // namespace redfish -- -2.16.6 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch index b04a72c9f..f40058ad8 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch @@ -1,7 +1,7 @@ -From 0784af276b72e5df9c545d83bc989833ac2935c4 Mon Sep 17 00:00:00 2001 +From 433358330c7f7d2fba99f6e488d67b314224317f Mon Sep 17 00:00:00 2001 From: "Wludzik, Jozef" Date: Mon, 18 May 2020 11:56:57 +0200 -Subject: [PATCH 2/4] Add POST and DELETE in MetricReportDefinitions +Subject: [PATCH] Add POST and DELETE in MetricReportDefinitions Added POST action in MetricReportDefinitions node to allow user to add new MetricReportDefinition. Using minimal set of @@ -24,9 +24,9 @@ Signed-off-by: Wludzik, Jozef Signed-off-by: Krzysztof Grobelny Change-Id: I2fed96848594451e22fde686f8c066d7770cc65a --- - redfish-core/include/utils/telemetry_utils.hpp | 5 +- - redfish-core/include/utils/time_utils.hpp | 145 +++++++++- - redfish-core/lib/metric_report_definition.hpp | 382 ++++++++++++++++++++++++- + .../include/utils/telemetry_utils.hpp | 5 +- + redfish-core/include/utils/time_utils.hpp | 145 ++++++- + redfish-core/lib/metric_report_definition.hpp | 382 +++++++++++++++++- 3 files changed, 516 insertions(+), 16 deletions(-) diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp @@ -679,5 +679,5 @@ index 48c56e6..d5a540d 100644 "#MetricReportDefinition.v1_3_0.MetricReportDefinition"; }; -- -2.16.6 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch index d81d654f1..7c3e4c804 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch @@ -1,7 +1,7 @@ -From b074a84560349fdbd46604ab0b8c75804de09fef Mon Sep 17 00:00:00 2001 +From d9016c8064f5732fb6d24d07a990ddfa294a8a9d Mon Sep 17 00:00:00 2001 From: "Wludzik, Jozef" Date: Mon, 8 Jun 2020 17:15:54 +0200 -Subject: [PATCH 3/4] Add support for MetricDefinition scheme +Subject: [PATCH] Add support for MetricDefinition scheme Added MetricDefinition node to redfish core. Now user is able to get all possible metrics that are present in system and are @@ -17,19 +17,19 @@ Signed-off-by: Wludzik, Jozef Signed-off-by: Krzysztof Grobelny Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00 --- - redfish-core/include/redfish.hpp | 3 + - redfish-core/include/utils/telemetry_utils.hpp | 56 ++--- - redfish-core/lib/metric_definition.hpp | 269 +++++++++++++++++++++++++ - redfish-core/lib/metric_report_definition.hpp | 22 ++ - redfish-core/lib/power.hpp | 4 +- - redfish-core/lib/sensors.hpp | 104 +++++++--- - redfish-core/lib/telemetry_service.hpp | 2 + - redfish-core/lib/thermal.hpp | 4 +- - 8 files changed, 410 insertions(+), 54 deletions(-) + redfish-core/include/redfish.hpp | 3 + + .../include/utils/telemetry_utils.hpp | 56 ++-- + redfish-core/lib/metric_definition.hpp | 269 ++++++++++++++++++ + redfish-core/lib/metric_report_definition.hpp | 22 ++ + redfish-core/lib/power.hpp | 4 +- + redfish-core/lib/sensors.hpp | 96 +++++-- + redfish-core/lib/telemetry_service.hpp | 2 + + redfish-core/lib/thermal.hpp | 4 +- + 8 files changed, 406 insertions(+), 50 deletions(-) create mode 100644 redfish-core/lib/metric_definition.hpp diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp -index 2587b37..705f490 100644 +index b366e24..a938d43 100644 --- a/redfish-core/include/redfish.hpp +++ b/redfish-core/include/redfish.hpp @@ -25,6 +25,7 @@ @@ -40,7 +40,7 @@ index 2587b37..705f490 100644 #include "../lib/metric_report.hpp" #include "../lib/metric_report_definition.hpp" #include "../lib/network_protocol.hpp" -@@ -211,6 +212,8 @@ class RedfishService +@@ -216,6 +217,8 @@ class RedfishService nodes.emplace_back(std::make_unique(app)); nodes.emplace_back(std::make_unique(app)); @@ -475,7 +475,7 @@ index 1c7a009..99c45ef 100644 std::optional> voltageCollections; diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp -index 567cb0c..363713d 100644 +index 14c9593..bf97540 100644 --- a/redfish-core/lib/sensors.hpp +++ b/redfish-core/lib/sensors.hpp @@ -54,9 +54,10 @@ static constexpr std::string_view thermal = "Thermal"; @@ -589,36 +589,11 @@ index 567cb0c..363713d 100644 const std::string chassisSubNode; private: -@@ -320,20 +380,20 @@ void getConnections( - * made, and eliminate Power sensors when a Thermal request is made. - */ - inline void reduceSensorList( -- const std::shared_ptr& SensorsAsyncResp, -+ const std::shared_ptr& sensorsAsyncResp, - const std::vector* allSensors, - const std::shared_ptr>& - activeSensors) - { -- if (SensorsAsyncResp == nullptr) -+ if (sensorsAsyncResp == nullptr) - { - return; - } - if ((allSensors == nullptr) || (activeSensors == nullptr)) - { - messages::resourceNotFound( -- SensorsAsyncResp->res, SensorsAsyncResp->chassisSubNode, -- SensorsAsyncResp->chassisSubNode == sensors::node::thermal -+ sensorsAsyncResp->res, sensorsAsyncResp->chassisSubNode, -+ sensorsAsyncResp->chassisSubNode == sensors::node::thermal - ? "Temperatures" - : "Voltages"); - @@ -345,11 +405,11 @@ inline void reduceSensorList( return; } -- for (const char* type : SensorsAsyncResp->types) +- for (const char* type : sensorsAsyncResp->types) + for (const char* path : sensorsAsyncResp->matchPaths) { for (const std::string& sensor : *allSensors) @@ -631,21 +606,21 @@ index 567cb0c..363713d 100644 @@ -853,18 +913,8 @@ inline void objectInterfacesToJson( if (sensorsAsyncResp->chassisSubNode == sensors::node::sensors) { - sensor_json["@odata.type"] = "#Sensor.v1_0_0.Sensor"; + sensorJson["@odata.type"] = "#Sensor.v1_0_0.Sensor"; - if (sensorType == "power") - { -- sensor_json["ReadingUnits"] = "Watts"; +- sensorJson["ReadingUnits"] = "Watts"; - } - else if (sensorType == "current") - { -- sensor_json["ReadingUnits"] = "Amperes"; +- sensorJson["ReadingUnits"] = "Amperes"; - } - else if (sensorType == "utilization") - { -- sensor_json["ReadingUnits"] = "Percent"; +- sensorJson["ReadingUnits"] = "Percent"; - } -+ sensor_json["ReadingType"] = sensors::toReadingType(sensorType); -+ sensor_json["ReadingUnits"] = sensors::toReadingUnits(sensorType); ++ sensorJson["ReadingType"] = sensors::toReadingType(sensorType); ++ sensorJson["ReadingUnits"] = sensors::toReadingUnits(sensorType); } else if (sensorType == "temperature") { @@ -705,5 +680,5 @@ index 8e01bee..00acdf9 100644 if (!json_util::readJson(req, asyncResp->res, "Temperatures", -- -2.16.6 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch index 08dcb385d..06c50b31f 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch @@ -1,7 +1,7 @@ -From 5b775e33221638a34c4aad0e2edeffc447d50fab Mon Sep 17 00:00:00 2001 +From b6286fe6800ca402b013e57429025fd9e4d65cab Mon Sep 17 00:00:00 2001 From: "Wludzik, Jozef" Date: Fri, 4 Dec 2020 14:48:41 +0100 -Subject: [PATCH 4/4] Sync Telmetry service with EventService +Subject: [PATCH] Sync Telmetry service with EventService Now assembling MetricReport is done properly and is covered in one place - MetricReport node. @@ -16,12 +16,12 @@ Tested: Change-Id: I2fc1841a6c9259a8bff30b34bddc0d4aabd41912 Signed-off-by: Wludzik, Jozef --- - redfish-core/include/event_service_manager.hpp | 156 +++++++++---------------- - redfish-core/lib/metric_report.hpp | 35 +++--- + .../include/event_service_manager.hpp | 156 ++++++------------ + redfish-core/lib/metric_report.hpp | 35 ++-- 2 files changed, 74 insertions(+), 117 deletions(-) diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp -index 54dafb4..1cdb9a6 100644 +index f68ae1d..893a813 100644 --- a/redfish-core/include/event_service_manager.hpp +++ b/redfish-core/include/event_service_manager.hpp @@ -14,6 +14,7 @@ @@ -326,5 +326,5 @@ index 050304c..c2013cc 100644 static constexpr const char* schemaType = -- -2.16.6 +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 ac095ba61..e5037593f 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -1,5 +1,5 @@ SRC_URI = "git://github.com/openbmc/bmcweb.git" -SRCREV = "f16f62633a64f386fd0382703ff0949ea177f457" +SRCREV = "a90daf182891521fcc7c3e99ba266e6a55d4b4dd" DEPENDS += "boost-url" RDEPENDS_${PN} += "phosphor-nslcd-authority-cert-config" @@ -22,6 +22,7 @@ SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \ file://0009-Add-support-to-ChangePassword-action.patch \ file://0010-managers-add-attributes-for-Manager.CommandShell.patch \ file://0034-recommended-fixes-by-crypto-review-team.patch \ + file://0036-Fix-wrong-check-in-EventService-events.patch \ " diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0010-fix-get-system-GUID-ipmi-command.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0010-fix-get-system-GUID-ipmi-command.patch index ccf326a91..a7d09f61e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0010-fix-get-system-GUID-ipmi-command.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0010-fix-get-system-GUID-ipmi-command.patch @@ -1,4 +1,4 @@ -From c1925ab965271875d4e9333be85cdfe8e1516948 Mon Sep 17 00:00:00 2001 +From f18efe239cb4bbfd6996f753ae694f81041d8d43 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Fri, 14 Feb 2020 13:13:06 -0800 Subject: [PATCH] Fix 'Get System GUID' to use settings UUID @@ -15,10 +15,10 @@ Signed-off-by: Vernon Mauery 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apphandler.cpp b/apphandler.cpp -index dcfda11..780afbc 100644 +index 90818a9..dcf2c86 100644 --- a/apphandler.cpp +++ b/apphandler.cpp -@@ -784,8 +784,6 @@ auto ipmiAppGetBtCapabilities() +@@ -788,8 +788,6 @@ auto ipmiAppGetBtCapabilities() auto ipmiAppGetSystemGuid() -> ipmi::RspType> { @@ -27,7 +27,7 @@ index dcfda11..780afbc 100644 static constexpr auto uuidInterface = "xyz.openbmc_project.Common.UUID"; static constexpr auto uuidProperty = "UUID"; -@@ -794,7 +792,7 @@ auto ipmiAppGetSystemGuid() -> ipmi::RspType> +@@ -798,7 +796,7 @@ auto ipmiAppGetSystemGuid() -> ipmi::RspType> { // Get the Inventory object implementing BMC interface auto busPtr = getSdBus(); diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0053-Fix-keep-looping-issue-when-entering-OS.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0053-Fix-keep-looping-issue-when-entering-OS.patch index 7a7fd0859..941e356ed 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0053-Fix-keep-looping-issue-when-entering-OS.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0053-Fix-keep-looping-issue-when-entering-OS.patch @@ -1,4 +1,4 @@ -From ad93a6e17310d92ef07b8d367b23c93793562d0f Mon Sep 17 00:00:00 2001 +From 58771a22dfcaa1e67bcf4fc0bd2ce0aa28c67e3f Mon Sep 17 00:00:00 2001 From: Cheng C Yang Date: Wed, 23 Jan 2019 17:02:40 +0800 Subject: [PATCH] Fix keep looping issue when entering OS @@ -16,11 +16,11 @@ normally without keep sending READ EVENT MESSAGE BUFFER command. After power on system, enter EFI SHELL, check cmdtool.efi can work correctly through KCS channel. --- - host-cmd-manager.cpp | 24 ++++++++++++++++++------ - 1 file changed, 18 insertions(+), 6 deletions(-) + host-cmd-manager.cpp | 33 ++++++++++++++++++++++++--------- + 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/host-cmd-manager.cpp b/host-cmd-manager.cpp -index f3aba7f..465eb81 100644 +index e52c9bb..b3a5d71 100644 --- a/host-cmd-manager.cpp +++ b/host-cmd-manager.cpp @@ -23,6 +23,8 @@ namespace command @@ -85,5 +85,5 @@ index f3aba7f..465eb81 100644 log("Error in setting SMS attention"); elog(); -- -2.7.4 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch deleted file mode 100644 index 862e9baa8..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch +++ /dev/null @@ -1,102 +0,0 @@ -From d5cfc5a0aaa50cc94054886e5cb7be25ef167c71 Mon Sep 17 00:00:00 2001 -From: huanghe -Date: Sat, 10 Oct 2020 14:40:00 +0800 -Subject: [PATCH 7/7] Add set in progress paramter to set/get boot option - command - -Signed-off-by: huanghe ---- - chassishandler.cpp | 34 ++++++++++++++++++++++++++++++++++ - chassishandler.hpp | 3 +++ - 2 files changed, 37 insertions(+) - -diff --git a/chassishandler.cpp b/chassishandler.cpp -index f043340..322aa9e 100644 ---- a/chassishandler.cpp -+++ b/chassishandler.cpp -@@ -1564,6 +1564,10 @@ static ipmi::Cc setBootMode(const Mode::Modes& mode) - return ipmi::ccSuccess; - } - -+static constexpr uint8_t setComplete = 0x0; -+static constexpr uint8_t setInProgress = 0x1; -+static uint8_t transferStatus = setComplete; -+ - /** @brief implements the Get Chassis system boot option - * @param bootOptionParameter - boot option parameter selector - * @param reserved1 - reserved bit -@@ -1598,6 +1602,14 @@ ipmi::RspType - - IpmiValue bootOption = ipmiDefault; - -+ -+ if (static_cast(bootOptionParameter) == -+ static_cast(BootOptionParameter::setInProgress)) -+ { -+ response.pack(bootOptionParameter,reserved1,transferStatus); -+ return ipmi::responseSuccess(std::move(response)); -+ } -+ - /* - * Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc. - * This is the only parameter used by petitboot. -@@ -1719,6 +1731,28 @@ ipmi::RspType<> ipmiChassisSetSysBootOptions(ipmi::Context::ptr ctx, - using namespace boot_options; - ipmi::Cc rc; - -+ if (parameterSelector == -+ static_cast(BootOptionParameter::setInProgress)) -+ { -+ uint2_t setInProgressFlag; -+ uint6_t rsvd; -+ if (data.unpack(setInProgressFlag,rsvd) != 0 || -+ !data.fullyUnpacked()) -+ { -+ return ipmi::responseReqDataLenInvalid(); -+ } -+ if (rsvd) -+ { -+ return ipmi::responseInvalidFieldRequest(); -+ } -+ if ((transferStatus == setInProgress) && -+ ((uint8_t)setInProgressFlag != setComplete)) -+ { -+ return ipmi::response(IPMI_CC_FAIL_SET_IN_PROGRESS); -+ } -+ transferStatus = (uint8_t)setInProgressFlag; -+ } -+ - /* 000101 - * Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc. - * This is the only parameter used by petitboot. -diff --git a/chassishandler.hpp b/chassishandler.hpp -index 93de2c0..5976abc 100644 ---- a/chassishandler.hpp -+++ b/chassishandler.hpp -@@ -25,6 +25,7 @@ enum ipmi_chassis_return_codes - { - IPMI_OK = 0x0, - IPMI_CC_PARM_NOT_SUPPORTED = 0x80, -+ IPMI_CC_FAIL_SET_IN_PROGRESS = 0x81, - }; - - // Generic completion codes, -@@ -46,6 +47,7 @@ enum ipmi_chassis_control_cmds : uint8_t - }; - enum class BootOptionParameter : size_t - { -+ setInProgress= 0x0, - bootInfo = 0x4, - bootFlags = 0x5, - opalNetworkSettings = 0x61 -@@ -53,6 +55,7 @@ enum class BootOptionParameter : size_t - - enum class BootOptionResponseSize : size_t - { -+ setInProgress = 3, - bootFlags = 5, - opalNetworkSettings = 50 - }; --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch index bc8c72f13..ba8896195 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch @@ -1,7 +1,7 @@ -From 1c8cb6b7c99ad85f470aa87095fcfb4de822ddb1 Mon Sep 17 00:00:00 2001 +From 9f4fb8a6aa076261b19c187aeef840d818158ec7 Mon Sep 17 00:00:00 2001 From: Cheng C Yang Date: Wed, 16 Oct 2019 14:24:20 +0800 -Subject: [PATCH 1/1] Move Set SOL config parameter to host-ipmid +Subject: [PATCH] Move Set SOL config parameter to host-ipmid Move Set SOL config parameter command from net-ipmid to host-ipmid, so that BIOS in Intel platform can enable or disable SOL through KCS. @@ -40,10 +40,10 @@ index 5397115..c93f3b1 100644 0x2C:0x01 //: 0x2C:0x02 //: diff --git a/transporthandler.cpp b/transporthandler.cpp -index 61065ad..59e38ea 100644 +index 0012746..0de76c4 100644 --- a/transporthandler.cpp +++ b/transporthandler.cpp -@@ -1469,8 +1469,298 @@ RspType getLan(uint4_t channelBits, uint3_t, bool revOnly, +@@ -2030,8 +2030,298 @@ RspType getLan(Context::ptr ctx, uint4_t channelBits, } // namespace transport } // namespace ipmi @@ -342,7 +342,7 @@ index 61065ad..59e38ea 100644 void register_netfn_transport_functions() { ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport, -@@ -1479,4 +1769,8 @@ void register_netfn_transport_functions() +@@ -2040,4 +2330,8 @@ void register_netfn_transport_functions() ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport, ipmi::transport::cmdGetLanConfigParameters, ipmi::Privilege::Operator, ipmi::transport::getLan); diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch index 61ac5fede..d6ba70562 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch @@ -1,7 +1,7 @@ -From b5400c4bc756a800fbeb4cc53117956fb59dc57d Mon Sep 17 00:00:00 2001 +From ff1d4198e8ad8f824f34fb9d261ea0e25179f070 Mon Sep 17 00:00:00 2001 From: Cheng C Yang Date: Thu, 11 Jul 2019 00:32:58 +0800 -Subject: [PATCH 1/1] Move Get SOL config parameter to host-ipmid +Subject: [PATCH] Move Get SOL config parameter to host-ipmid Move Get SOL config parameter command from net-ipmid to host-ipmid. @@ -41,10 +41,10 @@ index c93f3b1..730437d 100644 0x2C:0x01 //: 0x2C:0x02 //: diff --git a/transporthandler.cpp b/transporthandler.cpp -index 59e38ea..b64953f 100644 +index 0de76c4..b81e0d5 100644 --- a/transporthandler.cpp +++ b/transporthandler.cpp -@@ -1559,6 +1559,28 @@ static int getSOLParameter(const std::string& property, ipmi::Value& value, +@@ -2120,6 +2120,28 @@ static int getSOLParameter(const std::string& property, ipmi::Value& value, return 0; } @@ -73,7 +73,7 @@ index 59e38ea..b64953f 100644 static const constexpr uint8_t encryptMask = 0x80; static const constexpr uint8_t encryptShift = 7; static const constexpr uint8_t authMask = 0x40; -@@ -1761,6 +1783,171 @@ ipmi::RspType<> setSOLConfParams(ipmi::Context::ptr ctx, uint4_t chNum, +@@ -2322,6 +2344,171 @@ ipmi::RspType<> setSOLConfParams(ipmi::Context::ptr ctx, uint4_t chNum, return ipmi::responseSuccess(); } @@ -245,7 +245,7 @@ index 59e38ea..b64953f 100644 void register_netfn_transport_functions() { ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport, -@@ -1773,4 +1960,8 @@ void register_netfn_transport_functions() +@@ -2334,4 +2521,8 @@ void register_netfn_transport_functions() ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport, ipmi::transport::cmdSetSolConfigParameters, ipmi::Privilege::Admin, setSOLConfParams); 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 96e45cad3..bf1928825 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 92bdbcd90a445e49ba2f8e483d44ec41152d32b4 Mon Sep 17 00:00:00 2001 +From 16eb5d80893406739518e7a56eb5191aa7e68257 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,11 +21,11 @@ ipmitool power soft: soft power-off requested from system software Change-Id: Ic9fba3ca4abd9a758eb88f1e6ee09f7ca64ff80a Signed-off-by: Jason M. Bills --- - chassishandler.cpp | 206 +++++++++++++---------------------------------------- + chassishandler.cpp | 206 +++++++++++---------------------------------- 1 file changed, 50 insertions(+), 156 deletions(-) diff --git a/chassishandler.cpp b/chassishandler.cpp -index 0326806..8bfab88 100644 +index 4ca981d..cd0a13d 100644 --- a/chassishandler.cpp +++ b/chassishandler.cpp @@ -31,6 +31,7 @@ @@ -36,7 +36,7 @@ index 0326806..8bfab88 100644 #include #include -@@ -717,59 +718,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout, +@@ -813,59 +814,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout, //------------------------------------------ // Calls into Host State Manager Dbus object //------------------------------------------ @@ -137,8 +137,8 @@ index 0326806..8bfab88 100644 } //------------------------------------------ -@@ -1071,76 +1076,6 @@ ipmi::RspType ipmiChassisControl(uint8_t chassisControl) +@@ -1380,63 +1315,22 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl) switch (chassisControl) { case CMD_POWER_ON: @@ -287,5 +287,5 @@ index 0326806..8bfab88 100644 rc = setNmiProperty(true); break; -- -2.7.4 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch index aac0850ea..d0f9331d2 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch @@ -1,4 +1,4 @@ -From d9c89943d7b0aa00ee99b7c11278ac272a47a790 Mon Sep 17 00:00:00 2001 +From cfb5e13388531e1317eeb3ccf0f8eef0c6eeca60 Mon Sep 17 00:00:00 2001 From: Ren Yu Date: Tue, 28 May 2019 17:11:17 +0800 Subject: [PATCH] Save the pre-timeout interrupt in dbus property @@ -16,24 +16,24 @@ https://BMCIP/redfish/v1/Systems/system/LogServices/EventLog/Entries Signed-off-by: Ren Yu --- - app/watchdog.cpp | 47 +++++++++++++++++++++++++++++++++++++++++++++++ - app/watchdog_service.cpp | 6 ++++++ - app/watchdog_service.hpp | 9 +++++++++ + app/watchdog.cpp | 47 ++++++++++++++++++++++++++++++++++++++++ + app/watchdog_service.cpp | 6 +++++ + app/watchdog_service.hpp | 9 ++++++++ 3 files changed, 62 insertions(+) diff --git a/app/watchdog.cpp b/app/watchdog.cpp -index 2ffaae3..e9b7a9c 100644 +index 03c373e..cb0b1fd 100644 --- a/app/watchdog.cpp +++ b/app/watchdog.cpp -@@ -81,6 +81,7 @@ ipmi::RspType<> ipmiAppResetWatchdogTimer() +@@ -80,6 +80,7 @@ ipmi::RspType<> ipmiAppResetWatchdogTimer() static constexpr uint8_t wd_dont_stop = 0x1 << 6; static constexpr uint8_t wd_timeout_action_mask = 0x3; +static constexpr uint8_t wdPreTimeoutInterruptMask = 0x3; - static constexpr uint8_t wdTimerUseMask = 0x7; static constexpr uint8_t wdTimerUseResTimer1 = 0x0; -@@ -130,6 +131,45 @@ WatchdogService::Action ipmiActionToWdAction(IpmiAction ipmi_action) + static constexpr uint8_t wdTimerUseResTimer2 = 0x6; +@@ -127,6 +128,45 @@ WatchdogService::Action ipmiActionToWdAction(IpmiAction ipmi_action) } } @@ -79,7 +79,7 @@ index 2ffaae3..e9b7a9c 100644 enum class IpmiTimerUse : uint8_t { Reserved = 0x0, -@@ -257,6 +297,13 @@ ipmi_ret_t ipmi_app_watchdog_set(ipmi_netfn_t netfn, ipmi_cmd_t cmd, +@@ -250,6 +290,13 @@ ipmi::RspType<> // Mark as initialized so that future resets behave correctly wd_service.setInitialized(true); @@ -91,15 +91,15 @@ index 2ffaae3..e9b7a9c 100644 + ipmiPreTimeoutInterruptToWdAction(ipmiPreTimeoutInterrupt)); + lastCallSuccessful = true; - return IPMI_CC_OK; + return ipmi::responseSuccess(); } diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp -index 77663b4..0c4ea28 100644 +index 3534e89..4df1ab6 100644 --- a/app/watchdog_service.cpp +++ b/app/watchdog_service.cpp -@@ -203,3 +203,9 @@ void WatchdogService::setTimeRemaining(uint64_t timeRemaining) +@@ -198,3 +198,9 @@ void WatchdogService::setInterval(uint64_t interval) { - setProperty("TimeRemaining", timeRemaining); + setProperty("Interval", interval); } + +void WatchdogService::setPreTimeoutInterrupt( @@ -109,7 +109,7 @@ index 77663b4..0c4ea28 100644 +} \ No newline at end of file diff --git a/app/watchdog_service.hpp b/app/watchdog_service.hpp -index ed64a3c..b550f37 100644 +index 141bdb7..32b7461 100644 --- a/app/watchdog_service.hpp +++ b/app/watchdog_service.hpp @@ -15,6 +15,8 @@ class WatchdogService @@ -121,9 +121,9 @@ index ed64a3c..b550f37 100644 using TimerUse = sdbusplus::xyz::openbmc_project::State::server::Watchdog::TimerUse; -@@ -99,6 +101,13 @@ class WatchdogService +@@ -92,6 +94,13 @@ class WatchdogService */ - void setTimeRemaining(uint64_t timeRemaining); + void setInterval(uint64_t interval); + /** @brief Sets the value of the PreTimeoutInterrupt property on the host + * watchdog @@ -136,5 +136,5 @@ index ed64a3c..b550f37 100644 /** @brief sdbusplus handle */ sdbusplus::bus::bus bus; -- -2.7.4 +2.17.1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch new file mode 100644 index 000000000..658f0d8b7 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch @@ -0,0 +1,120 @@ +From 4d7c0f704df21912fa447caca4dbba246d1b80f6 Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey +Date: Tue, 26 Jan 2021 14:24:53 -0800 +Subject: [PATCH] Correct the IPv6 Router Address Configuration command + +The IPv6 Router Address Configuration Get/Set LAN command was not +reporting or modifying the correct portion of the networking +system. This command is intended to configure the Routing +Advertisement feature of IPv6. It is not a direct reflection of the +DHCP state. + +Systemd-networkd manages the Routing Advertisement via the +IPv6AcceptRA parameter, which according to the networkd documentaion, +enables/disables IPv6 DHCP functionality. + +Tested: +Issued "ipmitool raw 12 2 3 64 0 0" and was able to read the current +state of the IPv6AcceptRA variable. +Issued "ipmitool raw 12 1 3 64 2" and saw the configuration file for +the channel change, and the addition of a new IPv6 address to the +network device. +Issued "ipmitool raw 12 1 3 64 0" and saw that configuration file for +the channel change, and the removal of the IPv6 address from the +network device. + +Change-Id: Id01441f88ccc9d56449ab8115f4855de74e80cfc +Signed-off-by: Johnathan Mantey +--- + transporthandler.cpp | 61 ++++++++++++++++++++++++-------------------- + 1 file changed, 34 insertions(+), 27 deletions(-) + +diff --git a/transporthandler.cpp b/transporthandler.cpp +index b81e0d5..50343c7 100644 +--- a/transporthandler.cpp ++++ b/transporthandler.cpp +@@ -1260,6 +1260,35 @@ SetStatus& getSetStatus(uint8_t channel) + return setStatus[channel] = SetStatus::Complete; + } + ++/** @brief Gets the IPv6 Router Advertisement value ++ * ++ * @param[in] bus - The bus object used for lookups ++ * @param[in] params - The parameters for the channel ++ * @return networkd IPV6AcceptRA value ++ */ ++static bool getIPv6AcceptRA(sdbusplus::bus::bus& bus, ++ const ChannelParams& params) ++{ ++ auto raEnabled = ++ std::get(getDbusProperty(bus, params.service, params.logicalPath, ++ INTF_ETHERNET, "IPv6AcceptRA")); ++ return raEnabled; ++} ++ ++/** @brief Sets the IPv6AcceptRA flag ++ * ++ * @param[in] bus - The bus object used for lookups ++ * @param[in] params - The parameters for the channel ++ * @param[in] ipv6AcceptRA - boolean to enable/disable IPv6 Routing ++ * Advertisement ++ */ ++void setIPv6AcceptRA(sdbusplus::bus::bus& bus, const ChannelParams& params, ++ const bool ipv6AcceptRA) ++{ ++ setDbusProperty(bus, params.service, params.logicalPath, INTF_ETHERNET, ++ "IPv6AcceptRA", ipv6AcceptRA); ++} ++ + /** + * Define placeholder command handlers for the OEM Extension bytes for the Set + * LAN Configuration Parameters and Get LAN Configuration Parameters +@@ -1629,22 +1658,8 @@ RspType<> setLan(Context::ptr ctx, uint4_t channelBits, uint4_t reserved1, + { + return responseReqDataLenInvalid(); + } +- std::bitset<8> expected; +- EthernetInterface::DHCPConf dhcp = +- channelCall(channel); +- if ((dhcp == EthernetInterface::DHCPConf::both) | +- (dhcp == EthernetInterface::DHCPConf::v6)) +- { +- expected[IPv6RouterControlFlag::Dynamic] = 1; +- } +- else +- { +- expected[IPv6RouterControlFlag::Static] = 1; +- } +- if (expected != control) +- { +- return responseInvalidFieldRequest(); +- } ++ bool enableRA = control[IPv6RouterControlFlag::Dynamic]; ++ channelCall(channel, enableRA); + return responseSuccess(); + } + case LanParam::IPv6StaticRouter1IP: +@@ -1948,17 +1963,9 @@ RspType getLan(Context::ptr ctx, uint4_t channelBits, + case LanParam::IPv6RouterControl: + { + std::bitset<8> control; +- EthernetInterface::DHCPConf dhcp = +- channelCall(channel); +- if ((dhcp == EthernetInterface::DHCPConf::both) || +- (dhcp == EthernetInterface::DHCPConf::v6)) +- { +- control[IPv6RouterControlFlag::Dynamic] = 1; +- } +- else +- { +- control[IPv6RouterControlFlag::Static] = 1; +- } ++ control[IPv6RouterControlFlag::Dynamic] = ++ channelCall(channel); ++ control[IPv6RouterControlFlag::Static] = 0; + ret.pack(control); + return responseSuccess(std::move(ret)); + } +-- +2.26.2 + 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 a3debae71..81cb43ebe 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 @@ -4,11 +4,11 @@ PROJECT_SRC_DIR := "${THISDIR}/${PN}" SRC_URI += "file://phosphor-ipmi-host.service \ file://0010-fix-get-system-GUID-ipmi-command.patch \ file://0053-Fix-keep-looping-issue-when-entering-OS.patch \ - file://0056-add-SetInProgress-to-get-set-boot-option-cmd.patch \ file://0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch \ 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-Correct-the-IPv6-Router-Address-Configuration-comman.patch \ " EXTRA_OECONF_append = " --disable-i2c-whitelist-check" 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 68b43132d..099de5a47 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 @@ -2,7 +2,7 @@ SUMMARY = "libmctp_intel" DESCRIPTION = "Implementation of MCTP(DMTF DSP0236)" SRC_URI = "git://github.com/Intel-BMC/libmctp.git;protocol=ssh" -SRCREV = "46651f2a88322127cbd979d71c616fd35df8d989" +SRCREV = "14bf0b99083dda55b959273d63210407740c8217" 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 317386460..d885bf227 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 = "0f98e0d45a725003b810ea06f8e5f032b2864a5c" +SRCREV = "7ec1523f3a982678fec20b0ccc94436f3d467126" 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 90d8bc709..083394a24 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 = "0f98e0d45a725003b810ea06f8e5f032b2864a5c" +SRCREV = "7ec1523f3a982678fec20b0ccc94436f3d467126" S = "${WORKDIR}/git/mctp_emulator" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctp-wrapper.bb index 55fda9954..88939348f 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 = "0f98e0d45a725003b810ea06f8e5f032b2864a5c" +SRCREV = "7ec1523f3a982678fec20b0ccc94436f3d467126" S = "${WORKDIR}/git/mctp_wrapper" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpd.bb index b9c2eef31..8612fc78d 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 = "0f98e0d45a725003b810ea06f8e5f032b2864a5c" +SRCREV = "7ec1523f3a982678fec20b0ccc94436f3d467126" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb new file mode 100644 index 000000000..a0c4ac42a --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/mctpwplus.bb @@ -0,0 +1,24 @@ +SUMMARY = "MCTP Wrapper Library Plus" +DESCRIPTION = "Implementation of MCTP Wrapper Library Plus" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=615045c30a05cde5c0e924854d43c327" + +SRC_URI = "git://github.com/Intel-BMC/pmci.git;protocol=ssh" +SRCREV = "7ec1523f3a982678fec20b0ccc94436f3d467126" + +S = "${WORKDIR}/git/mctpwplus" + +PV = "1.0+git${SRCPV}" + +inherit cmake + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEPENDS += " \ + systemd \ + sdbusplus \ + phosphor-logging \ + cli11 \ + " +EXTRA_OECMAKE += "-DYOCTO_DEPENDENCIES=ON" 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 b047c0f85..3c443aa02 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 = "0f98e0d45a725003b810ea06f8e5f032b2864a5c" +SRCREV = "7ec1523f3a982678fec20b0ccc94436f3d467126" S = "${WORKDIR}/git/pldmd" @@ -24,6 +24,7 @@ DEPENDS += " \ gtest \ boost \ phosphor-dbus-interfaces \ + mctpwplus \ " FILES_${PN} += "${systemd_system_unitdir}/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 a76ebe7ca..0997869d5 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 = "0f98e0d45a725003b810ea06f8e5f032b2864a5c" +SRCREV = "7ec1523f3a982678fec20b0ccc94436f3d467126" S = "${WORKDIR}/git/pmci_launcher" 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 e96f5646c..33a19a902 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 = "e526b86d7f9eef3b7a58f2800263666a04051239" +SRCREV = "7d8a3003fb8038291f5e678cbfd74344ec6e62d2" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0001-Add-check-for-min-max-received-from-hwmon-files.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0001-Add-check-for-min-max-received-from-hwmon-files.patch new file mode 100644 index 000000000..33d35ec5e --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0001-Add-check-for-min-max-received-from-hwmon-files.patch @@ -0,0 +1,108 @@ +From 2516d67f8bb5ecd241b8dcdec3f8c58d0e3c4744 Mon Sep 17 00:00:00 2001 +From: Wojciech Dembinski +Date: Mon, 7 Dec 2020 19:23:10 +0100 +Subject: [PATCH] Add check for min/max received from hwmon files + +When hwmon reports incorrect min/max values or CPU Sensor cannot access +readings, it shall keep the last known good readings and not update +DBus with incorrect values. +This patch adds min < max verification check for the values received +from hwmon and removes check for power on/off in the case of a read +failure. + +Tested manually on a physical platform, test cases cover incorrect +max/min values and failing access to hwmon files. +SDR over IPMI can be fully received in the case of error. + +Signed-off-by: Wojciech Dembinski +Change-Id: Ia061f849b0f434812f822ed1902c8964d4c64b45 +--- + src/CPUSensor.cpp | 50 ++++++++++++++++++++++++----------------------- + 1 file changed, 26 insertions(+), 24 deletions(-) + +diff --git a/src/CPUSensor.cpp b/src/CPUSensor.cpp +index 2356821..01f5eb6 100644 +--- a/src/CPUSensor.cpp ++++ b/src/CPUSensor.cpp +@@ -1,5 +1,5 @@ + /* +-// Copyright (c) 2018 Intel Corporation ++// Copyright (c) 2018-2021 Intel Corporation + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. +@@ -146,19 +146,22 @@ void CPUSensor::setupRead(void) + + void CPUSensor::updateMinMaxValues(void) + { ++ double newMin = std::numeric_limits::quiet_NaN(); ++ double newMax = std::numeric_limits::quiet_NaN(); ++ + const boost::container::flat_map< + std::string, + std::vector, +- const char*>>> +- map = { ++ const char*, std::reference_wrapper>>> ++ map = { ++ { ++ "cap", + { +- "cap", +- { +- std::make_tuple("cap_max", std::ref(maxValue), "MaxValue"), +- std::make_tuple("cap_min", std::ref(minValue), "MinValue"), +- }, ++ std::make_tuple("cap_max", std::ref(maxValue), "MaxValue", std::ref(newMax)), ++ std::make_tuple("cap_min", std::ref(minValue), "MinValue", std::ref(newMin)), + }, +- }; ++ }, ++ }; + + if (auto fileParts = splitFileName(path)) + { +@@ -168,26 +171,25 @@ void CPUSensor::updateMinMaxValues(void) + { + for (const auto& vectorItem : mapIt->second) + { +- auto& [suffix, oldValue, dbusName] = vectorItem; ++ auto& [suffix, oldValue, dbusName, newValue] = vectorItem; + auto attrPath = boost::replace_all_copy(path, fileItem, suffix); +- if (auto newVal = +- readFile(attrPath, CPUSensor::sensorScaleFactor)) ++ ++ if(auto tmp = readFile(attrPath, CPUSensor::sensorScaleFactor)) + { +- updateProperty(sensorInterface, oldValue, *newVal, +- dbusName); ++ newValue.get() = *tmp; + } + else + { +- if (isPowerOn()) +- { +- updateProperty(sensorInterface, oldValue, 0, dbusName); +- } +- else +- { +- updateProperty(sensorInterface, oldValue, +- std::numeric_limits::quiet_NaN(), +- dbusName); +- } ++ newValue.get() = std::numeric_limits::quiet_NaN(); ++ } ++ } ++ ++ if(std::isfinite(newMin) && std::isfinite(newMax) && (newMin < newMax)) ++ { ++ for (const auto& vectorItem : mapIt->second) ++ { ++ auto& [suffix, oldValue, dbusName, newValue] = vectorItem; ++ updateProperty(sensorInterface, oldValue, newValue, dbusName); + } + } + } +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch new file mode 100644 index 000000000..0b2c19d32 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch @@ -0,0 +1,159 @@ +From 6d553f9fb6829d7dbbe2f625a09f476b0ef91ca0 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo +Date: Wed, 27 Jan 2021 15:52:16 -0800 +Subject: [PATCH] Fix PECI client creation flow + +This commit fixes the PECI client creation flow to make it retry +the creation when the client is not exposed correctly. + +Signed-off-by: Jae Hyun Yoo +--- + src/CPUSensorMain.cpp | 66 +++++++++++++++++++++++++++++++++++-------- + 1 file changed, 54 insertions(+), 12 deletions(-) + +diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp +index dfc942fcf7f3..67be7447e74e 100644 +--- a/src/CPUSensorMain.cpp ++++ b/src/CPUSensorMain.cpp +@@ -84,6 +84,7 @@ struct CPUConfig + }; + + static constexpr const char* peciDev = "/dev/peci-"; ++static constexpr const char* peciDevPath = "/sys/bus/peci/devices/"; + static constexpr const unsigned int rankNumMax = 8; + + namespace fs = std::filesystem; +@@ -169,7 +170,7 @@ bool createSensors(boost::asio::io_service& io, + } + + std::vector hwmonNamePaths; +- if (!findFiles(fs::path(R"(/sys/bus/peci/devices)"), ++ if (!findFiles(fs::path(peciDevPath), + R"(peci-\d+/\d+-.+/peci-.+/hwmon/hwmon\d+/name$)", + hwmonNamePaths, 1)) + { +@@ -405,7 +406,7 @@ bool createSensors(boost::asio::io_service& io, + return true; + } + +-void exportDevice(const CPUConfig& config) ++int exportDevice(const CPUConfig& config) + { + std::ostringstream hex; + hex << std::hex << config.addr; +@@ -413,9 +414,12 @@ void exportDevice(const CPUConfig& config) + std::string busStr = std::to_string(config.bus); + + std::string parameters = "peci-client 0x" + addrHexStr; +- std::string device = "/sys/bus/peci/devices/peci-" + busStr + "/new_device"; ++ std::string devPath = peciDevPath; ++ std::string delDevice = devPath + "peci-" + busStr + "/delete_device"; ++ std::string newDevice = devPath + "peci-" + busStr + "/new_device"; ++ std::string newClient = devPath + busStr + "-" + addrHexStr + "/driver"; + +- std::filesystem::path devicePath(device); ++ std::filesystem::path devicePath(newDevice); + const std::string& dir = devicePath.parent_path().string(); + for (const auto& path : std::filesystem::directory_iterator(dir)) + { +@@ -433,20 +437,38 @@ void exportDevice(const CPUConfig& config) + std::cout << parameters << " on bus " << busStr + << " is already exported\n"; + } +- return; ++ ++ std::ofstream delDeviceFile(delDevice); ++ if (!delDeviceFile.good()) ++ { ++ std::cerr << "Error opening " << delDevice << "\n"; ++ return -1; ++ } ++ delDeviceFile << parameters; ++ delDeviceFile.close(); ++ ++ break; + } + } + +- std::ofstream deviceFile(device); ++ std::ofstream deviceFile(newDevice); + if (!deviceFile.good()) + { +- std::cerr << "Error writing " << device << "\n"; +- return; ++ std::cerr << "Error opening " << newDevice << "\n"; ++ return -1; + } + deviceFile << parameters; + deviceFile.close(); + ++ if (!std::filesystem::exists(newClient)) ++ { ++ std::cerr << "Error creating " << newClient << "\n"; ++ return -1; ++ } ++ + std::cout << parameters << " on bus " << busStr << " is exported\n"; ++ ++ return 0; + } + + void detectCpu(boost::asio::deadline_timer& pingTimer, +@@ -462,6 +484,11 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, + + for (CPUConfig& config : cpuConfigs) + { ++ if (config.state == State::READY) ++ { ++ continue; ++ } ++ + std::string peciDevPath = peciDev + std::to_string(config.bus); + auto file = open(peciDevPath.c_str(), O_RDWR | O_CLOEXEC); + if (file < 0) +@@ -512,16 +539,29 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, + newState = State::OFF; + } + +- close(file); +- + if (config.state != newState) + { + if (newState != State::OFF) + { + if (config.state == State::OFF) + { +- std::cout << config.name << " is detected\n"; +- exportDevice(config); ++ struct peci_rd_pkg_cfg_msg msg; ++ msg.addr = config.addr; ++ msg.index = PECI_MBX_INDEX_CPU_ID; ++ msg.param = 0; ++ msg.rx_len = 4; ++ if (!ioctl(file, PECI_IOC_RD_PKG_CFG, &msg)) ++ { ++ std::cout << config.name << " is detected\n"; ++ if (exportDevice(config)) ++ { ++ newState = State::OFF; ++ } ++ } ++ else ++ { ++ newState = State::OFF; ++ } + } + + if (newState == State::ON) +@@ -544,6 +584,8 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, + keepPinging = true; + } + ++ close(file); ++ + if (DEBUG) + { + std::cout << config.name << ", state: " << config.state << "\n"; +-- +2.17.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 9a50b255d..39a6f1581 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,11 +1,13 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" -SRCREV = "6736d4b2a77cec00a8919f26035176c8b8025a4d" +SRCREV = "a3e8f2a391f389ffb2c379ca0c181e67de43824e" #SRC_URI = "git://github.com/openbmc/dbus-sensors.git" SRC_URI += "\ file://intrusionsensor-depend-on-networkd.conf \ + file://0001-Add-check-for-min-max-received-from-hwmon-files.patch \ + file://0002-Fix-PECI-client-creation-flow.patch \ " DEPENDS_append = " libgpiod libmctp" 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 f41bfd6d5..986d50f2d 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,7 +1,7 @@ SUMMARY = "Settings" SRC_URI = "git://github.com/Intel-BMC/settings.git;protocol=ssh" -SRCREV = "4879d875dc197a19e15227f45630a409a52330c4" +SRCREV = "946ac7669602d5660310e8609f500dadf16bb16d" PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" 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 04ae511ef..1468afe49 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 = "503c158972ff74a23ead8f50138107157b46758d" +SRCREV = "405c1e4bf8b993cb3800adead546e91b030ecb9b" EXTRA_OEMESON += " -Dmax-reports=5" EXTRA_OEMESON += " -Dmax-reading-parameters=200" 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 2dfe8544f..e141cdb46 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}:" -SRCREV = "3b13f734a5f881b9b51346ba09fabea752b145f3" +SRCREV = "6313c9df615fd85a8617c46444f964b972abdebd" 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 7201eccd9..c93a2e96b 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/webui-vue_%.bbappend @@ -1,6 +1,6 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/webui-vue.git" -SRCREV = "5fe1c3fed73164d4fe82ebb142cefbca72c2e706" +SRCREV = "391f94921bffb243d1eb3d72a49402a930b42160" do_compile_prepend() { cp -vf ${S}/.env.intel ${S}/.env 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_%.bbappend b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_%.bbappend deleted file mode 100644 index 7e93b46a6..000000000 --- a/meta-openbmc-mods/meta-common/recipes-support/curl/curl_%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -PACKAGECONFIG_remove = "gnutls" -PACKAGECONFIG += " ssl" diff --git a/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.74.0.bb b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.74.0.bb new file mode 100644 index 000000000..873bbe814 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-support/curl/curl_7.74.0.bb @@ -0,0 +1,85 @@ +SUMMARY = "Command line tool and library for client-side URL transfers" +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=2e9fb35867314fe31c6a4977ef7dd531" + +SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \ + file://0001-replace-krb5-config-with-pkg-config.patch \ +" + +SRC_URI[sha256sum] = "0f4d63e6681636539dc88fa8e929f934cd3a840c46e0bf28c73be11e521b77a5" + +# 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)} gnutls 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[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-libmetalink \ + --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-wht/conf/bblayers.conf.sample b/meta-openbmc-mods/meta-wht/conf/bblayers.conf.sample index 3fe594301..f76660ab9 100644 --- a/meta-openbmc-mods/meta-wht/conf/bblayers.conf.sample +++ b/meta-openbmc-mods/meta-wht/conf/bblayers.conf.sample @@ -1,12 +1,12 @@ # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly -LCONF_VERSION = "12" +LCONF_VERSION = "13" BBPATH = "${TOPDIR}" BBFILES ?= "" -# meta-intel has a config file that needs to be overridden -BBMASK = "/meta-intel/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb" +# meta-intel-openbmc has a config file that needs to be overridden +BBMASK = "/meta-intel-openbmc/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb" BBLAYERS ?= " \ ##OEROOT##/meta \ @@ -19,7 +19,7 @@ BBLAYERS ?= " \ ##OEROOT##/meta-aspeed \ ##OEROOT##/meta-x86 \ ##OEROOT##/meta-openbmc-mods \ - ##OEROOT##/meta-intel \ + ##OEROOT##/meta-intel-openbmc \ ##OEROOT##/meta-openbmc-mods/meta-common \ ##OEROOT##/meta-openbmc-mods/meta-common-small \ ##OEROOT##/meta-openbmc-mods/meta-ast2500 \ diff --git a/meta-openbmc-mods/meta-wht/conf/layer.conf b/meta-openbmc-mods/meta-wht/conf/layer.conf index 7daf9ddc8..4ce9453f7 100644 --- a/meta-openbmc-mods/meta-wht/conf/layer.conf +++ b/meta-openbmc-mods/meta-wht/conf/layer.conf @@ -7,8 +7,8 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "wht" -BBFILE_PATTERN_wht = "" -BBFILE_PRIORITY_wht = "7" +BBFILE_PATTERN_wht = "^${LAYERDIR}/" +BBFILE_PRIORITY_wht = "11" LAYERSERIES_COMPAT_wht = "dunfell gatesgarth" PRODUCT_GENERATION = "wht" diff --git a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0001-Filter-memory-thermtrip-events-based-on-DIMM-status.patch b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0001-Filter-memory-thermtrip-events-based-on-DIMM-status.patch index 30859d1a4..140724ca9 100644 --- a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0001-Filter-memory-thermtrip-events-based-on-DIMM-status.patch +++ b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0001-Filter-memory-thermtrip-events-based-on-DIMM-status.patch @@ -1,7 +1,7 @@ -From 0253fd1d68d6a42c95c425b1a61fa2d53b2b2469 Mon Sep 17 00:00:00 2001 +From c09e608da2f63eed5b73891d5c032b646d8e81eb Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Wed, 22 Jul 2020 14:30:04 -0700 -Subject: [PATCH] Filter memory thermtrip events based on DIMM status +Subject: [PATCH 1/2] Filter memory thermtrip events based on DIMM status There is a race-condition on shutdown that makes it difficult to differentiate between a normal shutdown and a memory thermtrip @@ -22,22 +22,22 @@ that the memory thermtrip event is logged. Change-Id: I9c38b41db30046499297ee24cc3a2790920b19d3 Signed-off-by: Jason M. Bills --- - src/host_error_monitor.cpp | 77 +++++++++++++++++++++++++++++++++++++- - 1 file changed, 75 insertions(+), 2 deletions(-) + src/host_error_monitor.cpp | 81 ++++++++++++++++++++++++++++++++++++-- + 1 file changed, 77 insertions(+), 4 deletions(-) diff --git a/src/host_error_monitor.cpp b/src/host_error_monitor.cpp -index 1c6a2e70d..aa4a9b672 100644 +index d52a5dc6a..77d065fa3 100644 --- a/src/host_error_monitor.cpp +++ b/src/host_error_monitor.cpp -@@ -17,6 +17,7 @@ - #include - +@@ -19,6 +19,7 @@ + #include #include + #include +#include #include #include -@@ -36,6 +37,9 @@ static std::shared_ptr associationCATAssert; +@@ -38,6 +39,9 @@ static std::shared_ptr associationCATAssert; static const constexpr char* rootPath = "/xyz/openbmc_project/CallbackManager"; @@ -47,7 +47,7 @@ index 1c6a2e70d..aa4a9b672 100644 static bool hostOff = true; static size_t caterrTimeoutMs = 2000; -@@ -258,6 +262,67 @@ static void initializeHostState() +@@ -274,6 +278,67 @@ static void initializeHostState() "xyz.openbmc_project.State.Host", "CurrentHostState"); } @@ -115,7 +115,7 @@ index 1c6a2e70d..aa4a9b672 100644 static std::shared_ptr startHostStateMonitor() { return std::make_shared( -@@ -826,7 +891,9 @@ static void cpu1MemtripHandler() +@@ -851,7 +916,9 @@ static void cpu1MemtripHandler() bool cpu1Memtrip = gpioLineEvent.event_type == gpiod::line_event::FALLING_EDGE; @@ -126,7 +126,7 @@ index 1c6a2e70d..aa4a9b672 100644 { memThermTripLog(1); } -@@ -886,7 +953,9 @@ static void cpu2MemtripHandler() +@@ -911,7 +978,9 @@ static void cpu2MemtripHandler() bool cpu2Memtrip = gpioLineEvent.event_type == gpiod::line_event::FALLING_EDGE; @@ -137,7 +137,23 @@ index 1c6a2e70d..aa4a9b672 100644 { memThermTripLog(2); } -@@ -1605,6 +1674,10 @@ int main(int argc, char* argv[]) +@@ -1521,13 +1590,13 @@ static void initializeErrorState() + } + + // Handle CPU1_MEM_THERM_EVENT (CPU1 DIMM Thermal trip) if it's asserted now +- if (cpu1MemtripLine.get_value() == 0) ++ if ((cpu1MemtripLine.get_value() == 0) && !cpu1CriticalDIMMs.empty()) + { + memThermTripLog(1); + } + + // Handle CPU2_MEM_THERM_EVENT (CPU2 DIMM Thermal trip) if it's asserted now +- if (cpu2MemtripLine.get_value() == 0) ++ if ((cpu2MemtripLine.get_value() == 0) && !cpu2CriticalDIMMs.empty()) + { + memThermTripLog(2); + } +@@ -1639,6 +1708,10 @@ int main(int argc, char* argv[]) std::shared_ptr hostStateMonitor = host_error_monitor::startHostStateMonitor(); diff --git a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0002-Add-a-workaround-for-spurious-CPU-errors.patch b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0002-Add-a-workaround-for-spurious-CPU-errors.patch index 2a573311f..1f1efea69 100644 --- a/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0002-Add-a-workaround-for-spurious-CPU-errors.patch +++ b/meta-openbmc-mods/meta-wht/recipes-core/host-error-monitor/host-error-monitor/0002-Add-a-workaround-for-spurious-CPU-errors.patch @@ -1,7 +1,7 @@ -From d0e4130b2d1e0e44efc8fd6e180487853625edd6 Mon Sep 17 00:00:00 2001 +From d7909c8924cf3619bffd52e5f352f175c1cf5033 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Mon, 17 Aug 2020 15:52:22 -0700 -Subject: [PATCH] Add a workaround for spurious CPU errors +Subject: [PATCH 2/2] Add a workaround for spurious CPU errors There is a possible issue where GPIO event interrupts are getting missed causing false errors to be logged. @@ -20,10 +20,10 @@ Signed-off-by: Jason M. Bills 1 file changed, 77 insertions(+) diff --git a/src/host_error_monitor.cpp b/src/host_error_monitor.cpp -index ca089f70d..fd453ccdc 100644 +index 77d065fa3..d026ab90d 100644 --- a/src/host_error_monitor.cpp +++ b/src/host_error_monitor.cpp -@@ -797,6 +797,18 @@ static void caterrAssertHandler() +@@ -806,6 +806,18 @@ static void caterrAssertHandler() } return; } @@ -42,7 +42,7 @@ index ca089f70d..fd453ccdc 100644 std::cerr << "CATERR asserted for " << std::to_string(caterrTimeoutMs) << " ms\n"; beep(beepCPUIERR); -@@ -1270,6 +1282,48 @@ static void errXAssertHandler(const int errPin, +@@ -1288,6 +1300,48 @@ static void errXAssertHandler(const int errPin, } return; } @@ -91,7 +91,7 @@ index ca089f70d..fd453ccdc 100644 std::cerr << "ERR" << std::to_string(errPin) << " asserted for " << std::to_string(errTimeoutMs) << " ms\n"; if (errPinCPUs.count()) -@@ -1379,6 +1433,18 @@ static void err2AssertHandler() +@@ -1397,6 +1451,18 @@ static void err2AssertHandler() } return; } @@ -110,7 +110,7 @@ index ca089f70d..fd453ccdc 100644 conn->async_method_call( [](boost::system::error_code ec, const std::variant& property) { -@@ -1447,6 +1513,17 @@ static void smiAssertHandler() +@@ -1465,6 +1531,17 @@ static void smiAssertHandler() } return; } diff --git a/meta-openbmc-mods/meta-wolfpass/conf/bblayers.conf.sample b/meta-openbmc-mods/meta-wolfpass/conf/bblayers.conf.sample index 493fdde0b..4b9445344 100644 --- a/meta-openbmc-mods/meta-wolfpass/conf/bblayers.conf.sample +++ b/meta-openbmc-mods/meta-wolfpass/conf/bblayers.conf.sample @@ -1,6 +1,6 @@ # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly -LCONF_VERSION = "12" +LCONF_VERSION = "13" BBPATH = "${TOPDIR}" BBFILES ?= "" @@ -16,7 +16,7 @@ BBLAYERS ?= " \ ##OEROOT##/meta-aspeed \ ##OEROOT##/meta-x86 \ ##OEROOT##/meta-openbmc-mods \ - ##OEROOT##/meta-intel \ + ##OEROOT##/meta-intel-openbmc \ ##OEROOT##/meta-openbmc-mods/meta-common \ ##OEROOT##/meta-openbmc-mods/meta-common-small \ ##OEROOT##/meta-openbmc-mods/meta-ast2500 \ diff --git a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf index 9dacd1c2b..441b4b578 100644 --- a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf +++ b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf @@ -7,8 +7,8 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "wolfpass" -BBFILE_PATTERN_wolfpass = "" -BBFILE_PRIORITY_wolfpass = "7" +BBFILE_PATTERN_wolfpass = "^${LAYERDIR}/" +BBFILE_PRIORITY_wolfpass = "11" LAYERSERIES_COMPAT_wolfpass = "dunfell gatesgarth" PRODUCT_GENERATION = "prl" -- cgit v1.2.3