diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-05-29 19:22:39 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-05-29 19:22:39 +0300 |
commit | 5364646cb66fa75cdcbf148e039e0383cda94f2a (patch) | |
tree | 78b1711f353235e812435be90e124eab4037294e /meta-phosphor | |
parent | 816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5 (diff) | |
parent | 7b595c2f82912a170774e84e5bb81d1b6030bf6b (diff) | |
download | openbmc-5364646cb66fa75cdcbf148e039e0383cda94f2a.tar.xz |
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into intel
Diffstat (limited to 'meta-phosphor')
119 files changed, 466 insertions, 1630 deletions
diff --git a/meta-phosphor/aspeed-layer/recipes-connectivity/jsnbd/jsnbd/state_hook b/meta-phosphor/aspeed-layer/recipes-connectivity/jsnbd/jsnbd/state_hook new file mode 100755 index 000000000..0df6ff973 --- /dev/null +++ b/meta-phosphor/aspeed-layer/recipes-connectivity/jsnbd/jsnbd/state_hook @@ -0,0 +1,68 @@ +#!/bin/sh + +if [ $# -ne 2 ] +then + echo "usage: $0 <start|stop> <config>" >&2 + exit 1 +fi + +action=$1 +config=$2 + +gadget_name=mass-storage +gadget_dir=/sys/kernel/config/usb_gadget/$gadget_name + +case "$config" in +0) + nbd_device=/dev/nbd0 + ;; +*) + echo "invalid config $config" >&2 + exit 1 + ;; +esac + +set -ex + +case "$action" in +start) + mkdir -p $gadget_dir + ( + cd $gadget_dir + # http://www.linux-usb.org/usb.ids + # |-> 1d6b Linux Foundation + # |-> 0104 Multifunction Composite Gadget + echo "0x1d6b" > idVendor + echo "0x0104" > idProduct + mkdir -p strings/0x409 + echo "OpenBMC" > strings/0x409/manufacturer + echo "Virtual Media Device" > strings/0x409/product + mkdir -p configs/c.1/strings/0x409 + echo "config 1" > configs/c.1/strings/0x409/configuration + mkdir -p functions/mass_storage.usb0 + ln -s functions/mass_storage.usb0 configs/c.1 + echo 1 > functions/mass_storage.usb0/lun.0/removable + echo 1 > functions/mass_storage.usb0/lun.0/ro + echo 0 > functions/mass_storage.usb0/lun.0/cdrom + echo $nbd_device > functions/mass_storage.usb0/lun.0/file + echo "1e6a0000.usb-vhub:p4" > UDC + ) + ;; +stop) + ( + cd $gadget_dir + rm configs/c.1/mass_storage.usb0 + rmdir functions/mass_storage.usb0 + rmdir configs/c.1/strings/0x409 + rmdir configs/c.1 + rmdir strings/0x409 + ) + rmdir $gadget_dir + ;; +*) + echo "invalid action $action" >&2 + exit 1 +esac + +exit 0 + diff --git a/meta-phosphor/aspeed-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend b/meta-phosphor/aspeed-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend new file mode 100644 index 000000000..3ccc08798 --- /dev/null +++ b/meta-phosphor/aspeed-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +FILES_${PN} += "${sysconfdir}/nbd-proxy/state" +SRC_URI += "file://state_hook" + +do_install_append() { + install -d ${D}${sysconfdir}/nbd-proxy/ + install -m 0755 ${WORKDIR}/state_hook ${D}${sysconfdir}/nbd-proxy/state +} diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass index 17cbdcd25..5981066b8 100644 --- a/meta-phosphor/classes/obmc-phosphor-image.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass @@ -83,7 +83,6 @@ IMAGE_FEATURES_append_df-obmc-ubi-fs = " read-only-rootfs" CORE_IMAGE_EXTRA_INSTALL_append = " bash \ packagegroup-obmc-apps-extras \ - packagegroup-obmc-apps-extrasdev \ packagegroup-obmc-apps-extrasdevtools \ i2c-tools \ obmc-console \ @@ -98,8 +97,6 @@ CORE_IMAGE_EXTRA_INSTALL_append = " bash \ OBMC_IMAGE_EXTRA_INSTALL ?= "" -do_image_complete[depends] += "obmc-phosphor-debug-tarball:do_image_complete" - # The /etc/version file is misleading and not useful. Remove it. # Users should instead rely on /etc/os-release. remove_etc_version() { diff --git a/meta-phosphor/classes/obmc-phosphor-kernel-version.bbclass b/meta-phosphor/classes/obmc-phosphor-kernel-version.bbclass new file mode 100644 index 000000000..8fa8947e5 --- /dev/null +++ b/meta-phosphor/classes/obmc-phosphor-kernel-version.bbclass @@ -0,0 +1,17 @@ +do_kernel_configme_append() { + # Remove previous CONFIG_LOCALVERSION + sed -i '/CONFIG_LOCALVERSION/d' ${B}/.config + + # Latest version after yocto patched (if any) + latestVersion="-$(git rev-parse --verify HEAD)" + shortLatestVersion="$(echo ${latestVersion} | cut -c1-8)" + + shortLinuxVersionExt="$(echo ${LINUX_VERSION_EXTENSION} | cut -c1-8)" + + if [ "${latestVersion}" != "${LINUX_VERSION_EXTENSION}" ]; then + dirtyString="-dirty" + echo "CONFIG_LOCALVERSION="\"${shortLinuxVersionExt}${dirtyString}${shortLatestVersion}\" >> ${B}/.config + else + echo "CONFIG_LOCALVERSION="\"${shortLinuxVersionExt}\" >> ${B}/.config + fi +} diff --git a/meta-phosphor/classes/phosphor-networkd-rev.bbclass b/meta-phosphor/classes/phosphor-networkd-rev.bbclass index eca260de9..8dabafcad 100644 --- a/meta-phosphor/classes/phosphor-networkd-rev.bbclass +++ b/meta-phosphor/classes/phosphor-networkd-rev.bbclass @@ -1,2 +1,2 @@ SRC_URI += "git://github.com/openbmc/phosphor-networkd" -SRCREV = "f1aa51cedf4618d084ef9edd613d5f886fc8b73c" +SRCREV = "0283b39bd3c758313842be52bf76f6222e0425b6" diff --git a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass index 4d146c109..fe9d1a5d3 100644 --- a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass +++ b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass @@ -46,12 +46,6 @@ SYSTEMD_SUBSTITUTIONS += "RO_MTD:${BMC_RO_MTD}:obmc-flash-bmc-ubiro@.service" SYSTEMD_SUBSTITUTIONS += "KERNEL_MTD:${BMC_KERNEL_MTD}:obmc-flash-bmc-ubiro@.service" SYSTEMD_SUBSTITUTIONS += "RW_SIZE:${BMC_RW_SIZE}:obmc-flash-bmc-ubirw.service" -SRC_URI += "file://synclist" do_install_append() { install -d ${D}/usr/local - - if [ -f ${WORKDIR}/build/phosphor-sync-software-manager ]; then - install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/synclist ${D}${sysconfdir}/synclist - fi } diff --git a/meta-phosphor/classes/skeleton-rev.bbclass b/meta-phosphor/classes/skeleton-rev.bbclass index f593becc9..181a892fd 100644 --- a/meta-phosphor/classes/skeleton-rev.bbclass +++ b/meta-phosphor/classes/skeleton-rev.bbclass @@ -1,4 +1,4 @@ -SRCREV ?= "c0da84767c00657c0b3b1afff7d9c5c2f1ed5fdb" +SRCREV ?= "c8334f3258cb80839e49defe386d33c196929215" SKELETON_URI ?= "git://github.com/openbmc/skeleton" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" diff --git a/meta-phosphor/conf/distro/include/phosphor-base.inc b/meta-phosphor/conf/distro/include/phosphor-base.inc index 9cb9f861e..b6f155122 100644 --- a/meta-phosphor/conf/distro/include/phosphor-base.inc +++ b/meta-phosphor/conf/distro/include/phosphor-base.inc @@ -148,3 +148,5 @@ BAD_RECOMMENDATIONS_pn-obmc-phosphor-image = "udev-hwdb" BAD_RECOMMENDATIONS_pn-obmc-phosphor-image += "shared-mime-info" LAYER_CONF_VERSION ?= "8" + +KERNEL_CLASSES_append = " obmc-phosphor-kernel-version" diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc index 0128fcea1..f99fbed43 100644 --- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc +++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc @@ -102,7 +102,7 @@ VIRTUAL-RUNTIME_obmc-dump-manager ?= "phosphor-debug-collector-manager" # Provide support for monitoring BMC core dumps VIRTUAL-RUNTIME_obmc-dump-monitor ?= "phosphor-debug-collector-monitor" -PREFERRED_PROVIDER_virtual/obmc-system-mgmt ?= "obmc-phosphor-sysd" +PREFERRED_PROVIDER_virtual/obmc-system-mgmt ??= "obmc-phosphor-sysd" # phosphor-hwmon-config # @@ -194,21 +194,20 @@ PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native ?= \ PREFERRED_PROVIDER_virtual/phosphor-logging-callouts ?= \ "phosphor-logging-callouts-example-native" -# The phosphor-fan-presence application is data driven and requires an -# input YAML that maps fans to their tach sensors. -# This virtual is a native recipe that provides that mapping by installing -# configuration files in the format and native sysroot location expected by -# the phosphor-fan-presence build process in the native sysroot. +# The phosphor-fan-presence application is data driven and requires an input +# YAML that maps fans to their tach sensors. This virtual is a recipe that +# provides that mapping by installing configuration files in the format and +# sysroot location expected by the phosphor-fan-presence build process in the +# sysroot. PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config ?= \ - "phosphor-fan-presence-config-native" + "phosphor-fan-presence-config" -# The phosphor-fan-control application is data driven and requires a YAML -# file to define the fans in the system. -# This virtual is a native recipe that provides that definition by installing -# the YAML file in the format and native sysroot location expected by -# the phosphor-fan-control build process in the native sysroot. +# The phosphor-fan-control application is data driven and requires a YAML file +# to define the fans in the system. This virtual is a recipe that provides +# that definition by installing the YAML file in the format and sysroot +# location expected by the phosphor-fan-control build process in the sysroot. PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config ?= \ - "phosphor-fan-control-fan-config-native" + "phosphor-fan-control-fan-config" # The phosphor-gpio-monitor application is data-driven and requires an input. # The application then watches the passed in input event entry for the diff --git a/meta-phosphor/conf/distro/include/phosphor-mrw.inc b/meta-phosphor/conf/distro/include/phosphor-mrw.inc index 9b2cb4586..9fe8618a4 100644 --- a/meta-phosphor/conf/distro/include/phosphor-mrw.inc +++ b/meta-phosphor/conf/distro/include/phosphor-mrw.inc @@ -13,5 +13,5 @@ PREFERRED_PROVIDER_virtual/phosphor-ipmi-sensor-inventory_df-mrw ?= "phosphor-ip PREFERRED_PROVIDER_virtual/phosphor-ipmi-inventory-sel_df-mrw ?= "phosphor-ipmi-inventory-sel-mrw-native" PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native_df-mrw ?= "phosphor-led-manager-config-mrw-native" PREFERRED_PROVIDER_virtual/phosphor-logging-callouts_df-mrw ?= "phosphor-logging-callouts-mrw-native" -PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config_df-mrw ?= "phosphor-fan-presence-mrw-native" -PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config_df-mrw ?= "phosphor-fan-control-fan-config-mrw-native" +PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config_df-mrw ?= "phosphor-fan-presence-mrw" +PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config_df-mrw ?= "phosphor-fan-control-fan-config-mrw" diff --git a/meta-phosphor/conf/layer.conf b/meta-phosphor/conf/layer.conf index 6ffcde01f..0df82a724 100644 --- a/meta-phosphor/conf/layer.conf +++ b/meta-phosphor/conf/layer.conf @@ -6,7 +6,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "phosphor-layer" -BBFILE_PATTERN_phosphor-layer = "^${LAYERDIR}/" +BBFILE_PATTERN_phosphor-layer := "^${LAYERDIR}/" LAYERVERSION_phosphor-layer = "1" LAYERSERIES_COMPAT_phosphor-layer = "thud warrior" diff --git a/meta-phosphor/recipes-core/base-files/base-files/50-rp_filter.conf b/meta-phosphor/recipes-core/base-files/base-files/50-rp_filter.conf new file mode 100644 index 000000000..7194eb85d --- /dev/null +++ b/meta-phosphor/recipes-core/base-files/base-files/50-rp_filter.conf @@ -0,0 +1,5 @@ +# Turn on Source Address Verification in all interfaces to +# prevent some spoofing attacks +net.ipv4.conf.default.rp_filter = 2 +net.ipv4.conf.all.rp_filter = 2 + diff --git a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend index 83e455f3d..c77cfefc7 100644 --- a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend +++ b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend @@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" RDEPENDS_${PN}_append_df-obmc-ubi-fs = " preinit-mounts" SRC_URI += " \ + file://50-rp_filter.conf \ ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'file://nsswitch_ldap.conf', '', d)}" do_install_append() { @@ -14,4 +15,7 @@ do_install_append() { if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)}" ]; then install -D -m 600 ${WORKDIR}/nsswitch_ldap.conf ${D}/${sysconfdir}/nsswitch.conf fi + + install -d ${D}/${libdir}/sysctl.d + install -D -m 644 ${WORKDIR}/50-rp_filter.conf ${D}/${libdir}/sysctl.d/50-rp_filter.conf } diff --git a/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend index 96236ca73..d494db505 100644 --- a/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend +++ b/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -1,5 +1,6 @@ RDEPENDS_${PN}_append = " \ nativesdk-autoconf-archive \ + nativesdk-meson \ nativesdk-phosphor-dbus-interfaces-yaml \ nativesdk-sdbus++ \ nativesdk-phosphor-logging-elog \ diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/recipes-core/systemd/obmc-targets.bb index 1a13ea3a9..00c21b93a 100644 --- a/meta-phosphor/recipes-core/systemd/obmc-targets.bb +++ b/meta-phosphor/recipes-core/systemd/obmc-targets.bb @@ -75,7 +75,6 @@ SYSTEMD_SERVICE_${PN} += " \ obmc-fan-control.target \ obmc-fan-control-ready@.target \ obmc-fan-watchdog-takeover.target \ - obmc-standby.target \ " SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}" diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-reboot@.target b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-reboot@.target index a01b94251..8e749e6e1 100644 --- a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-reboot@.target +++ b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-reboot@.target @@ -2,8 +2,6 @@ Description=Reboot Host%i Wants=multi-user.target After=multi-user.target -Wants=mapper-wait@-org-openbmc-control-chassis%i.service -After=mapper-wait@-org-openbmc-control-chassis%i.service Conflicts=obmc-host-startmin@%i.target RefuseManualStop=yes OnFailure=obmc-chassis-poweroff@%i.target diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-start@.target b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-start@.target index 790ef6af9..ff1486b91 100644 --- a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-start@.target +++ b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-start@.target @@ -2,8 +2,6 @@ Description=Start Host%i Wants=multi-user.target After=multi-user.target -Wants=mapper-wait@-org-openbmc-control-chassis%i.service -After=mapper-wait@-org-openbmc-control-chassis%i.service Conflicts=obmc-host-stop@%i.target RefuseManualStop=yes OnFailure=obmc-host-quiesce@%i.target diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-startmin@.target b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-startmin@.target index fc93cdce4..88ccb2595 100644 --- a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-startmin@.target +++ b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-startmin@.target @@ -2,8 +2,6 @@ Description=Start Host%i Minimum Wants=multi-user.target After=multi-user.target -Wants=mapper-wait@-org-openbmc-control-chassis%i.service -After=mapper-wait@-org-openbmc-control-chassis%i.service Conflicts=obmc-host-stop@%i.target RefuseManualStop=yes OnFailure=obmc-host-quiesce@%i.target diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-stop@.target b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-stop@.target index d8f3cc938..496fd5b3f 100644 --- a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-stop@.target +++ b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-host-stop@.target @@ -2,8 +2,6 @@ Description=Stop Host%i Wants=multi-user.target After=multi-user.target -Wants=mapper-wait@-org-openbmc-control-chassis%i.service -After=mapper-wait@-org-openbmc-control-chassis%i.service After=obmc-chassis-poweroff@%i.target Conflicts=obmc-host-startmin@%i.target RefuseManualStop=yes diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-standby.target b/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-standby.target deleted file mode 100644 index 95044a404..000000000 --- a/meta-phosphor/recipes-core/systemd/obmc-targets/obmc-standby.target +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Phosphor System - Standby -Requires=multi-user.target -RefuseManualStart=yes -RefuseManualStop=yes -AllowIsolate=yes - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend index fa6a7ed8e..f9d830157 100644 --- a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend +++ b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend @@ -1,11 +1,10 @@ FILES_${PN}-catalog-extralocales = \ "${exec_prefix}/lib/systemd/catalog/*.*.catalog" PACKAGES =+ "${PN}-catalog-extralocales" -PACKAGECONFIG_remove = "backlight binfmt firstboot gshadow hibernate ima \ - localed logind machined nss nss-mymachines nss-resolve \ - polkit quotacheck smack utmp vconsole" +PACKAGECONFIG = "pam hostnamed networkd randomseed resolved sysusers timedated \ + timesyncd xz" -FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://default.network" SRC_URI += "file://0001-sd-bus-Don-t-automatically-add-ObjectManager.patch" diff --git a/meta-phosphor/recipes-devtools/python/python/0001-json-Use-int-long.__str__-to-convert-subclasses.patch b/meta-phosphor/recipes-devtools/python/python/0001-json-Use-int-long.__str__-to-convert-subclasses.patch deleted file mode 100644 index 26669d848..000000000 --- a/meta-phosphor/recipes-devtools/python/python/0001-json-Use-int-long.__str__-to-convert-subclasses.patch +++ /dev/null @@ -1,128 +0,0 @@ -From b002fd4b884b5f8cd3f429ea2002dd19e91d1d91 Mon Sep 17 00:00:00 2001 -From: Brad Bishop <bradleyb@fuzziesquirrel.com> -Date: Thu, 7 Jun 2018 09:18:01 -0400 -Subject: [PATCH] json: Use int/long.__str__ to convert subclasses - -Based on changes that went into 3.x: - -e0805cf10ea84b44a13ad5649267edba7cb83ee9 -a4998a70416c27730e75c0a4225ee2c3552b1618 ---- - Lib/json/encoder.py | 26 ++++++++++++++++++-------- - Modules/_json.c | 21 +++++++++++++++++---- - 2 files changed, 35 insertions(+), 12 deletions(-) - -diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py -index 97ffe8e8a2..3156682fdd 100644 ---- a/Lib/json/encoder.py -+++ b/Lib/json/encoder.py -@@ -283,6 +283,8 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, - long=long, - str=str, - tuple=tuple, -+ _intstr=int.__str__, -+ _longstr=long.__str__, - ): - - def _iterencode_list(lst, _current_indent_level): -@@ -317,8 +319,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, - yield buf + 'true' - elif value is False: - yield buf + 'false' -- elif isinstance(value, (int, long)): -- yield buf + str(value) -+ elif isinstance(value, int): -+ yield buf + _intstr(value) -+ elif isinstance(value, long): -+ yield buf + _longstr(value) - elif isinstance(value, float): - yield buf + _floatstr(value) - else: -@@ -374,8 +378,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, - key = 'false' - elif key is None: - key = 'null' -- elif isinstance(key, (int, long)): -- key = str(key) -+ elif isinstance(key, int): -+ key = _intstr(key) -+ elif isinstance(key, long): -+ key = _longstr(key) - elif _skipkeys: - continue - else: -@@ -394,8 +400,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, - yield 'true' - elif value is False: - yield 'false' -- elif isinstance(value, (int, long)): -- yield str(value) -+ elif isinstance(value, int): -+ yield _intstr(value) -+ elif isinstance(value, long): -+ yield _longstr(value) - elif isinstance(value, float): - yield _floatstr(value) - else: -@@ -423,8 +431,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, - yield 'true' - elif o is False: - yield 'false' -- elif isinstance(o, (int, long)): -- yield str(o) -+ elif isinstance(o, long): -+ yield _longstr(o) -+ elif isinstance(o, int): -+ yield _intstr(o) - elif isinstance(o, float): - yield _floatstr(o) - elif isinstance(o, (list, tuple)): -diff --git a/Modules/_json.c b/Modules/_json.c -index 39ec467b09..f429738145 100644 ---- a/Modules/_json.c -+++ b/Modules/_json.c -@@ -1981,12 +1981,19 @@ encoder_listencode_obj(PyEncoderObject *s, PyObject *rval, PyObject *obj, Py_ssi - return -1; - return _steal_list_append(rval, encoded); - } -- else if (PyInt_Check(obj) || PyLong_Check(obj)) { -- PyObject *encoded = PyObject_Str(obj); -+ else if (PyLong_Check(obj)) { -+ PyObject *encoded = PyLong_Type.tp_str(obj); - if (encoded == NULL) - return -1; - return _steal_list_append(rval, encoded); - } -+ else if (PyInt_Check(obj)) { -+ PyObject *encoded = PyInt_Type.tp_str(obj); -+ if (encoded == NULL) -+ return -1; -+ return _steal_list_append(rval, encoded); -+ } -+ - else if (PyFloat_Check(obj)) { - PyObject *encoded = encoder_encode_float(s, obj); - if (encoded == NULL) -@@ -2131,11 +2138,17 @@ encoder_listencode_dict(PyEncoderObject *s, PyObject *rval, PyObject *dct, Py_ss - if (kstr == NULL) - goto bail; - } -- else if (PyInt_Check(key) || PyLong_Check(key)) { -- kstr = PyObject_Str(key); -+ else if (PyLong_Check(key)) { -+ kstr = PyLong_Type.tp_str(key); - if (kstr == NULL) - goto bail; - } -+ else if (PyInt_Check(key)) { -+ kstr = PyInt_Type.tp_str(key); -+ if (kstr == NULL) -+ goto bail; -+ } -+ - else if (key == Py_True || key == Py_False || key == Py_None) { - kstr = _encoded_const(key); - if (kstr == NULL) --- -2.14.3 - diff --git a/meta-phosphor/recipes-devtools/python/python_2.%.bbappend b/meta-phosphor/recipes-devtools/python/python_2.%.bbappend index ae0078bac..0db91f179 100644 --- a/meta-phosphor/recipes-devtools/python/python_2.%.bbappend +++ b/meta-phosphor/recipes-devtools/python/python_2.%.bbappend @@ -1,5 +1,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://0001-json-Use-int-long.__str__-to-convert-subclasses.patch" # Remove all python .py files from python recipe. Only the .pyc # files are required. Only do this if the openbmc-phosphor-tiny diff --git a/meta-phosphor/recipes-extended/gpioplus/gpioplus_git.bb b/meta-phosphor/recipes-extended/gpioplus/gpioplus_git.bb index e2c960bd0..5a67b20ba 100644 --- a/meta-phosphor/recipes-extended/gpioplus/gpioplus_git.bb +++ b/meta-phosphor/recipes-extended/gpioplus/gpioplus_git.bb @@ -6,15 +6,11 @@ PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" -inherit autotools pkgconfig +inherit meson pkgconfig -DEPENDS += " \ - autoconf-archive-native \ - " - -EXTRA_OECONF_append += " \ - --disable-examples \ - --disable-tests \ +EXTRA_OEMESON = " \ + -Dexamples=false \ + -Dtests=disabled \ " SRC_URI += "git://github.com/openbmc/gpioplus" diff --git a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb index ff7f9b455..fbdda9bbd 100644 --- a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb +++ b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb @@ -37,7 +37,7 @@ DEPENDS_append_class-native = " \ " SRC_URI += "git://github.com/openbmc/sdbusplus" -SRCREV = "8515eae7adcb9811ba271d05d82f66d48b1df082" +SRCREV = "66ef099b5a77315bb531300dfcc81a53867cd5fa" PACKAGECONFIG ??= "libsdbusplus transaction" PACKAGECONFIG[libsdbusplus] = "--enable-libsdbusplus,--disable-libsdbusplus,systemd,libsystemd" diff --git a/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb b/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb index bd904e0b6..7b721e01b 100644 --- a/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb +++ b/meta-phosphor/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=75859989545e37968a99b631ef42722e" DEPENDS = " libvncserver systemd sdbusplus phosphor-logging phosphor-dbus-interfaces" SRC_URI = "git://github.com/openbmc/obmc-ikvm" -SRCREV = "fb6a8e1e727a8ece5eb0350d3962dd3056a6f608" +SRCREV = "133bfa2d5b1b3af0b8e819b4cd210a0e1ac0445c" PV = "1.0+git${SRCPV}" diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config.bb b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config.bb new file mode 100644 index 000000000..c0cea9cb8 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config.bb @@ -0,0 +1,28 @@ +SUMMARY = "Phosphor certificate manager configuration for a bmcweb service" + +PR = "r1" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/LICENSE;md5=19407077e42b1ba3d653da313f1f5b4e" + +RDEPENDS_${PN} = "phosphor-certificate-manager" + +inherit allarch + +SRC_URI = "file://env" + +do_install() { + install -D ${WORKDIR}/env ${D}/${sysconfdir}/default/obmc/cert/bmcweb +} + +pkg_postinst_${PN}() { + LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@bmcweb.service" + TARGET="../phosphor-certificate-manager@.service" + mkdir -p $D$systemd_system_unitdir/multi-user.target.wants + ln -s $TARGET $LINK +} + +pkg_prerm_${PN}() { + LINK="$D$systemd_system_unitdir/multi-user.target.wants/phosphor-certificate-manager@bmcweb.service" + rm $LINK +} diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config/env b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config/env new file mode 100644 index 000000000..af4899a30 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-bmcweb-cert-config/env @@ -0,0 +1,12 @@ +#D-Bus object path +#example: /xyz/openbmc_project/certs/server/https +ENDPOINT=https + +#Path for the certificate file +CERTPATH=/etc/ssl/certs/https/server.pem + +#Units to restart +UNIT=bmcweb.service + +#Type of the service client/server +TYPE=server diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb b/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb index a2459f992..377c0f1b3 100644 --- a/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb @@ -9,7 +9,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "git://github.com/openbmc/phosphor-certificate-manager" -SRCREV = "8841dbd66ecc4bbfebe4d09dc9d2437611a5cbdc" +SRCREV = "13bf74e4486df30fb70b9dbb040277bcdf50e0ec" inherit autotools \ pkgconfig \ @@ -22,6 +22,7 @@ DEPENDS = " \ phosphor-dbus-interfaces-native \ sdbusplus \ sdbusplus-native \ + sdeventplus \ " S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service b/meta-phosphor/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service deleted file mode 100644 index 416fddc13..000000000 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-mgr-inventory/obmc-sync-inventory-item@.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Sync %I - -[Service] -Restart=no -Type=oneshot -EnvironmentFile={envfiledir}/obmc/sync_inventory_item/%I -ExecStart=/usr/bin/env sync_inventory_items.py -p ${{PROPERTY}} -s $SYNC_TYPE -SyslogIdentifier=sync_inventory_items.py -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-mgr-inventory_git.bb b/meta-phosphor/recipes-phosphor/chassis/obmc-mgr-inventory_git.bb deleted file mode 100644 index 61e55d9f8..000000000 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-mgr-inventory_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "OpenBMC inventory manager" -DESCRIPTION = "OpenBMC inventory manager." -PR = "r1" -PV = "1.0+git${SRCPV}" - -inherit skeleton-python -inherit obmc-phosphor-dbus-service - -RRECOMMENDS_${PN} += "virtual-obmc-inventory-data" - -VIRTUAL-RUNTIME_skeleton_workbook ?= "" - -RDEPENDS_${PN} += "\ - python-argparse \ - python-dbus \ - python-json \ - python-pickle \ - python-pygobject \ - python-subprocess \ - pyphosphor-dbus \ - ${VIRTUAL-RUNTIME_skeleton_workbook} \ - " - -SKELETON_DIR = "pyinventorymgr" -SYSTEMD_SERVICE_${PN} += "obmc-sync-inventory-item@.service" diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb index e9517acbd..6a8b041b7 100644 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb +++ b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" S = "${WORKDIR}/git" SRC_URI += "git://github.com/openbmc/phosphor-buttons.git" -SRCREV = "69101225892575db3d29cb4cfe7683773f1e4f52" +SRCREV = "1ac9ab6d29dc06bf15f1377fc8aebb21a3e5a600" inherit cmake pkgconfig systemd diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-power_git.bb b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-power_git.bb new file mode 100644 index 000000000..b9f7dc977 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-power_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Chassis Power Control" +HOMEPAGE = "https://github.com/openbmc/phosphor-power-control" +PR = "r1" +PV = "1.0+git${SRCPV}" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +inherit autotools pkgconfig + +DEPENDS += "autoconf-archive-native" +DEPENDS += "phosphor-logging" +DEPENDS += "nlohmann-json" +DEPENDS += "gpioplus" + +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/openbmc/phosphor-power-control" +SRCREV = "4d209a24588d112dfd61158b2e01dd973d99961e" diff --git a/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb b/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb index 83179abf7..c6a25437f 100644 --- a/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb @@ -3,7 +3,7 @@ DESCRIPTION = "Entity Manager provides d-bus configuration data \ and configures system sensors" SRC_URI = "git://github.com/openbmc/entity-manager.git" -SRCREV = "444830eed8cc2693d03015c3a6c1632ad804bf00" +SRCREV = "16a02f28484e8fdf94c7949a3084adc89f023413" PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb index b7f15f27a..9a6c036e4 100644 --- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb +++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb @@ -14,7 +14,7 @@ DEPENDS += "autoconf-archive-native" DEPENDS += "sdbus++-native" SRC_URI += "git://github.com/openbmc/phosphor-dbus-interfaces" -SRCREV = "5515c34fded4c217e3cc07f551d59d34cd3329c5" +SRCREV = "57b878d048f929643276f1bf7fdf750abc4bde8b" DEPENDS_remove_class-native = "sdbus++-native" DEPENDS_remove_class-nativesdk = "sdbus++-native" diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb index c0c1b9534..1f64caf8a 100644 --- a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb +++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb @@ -7,7 +7,6 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" inherit autotools pkgconfig -inherit obmc-phosphor-python-autotools inherit obmc-phosphor-dbus-service inherit obmc-phosphor-systemd inherit phosphor-mapperdir @@ -25,17 +24,9 @@ SYSTEMD_SERVICE_${PN} += " \ mapper-wait@.service \ mapper-subtree-remove@.service \ " -RDEPENDS_${PN} += " \ - python-argparse \ - python-xml \ - python-dbus \ - python-pygobject \ - pyphosphor-dbus \ - pyphosphor-utils \ - " SRC_URI += "git://github.com/openbmc/phosphor-objmgr" -SRCREV = "7f838376084fb8f5c00b8926013891cb58389033" +SRCREV = "5eddf44006cf9ad5b9a5c103adc1682fc835f932" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/devtools/obmc-pydevtools_git.bb b/meta-phosphor/recipes-phosphor/devtools/obmc-pydevtools_git.bb deleted file mode 100644 index ea0264cb3..000000000 --- a/meta-phosphor/recipes-phosphor/devtools/obmc-pydevtools_git.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "OpenBMC python devtools" -DESCRIPTION = "Shortcut scripts for developers." -PR = "r1" -PV = "1.0+git${SRCPV}" - -inherit skeleton-python - -VIRTUAL-RUNTIME_skeleton_workbook ?= "" - -RDEPENDS_${PN} += "\ - python-dbus \ - python-json \ - python-xml \ - python-pygobject \ - ${VIRTUAL-RUNTIME_skeleton_workbook} \ - " - -SKELETON_DIR = "pytools" - -do_install_append() { - if [ -f ${S}/obmcutil-completion.sh ] - then - install -d ${D}${sysconfdir}/profile.d - install -m 0644 -D -t ${D}${sysconfdir}/profile.d ${S}/obmcutil-completion.sh - fi -} diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-events-config-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-events-config.bb index 9d42d78c9..360650f8f 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-events-config-native.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-events-config.bb @@ -3,14 +3,15 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-fan -SRC_URI += "file://events.yaml" - S = "${WORKDIR}" +SRC_URI = "file://events.yaml" + do_install() { - DEST=${D}${control_datadir} - install -D events.yaml ${DEST}/events.yaml + install -D events.yaml ${D}${control_datadir}/events.yaml } + +FILES_${PN} += "${control_datadir}/events.yaml" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb deleted file mode 100644 index 81dfa6b37..000000000 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "Generate fan control YAML from the MRW" -PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" - -inherit native -inherit phosphor-fan -inherit mrw-xml - -DEPENDS += " \ - mrw-native \ - mrw-perl-tools-native \ - " - -PROVIDES += "virtual/phosphor-fan-control-fan-config" - -S = "${WORKDIR}" - -do_compile() { - ${bindir}/perl-native/perl \ - ${bindir}/gen_fan_zone_yaml.pl \ - -i ${mrw_datadir}/${MRW_XML} \ - -o ${S}/fans.yaml -} - -do_install() { - DEST=${D}${control_datadir} - install -D ${S}/fans.yaml ${DEST}/fans.yaml -} diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw.bb new file mode 100644 index 000000000..38a424b69 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw.bb @@ -0,0 +1,24 @@ +SUMMARY = "Generate fan control YAML from the MRW" +PR = "r1" +LICENSE = "Apache-2.0" + +inherit allarch +inherit phosphor-fan +inherit mrw-xml + +S = "${WORKDIR}" +DEPENDS = "mrw-native mrw-perl-tools-native" +PROVIDES += "virtual/phosphor-fan-control-fan-config" + +do_compile() { + ${bindir}/perl-native/perl \ + ${bindir}/gen_fan_zone_yaml.pl \ + -i ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} \ + -o fans.yaml +} + +do_install() { + install -D fans.yaml ${D}${control_datadir}/fans.yaml +} + +FILES_${PN} += "${control_datadir}/fans.yaml" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config.bb index 516fa0020..b82da0a0c 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config-native.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-fan-config.bb @@ -3,16 +3,16 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-fan +S = "${WORKDIR}" PROVIDES += "virtual/phosphor-fan-control-fan-config" -SRC_URI += "file://fans.yaml" - -S = "${WORKDIR}" +SRC_URI = "file://fans.yaml" do_install() { - DEST=${D}${control_datadir} - install -D fans.yaml ${DEST}/fans.yaml + install -D fans.yaml ${D}${control_datadir}/fans.yaml } + +FILES_${PN} += "${control_datadir}/fans.yaml" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config.bb index f4f5f573a..1dc114990 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config-native.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config.bb @@ -3,14 +3,15 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-fan -SRC_URI += "file://zone_conditions.yaml" - S = "${WORKDIR}" +SRC_URI = "file://zone_conditions.yaml" + do_install() { - DEST=${D}${control_datadir} - install -D zone_conditions.yaml ${DEST}/zone_conditions.yaml + install -D zone_conditions.yaml ${D}${control_datadir}/zone_conditions.yaml } + +FILES_${PN} += "${control_datadir}/zone_conditions.yaml" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-config-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-config.bb index 43f146262..e649777e7 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-config-native.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-control-zone-config.bb @@ -3,14 +3,15 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-fan -SRC_URI += "file://zones.yaml" - S = "${WORKDIR}" +SRC_URI = "file://zones.yaml" + do_install() { - DEST=${D}${control_datadir} - install -D zones.yaml ${DEST}/zones.yaml + install -D zones.yaml ${D}${control_datadir}/zones.yaml } + +FILES_${PN} += "${control_datadir}/zones.yaml" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-monitor-config-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-monitor-config.bb index e8fa54be7..9285981ef 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-monitor-config-native.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-monitor-config.bb @@ -3,14 +3,16 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-fan -SRC_URI += "file://monitor.yaml" - S = "${WORKDIR}" +SRC_URI = "file://monitor.yaml" + do_install() { DEST=${D}${monitor_datadir} - install -D monitor.yaml ${DEST}/monitor.yaml + install -D monitor.yaml ${D}${monitor_datadir}/monitor.yaml } + +FILES_${PN} += "${monitor_datadir}/monitor.yaml" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-config-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-config.bb index fca15a316..30da6eab8 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-config-native.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-config.bb @@ -9,15 +9,16 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-fan +S = "${WORKDIR}" PROVIDES += "virtual/phosphor-fan-presence-config" -SRC_URI += "file://config.yaml" - -S = "${WORKDIR}" +SRC_URI = "file://config.yaml" do_install() { install -D config.yaml ${D}${presence_datadir}/config.yaml } + +FILES_${PN} += "${presence_datadir}/config.yaml" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-mrw.bb index 70a3f8254..31b765463 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan-presence-mrw.bb @@ -1,19 +1,16 @@ SUMMARY = "Generate fan presence YAML from the MRW" PR = "r1" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-fan inherit mrw-xml -DEPENDS += " \ - mrw-native \ - mrw-perl-tools-native \ - " - +DEPENDS = "mrw-native mrw-perl-tools-native" PROVIDES += "virtual/phosphor-fan-presence-config" +FILES_${PN} += "${presence_datadir}/config.yaml" + S = "${WORKDIR}" do_install() { @@ -22,6 +19,6 @@ do_install() { ${bindir}/perl-native/perl \ ${bindir}/gen_presence_yaml.pl \ - -i ${mrw_datadir}/${MRW_XML} \ + -i ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} \ -o ${DEST}/config.yaml } diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc b/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc index 71e1d58ec..141ec0ffb 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-fan-presence" -SRCREV = "59096e50db52d85d2252bb5c7de054bd3c8156c5" +SRCREV = "d9a580aa5037fdb08911940263a580b036f2d9fa" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb index 219d6ff32..e7c557ae4 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb @@ -39,7 +39,7 @@ SYSTEMD_PACKAGES = "${FAN_PACKAGES}" # ${PN}-presence-tach specific configuration PACKAGECONFIG[presence] = " \ --enable-presence \ - PRESENCE_CONFIG=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \ + PRESENCE_CONFIG=${STAGING_DIR_HOST}${presence_datadir}/config.yaml, \ --disable-presence, \ virtual/phosphor-fan-presence-config \ , \ @@ -51,23 +51,23 @@ INSTFMT_TACH = "phosphor-fan-presence-tach@{0}.service" POWERON_TGT = "obmc-chassis-poweron@{0}.target" FMT_TACH = "../${TMPL_TACH}:${POWERON_TGT}.requires/${INSTFMT_TACH}" -FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach" +FILES_${PN}-presence-tach = "${bindir}/phosphor-fan-presence-tach" SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL_TACH}" SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_INSTANCES')}" # -------------------------------------- # ${PN}-control specific configuration PACKAGECONFIG[control] = "--enable-control \ - FAN_DEF_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/fans.yaml \ - FAN_ZONE_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zones.yaml \ - ZONE_EVENTS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/events.yaml \ - ZONE_CONDITIONS_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zone_conditions.yaml \ + FAN_DEF_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/fans.yaml \ + FAN_ZONE_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/zones.yaml \ + ZONE_EVENTS_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/events.yaml \ + ZONE_CONDITIONS_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/zone_conditions.yaml \ FAN_ZONE_OUTPUT_DIR=${S}/control, \ --disable-control, \ virtual/phosphor-fan-control-fan-config \ - phosphor-fan-control-zone-config-native \ - phosphor-fan-control-events-config-native \ - phosphor-fan-control-zone-conditions-config-native \ + phosphor-fan-control-zone-config \ + phosphor-fan-control-events-config \ + phosphor-fan-control-zone-conditions-config \ , \ " @@ -81,7 +81,7 @@ TMPL_CONTROL_INIT = "phosphor-fan-control-init@.service" INSTFMT_CONTROL_INIT = "phosphor-fan-control-init@{0}.service" FMT_CONTROL_INIT = "../${TMPL_CONTROL_INIT}:${POWERON_TGT}.wants/${INSTFMT_CONTROL_INIT}" -FILES_${PN}-control = "${sbindir}/phosphor-fan-control" +FILES_${PN}-control = "${bindir}/phosphor-fan-control" SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL} ${TMPL_CONTROL_INIT}" SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}" SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES')}" @@ -89,10 +89,10 @@ SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHAS # -------------------------------------- # ${PN}-monitor specific configuration PACKAGECONFIG[monitor] = "--enable-monitor \ - FAN_MONITOR_YAML_FILE=${STAGING_DIR_NATIVE}${monitor_datadir}/monitor.yaml \ + FAN_MONITOR_YAML_FILE=${STAGING_DIR_HOST}${monitor_datadir}/monitor.yaml \ FAN_MONITOR_OUTPUT_DIR=${S}/monitor, \ --disable-monitor, \ - phosphor-fan-monitor-config-native \ + phosphor-fan-monitor-config \ , \ " @@ -104,7 +104,7 @@ TMPL_MONITOR_INIT = "phosphor-fan-monitor-init@.service" INSTFMT_MONITOR_INIT = "phosphor-fan-monitor-init@{0}.service" FMT_MONITOR_INIT = "../${TMPL_MONITOR_INIT}:${POWERON_TGT}.wants/${INSTFMT_MONITOR_INIT}" -FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor" +FILES_${PN}-monitor = "${bindir}/phosphor-fan-monitor" SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR} ${TMPL_MONITOR_INIT}" SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}" SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES')}" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb index 8e2630ac5..171c1c42e 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb @@ -13,7 +13,7 @@ inherit obmc-phosphor-ipmiprovider-symlink S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/phosphor-pid-control" -SRCREV = "5782ab81367e22e87d719c9fef6e85ecdc6cf95e" +SRCREV = "375f7098c232d38adcaab99b2f3ee561ded8c256" # Each platform will need a service file that starts # at an appropriate time per system. For instance, if @@ -24,10 +24,10 @@ DEPENDS += "autoconf-archive-native" DEPENDS += "sdbusplus" DEPENDS += "phosphor-dbus-interfaces" DEPENDS += "phosphor-logging" -DEPENDS += "phosphor-dbus-interfaces" DEPENDS += "libevdev" DEPENDS += "nlohmann-json" DEPENDS += "cli11" +DEPENDS += "boost" # We depend on this to be built first so we can build our providers. DEPENDS += "phosphor-ipmi-host" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc index c414987ea..5731f787f 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt" -SRCREV = "ab8231c66364286a10b0da6d64d9742752323b4d" +SRCREV = "d5b8f75c2f93d19d16411f0846d8ecd331d59562" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc deleted file mode 100644 index 0b1b16ed3..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc +++ /dev/null @@ -1,516 +0,0 @@ -#!/bin/bash -set -eo pipefail - -# Get the root mtd device number (mtdX) from "/dev/ubiblockX_Y on /" -findrootmtd() { - rootmatch=" on / " - m="$(mount | grep "${rootmatch}" | grep "ubiblock")" - m="${m##*ubiblock}" - m="${m%_*}" - if [ -z "${m}" ]; then - # default to bmc mtd (0) - m=0 - fi - echo "mtd${m}" -} - -findrootubi() { - rootmatch=" on / " - m="$(mount | grep "${rootmatch}")" - m="${m##*ubiblock}" - m="${m% on*}" - echo "ubi${m}" -} - -# Get the mtd device number (mtdX) -findmtd() { - m="$(grep -xl "$1" /sys/class/mtd/*/name)" - m="${m%/name}" - m="${m##*/}" - echo "${m}" -} - -# Get the mtd device number only (return X of mtdX) -findmtdnum() { - m="$(findmtd "$1")" - m="${m##mtd}" - echo "${m}" -} - -# Get the ubi device number (ubiX_Y) -findubi() { - u="$(grep -xl "$1" /sys/class/ubi/ubi?/subsystem/ubi*/name)" - u="${u%/name}" - u="${u##*/}" - echo "${u}" -} - -# Get the ubi device number (ubiX_Y) on a specific mtd -findubi_onmtd() { - u="$(grep -xl "$1" /sys/class/ubi/ubi"$2"/subsystem/ubi"$2"*/name)" - u="${u%/name}" - u="${u##*/}" - echo "${u}" -} - -# Get all ubi device names on a specific mtd that match requested string -findubiname_onmtd() { - u="$(grep -h "$1" /sys/class/ubi/ubi"$2"/subsystem/ubi"$2"*/name)" - u="${u%/name}" - u="${u##*/}" - echo "${u}" -} - -# Get the name from the requested ubiX_Y volume -findname() { - n="$(cat /sys/class/ubi/$1/name)" - echo "${n}" -} - -# Set the u-boot envs that perform a side switch on failure to boot -set_wdt2bite() { - if ! fw_printenv wdt2bite 2>/dev/null; then - fw_setenv wdt2bite "mw.l 0x1e785024 0xa 1; mw.b 0x1e78502c 0xb3 1" - fw_setenv bootalt "run wdt2bite" - fw_setenv obmc_bootcmd "ubi part obmc-ubi; run do_rwreset; ubi read \ -\${loadaddr} \${kernelname}; bootm \${loadaddr} || run bootalt" - fi -} - -# Make space on flash before creating new volumes. This can be enhanced -# determine current flash usage. For now only keep a "keepmax" number of them -ubi_remove_volumes() -{ - rootubi="$(findrootubi)" - rootname="$(findname "${rootubi}")" - rootversion="${rootname##*-}" - rootkernel="kernel-${rootversion}" - - # Just keep max number of volumes before updating, don't delete the version - # the BMC is booted from, and when a version is identified to be deleted, - # delete both the rofs and kernel volumes for that version. - rmnames="$(findubiname_onmtd "${name%-*}-" "${ro}")" - rmnames=(${rmnames}) - ubicount="${#rmnames[@]}" - while [ ${ubicount} -ge ${keepmax} ]; do - # Loop through existing volumes and skip currently active ones - for (( index=0; index<${#rmnames[@]}; index++ )); do - rmname="${rmnames[${index}]}" - rmversion="${rmname##*-}" - [ "${rmversion}" == "${version}" ] && continue - rmubi="$(findubi_onmtd "rofs-${rmversion}" "${ro}")" - if [[ ( "${rmubi}" != "${rootubi}" ) && - ( "${rmname}" != "${rootkernel}" ) ]]; then - ubi_remove "rofs-${rmversion}" "${ro}" - ubi_remove "kernel-${rmversion}" "${ro}" - # Remove priority value - fw_setenv "${rmversion}" - break - fi - done - # Decrease count regardless to avoid an infinite loop - (( ubicount-- )) - done -} - -ubi_rw() { - rwmtd="$(findmtd "${reqmtd}")" - rw="${rwmtd#mtd}" - ubidev="/dev/ubi${rw}" - - # Update rwfs_size, check imgsize was specified, otherwise it'd clear the var - if [ ! -z "$imgsize" ]; then - rwsize="$(fw_printenv -n rwfs_size 2>/dev/null)" || true - if [[ "${imgsize}" != "${rwsize}" ]]; then - fw_setenv rwfs_size "${imgsize}" - fi - fi - - vol="$(findubi "${name}")" - if [ -z "${vol}" ]; then - ubimkvol "${ubidev}" -N "${name}" -s "${imgsize}" - fi -} - -ubi_ro() { - keepmax=2 # Default 2 volumes per mtd - romtd="$(findmtd "${reqmtd}")" - romtd2="$(findmtd "${reqmtd2}")" - - if [ ! "${romtd}" == "${romtd2}" ]; then - # Request to use alternate mtd device, choose the non-root one - keepmax=1 # 1 volume on each of the requested mtds - rootmtd="$(findrootmtd)" - if [ "${rootmtd}" == "${romtd}" ]; then - romtd="${romtd2}" - fi - fi - ro="${romtd#mtd}" - ubidev="/dev/ubi${ro}" - - ubi_remove_volumes - - if [ -z "${imgfile}" ]; then - echo "Unable to create read-only volume. Image file not specified." - return 1 - fi - - # Create a ubi volume, dynamically sized to fit BMC image if size unspecified - img="/tmp/images/${version}/${imgfile}" - imgsize="$(stat -c '%s' ${img})" - - vol="$(findubi "${name}")" - if [ ! -z "${vol}" ]; then - # Allow a duplicate kernel volume on the alt mtd - if [[ "${name}" =~ "kernel" ]]; then - vol="$(findubi_onmtd "${name}" "${ro}")" - fi - fi - if [ -z "${vol}" ]; then - ubimkvol "${ubidev}" -N "${name}" -s "${imgsize}" --type=static - vol="$(findubi "${name}")" - fi -} - -# Squashfs images need a ubi block -ubi_block() { - vol="$(findubi "${name}")" - ubidevid="${vol#ubi}" - block="/dev/ubiblock${ubidevid}" - if [ ! -e "$block" ]; then - ubiblock --create "/dev/ubi${ubidevid}" - fi -} - -ubi_updatevol() { - vol="$(findubi "${name}")" - ubidevid="${vol#ubi}" - img="/tmp/images/${version}/${imgfile}" - ubiupdatevol "/dev/ubi${ubidevid}" "${img}" -} - -ubi_remove() { - rmname="$1" - rmmtd="$2" - if [ ! -z "${rmmtd}" ]; then - vol="$(findubi_onmtd "${rmname}" "${rmmtd}")" - else - vol="$(findubi "${rmname}")" - fi - - if [ ! -z "$vol" ]; then - vol="${vol%_*}" - - if grep -q "$rmname" /proc/mounts; then - mountdir=$(grep "$rmname" /proc/mounts | cut -d " " -f 2) - umount "$mountdir" - rm -r "$mountdir" - fi - - ubirmvol "/dev/${vol}" -N "$rmname" - fi -} - -ubi_cleanup() { - # When ubi_cleanup is run, it expects one or no active version. - activeVersion=$(busctl --list --no-pager tree \ - xyz.openbmc_project.Software.BMC.Updater | \ - grep /xyz/openbmc_project/software/ | tail -c 9) - - if [[ -z "$activeVersion" ]]; then - vols=$(ubinfo -a | grep "rofs-" | cut -c 14-) - vols=(${vols}) - else - vols=$(ubinfo -a | grep "rofs-" | \ - grep -v "$activeVersion" | cut -c 14-) - vols=(${vols}) - fi - - for (( index=0; index<${#vols[@]}; index++ )); do - ubi_remove ${vols[index]} - done -} - -mount_alt_rwfs() { - altNum="$(findmtdnum "alt-bmc")" - if [ ! -z "${altNum}" ]; then - altRwfs=$(ubinfo -a -d ${altNum} | grep -w "rwfs") || true - if [ ! -z "${altRwfs}" ]; then - altVarMount="/media/alt/var" - mkdir -p "${altVarMount}" - if mount ubi"${altNum}":rwfs "${altVarMount}" -t ubifs -o defaults; then - mkdir -p "${altVarMount}"/persist/etc - fi - fi - fi -} - -remount_ubi() { - bmcmtd="$(findmtd "bmc")" - altbmcmtd="$(findmtd "alt-bmc")" - mtds="${bmcmtd: -1}","${altbmcmtd: -1}" - - IFS=',' read -r -a mtds <<< "$mtds" - mtds=($(echo "${mtds[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')) - for mtd in ${mtds[@]}; do - # Get information on all ubi volumes - ubinfo=$(ubinfo -d ${mtd}) - presentVolumes=${ubinfo##*:} - IFS=', ' read -r -a array <<< "$presentVolumes" - for element in ${array[@]}; do - elementProperties=$(ubinfo -d $mtd -n $element) - # Get ubi volume name by getting rid of additional properties - name=${elementProperties#*Name:} - name="${name%Character*}" - name="$(echo -e "${name}" | tr -d '[:space:]')" - - if [[ ${name} == rofs-* ]]; then - mountdir="/media/${name}" - - if [ ! -d ${mountdir} ]; then - mkdir -p "${mountdir}" - # U-Boot will create the ubiblock for the running version, but not - # for the version on the other chip - if [ ! -e "/dev/ubiblock${mtd}_${element}" ]; then - ubiblock --create /dev/ubi${mtd}_${element} - fi - mount -t squashfs -o ro "/dev/ubiblock${mtd}_${element}" "${mountdir}" - fi - fi - done - done - - set_wdt2bite -} - -# Read the current env variable and set it on the alternate boot env -copy_env_var_to_alt() { - varName=$1 - value="$(fw_printenv -n "${varName}")" - fw_setenv -c /etc/alt_fw_env.config "${varName}" "${value}" -} - -# When the alternate bmc chip boots, u-boot thinks its the primary mtdX. -# Therefore need to swap the chip numbers when copying the ubiblock and root to -# alternate bmc u-boot environment. -copy_ubiblock_to_alt() { - value="$(fw_printenv -n ubiblock)" - bmcNum="$(findmtdnum "bmc")" - altNum="$(findmtdnum "alt-bmc")" - replaceAlt="${value/${altNum},/${bmcNum},}" - - if [[ "${value}" == "${replaceAlt}" ]]; then - replaceBmc="${value/${bmcNum},/${altNum},}" - value=${replaceBmc} - else - value=${replaceAlt} - fi - - fw_setenv -c /etc/alt_fw_env.config ubiblock "${value}" -} - -copy_root_to_alt() { - value="$(fw_printenv -n root)" - bmcNum="$(findmtdnum "bmc")" - altNum="$(findmtdnum "alt-bmc")" - replaceAlt="${value/${altNum}_/${bmcNum}_}" - - if [[ "${value}" == "${replaceAlt}" ]]; then - replaceBmc="${value/${bmcNum}_/${altNum}_}" - value=${replaceBmc} - else - value=${replaceAlt} - fi - - fw_setenv -c /etc/alt_fw_env.config root "${value}" -} - -ubi_setenv() { - # The U-Boot environment maintains two banks of environment variables. - # The banks need to be consistent with each other to ensure that these - # variables can reliably be read from file. In order to guarantee that the - # banks are both correct, we need to run fw_setenv twice. - variable=$1 - if [[ "$variable" == *"="* ]]; then - varName="${variable%=*}" - value="${variable##*=}" - # Write only if var is not set already to the requested value - currentValue="$(fw_printenv -n "${varName}" 2>/dev/null)" || true - if [[ "${currenValue}" != "${value}" ]]; then - fw_setenv "$varName" "$value" - fw_setenv "$varName" "$value" - fi - else - fw_setenv "$variable" - fw_setenv "$variable" - fi -} - -mtd_write() { - flashmtd="$(findmtd "${reqmtd}")" - img="/tmp/images/${version}/${imgfile}" - flashcp -v ${img} /dev/${flashmtd} -} - -backup_env_vars() { - copy_env_var_to_alt kernelname - copy_ubiblock_to_alt - copy_root_to_alt -} - -update_env_vars() { - vol="$(findubi rofs-"${version}")" - if [ -z "${vol}" ]; then - return 1 - fi - ubidevid="${vol#ubi}" - block="/dev/ubiblock${ubidevid}" - if [ ! -e "${block}" ]; then - return 1 - fi - ubi_setenv "kernelname=kernel-${version}" - ubi_setenv "ubiblock=$(echo "${ubidevid}" | sed 's/_/,/')" - ubi_setenv "root=${block}" -} - -#TODO: Replace the implementation with systemd-inhibitors lock -# once systemd/systemd#949 is resolved -rebootguardenable() { - dir="/run/systemd/system/" - file="reboot-guard.conf" - units=("reboot" "poweroff" "halt") - - for unit in "${units[@]}"; do - mkdir -p ${dir}${unit}.target.d - echo -e "[Unit]\nRefuseManualStart=yes" >> ${dir}${unit}.target.d/${file} - done -} - -#TODO: Replace the implementation with systemd-inhibitors lock -# once systemd/systemd#949 is resolved -rebootguarddisable() { - dir="/run/systemd/system/" - file="reboot-guard.conf" - units=("reboot" "poweroff" "halt") - - for unit in "${units[@]}"; do - rm -rf ${dir}${unit}.target.d/${file} - done -} - -# Create a copy in the alt mtd -create_vol_in_alt() { - alt="alt-bmc" - altmtd="$(findmtd "${alt}")" - if [ ! -z "${altmtd}" ]; then - reqmtd="${alt}" - reqmtd2="${alt}" - ubi_ro - ubi_updatevol - fi -} - -# Copy contents of one MTD device to another -mtd_copy() { - in=$1 - out=$2 - - # Must erase MTD first to prevent corruption - flash_eraseall "${out}" - dd if="${in}" of="${out}" -} - -mirroruboot() { - bmc="$(findmtd "u-boot")" - bmcdev="/dev/${bmc}" - alt="$(findmtd "alt-u-boot")" - altdev="/dev/${alt}" - - checksum_bmc="$(md5sum "${bmcdev}")" - checksum_bmc="${checksum_bmc% *}" - checksum_alt="$(md5sum "${altdev}")" - checksum_alt="${checksum_alt% *}" - - if [[ "${checksum_bmc}" != "${checksum_alt}" ]]; then - bmcenv="$(findmtd "u-boot-env")" - bmcenvdev="/dev/${bmcenv}" - altenv="$(findmtd "alt-u-boot-env")" - altenvdev="/dev/${altenv}" - - echo "Mirroring U-boot to alt chip" - mtd_copy "${bmcdev}" "${altdev}" - mtd_copy "${bmcenvdev}" "${altenvdev}" - - copy_ubiblock_to_alt - copy_root_to_alt - fi -} - -case "$1" in - mtduboot) - reqmtd="$2" - version="$3" - imgfile="image-u-boot" - mtd_write - ;; - ubirw) - reqmtd="$2" - name="$3" - imgsize="$4" - ubi_rw - ;; - ubiro) - reqmtd="$(echo "$2" | cut -d "+" -f 1)" - reqmtd2="$(echo "$2" | cut -d "+" -f 2)" - name="$3" - version="$4" - imgfile="image-rofs" - ubi_ro - ubi_updatevol - ubi_block - ;; - ubikernel) - reqmtd="$(echo "$2" | cut -d "+" -f 1)" - reqmtd2="$(echo "$2" | cut -d "+" -f 2)" - name="$3" - version="$4" - imgfile="image-kernel" - ubi_ro - ubi_updatevol - create_vol_in_alt - ;; - ubiremove) - name="$2" - ubi_remove "${name}" - ;; - ubicleanup) - ubi_cleanup - ;; - ubisetenv) - ubi_setenv "$2" - ;; - ubiremount) - remount_ubi - mount_alt_rwfs - ;; - createenvbackup) - backup_env_vars - ;; - updateubootvars) - version="$2" - update_env_vars - ;; - rebootguardenable) - rebootguardenable - ;; - rebootguarddisable) - rebootguarddisable - ;; - mirroruboot) - mirroruboot - ;; - *) - echo "Invalid argument" - exit 1 - ;; -esac diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-cleanup.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-cleanup.service deleted file mode 100644 index f8c9135a1..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-cleanup.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Clean up UBI volumes unattached to a BMC version after DeleteAll - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStartPre=/usr/bin/env obmc-flash-bmc createenvbackup -ExecStart=/usr/bin/env obmc-flash-bmc ubicleanup -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-mirroruboot.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-mirroruboot.service deleted file mode 100644 index 361dd61cd..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-mirroruboot.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy uboot from the currently booted bmc chip to the alternate chip - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc mirroruboot -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-setenv@.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-setenv@.service deleted file mode 100644 index 73b55d4f3..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-setenv@.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Set U-Boot environment variable - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc ubisetenv %I -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiremount.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiremount.service deleted file mode 100644 index 388bb1a0d..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiremount.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Remount the ubi volume after a reboot -Wants=xyz.openbmc_project.Software.BMC.Updater.service -Before=xyz.openbmc_project.Software.BMC.Updater.service -Wants=obmc-flash-bmc-setenv@rwreset.service -After=obmc-flash-bmc-setenv@rwreset.service - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc ubiremount -SyslogIdentifier=obmc-flash-bmc - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro-remove@.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro-remove@.service deleted file mode 100644 index 42aa026b9..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro-remove@.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Deletes read-only and kernel ubi volume %I - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc ubiremove rofs-%i -ExecStart=/usr/bin/env obmc-flash-bmc ubiremove kernel-%i -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service deleted file mode 100644 index 5cd8565f5..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Store read-only images %I to BMC storage -OnFailure=obmc-flash-bmc-ubiro-remove@%i.service - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStartPre=/usr/bin/env obmc-flash-bmc createenvbackup -ExecStart=/usr/bin/env obmc-flash-bmc ubiro {RO_MTD} rofs-%i %i -ExecStart=/usr/bin/env obmc-flash-bmc ubikernel {KERNEL_MTD} kernel-%i %i -ExecStart=/usr/bin/env obmc-flash-bmc mtduboot u-boot %i -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubirw-remove.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubirw-remove.service deleted file mode 100644 index 68c4ab256..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubirw-remove.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Deletes BMC read-write ubi volume - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc ubiremove rwfs -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubirw.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubirw.service deleted file mode 100644 index 79d0ea387..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubirw.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Create BMC read-write ubi volume - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc ubirw {RW_MTD} rwfs {RW_SIZE} -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-updateubootvars@.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-updateubootvars@.service deleted file mode 100644 index bab0b0297..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-updateubootvars@.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description= Updates the u-boot variable to point BMC version to %I - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc updateubootvars %i -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/reboot-guard-disable.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/reboot-guard-disable.service deleted file mode 100644 index b09df99d3..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/reboot-guard-disable.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Removes the guard that blocks BMC reboot - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc rebootguarddisable -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/reboot-guard-enable.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/reboot-guard-enable.service deleted file mode 100644 index 4405e3dbb..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/reboot-guard-enable.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Enable a guard that blocks BMC reboot - -[Service] -Type=oneshot -RemainAfterExit=no -ExecStart=/usr/bin/env obmc-flash-bmc rebootguardenable -SyslogIdentifier=obmc-flash-bmc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/software.conf b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/software.conf deleted file mode 100644 index 09ecd92e4..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/software.conf +++ /dev/null @@ -1,3 +0,0 @@ -# /tmp/images is the software image upload directory -# It should not be deleted if the UBI code update is used. -x /tmp/images diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/synclist b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/synclist deleted file mode 100644 index 3836673c7..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/synclist +++ /dev/null @@ -1,3 +0,0 @@ -/etc/hostname -/etc/machine-id -/etc/systemd/network/ diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/usr-local.mount b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/usr-local.mount deleted file mode 100644 index 7aa2cf656..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/usr-local.mount +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=/usr/local - -[Mount] -What=tmpfs -Where=/usr/local -Type=tmpfs diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.BMC.Updater.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.BMC.Updater.service deleted file mode 100644 index bd46bcdba..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.BMC.Updater.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=OpenBMC Software Update Manager -Wants=xyz.openbmc_project.Software.Version.service -Before=xyz.openbmc_project.Software.Version.service -Wants=obmc-mapper.target -After=obmc-mapper.target - -[Service] -ExecStart=/usr/bin/env phosphor-image-updater -SyslogIdentifier=phosphor-image-updater -Restart=always -Type=dbus -BusName={BUSNAME} - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Download.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Download.service deleted file mode 100644 index ea7cc151e..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Download.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Phosphor Download Manager - -[Service] -ExecStart=/usr/bin/env phosphor-download-manager -SyslogIdentifier=phosphor-download-manager -Restart=always -Type=dbus -BusName={BUSNAME} - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Sync.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Sync.service deleted file mode 100644 index 7141841f5..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Sync.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Phosphor Sync Manager that syncs files to the alternate BMC chip - -[Service] -ExecStart=/usr/bin/env phosphor-sync-software-manager -SyslogIdentifier=phosphor-sync-software-manager -Restart=always - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Version.service b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Version.service deleted file mode 100644 index a8f6159ef..000000000 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager/xyz.openbmc_project.Software.Version.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Phosphor Version Software Manager - -[Service] -ExecStartPre=/bin/sh -c 'mkdir -p /tmp/images' -ExecStart=/usr/bin/env phosphor-version-software-manager -SyslogIdentifier=phosphor-version-software-manager -Restart=always -Type=dbus -BusName={BUSNAME} - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb index fe30f4fd5..588c55f32 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb @@ -72,21 +72,4 @@ SYSTEMD_SERVICE_${PN}-updater += " \ obmc-flash-bmc-setenv@.service \ " -SRC_URI += "file://software.conf" -SRC_URI += "file://obmc-flash-bmc" - -do_install_append() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/obmc-flash-bmc ${D}${bindir}/obmc-flash-bmc - - # /tmp/images is the software image upload directory. - # It should not be deleted since it is watched by the Image Manager - # for new images. - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then - install -d ${D}${exec_prefix}/lib/tmpfiles.d - install -m 644 ${WORKDIR}/software.conf ${D}${exec_prefix}/lib/tmpfiles.d/ - fi -} - S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/gpio/phosphor-gpio-monitor_git.bb b/meta-phosphor/recipes-phosphor/gpio/phosphor-gpio-monitor_git.bb index 985521896..c2f611de6 100644 --- a/meta-phosphor/recipes-phosphor/gpio/phosphor-gpio-monitor_git.bb +++ b/meta-phosphor/recipes-phosphor/gpio/phosphor-gpio-monitor_git.bb @@ -33,10 +33,10 @@ DEPENDS += "systemd" SYSTEMD_SERVICE_${PN}-monitor += "phosphor-gpio-monitor@.service" SYSTEMD_SERVICE_${PN}-presence += "phosphor-gpio-presence@.service" -FILES_${PN}-monitor += "${sbindir}/phosphor-gpio-monitor" -FILES_${PN}-monitor += "${sbindir}/phosphor-gpio-util" -FILES_${PN}-presence += "${sbindir}/phosphor-gpio-presence" +FILES_${PN}-monitor += "${bindir}/phosphor-gpio-monitor" +FILES_${PN}-monitor += "${bindir}/phosphor-gpio-util" +FILES_${PN}-presence += "${bindir}/phosphor-gpio-presence" SRC_URI += "git://github.com/openbmc/phosphor-gpio-monitor" -SRCREV = "47044e6c86332cf4ba878c85bec362eb616fc7df" +SRCREV = "64c8fcb65192c7b2abc92c1161038467eb98f667" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb b/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb index c13a13237..70cde265a 100644 --- a/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb +++ b/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb @@ -3,3 +3,7 @@ DESCRIPTION = "Image with Phosphor, an OpenBMC framework." IMAGE_LINGUAS = "" inherit obmc-phosphor-image + +OBMC_IMAGE_EXTRA_INSTALL_append = "\ + phosphor-bmcweb-cert-config \ + " diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.service b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.service deleted file mode 100644 index 86a7279a5..000000000 --- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Start bmcweb server - -Wants=network.target -After=network.target - -[Service] -ExecStart={bindir}/bmcweb -Type=simple -WorkingDirectory=/home/root - -[Install] -WantedBy=network.target diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.socket b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.socket deleted file mode 100644 index 8782e4dd3..000000000 --- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.socket +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=BMC Webserver socket - -[Socket] -ListenStream=443 -ReusePort=true - -[Install] -WantedBy=sockets.target diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb index afde5c386..181ef9c62 100644 --- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb +++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb @@ -1,4 +1,4 @@ -inherit obmc-phosphor-systemd +inherit systemd inherit useradd USERADD_PACKAGES = "${PN}" @@ -15,12 +15,14 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=a6a4edad4aed50f39a66d098d74b265b" SRC_URI = "git://github.com/openbmc/bmcweb.git" PV = "1.0+git${SRCPV}" -SRCREV = "48e4639e3ee4284e6ea686b30d8f476a7d3e7bb6" +SRCREV = "22c33710fed78a5c47446ee91ececf8b8ab104db" S = "${WORKDIR}/git" DEPENDS = "openssl zlib boost libpam sdbusplus gtest nlohmann-json libtinyxml2 " +RDEPENDS_${PN} += "jsnbd" + FILES_${PN} += "${datadir}/** " inherit cmake @@ -30,8 +32,3 @@ EXTRA_OECMAKE = "-DBMCWEB_BUILD_UT=OFF -DYOCTO_DEPENDENCIES=ON" SYSTEMD_SERVICE_${PN} += "bmcweb.service bmcweb.socket" FULL_OPTIMIZATION = "-Os -pipe " - -do_install_append() { - rm -rf ${D}${includedir}/dbus - rm -rf ${D}${libdir}/cmake -} diff --git a/meta-phosphor/recipes-phosphor/inventory/obmc-inventory_git.bb b/meta-phosphor/recipes-phosphor/inventory/obmc-inventory_git.bb deleted file mode 100644 index 56286123e..000000000 --- a/meta-phosphor/recipes-phosphor/inventory/obmc-inventory_git.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Phosphor Inventory Generation" -DESCRIPTION = "Generates inventory data from the machine readable workbook" -PR = "r1" -PV = "1.0+git${SRCPV}" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" - -inherit mrw-xml - -S = "${WORKDIR}/git" - -PROVIDES += "virtual/obmc-inventory-data" -RPROVIDES_${PN} += "virtual-obmc-inventory-data" - -inherit allarch -inherit mrw-rev - -DEPENDS += "mrw-native mrw-api-native" - -SRC_URI += "${MRW_TOOLS_SRC_URI}" -SRCREV = "${MRW_TOOLS_SRCREV}" - -FILES_${PN} += "${datadir}/inventory" - -do_compile() { - ${STAGING_BINDIR_NATIVE}/perl-native/perl ${S}/inventory.pl \ - -x ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} -o inventory.json -} - -do_install() { - install -d ${D}${datadir}/inventory - install -m 0644 inventory.json ${D}${datadir}/inventory/inventory.json -} diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb index b02ea28aa..2dd6e281c 100644 --- a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb +++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb @@ -3,19 +3,16 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -inherit native +inherit allarch inherit phosphor-inventory-manager PROVIDES += "virtual/phosphor-inventory-manager-assettag" - -SRC_URI += "file://assettag.yaml" - S = "${WORKDIR}" -do_install() { - # This recipe would provide the yaml for inventory manager to - # create AssetTag property at startup +SRC_URI = "file://assettag.yaml" - install -d ${D}${base_datadir}/events.d/ - install assettag.yaml ${D}${base_datadir}/events.d/assettag.yaml +do_install() { + install -D assettag.yaml ${D}${base_datadir}/events.d/assettag.yaml } + +FILES_${PN} += "${base_datadir}/events.d/assettag.yaml" diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc index fe6447ff9..d046e4a8d 100644 --- a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc +++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc @@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-inventory-manager" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/openbmc/phosphor-inventory-manager" -SRCREV = "2ed0fd1025c2f6a10b5df04f27cfbebbb2314395"
\ No newline at end of file +SRCREV = "ded627c42f5e5319e3704fff742a0227c05f00a9"
\ No newline at end of file diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb index c6e3b2955..520cdcc99 100644 --- a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb @@ -15,7 +15,7 @@ inherit autotools \ require phosphor-inventory-manager.inc DEPENDS += " \ - ${PN}-config-native \ + phosphor-inventory-manager-assettag \ phosphor-dbus-interfaces \ phosphor-dbus-interfaces-native \ phosphor-logging \ @@ -33,9 +33,12 @@ DBUS_SERVICE_${PN} = "${OBMC_INVENTORY_MGR_IFACE}.service" S = "${WORKDIR}/git" EXTRA_OECONF = " \ - YAML_PATH=${STAGING_DIR_NATIVE}${base_datadir} \ + YAML_PATH=${STAGING_DIR_HOST}${base_datadir} \ BUSNAME=${OBMC_INVENTORY_MGR_IFACE} \ INVENTORY_ROOT=${OBMC_INVENTORY_PATH} \ IFACE=${OBMC_INVENTORY_MGR_IFACE} \ - IFACES_PATH=${STAGING_DIR_NATIVE}${yaml_dir} \ + IFACES_PATH=${STAGING_DIR_HOST}${yaml_dir} \ " + +PACKAGECONFIG ??= "" +PACKAGECONFIG[associations] = "--enable-associations, --disable-associations,nlohmann-json," diff --git a/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb b/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb index d08dfdc40..0125d730c 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb @@ -10,6 +10,8 @@ inherit autotools pkgconfig DEPENDS += "autoconf-archive-native" +EXTRA_OECONF = "--disable-tests" + S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/ipmi-blob-tool" -SRCREV = "06561460bded9bf42398d987ac87bcec170740aa" +SRCREV = "444746495ad3f951cb093c7144b7cb9218b8599f" diff --git a/meta-phosphor/recipes-phosphor/ipmi/ipmitool/0001-create_pen_list-only-print-if-values-are-set.patch b/meta-phosphor/recipes-phosphor/ipmi/ipmitool/0001-create_pen_list-only-print-if-values-are-set.patch new file mode 100644 index 000000000..c9b955d6f --- /dev/null +++ b/meta-phosphor/recipes-phosphor/ipmi/ipmitool/0001-create_pen_list-only-print-if-values-are-set.patch @@ -0,0 +1,35 @@ +From 51f3c26190f91981e35671ac87bb716dac8a9b7f Mon Sep 17 00:00:00 2001 +From: Vernon Mauery <vernon.mauery@intel.com> +Date: Wed, 27 Feb 2019 15:22:52 -0800 +Subject: [PATCH] create_pen_list: only print if values are set + +On a failed download of the PEN list, the create_pen_list script +improperly printed an invalid entry of { , "" } causing the build to +fail. The last line print must check that it has something to print or +it will print the wrong thing. + +Partially resolves ipmitool/ipmitool#11 + +Signed-off-by: Vernon Mauery <vernon.mauery@intel.com> +--- + lib/create_pen_list | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/create_pen_list b/lib/create_pen_list +index e2b44d2..81864ad 100755 +--- a/lib/create_pen_list ++++ b/lib/create_pen_list +@@ -67,7 +67,9 @@ parse_pen_list() { + } + + END { +- print "{ " PEN ", \"" ENTERPRISE "\" }," ++ if(PEN) { ++ print "{ " PEN ", \"" ENTERPRISE "\" }," ++ } + }' + } + +-- +2.17.1 + diff --git a/meta-phosphor/recipes-phosphor/ipmi/ipmitool/0001-plugins-Add-a-backend-for-the-OpenBMC-dbus-interface.patch b/meta-phosphor/recipes-phosphor/ipmi/ipmitool/0001-plugins-Add-a-backend-for-the-OpenBMC-dbus-interface.patch deleted file mode 100644 index de32c0155..000000000 --- a/meta-phosphor/recipes-phosphor/ipmi/ipmitool/0001-plugins-Add-a-backend-for-the-OpenBMC-dbus-interface.patch +++ /dev/null @@ -1,387 +0,0 @@ -From 7a74bdc8d1b0b32c35dc83e130f687a52dfda1e8 Mon Sep 17 00:00:00 2001 -From: Jeremy Kerr <jk@ozlabs.org> -Date: Tue, 13 Oct 2015 09:17:21 +0800 -Subject: [PATCH] plugins: Add a backend for the OpenBMC dbus interface - -Signed-off-by: Jeremy Kerr <jk@ozlabs.org> - -Includes the following commits from the following authors - -plugins/dbus: Split netfn from lun, and ccode from data - -Signed-off-by: Jeremy Kerr <jk@ozlabs.org> - -plugins/dbus: fix missing semicolon - -Reported-by: Chris Austen <austenc@us.ibm.com> - -Signed-off-by: Jeremy Kerr <jk@ozlabs.org> - -plugins/dbus: Fix ccode response - -We need to copy it in from the dbus reply. - -Signed-off-by: Jeremy Kerr <jk@ozlabs.org> - -plugins/dbus: Use default dbus connection - -... so we'll use the system bus if run as UID 0. - -Signed-off-by: Jeremy Kerr <jk@ozlabs.org> - -if no interface is specified, use the dbus interface by default - -This is a patch that should only be on openbmc, not sent upstream -because the dbus interface is really only an openbmc thing. - -Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> ---- - configure.ac | 19 ++++ - src/plugins/Makefile.am | 4 +- - src/plugins/dbus/Makefile.am | 41 ++++++++ - src/plugins/dbus/dbus.c | 199 +++++++++++++++++++++++++++++++++++ - src/plugins/ipmi_intf.c | 6 ++ - 5 files changed, 267 insertions(+), 2 deletions(-) - create mode 100644 src/plugins/dbus/Makefile.am - create mode 100644 src/plugins/dbus/dbus.c - -diff --git a/configure.ac b/configure.ac -index f2fe1f3..81cc925 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -60,6 +60,7 @@ xenable_all_options=yes - xenable_intf_bmc=no - xenable_intf_dummy=no - xenable_intf_imb=yes -+xenable_intf_dbus=yes - xenable_intf_lipmi=yes - xenable_intf_open=yes - #xenable_intf_serial=yes -@@ -222,6 +223,22 @@ if test "x$xenable_intf_usb" = "xyes"; then - IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB usb/libintf_usb.la" - fi - -+dnl enable IPMI dbus interface -+AC_ARG_ENABLE([intf-dbus], -+ [AC_HELP_STRING([--enable-intf-dbus], -+ [enable IPMI dbus interface [default=yes]])], -+ [xenable_intf_dbus=$enableval], -+ [xenable_intf_dbus=yes]) -+if test "x$xenable_intf_dbus" = "xstatic" || test "x$xenable_intf_dbus" = "xplugin"; then -+ xenable_intf_dbus=yes -+fi -+if test "x$xenable_intf_dbus" = "xyes"; then -+ AC_DEFINE(IPMI_INTF_DBUS, [1], [Define to 1 to enable dbus interface.]) -+ AC_SUBST(INTF_DBUS, [dbus]) -+ AC_SUBST(INTF_DBUS_LIB, [libintf_dbus.la]) -+ IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB dbus/libintf_dbus.la" -+fi -+ - dnl enable IPMIv2.0 RMCP+ LAN interface - AC_ARG_ENABLE([intf-lanplus], - [AC_HELP_STRING([--enable-intf-lanplus], -@@ -664,6 +681,7 @@ AC_CONFIG_FILES([Makefile - src/plugins/imb/Makefile - src/plugins/bmc/Makefile - src/plugins/usb/Makefile -+ src/plugins/dbus/Makefile - src/plugins/lipmi/Makefile - src/plugins/serial/Makefile - src/plugins/dummy/Makefile]) -@@ -681,6 +699,7 @@ AC_MSG_RESULT([ free : $xenable_intf_free]) - AC_MSG_RESULT([ imb : $xenable_intf_imb]) - AC_MSG_RESULT([ bmc : $xenable_intf_bmc]) - AC_MSG_RESULT([ usb : $xenable_intf_usb]) -+AC_MSG_RESULT([ dbus : $xenable_intf_dbus]) - AC_MSG_RESULT([ lipmi : $xenable_intf_lipmi]) - AC_MSG_RESULT([ serial : $xenable_intf_serial]) - AC_MSG_RESULT([ dummy : $xenable_intf_dummy]) -diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am -index 7ad8173..c0b0b29 100644 ---- a/src/plugins/Makefile.am -+++ b/src/plugins/Makefile.am -@@ -32,8 +32,8 @@ MAINTAINERCLEANFILES = Makefile.in - - AM_CPPFLAGS = -I$(top_srcdir)/include - --SUBDIRS = @INTF_LAN@ @INTF_LANPLUS@ @INTF_OPEN@ @INTF_LIPMI@ @INTF_IMB@ @INTF_BMC@ @INTF_FREE@ @INTF_SERIAL@ @INTF_DUMMY@ @INTF_USB@ --DIST_SUBDIRS = lan lanplus open lipmi imb bmc free serial dummy usb -+SUBDIRS = @INTF_LAN@ @INTF_LANPLUS@ @INTF_OPEN@ @INTF_LIPMI@ @INTF_IMB@ @INTF_BMC@ @INTF_FREE@ @INTF_SERIAL@ @INTF_DUMMY@ @INTF_USB@ @INTF_DBUS@ -+DIST_SUBDIRS = lan lanplus open lipmi imb bmc free serial dummy usb dbus - - noinst_LTLIBRARIES = libintf.la - libintf_la_SOURCES = ipmi_intf.c -diff --git a/src/plugins/dbus/Makefile.am b/src/plugins/dbus/Makefile.am -new file mode 100644 -index 0000000..3e92113 ---- /dev/null -+++ b/src/plugins/dbus/Makefile.am -@@ -0,0 +1,41 @@ -+ # -+ # Copyright (c) 2015 IBM Corporation -+ # All rights reserved. -+ # -+ # Redistribution and use in source and binary forms, with or without -+ # modification,are permitted provided that the following conditions are met: -+ # -+ # 1. Redistributions of source code must retain the above copyright notice, -+ # this list of conditions and the following disclaimer. -+ # -+ # 2. Redistributions in binary form must reproduce the above copyright notice, -+ # this list of conditions and the following disclaimer in the documentation -+ # and/or other materials provided with the distribution. -+ # -+ # 3. Neither the name of the copyright holder nor the names of its contributors -+ # may be used to endorse or promote products derived from this software -+ # without specific prior written permission. -+ # -+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -+ # AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE -+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+ # POSSIBILITY OF SUCH DAMAGE. -+ # -+ -+MAINTAINERCLEANFILES = Makefile.in -+ -+INCLUDES = -I$(top_srcdir)/include -+ -+EXTRA_LTLIBRARIES = libintf_dbus.la -+noinst_LTLIBRARIES = @INTF_DBUS_LIB@ -+libintf_dbus_la_LDFLAGS = -lsystemd -+libintf_dbus_la_LIBADD = $(top_builddir)/lib/libipmitool.la -+libintf_dbus_la_SOURCES = dbus.c -+ -diff --git a/src/plugins/dbus/dbus.c b/src/plugins/dbus/dbus.c -new file mode 100644 -index 0000000..c20545f ---- /dev/null -+++ b/src/plugins/dbus/dbus.c -@@ -0,0 +1,199 @@ -+/* -+ * Copyright (c) 2015 IBM Corporation -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * 1. Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the following disclaimer. -+ * -+ * 2. Redistributions in binary form must reproduce the above copyright notice, -+ * this list of conditions and the following disclaimer in the documentation -+ * and/or other materials provided with the distribution. -+ * -+ * 3. Neither the name of the copyright holder nor the names of its -+ * contributors may be used to endorse or promote products derived from this -+ * software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+ * POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#define _BSD_SOURCE -+ -+#include <sys/file.h> -+#include <sys/stat.h> -+#include <sys/types.h> -+#include <fcntl.h> -+#include <errno.h> -+#include <unistd.h> -+#include <stdbool.h> -+ -+#include <systemd/sd-bus.h> -+#include <systemd/sd-bus-vtable.h> -+ -+#include <ipmitool/log.h> -+#include <ipmitool/ipmi.h> -+#include <ipmitool/ipmi_intf.h> -+ -+static sd_bus *bus; -+static uint8_t seq; -+static struct ipmi_rs rsp; -+static bool reply_received; -+ -+static const char *bus_name = "org.openbmc.HostIpmi.ipmitool"; -+static const char *object_path = "/org/openbmc/HostIpmi/ipmitool"; -+static const char *interface = "org.openbmc.HostIpmi"; -+ -+static struct ipmi_rs *ipmi_dbus_sendrecv(struct ipmi_intf *intf, -+ struct ipmi_rq *req) -+{ -+ sd_bus_message *msg; -+ int rc; -+ -+ (void)intf; -+ -+ rsp.ccode = 0xff; -+ -+ rc = sd_bus_message_new_signal(bus, &msg, object_path, -+ interface, "ReceivedMessage"); -+ if (rc < 0) { -+ lprintf(LOG_ERR, "%s: failed to create message: %s\n", -+ __func__, strerror(-rc)); -+ goto out; -+ } -+ -+ rc = sd_bus_message_append(msg, "yyyy", -+ ++seq, -+ req->msg.netfn, -+ req->msg.lun, -+ req->msg.cmd); -+ if (rc < 0) { -+ lprintf(LOG_ERR, "%s: failed to init bytes\n", __func__); -+ goto out_free; -+ } -+ -+ rc = sd_bus_message_append_array(msg, 'y', req->msg.data, -+ req->msg.data_len); -+ if (rc < 0) { -+ lprintf(LOG_ERR, "%s: failed to init body\n", __func__); -+ goto out_free; -+ } -+ -+ rc = sd_bus_send(bus, msg, NULL); -+ if (rc < 0) { -+ lprintf(LOG_ERR, "%s: failed to send dbus message\n", -+ __func__); -+ goto out_free; -+ } -+ -+ for (reply_received = false; !reply_received;) { -+ rc = sd_bus_wait(bus, -1); -+ sd_bus_process(bus, NULL); -+ } -+ -+out_free: -+ sd_bus_message_unref(msg); -+out: -+ return &rsp; -+} -+ -+static int ipmi_dbus_method_send_message(sd_bus_message *msg, void *userdata, -+ sd_bus_error *error) -+{ -+ uint8_t recv_seq, recv_netfn, recv_lun, recv_cmd, recv_cc; -+ const void *data; -+ size_t n; -+ int rc; -+ -+ (void)userdata; -+ (void)error; -+ -+ rc = sd_bus_message_read(msg, "yyyyy", &recv_seq, &recv_netfn, -+ &recv_lun, &recv_cmd, &recv_cc); -+ if (rc < 0) { -+ lprintf(LOG_ERR, "%s: failed to read reply\n", __func__); -+ goto out; -+ } -+ -+ rc = sd_bus_message_read_array(msg, 'y', &data, &n); -+ if (rc < 0) { -+ lprintf(LOG_ERR, "%s: failed to read reply data\n", __func__); -+ goto out; -+ } -+ -+ if (n > sizeof(rsp.data)) { -+ lprintf(LOG_ERR, "%s: data too long!\n", __func__); -+ goto out; -+ } -+ -+ if (recv_seq == seq) { -+ rsp.ccode = recv_cc; -+ rsp.data_len = n; -+ memcpy(rsp.data, data, rsp.data_len); -+ reply_received = true; -+ } -+ -+out: -+ sd_bus_reply_method_return(msg, "x", 0); -+ return 0; -+} -+ -+static const sd_bus_vtable dbus_vtable[] = { -+ SD_BUS_VTABLE_START(0), -+ SD_BUS_SIGNAL("ReceivedMessage", "yyyyay", 0), -+ SD_BUS_METHOD("sendMessage", "yyyyyay", "x", -+ ipmi_dbus_method_send_message, -+ SD_BUS_VTABLE_UNPRIVILEGED), -+ SD_BUS_VTABLE_END -+}; -+ -+static int ipmi_dbus_setup(struct ipmi_intf *intf) -+{ -+ const char *name; -+ int rc; -+ -+ rc = sd_bus_default(&bus); -+ if (rc < 0) { -+ lprintf(LOG_ERR, "Can't connect to session bus: %s\n", -+ strerror(-rc)); -+ return -1; -+ } -+ -+ sd_bus_add_object_vtable(bus, NULL, object_path, interface, -+ dbus_vtable, NULL); -+ -+ sd_bus_request_name(bus, bus_name, SD_BUS_NAME_REPLACE_EXISTING); -+ -+ sd_bus_flush(bus); -+ sd_bus_get_unique_name(bus, &name); -+ intf->opened = 1; -+ -+ return 0; -+} -+ -+static void ipmi_dbus_close(struct ipmi_intf *intf) -+{ -+ if (intf->opened) -+ sd_bus_close(bus); -+ intf->opened = 0; -+} -+ -+struct ipmi_intf ipmi_dbus_intf = { -+ .name = "dbus", -+ .desc = "OpenBMC dbus interface", -+ .setup = ipmi_dbus_setup, -+ .close = ipmi_dbus_close, -+ .sendrecv = ipmi_dbus_sendrecv, -+}; -diff --git a/src/plugins/ipmi_intf.c b/src/plugins/ipmi_intf.c -index 9225a34..56c2543 100644 ---- a/src/plugins/ipmi_intf.c -+++ b/src/plugins/ipmi_intf.c -@@ -89,8 +89,14 @@ extern struct ipmi_intf ipmi_dummy_intf; - #ifdef IPMI_INTF_USB - extern struct ipmi_intf ipmi_usb_intf; - #endif -+#ifdef IPMI_INTF_DBUS -+extern struct ipmi_intf ipmi_dbus_intf; -+#endif - - struct ipmi_intf * ipmi_intf_table[] = { -+#ifdef IPMI_INTF_DBUS -+ &ipmi_dbus_intf, -+#endif - #ifdef IPMI_INTF_OPEN - &ipmi_open_intf, - #endif --- -2.17.1 - diff --git a/meta-phosphor/recipes-phosphor/ipmi/ipmitool_%.bbappend b/meta-phosphor/recipes-phosphor/ipmi/ipmitool_%.bbappend index 7a34ce4c8..5f25f5dbb 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/ipmitool_%.bbappend +++ b/meta-phosphor/recipes-phosphor/ipmi/ipmitool_%.bbappend @@ -2,4 +2,17 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" DEPENDS += "systemd" -SRC_URI += "file://0001-plugins-Add-a-backend-for-the-OpenBMC-dbus-interface.patch" +SRC_URI = "git://github.com/ipmitool/ipmitool.git;protocol=https" +SRCREV = "d818c2ff85c011be29c8d3047e516a5e032a1923" + +# this patch has been submitted to ipmitool upstream and is in review +SRC_URI += " \ + file://0001-create_pen_list-only-print-if-values-are-set.patch \ + " + +S = "${WORKDIR}/git" +LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=9aa91e13d644326bf281924212862184" + +EXTRA_OECONF_append = " --enable-intf-dbus DEFAULT_INTF=dbus " + +PV = "1.8.18+git${SRCPV}" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb index 8d45667cd..38121e542 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb @@ -17,7 +17,7 @@ DEPENDS += "protobuf" S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs-binarystore" -SRCREV = "8ca234e6986763ffaddcf56b49fecdfe96a60182" +SRCREV = "e535a736efd8ef2088c57a91c387be7800674161" FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}" FILES_${PN}_append = " ${libdir}/blob-ipmid/lib*${SOLIBS}" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb index 58ef897a0..350083e6e 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb @@ -16,7 +16,7 @@ DEPENDS += "ipmi-blob-tool" S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs" -SRCREV = "924bc380c47f33689a1243b2d79cb619674c86fa" +SRCREV = "00d5f0de56f3e453be37c2ffc45418fb406396a2" FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}" FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb index 833de8b63..a3180402d 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb @@ -19,7 +19,7 @@ DEPENDS += "systemd" S = "${WORKDIR}/git" SRC_URI += "git://github.com/openbmc/btbridge" -SRCREV="bfbc29c9d292a537414d8cf8e4a78ef2ee6f07a3" +SRCREV="aa5511d28ff9acee4a404c6397d09f5187812ed8" # This is how linux-libc-headers says to include custom uapi headers CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json index e9e981b24..7f26c247e 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json @@ -88,12 +88,12 @@ } }, "8" : { - "name" : "RESERVED", - "is_valid" : false, + "name" : "INTRABMC", + "is_valid" : true, "active_sessions" : 0, "channel_info" : { - "medium_type" : "reserved", - "protocol_type" : "na", + "medium_type" : "oem", + "protocol_type" : "oem", "session_supported" : "session-less", "is_ipmi" : true } diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb index 8b3b6ccc9..37caeab99 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb @@ -14,13 +14,18 @@ DEPENDS += "phosphor-ipmi-blobs" DEPENDS += "phosphor-logging" DEPENDS += "sdbusplus" DEPENDS += "ipmi-blob-tool" +DEPENDS += "pciutils" + +EXTRA_OECONF = "--disable-tests --disable-build-host-tool" S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash" -SRCREV = "4679e50a5e19157b6bb4e4760a9fb92577ad37f5" +SRCREV = "0c642fd04b8f004deff7e3ebaf5613435c2177ea" FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}" FILES_${PN}_append = " ${libdir}/blob-ipmid/lib*${SOLIBS}" FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la" BLOBIPMI_PROVIDER_LIBRARY += "libfirmwareblob.so" + +do_configure[depends] += "virtual/kernel:do_shared_workdir" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-fru.inc b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-fru.inc index b6dc52328..e8e89bf2e 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-fru.inc +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-fru.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/ipmi-fru-parser" LICENSE = "GPL-3.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=7702f203b58979ebbc31bfaeb44f219c" SRC_URI += "git://github.com/openbmc/ipmi-fru-parser" -SRCREV = "7d740a670b4a81ba8f25864eb226af681d0be0b1" +SRCREV = "fcb1a256189a67012b5bd630597454c6e9d75bd3" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc index 5236cb92f..04ffdfd04 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc @@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-host-ipmid" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid" -SRCREV = "bea5392552b3b6445adf093b97c97512d69db160" +SRCREV = "db2e8c45727ba98e26778b8c754b92e093e6921c" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py index 5e6c4b5e6..877e3eb57 100755 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py @@ -12,6 +12,11 @@ import sys import yaml import copy +# Custom representer for None types. This is to handle empty dictionaries. +# By default Pyyaml outputs these as "null", whereas we want an empty character. +def represent_none(self, _): + return self.represent_scalar('tag:yaml.org,2002:null', '') + def dict_merge(target, source): """Deep merge for dicts. @@ -43,6 +48,8 @@ if len(sys.argv) == 2: # No overrides to handle sys.exit(0) +yaml.add_representer(type(None), represent_none) + target_filename = sys.argv[1] with open(target_filename) as target_file: data = yaml.safe_load(target_file) diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service index 8beb73273..62687d68c 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service @@ -26,3 +26,4 @@ BusName=xyz.openbmc_project.Control.Host [Install] WantedBy=multi-user.target +Alias=xyz.openbmc_project.Control.Host.service diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb index 9d61a290f..4e69c2d36 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb @@ -46,6 +46,9 @@ RDEPENDS_${PN} += "phosphor-network" RDEPENDS_${PN} += "phosphor-time-manager" RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_ipmi-config}" RDEPENDS_${PN} += "virtual/obmc-watchdog" +RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_obmc-bmc-state-manager}" +RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_obmc-bmc-version}" +RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_obmc-bmc-updater}" inherit useradd diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb index b1208e5a5..1ef93d5db 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb @@ -3,7 +3,7 @@ DESCRIPTION = "The IPMB bridge implements a Dbus compliant interface for \ implementing IPMB interfaces" SRC_URI = "git://github.com/openbmc/ipmbbridge.git" -SRCREV = "08deaa317c7ac0dd6e4202529ff17962c63df485" +SRCREV = "8188d7651c23502f88f9bf850ab7e549f6463997" PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" @@ -14,7 +14,9 @@ SYSTEMD_SERVICE_${PN} = "ipmb.service" DEPENDS = "sdbusplus \ phosphor-logging \ i2c-tools \ - boost" + boost \ + nlohmann-json" S = "${WORKDIR}/git/" inherit cmake systemd +FILES_${PN} += "/usr/share/ipmbbridge/ipmb-channels.json" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs/org.openbmc.HostIpmi.service b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs/org.openbmc.HostIpmi.service deleted file mode 100644 index 6b75a7d03..000000000 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs/org.openbmc.HostIpmi.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Phosphor IPMI KCS DBus Bridge - -[Service] -Restart=always -ExecStart={sbindir}/kcsbridged --d="/dev/{KCS_DEVICE}" -Type=dbus -BusName={BUSNAME} - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb index 752ac78c9..075e6cf6e 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb @@ -6,14 +6,14 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=b1beb00e508e89da1ed2a541934f28c0" inherit autotools pkgconfig -inherit obmc-phosphor-dbus-service +inherit systemd PV = "1.0+git${SRCPV}" KCS_DEVICE ?= "ipmi-kcs3" -DBUS_SERVICE_${PN} = "org.openbmc.HostIpmi.service" -SYSTEMD_SUBSTITUTIONS += "KCS_DEVICE:${KCS_DEVICE}:org.openbmc.HostIpmi.service" +SYSTEMD_SERVICE_${PN} = " ${PN}@${KCS_DEVICE}.service " +FILES_${PN} += " ${systemd_system_unitdir}/${PN}@.service " PROVIDES += "virtual/obmc-host-ipmi-hw" RPROVIDES_${PN} += "virtual-obmc-host-ipmi-hw" @@ -22,11 +22,15 @@ RRECOMMENDS_${PN} += "phosphor-ipmi-host" DEPENDS += " \ autoconf-archive-native \ systemd \ + sdbusplus \ + boost \ + phosphor-logging \ + cli11 \ " S = "${WORKDIR}/git" -SRC_URI = "git://github.com/openbmc/kcsbridge.git;protocol=https" -SRCREV = "17a2ab7f39a78ff0603aa68cf35108ea94eb442f" +SRC_URI = "git://github.com/openbmc/kcsbridge.git" +SRCREV = "2cdc49585235a6557c9cbb6c8b75c064fc02681a" # This is how linux-libc-headers says to include custom uapi headers CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/ipmi-net-firewall.sh b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/ipmi-net-firewall.sh deleted file mode 100644 index ca32f985a..000000000 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/ipmi-net-firewall.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -f $IPTABLESRULE ]; then - iptables-restore < $IPTABLESRULE -fi diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.service b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.service deleted file mode 100644 index 6b836b604..000000000 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=Network IPMI daemon -# TODO openbmc/openbmc#2059 - The wants/after below should be based on providers -Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot.service -After=mapper-wait@-xyz-openbmc_project-control-host0-boot.service -Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot-one_time.service -After=mapper-wait@-xyz-openbmc_project-control-host0-boot-one_time.service -Wants=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service -After=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service -Wants=mapper-wait@-xyz-openbmc_project-control-host0-restriction_mode.service -After=mapper-wait@-xyz-openbmc_project-control-host0-restriction_mode.service - -[Service] -Environment=IPTABLESRULE=/var/lib/iptables_rules -ExecStartPre=/usr/bin/env ipmi-net-firewall.sh -ExecStart=/usr/bin/env netipmid -SyslogIdentifier=netipmid -Restart=always -RuntimeDirectory = ipmi -RuntimeDirectoryPreserve = yes -StateDirectory = ipmi diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.socket b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.socket deleted file mode 100644 index 077b7804c..000000000 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net/phosphor-ipmi-net.socket +++ /dev/null @@ -1,6 +0,0 @@ -[Socket] -ListenDatagram=623 - -[Install] -WantedBy=sockets.target - diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb index a084387f2..370e585ea 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb @@ -7,27 +7,44 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" inherit autotools pkgconfig -inherit obmc-phosphor-systemd +inherit systemd DEPENDS += "autoconf-archive-native" +DEPENDS += "cli11" DEPENDS += "phosphor-mapper" DEPENDS += "systemd" DEPENDS += "phosphor-ipmi-host" -RDEPENDS_${PN} += "iptables" SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid" -SRC_URI += "file://ipmi-net-firewall.sh" -SRCREV = "8af90ebcc552e243ae85aa9e9da1a00fbecab56c" +SRCREV = "052b7cf37411a1bb69af1e6ce541a16021fffa9f" S = "${WORKDIR}/git" -do_install_append() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/ipmi-net-firewall.sh \ - ${D}${bindir}/ipmi-net-firewall.sh -} +FILES_${PN} += " \ + ${systemd_system_unitdir}/${PN}@.service \ + ${systemd_system_unitdir}/${PN}@.socket \ + " + +# If RMCPP_IFACE is not set by bbappend, set it to default +DEFAULT_RMCPP_IFACE = "eth0" +RMCPP_IFACE ?= "${DEFAULT_RMCPP_IFACE}" +# install parameterized service and socket files SYSTEMD_SERVICE_${PN} = " \ - ${PN}.service \ - ${PN}.socket \ + ${PN}@${RMCPP_IFACE}.service \ + ${PN}@${RMCPP_IFACE}.socket \ " + +# To add another RMCPP interface, add similar lines to the +# following lines in a bbappend: +# +# ALT_RMCPP_IFACE = "eth1" +# SYSTEMD_SERVICE_${PN} += " \ +# ${PN}@${ALT_RMCPP_IFACE}.service \ +# ${PN}@${ALT_RMCPP_IFACE}.socket \ +# " + +# Also, be sure to enable a corresponding entry in the channel +# config file with the same 'name' as the interfaces above +# Override the default phosphor-ipmi-config.bb with a bbappend + diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml index ec82afed6..8188612b3 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml @@ -207,6 +207,7 @@ gpu_func_sensor: type: "bool" assert: true deassert: false + xyz.openbmc_project.Inventory.Item.Accelerator: # Field replaceable doesn't come as a sensor data # but we know that GPU is Field replaceable so setting # true in both cases. diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb index 12e507370..ccc0fc280 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb @@ -4,7 +4,6 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" inherit native -inherit obmc-phosphor-utils inherit mrw-xml PROVIDES += "virtual/phosphor-led-manager-config-native" @@ -12,7 +11,7 @@ DEPENDS += "mrw-native mrw-perl-tools-native" # Generate a YAML files based on MRW input do_install_append() { - USE_MRW="${@df_enabled(d, 'obmc-mrw', 'yes')}" + USE_MRW="${@bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'yes', 'no', d)}" DEST=${D}${datadir}/phosphor-led-manager if [ "${USE_MRW}" = "yes" ]; then diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc index bd1c58fb4..d7c473a10 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc @@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-led-manager" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-led-manager" -SRCREV = "ab3b247f0406eeb4884131dfac44be870786abb6" +SRCREV = "6fd9e440be73865d99cd408e0f87ec639882267b" diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb index 60b6761a8..7dcdc6645 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs_git.bb @@ -18,7 +18,7 @@ DBUS_SERVICE_${PN} += "xyz.openbmc_project.led.controller@.service" SRC_URI += "git://github.com/openbmc/phosphor-led-sysfs" SRC_URI += "file://70-leds.rules" -SRCREV = "e0844ff447abad01fa6f902caab3839336d1518d" +SRCREV = "5b1417bd21d1e9c00b25bb6db700aec442af746d" S = "${WORKDIR}/git" do_install_append() { diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb index 9ee46fc78..89d71ae3c 100644 --- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb @@ -42,18 +42,18 @@ SYSTEMD_PACKAGES = "${LOGGING_PACKAGES}" DBUS_PACKAGES = "${LOGGING_PACKAGES}" FILES_${PN}-base += " \ - ${sbindir}/phosphor-log-manager \ + ${bindir}/phosphor-log-manager \ ${libdir}/libphosphor_logging.so.* \ " DBUS_SERVICE_${PN}-base += "xyz.openbmc_project.Logging.service" DBUS_SERVICE_phosphor-rsyslog-config += "xyz.openbmc_project.Syslog.Config.service" FILES_phosphor-rsyslog-config += " \ - ${sbindir}/phosphor-rsyslog-conf \ + ${bindir}/phosphor-rsyslog-conf \ " SRC_URI += "git://github.com/openbmc/phosphor-logging" -SRCREV = "e5e3a9ccd0c3d13f63e9e1a730bd3a8cb66b48dd" +SRCREV = "f59854e94b077630200117b390c4e943d588be31" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/mboxd/mboxd/mboxd.service b/meta-phosphor/recipes-phosphor/mboxd/mboxd/mboxd.service index b13f72c05..abc97e522 100644 --- a/meta-phosphor/recipes-phosphor/mboxd/mboxd/mboxd.service +++ b/meta-phosphor/recipes-phosphor/mboxd/mboxd/mboxd.service @@ -4,8 +4,8 @@ BindsTo=dev-aspeed\x2dlpc\x2dctrl.device After=dev-aspeed\x2dlpc\x2dctrl.device BindsTo=dev-aspeed\x2dmbox.device After=dev-aspeed\x2dmbox.device -Requires=phosphor-ipmi-host.service -After=phosphor-ipmi-host.service +Requires=xyz.openbmc_project.Control.Host.service +After=xyz.openbmc_project.Control.Host.service [Service] Restart=always diff --git a/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb b/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb index 68525bbc0..e49daa195 100644 --- a/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb +++ b/meta-phosphor/recipes-phosphor/mboxd/mboxd_git.bb @@ -20,7 +20,7 @@ SRC_URI += "file://99-aspeed-mbox.rules" SRC_URI += "file://99-aspeed-lpc-ctrl.rules" SRC_URI += "file://aspeed-lpc-ctrl-h.patch" -SRCREV="a804a73c39e12016cb94da9bf2de84be50ed68ad" +SRCREV="fac3689e77d37aca9c85dafabf921a847b1c4e02" PROVIDES += "mboxctl" diff --git a/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb b/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb index a997b2d6a..c783d00ce 100644 --- a/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb +++ b/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb @@ -33,11 +33,13 @@ RDEPENDS_${PN}-bmc-state-mgmt = " \ SUMMARY_${PN}-chassis-state-mgmt = "Chassis state management" RDEPENDS_${PN}-chassis-state-mgmt = " \ ${VIRTUAL-RUNTIME_obmc-chassis-state-manager} \ + obmc-phosphor-power \ " SUMMARY_${PN}-extras = "Extra features" RDEPENDS_${PN}-extras = " \ bmcweb \ + obmc-ikvm \ phosphor-dbus-monitor \ phosphor-systemd-policy \ dbus-broker \ @@ -50,6 +52,7 @@ RDEPENDS_${PN}-extrasdev = " \ SUMMARY_${PN}-extrasdevtools = "Development tools" RDEPENDS_${PN}-extrasdevtools = " \ + libgpiod \ " # Use the fan control package group for applications @@ -98,11 +101,7 @@ RDEPENDS_${PN}-sensors = " \ ${VIRTUAL-RUNTIME_obmc-sensors-hwmon} \ " -# These packages are not required with UBI enabled -${PN}-software-extras = " \ - obmc-flash-bmc \ - obmc-mgr-download \ - " +${PN}-software-extras = "" ${PN}-software-extras_df-obmc-ubi-fs = " \ phosphor-image-signing \ diff --git a/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb b/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb index ec63eca5a..8eea299ae 100644 --- a/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb +++ b/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb @@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" DEPENDS += "systemd sdbusplus boost phosphor-ipmi-host" SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git;protocol=git" -SRCREV = "bb071fb5baac164435672a42fec7ed2c10ea4503" +SRCREV = "c4a336fb15464b9f4a7328c02cb43285a6eb1e58" PV = "0.1+git${SRCPV}" diff --git a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb index 02a793545..6e9ed8ef6 100644 --- a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb +++ b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb @@ -2,7 +2,7 @@ SUMMARY = "dbus-sensors" DESCRIPTION = "Dbus Sensor Services Configured from D-Bus" SRC_URI = "git://github.com/openbmc/dbus-sensors.git" -SRCREV = "af6b87c7f269f6ed3521639284fc6672c42c8a0f" +SRCREV = "7b18b1e0298c6237b4b775dbe15bcd0cec7fdf07" PV = "0.1+git${SRCPV}" @@ -16,6 +16,7 @@ SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.cpusensor.service" SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.exitairsensor.service" SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.ipmbsensor.service" SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.intrusionsensor.service" +SYSTEMD_SERVICE_${PN} += " xyz.openbmc_project.psusensor.service" DEPENDS = "boost nlohmann-json sdbusplus i2c-tools" inherit cmake systemd diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb index e11db807a..e8977d153 100644 --- a/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb +++ b/meta-phosphor/recipes-phosphor/sensors/phosphor-hwmon_git.bb @@ -39,7 +39,7 @@ SRC_URI += "file://70-hwmon.rules" SRC_URI += "file://70-iio.rules" SRC_URI += "file://start_hwmon.sh" -SRCREV = "1f30ab2c476a473f3a78030c5dc1110c287e0789" +SRCREV = "5c014d2bb76f6f6d51aecf31bea95cb9ed9b1953" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml index 59af1a4f7..72946876d 100644 --- a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml +++ b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml @@ -127,3 +127,9 @@ Properties: Enabled: Default: 'false' + +/xyz/openbmc_project/software/apply_time: + - Interface: xyz.openbmc_project.Software.ApplyTime + Properties: + RequestedApplyTime: + Default: ApplyTime::RequestedApplyTimes::OnReset diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb index 59c743a69..9da5475c7 100644 --- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb @@ -41,25 +41,26 @@ DEPENDS += "sdbusplus" DEPENDS += "sdeventplus" DEPENDS += "phosphor-logging" DEPENDS += "phosphor-dbus-interfaces" -DEPENDS += "systemd" DEPENDS += "libcereal" -FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager" +FILES_${PN}-host = "${bindir}/phosphor-host-state-manager" DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service" DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service" SYSTEMD_ENVIRONMENT_FILE_${PN}-host += "obmc/phosphor-reboot-host/reboot.conf" SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service" -FILES_${PN}-chassis = "${sbindir}/phosphor-chassis-state-manager" +FILES_${PN}-chassis = "${bindir}/phosphor-chassis-state-manager" DBUS_SERVICE_${PN}-chassis += "xyz.openbmc_project.State.Chassis.service" -FILES_${PN}-bmc = "${sbindir}/phosphor-bmc-state-manager" +FILES_${PN}-chassis += "${bindir}/obmcutil" + +FILES_${PN}-bmc = "${bindir}/phosphor-bmc-state-manager" DBUS_SERVICE_${PN}-bmc += "xyz.openbmc_project.State.BMC.service" -FILES_${PN}-discover = "${sbindir}/phosphor-discover-system-state" +FILES_${PN}-discover = "${bindir}/phosphor-discover-system-state" SYSTEMD_SERVICE_${PN}-discover += "phosphor-discover-system-state@.service" -FILES_${PN}-host-check = "${sbindir}/phosphor-host-check" +FILES_${PN}-host-check = "${bindir}/phosphor-host-check" SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-check@.service" SYSTEMD_SERVICE_${PN}-host-check += "phosphor-reset-host-running@.service" @@ -131,6 +132,6 @@ HOST_RST_RBT_ATTEMPTS_SVC_FMT = "../${HOST_RST_RBT_ATTEMPTS_SVC}:${HOST_START_TG SYSTEMD_LINK_${PN}-host += "${@compose_list_zip(d, 'HOST_RST_RBT_ATTEMPTS_SVC_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" SRC_URI += "git://github.com/openbmc/phosphor-state-manager" -SRCREV = "32c532ea9bcddcab30f4fff30e6938211fdf584d" +SRCREV = "3a30b0542b602e0fe42d033c5e0fb1330988b840" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb b/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb index fa680bef0..db9d3bdee 100644 --- a/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb @@ -39,5 +39,5 @@ DBUS_SERVICE_phosphor-ldap = " \ xyz.openbmc_project.LDAP.PrivilegeMapper.service \ " SRC_URI += "git://github.com/openbmc/phosphor-user-manager" -SRCREV = "c3f56c50ffffe1076531eb4aad7c0a574a44841f" +SRCREV = "fef578960f632abacc5cd615b2bedfb3ab9ebb90" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb index 906f6654a..0b63dccb2 100644 --- a/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb +++ b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb @@ -20,7 +20,7 @@ DEPENDS += "phosphor-logging" DEPENDS += "systemd" SRC_URI += "git://github.com/openbmc/phosphor-watchdog" -SRCREV = "26eef26c97beec18d0f96fd1cd792229caded542" +SRCREV = "47a9ec4ee9b05a9794a09d16762e3ef7318c5489" S = "${WORKDIR}/git" EXTRA_OEMESON = " \ diff --git a/meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb b/meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb index 3f73f308a..1595121c7 100644 --- a/meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb +++ b/meta-phosphor/recipes-phosphor/webui/phosphor-webui_git.bb @@ -6,7 +6,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/openbmc/phosphor-webui.git" -SRCREV = "a5deeeafe84893722d601b2343943eb78f263e4f" +SRCREV = "44da471fceb3790b49a43bc023781f62b19f9fde" S = "${WORKDIR}/git" DEPENDS_prepend = "nodejs-native " diff --git a/meta-phosphor/recipes-support/rng-tools/rng-tools/10-nice.conf b/meta-phosphor/recipes-support/rng-tools/rng-tools/10-nice.conf new file mode 100644 index 000000000..de71db451 --- /dev/null +++ b/meta-phosphor/recipes-support/rng-tools/rng-tools/10-nice.conf @@ -0,0 +1,6 @@ +[Service] +# Make the priority of the random number generator seeding +# process nearly the lowest on the system but allow +# daemons to have lower priority if desired. This makes our +# system much more responsive during boot. +Nice=18 diff --git a/meta-phosphor/recipes-support/rng-tools/rng-tools/rngd.service b/meta-phosphor/recipes-support/rng-tools/rng-tools/rngd.service deleted file mode 100644 index 7b0e9a71f..000000000 --- a/meta-phosphor/recipes-support/rng-tools/rng-tools/rngd.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Hardware RNG Entropy Gatherer Daemon - -[Service] -ExecStart=@SBINDIR@/rngd -f - -[Install] -WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend b/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend index cda8e0b51..16add36d8 100644 --- a/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend +++ b/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend @@ -1,17 +1,13 @@ - FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://rngd.service" +SRC_URI += "file://10-nice.conf" inherit systemd -SYSTEMD_SERVICE_${PN} = "rngd.service" +FILES_${PN} += "${systemd_unitdir}/system/rngd.service.d" do_install_append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/rngd.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/rngd.service + install -d ${D}${systemd_unitdir}/system/rngd.service.d + install -m 644 ${WORKDIR}/10-nice.conf ${D}${systemd_unitdir}/system/rngd.service.d fi } - |