summaryrefslogtreecommitdiffstats
path: root/meta-openpower/common/recipes-phosphor
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openpower/common/recipes-phosphor')
-rw-r--r--meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces-mapper-config-native.bb11
-rw-r--r--meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb32
-rw-r--r--meta-openpower/common/recipes-phosphor/dbus/phosphor-mapper-config-native%.bbappend1
-rw-r--r--meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.bb77
-rw-r--r--meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.inc5
-rw-r--r--meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-checkstop@.service13
-rw-r--r--meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog-timeout@.service9
-rw-r--r--meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service9
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb71
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios362
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-check-clearvolatile@.service14
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-cleanup.service8
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-enable-clearvolatile@.service14
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service8
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service13
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service11
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service13
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service10
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service10
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service16
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service19
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager.bbappend4
-rw-r--r--meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager/software-bmc-updater.conf3
-rw-r--r--meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb18
-rw-r--r--meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service9
-rw-r--r--meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service10
-rw-r--r--meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service17
-rw-r--r--meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl.bb15
-rw-r--r--meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl/pnorboot.service9
-rw-r--r--meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb30
-rw-r--r--meta-openpower/common/recipes-phosphor/host/checkstop-monitor/checkstop.conf3
-rw-r--r--meta-openpower/common/recipes-phosphor/host/checkstop-monitor/obmc/gpio/checkstop4
-rw-r--r--meta-openpower/common/recipes-phosphor/host/hostboot-settings.bb19
-rw-r--r--meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings110
-rw-r--r--meta-openpower/common/recipes-phosphor/host/hostboot-settings/hostboot-settings.service9
-rw-r--r--meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service20
-rw-r--r--meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service19
-rw-r--r--meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service19
-rw-r--r--meta-openpower/common/recipes-phosphor/host/op-proc-control.bb26
-rw-r--r--meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb19
-rw-r--r--meta-openpower/common/recipes-phosphor/host/p9-host-start.bb23
-rw-r--r--meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb19
-rw-r--r--meta-openpower/common/recipes-phosphor/initfs/obmc-phosphor-initfs.bbappend1
-rw-r--r--meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest.bbappend1
-rw-r--r--meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest/url_config.json14
-rw-r--r--meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload.bb31
-rw-r--r--meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload/op-inventory-upload@.service16
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config-native.bb19
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config/config.yaml117
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-error-native.bb19
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw-native.bb16
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml34
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist-native.bb6
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist/openpower-ipmi-oem-whitelist-native.conf2
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb35
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.inc5
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-config-native.bbappend1
-rw-r--r--meta-openpower/common/recipes-phosphor/ipmi/phosphor-logging-error-logs-native.bbappend1
-rw-r--r--meta-openpower/common/recipes-phosphor/logging/phosphor-logging.bbappend5
-rw-r--r--meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-example-native.bb17
-rw-r--r--meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb19
-rw-r--r--meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb111
-rw-r--r--meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc5
-rwxr-xr-xmeta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh20
-rw-r--r--meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-disable@.service12
-rw-r--r--meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-enable@.service17
-rw-r--r--meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service14
-rw-r--r--meta-openpower/common/recipes-phosphor/packagegroups/nativesdk-packagegroup-sdk-host.bbappend4
-rw-r--r--meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend24
-rw-r--r--meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-ipmid-providers.bbappend1
-rw-r--r--meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-debugtools.bbappend5
-rw-r--r--meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb61
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example-native.bb22
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example/inventory2
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb28
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example-native.bb22
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example/example.yaml6
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb29
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw/config.yaml11
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout-native.bb19
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout/layout.yaml15
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.bb47
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.inc5
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/70-op-vpd.rules1
-rw-r--r--meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/op-vpd-parser.service12
-rw-r--r--meta-openpower/common/recipes-phosphor/webui/phosphor-webui.bbappend16
86 files changed, 1999 insertions, 0 deletions
diff --git a/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces-mapper-config-native.bb b/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces-mapper-config-native.bb
new file mode 100644
index 000000000..1ef4adca2
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces-mapper-config-native.bb
@@ -0,0 +1,11 @@
+SUMMARY="Add /org/open_power namespace to phosphor-mapper"
+DESCRIPTION="Add the /org/open_power path namespace and \
+org.open_power interface prefix to the mapper \
+watch list."
+
+inherit phosphor-mapper
+inherit native
+inherit obmc-phosphor-license
+
+PHOSPHOR_MAPPER_NAMESPACE_append = " /org/open_power"
+PHOSPHOR_MAPPER_INTERFACE_append = " org.open_power"
diff --git a/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb b/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb
new file mode 100644
index 000000000..18ce1adf1
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Open POWER DBus Interfaces"
+DESCRIPTION = "Generated bindings, using sdbus++, for the openpower YAML"
+PR = "r1"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-license
+inherit pythonnative
+inherit phosphor-dbus-yaml
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbus++-native"
+
+SRC_URI += "git://github.com/openbmc/openpower-dbus-interfaces"
+SRCREV = "db61501f7a2ad964555b3fb482a2bb4cffcbbb9d"
+
+DEPENDS_remove_class-native = "sdbus++-native"
+DEPENDS_remove_class-nativesdk = "sdbus++-native"
+
+PACKAGECONFIG ??= "libopenpower_dbus"
+PACKAGECONFIG[libopenpower_dbus] = " \
+ --enable-libopenpower_dbus, \
+ --disable-libopenpower_dbus, \
+ systemd sdbusplus, \
+ libsystemd sdbusplus \
+ "
+
+PACKAGECONFIG_remove_class-native = "libopenpower_dbus"
+PACKAGECONFIG_remove_class-nativesdk = "libopenpower_dbus"
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/meta-openpower/common/recipes-phosphor/dbus/phosphor-mapper-config-native%.bbappend b/meta-openpower/common/recipes-phosphor/dbus/phosphor-mapper-config-native%.bbappend
new file mode 100644
index 000000000..04df9733b
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/dbus/phosphor-mapper-config-native%.bbappend
@@ -0,0 +1 @@
+PHOSPHOR_MAPPER_CONFIGS_append_df-openpower = " openpower-dbus-interfaces-mapper-config-native"
diff --git a/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.bb b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.bb
new file mode 100644
index 000000000..ac4cd0141
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.bb
@@ -0,0 +1,77 @@
+SUMMARY = "OpenPOWER Debug Collector"
+DESCRIPTION = "Application to log error during host checkstop and watchdog timeout"
+
+PR = "r1"
+
+inherit autotools \
+ pkgconfig \
+ obmc-phosphor-systemd \
+ pythonnative \
+ phosphor-dbus-yaml
+
+require ${PN}.inc
+
+DEPENDS += " \
+ phosphor-logging \
+ autoconf-archive-native \
+ sdbus++-native \
+ "
+RDEPENDS_${PN} += " \
+ phosphor-logging \
+ "
+
+S = "${WORKDIR}/git"
+
+# This provides below 2 applications that are called into in case
+# of host checkstop and host watchdog timeout respectively.
+APPS = "checkstop watchdog"
+
+DEBUG_TMPL = "openpower-debug-collector-{0}@.service"
+SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'DEBUG_TMPL', 'APPS')}"
+
+# This needs to be executed as part of host crash
+CHECKSTOP_TMPL = "openpower-debug-collector-checkstop@.service"
+CRASH_TGTFMT = "obmc-host-crash@{0}.target"
+CHECKSTOP_INSTFMT = "openpower-debug-collector-checkstop@{0}.service"
+CRASH_CHECKSTOP_FMT = "../${CHECKSTOP_TMPL}:${CRASH_TGTFMT}.wants/${CHECKSTOP_INSTFMT}"
+
+# Make watchdog part of obmc-host-timeout target
+WDOG_TMPL = "openpower-debug-collector-watchdog@.service"
+TIMEOUT_TGTFMT = "obmc-host-timeout@{0}.target"
+WDOG_INSTFMT = "openpower-debug-collector-watchdog@{0}.service"
+TIMEOUT_WDOG_FMT = "../${WDOG_TMPL}:${TIMEOUT_TGTFMT}.wants/${WDOG_INSTFMT}"
+
+# Capture debug information on watchdog timeout
+DEBUG_WD_TIMEOUT_TMPL = "openpower-debug-collector-watchdog-timeout@.service"
+DEBUG_WD_TIMEOUT_INSTFMT = "openpower-debug-collector-watchdog-timeout@{0}.service"
+DEBUG_WD_TIMEOUT_FMT = "../${DEBUG_WD_TIMEOUT_TMPL}:${TIMEOUT_TGTFMT}.wants/${DEBUG_WD_TIMEOUT_INSTFMT}"
+
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CRASH_CHECKSTOP_FMT', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'TIMEOUT_WDOG_FMT', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'DEBUG_WD_TIMEOUT_FMT', 'OBMC_HOST_INSTANCES')}"
+
+# Do not depend on phosphor-logging for native build
+DEPENDS_remove_class-native = "phosphor-logging"
+
+# Do not depend on phosphor-logging for native SDK build
+DEPENDS_remove_class-nativesdk = "phosphor-logging"
+
+# Provide a means to enable/disable install_error_yaml feature
+PACKAGECONFIG ??= "install_error_yaml"
+PACKAGECONFIG[install_error_yaml] = " \
+ --enable-install_error_yaml, \
+ --disable-install_error_yaml, ,\
+ "
+
+# Enable install_error_yaml during native and native SDK build
+PACKAGECONFIG_add_class-native = "install_error_yaml"
+PACKAGECONFIG_add_class-nativesdk = "install_error_yaml"
+
+# Disable install_error_yaml during target build
+PACKAGECONFIG_remove_class-target = "install_error_yaml"
+
+# Disable generating elog error header file during bitbake. Applications
+# should be using the elog header generated by phosphor-logging recipe
+EXTRA_OECONF += "--disable-gen_errors"
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.inc b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.inc
new file mode 100644
index 000000000..4b1435625
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/openpower-debug-collector"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/openpower-debug-collector"
+SRCREV = "5bc32f24a05de75b3a11d93cdae7b99ee718efcb"
diff --git a/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-checkstop@.service b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-checkstop@.service
new file mode 100644
index 000000000..5e8cf3dcd
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-checkstop@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenPOWER debug data collector for host checkstop
+Before=obmc-host-quiesce@%i.target
+
+[Service]
+# Adding 10 seconds to allow OCC to collect debug data
+# before processing checkstop. OCC has to wait 5 seconds
+# for our driver to stop using the SBEFIFO.
+ExecStart={base_bindir}/sleep 10
+ExecStart=/usr/bin/env checkstop_app
+SyslogIdentifier=checkstop_app
+Type=oneshot
+Restart=no
diff --git a/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog-timeout@.service b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog-timeout@.service
new file mode 100644
index 000000000..55ba40351
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog-timeout@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=OpenPOWER debug data collector for host %I watchdog timeout
+Before=obmc-host-quiesce@%i.target
+
+[Service]
+ExecStart=/usr/bin/env openpower-proc-control collectSBEHBData
+SyslogIdentifier=openpower-proc-control
+Type=oneshot
+Restart=no
diff --git a/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service
new file mode 100644
index 000000000..6fc3fec82
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=OpenPOWER debug data collector for host watchdog timeout
+Before=obmc-host-quiesce@%i.target
+
+[Service]
+ExecStart=/usr/bin/env watchdog_timeout
+SyslogIdentifier=watchdog_timeout
+Type=oneshot
+Restart=no
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb
new file mode 100644
index 000000000..cd17e0d5c
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb
@@ -0,0 +1,71 @@
+SUMMARY = "OpenPower Software Management"
+DESCRIPTION = "OpenPower Software Manager provides a set of host software \
+management daemons. It is suitable for use on a wide variety of OpenPower \
+platforms."
+HOMEPAGE = "https://github.com/openbmc/openpower-pnor-code-mgmt"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+inherit pythonnative
+
+PACKAGECONFIG[verify_pnor_signature] = "--enable-verify_pnor_signature,--disable-verify_pnor_signature"
+
+DEPENDS += " \
+ autoconf-archive-native \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ sdbusplus-native \
+ "
+
+RDEPENDS_${PN} += " \
+ mtd-utils-ubifs \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ virtual-obmc-image-manager \
+ "
+
+S = "${WORKDIR}/git"
+
+SRC_URI += "git://github.com/openbmc/openpower-pnor-code-mgmt"
+
+SRC_URI += "file://obmc-flash-bios"
+
+SRCREV = "c39d923fee581533775e37be3f59f77c021718ee"
+
+do_install_append() {
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/obmc-flash-bios ${D}${sbindir}/obmc-flash-bios
+}
+
+DBUS_SERVICE_${PN} += "org.open_power.Software.Host.Updater.service"
+
+SYSTEMD_SERVICE_${PN} += " \
+ obmc-flash-bios-ubiattach.service \
+ obmc-flash-bios-ubimount@.service \
+ obmc-flash-bios-ubiumount-ro@.service \
+ obmc-flash-bios-ubiumount-rw@.service \
+ obmc-flash-bios-ubipatch.service \
+ obmc-flash-bios-ubiremount.service \
+ obmc-flash-bios-updatesymlinks.service \
+ obmc-flash-bios-cleanup.service \
+ obmc-flash-bios-enable-clearvolatile@.service \
+ obmc-flash-bios-check-clearvolatile@.service \
+ "
+
+ENABLE_CLEAR_VOLATILE_TMPL = "obmc-flash-bios-enable-clearvolatile@.service"
+HOST_START_TGTFMT = "obmc-host-start@{0}.target"
+ENABLE_CLEAR_VOLATILE_INSTFMT = "obmc-flash-bios-enable-clearvolatile@{0}.service"
+ENABLE_CLEAR_VOLATILE_START_FMT = "../${ENABLE_CLEAR_VOLATILE_TMPL}:${HOST_START_TGTFMT}.requires/${ENABLE_CLEAR_VOLATILE_INSTFMT}"
+
+CHECK_CLEAR_VOLATILE_TMPL = "obmc-flash-bios-check-clearvolatile@.service"
+HOST_STARTMIN_TGTFMT = "obmc-host-startmin@{0}.target"
+CHECK_CLEAR_VOLATILE_INSTFMT = "obmc-flash-bios-check-clearvolatile@{0}.service"
+CHECK_CLEAR_VOLATILE_START_FMT = "../${CHECK_CLEAR_VOLATILE_TMPL}:${HOST_STARTMIN_TGTFMT}.requires/${CHECK_CLEAR_VOLATILE_INSTFMT}"
+
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'ENABLE_CLEAR_VOLATILE_START_FMT', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'CHECK_CLEAR_VOLATILE_START_FMT', 'OBMC_HOST_INSTANCES')}"
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
new file mode 100644
index 000000000..ff8818518
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
@@ -0,0 +1,362 @@
+#!/bin/sh
+
+# Get the mtd device number (mtdX)
+findmtd() {
+ m="$(grep -xl "$1" /sys/class/mtd/*/name)"
+ m="${m%/name}"
+ m="${m##*/}"
+ 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 mount information
+is_mounted() {
+ grep -q "$1" /proc/mounts
+ return $?
+}
+
+# Attach the pnor mtd device to ubi.
+attach_ubi() {
+ pnormtd="$(findmtd pnor)"
+ pnor="${pnormtd#mtd}"
+ pnordev="/dev/mtd${pnor}"
+
+ if [ -d "/sys/class/ubi/ubi${pnor}" ]; then
+ # Already attached
+ return 0
+ fi
+
+ ubiattach /dev/ubi_ctrl -m "${pnor}" -d "${pnor}"
+ rc=$?
+ if [ ${rc} -ne 0 ]; then
+ # Check the pnor mtd device is formatted as ubi by reading the first 3 byes,
+ # which should be the ascii chars 'UBI'
+ magic="$(hexdump -C -n 3 ${pnordev})"
+ if [[ "${magic}" =~ "UBI" ]]; then
+ # Device already formatted as ubi, ubiattach failed for some other reason
+ return ${rc}
+ else
+ # Format device as ubi
+ echo "Starting ubiformat ${pnordev}"
+ ubiformat "${pnordev}" -y -q
+ # Retry the ubiattach
+ ubiattach /dev/ubi_ctrl -m "${pnor}" -d "${pnor}"
+ fi
+ fi
+}
+
+mount_squashfs() {
+ pnormtd="$(findmtd pnor)"
+ ubidev="/dev/ubi${pnormtd#mtd}"
+ mountdir="/media/${name}"
+ vol="$(findubi "${name}")"
+ img="/tmp/images/${version}/pnor.xz.squashfs"
+ filesize="$(ls -sh $img | awk -F " " {'print $1'})"
+
+ if is_mounted "${name}"; then
+ echo "${name} is already mounted."
+ return 0
+ fi
+
+ if [ ! -z "${vol}" ]; then
+ ubirmvol "${ubidev}" -N "${name}"
+ fi
+
+ if [ ! -d "${mountdir}" ]; then
+ mkdir "${mountdir}"
+ fi
+
+ # Set size of read-only partition equal to pnor.xz.squashfs
+ ubimkvol "${ubidev}" -N "${name}" -s "${filesize}"KiB --type=static
+ vol="$(findubi "${name}")"
+
+ if [ $? != 0 ]; then
+ echo "Unable to create RO volume!"
+ return 1
+ fi
+
+ ubidevid="${vol#ubi}"
+ ubiupdatevol "/dev/ubi${ubidevid}" "${img}"
+
+ if [ $? != 0 ]; then
+ echo "Unable to update RO volume!"
+ return 1
+ fi
+
+ ubiblock --create "/dev/ubi${ubidevid}"
+
+ if [ $? != 0 ]; then
+ echo "Unable to create UBI block for RO volume!"
+ return 1
+ fi
+
+ mount -t squashfs -o ro "/dev/ubiblock${ubidevid}" "${mountdir}"
+
+ if [ $? != 0 ]; then
+ echo "Unable to mount RO volume!"
+ return 1
+ fi
+}
+
+mount_ubi() {
+ pnormtd="$(findmtd pnor)"
+ pnor="${pnormtd#mtd}"
+ ubidev="/dev/ubi${pnor}"
+ pnordev="/dev/mtd${pnor}"
+
+ if [[ "${name}" == "pnor-patch" ]]; then
+ if [[ "$(fw_printenv fieldmode 2>/dev/null)" == "fieldmode=true" ]]; then
+ return 0
+ fi
+ if [[ ! "$(hexdump -C -n 3 ${pnordev})" =~ "UBI" ]]; then
+ return 0
+ fi
+ mountdir="/usr/local/share/pnor"
+ else
+ mountdir="/media/${name}"
+ fi
+
+ if [[ "${name}" == "pnor-prsv" ]]; then
+ size="2MiB"
+ else
+ size="16MiB"
+ fi
+
+ if [ ! -d "${mountdir}" ]; then
+ mkdir -p "${mountdir}"
+ fi
+
+ vol="$(findubi "${name}")"
+ if [ -z "${vol}" ]; then
+ ubimkvol "${ubidev}" -N "${name}" -s "${size}"
+ fi
+
+ if ! is_mounted "${name}"; then
+ mountdev="ubi${pnor}:${name}"
+ mount -t ubifs "${mountdev}" "${mountdir}"
+ fi
+}
+
+umount_ubi() {
+ pnormtd="$(findmtd pnor)"
+ pnor="${pnormtd#mtd}"
+ ubidev="/dev/ubi${pnor}"
+ mountdir="/media/${name}"
+
+ if is_mounted "${name}"; then
+ umount "${mountdir}"
+ fi
+
+ vol="$(findubi "${name}")"
+ id="${vol##*_}"
+ if [ -n "${id}" ]; then
+ ubirmvol "${ubidev}" -n "${id}"
+ fi
+
+ if [ -d "${mountdir}" ]; then
+ rm -r "${mountdir}"
+ fi
+}
+
+remount_ubi() {
+ pnormtd="$(findmtd pnor)"
+ pnor="${pnormtd#mtd}"
+ pnordev="/dev/mtd${pnor}"
+
+ # Re-Attach the pnor mtd device to ubi
+ if [[ $(hexdump -C -n 3 ${pnordev}) =~ "UBI" ]]; then
+ ubiattach /dev/ubi_ctrl -m "${pnor}" -d "${pnor}"
+ else
+ # Device not formatted as ubi.
+ return 0
+ fi
+
+ # Get information on all ubi volumes
+ ubinfo=$(ubinfo -d ${pnor})
+ presentVolumes=${ubinfo##*:}
+ IFS=', ' read -r -a array <<< "$presentVolumes"
+ for element in ${array[@]};
+ do
+ elementProperties=$(ubinfo -d $pnor -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} == pnor-prsv ]] || [[ ${name} == pnor-rw* ]] || [[ ${name} == pnor-ro* ]]; then
+ mountdir="/media/${name}"
+ if [ ! -d "${mountdir}" ]; then
+ mkdir -p "${mountdir}"
+ fi
+
+ if [[ ${name} == pnor-ro* ]]
+ then
+ ubiblock --create /dev/ubi${pnor}_${element}
+ mount -t squashfs -o ro "/dev/ubiblock${pnor}_${element}" "${mountdir}"
+ else
+ mount -t ubifs "ubi${pnor}:${name}" "${mountdir}"
+ fi
+ fi
+ done
+}
+
+update_symlinks() {
+ PNOR_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/"
+ PNOR_RO_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/ro"
+ PNOR_RO_PREFIX="/media/pnor-ro-"
+ PNOR_RW_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/rw"
+ PNOR_RW_PREFIX="/media/pnor-rw-"
+ PNOR_PRSV_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/prsv"
+ PNOR_PRSV="/media/pnor-prsv"
+ PERSISTENCE_PATH="/var/lib/obmc/openpower-pnor-code-mgmt/"
+ PNOR_PATCH_LOCATION="/usr/local/share/pnor/"
+
+ # Get a list of all active PNOR versions
+ data="$(ls -d ${PNOR_RO_PREFIX}*)"
+ IFS=$'\n' array=(${data})
+
+ currentVersion=""
+ lowestPriority=255
+ for element in ${array[@]}; do
+ #Remove the PNOR_RO_PREFIX from the path to get version ID.
+ versionId="${element#${PNOR_RO_PREFIX}}"
+
+ # Get the priority of active versions from persistence files.
+ if [[ -f "${PERSISTENCE_PATH}${versionId}" ]]; then
+ data="$(grep -r "priority" ${PERSISTENCE_PATH}${versionId})"
+ priority="${data: -1}"
+ if [[ priority -le lowestPriority ]]; then
+ lowestPriority=${priority}
+ currentVersion=${versionId}
+ fi
+ fi
+ done
+
+ # Return if no active version found
+ if [ -z $currentVersion ]; then
+ return 0;
+ fi
+
+ if [ ! -d "${PNOR_ACTIVE_PATH}" ]; then
+ mkdir -p "${PNOR_ACTIVE_PATH}"
+ fi
+
+ # If the RW or RO active links doesn't point to the version with
+ # lowest priority, then remove the symlink and create new ones.
+ if [[ $(readlink -f "${PNOR_RO_ACTIVE_PATH}") != ${PNOR_RO_PREFIX}${currentVersion} ]]; then
+ rm -f ${PNOR_RO_ACTIVE_PATH}
+ rm -rf ${PNOR_PATCH_LOCATION}*
+ ln -sfv ${PNOR_RO_PREFIX}${currentVersion} ${PNOR_RO_ACTIVE_PATH}
+ fi
+
+ if [[ $(readlink -f "${PNOR_RW_ACTIVE_PATH}") != ${PNOR_RW_PREFIX}${currentVersion} ]]; then
+ rm -f ${PNOR_RW_ACTIVE_PATH}
+ ln -sfv ${PNOR_RW_PREFIX}${currentVersion} ${PNOR_RW_ACTIVE_PATH}
+ fi
+
+ if [[ ! -h ${PNOR_PRSV_ACTIVE_PATH} ]]; then
+ ln -sfv ${PNOR_PRSV} ${PNOR_PRSV_ACTIVE_PATH}
+ fi
+}
+
+ubi_cleanup() {
+ # When ubi_cleanup is run, it expects one or no active version.
+ activeVersion=$(busctl --list --no-pager tree \
+ org.open_power.Software.Host.Updater | \
+ grep /xyz/openbmc_project/software/ | tail -c 9)
+
+ if [[ -z "$activeVersion" ]]; then
+ vols=$(ubinfo -a | grep -e "pnor-ro-" -e "pnor-rw-" | cut -c 14-)
+ vols=(${vols})
+ else
+ vols=$(ubinfo -a | grep -e "pnor-ro-" -e "pnor-rw-" | \
+ grep -v "$activeVersion" | cut -c 14-)
+ vols=(${vols})
+ fi
+
+ for (( index=0; index<${#vols[@]}; index++ )); do
+ name=${vols[index]}
+ umount_ubi
+ done
+}
+
+clear_volatile() {
+ service=$(mapper get-service /org/open_power/control/volatile)
+ clearVolatileEnabled=$(busctl get-property $service /org/open_power/control/volatile xyz.openbmc_project.Object.Enable Enabled)
+ if [[ "$clearVolatileEnabled" != "b true" ]]; then
+ return 0
+ fi
+
+ PNOR_TOC_FILE="pnor.toc"
+ PNOR_RO_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/ro/"
+ PNOR_RW_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/rw/"
+ PNOR_PRSV_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/prsv/"
+
+ # toc partition string format:
+ # partition27=HB_VOLATILE,0x02ba9000,0x02bae000,00,ECC,VOLATILE,READWRITE
+ tocFilePath="${PNOR_RO_ACTIVE_PATH}${PNOR_TOC_FILE}"
+ volatiles=($(grep VOLATILE "${tocFilePath}" | grep -Eo '^partition([0-9]+)=([A-Za-z0-9_]+)'))
+ for (( index=0; index<${#volatiles[@]}; index++ )); do
+ volatileName="$(echo ${volatiles[${index}]} | awk -F '=' '{print $2}')"
+
+ rwVolatile="${PNOR_RW_ACTIVE_PATH}${volatileName}"
+ if [ -f "${rwVolatile}" ]; then
+ echo "Clear $rwVolatile"
+ rm "${rwVolatile}"
+ fi
+ prsvVolatile="${PNOR_PRSV_ACTIVE_PATH}${volatileName}"
+ if [ -f "${prsvVolatile}" ]; then
+ echo "Clear $prsvVolatile"
+ rm "${prsvVolatile}"
+ fi
+ done
+ # Always reset the sensor after clearing
+ busctl set-property $service /org/open_power/control/volatile xyz.openbmc_project.Object.Enable Enabled b false
+}
+
+case "$1" in
+ ubiattach)
+ attach_ubi
+ ;;
+ squashfsmount)
+ name="$2"
+ version="$3"
+ mount_squashfs
+ ;;
+ ubimount)
+ name="$2"
+ mount_ubi
+ ;;
+ ubiumount)
+ name="$2"
+ umount_ubi
+ ;;
+ ubiremount)
+ remount_ubi
+ ;;
+ updatesymlinks)
+ update_symlinks
+ ;;
+ ubicleanup)
+ ubi_cleanup
+ ;;
+ clearvolatile)
+ clear_volatile
+ ;;
+ *)
+ echo "Invalid argument"
+ exit 1
+ ;;
+esac
+rc=$?
+if [ ${rc} -ne 0 ]; then
+ echo "$0: error ${rc}"
+ exit ${rc}
+fi
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-check-clearvolatile@.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-check-clearvolatile@.service
new file mode 100644
index 000000000..af66b4db9
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-check-clearvolatile@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Clear the Volatile PNOR partitions in host%i if Enabled
+After=obmc-flash-bios-enable-clearvolatile@%i.service
+Before=obmc-host-start-pre@%i.target
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios clearvolatile
+SyslogIdentifier=obmc-flash-bios-check-clearvolatile
+
+[Install]
+RequiredBy=obmc-host-startmin@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-cleanup.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-cleanup.service
new file mode 100644
index 000000000..07642a0e0
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-cleanup.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Clean up UBI volumes unattached to a Host version
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios ubicleanup
+SyslogIdentifier=obmc-flash-bios
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-enable-clearvolatile@.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-enable-clearvolatile@.service
new file mode 100644
index 000000000..e040738c7
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-enable-clearvolatile@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Enable the clearing of the Volatile PNOR partitions in host%i
+After=mapper-wait@-org-open_power-control-volatile.service
+Before=obmc-flash-bios-check-clearvolatile@%i.service
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /org/open_power/control/volatile` /org/open_power/control/volatile xyz.openbmc_project.Object.Enable Enabled b true"
+SyslogIdentifier=obmc-flash-bios-enable-clearvolatile
+
+[Install]
+RequiredBy=obmc-host-start@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service
new file mode 100644
index 000000000..d0785c9b0
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Attach the PNOR mtd device to UBI
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/env obmc-flash-bios ubiattach
+SyslogIdentifier=obmc-flash-bios
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service
new file mode 100644
index 000000000..d03041dad
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Mount UBIFS volumes pnor-ro-%I, pnor-rw-%I and pnor-prsv
+Requires=obmc-flash-bios-ubiattach.service
+After=obmc-flash-bios-ubiattach.service
+OnFailure=obmc-flash-bios-ubiumount-ro@%i.service obmc-flash-bios-ubiumount-rw@%i.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios squashfsmount pnor-ro-%i %i
+ExecStart=/usr/bin/env obmc-flash-bios ubimount pnor-rw-%i
+ExecStart=/usr/bin/env obmc-flash-bios ubimount pnor-prsv
+SyslogIdentifier=obmc-flash-bios
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
new file mode 100644
index 000000000..206d31448
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Create a ubi volume for pnor patches
+Before=mboxd.service
+Wants=usr-local.mount
+After=usr-local.mount
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios ubimount pnor-patch
+SyslogIdentifier=obmc-flash-bios
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service
new file mode 100644
index 000000000..f52cac684
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Remount the squashfs and ubi volumes after a reboot
+Wants=org.open_power.Software.Host.Updater.service
+Before=org.open_power.Software.Host.Updater.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios ubiremount
+SyslogIdentifier=obmc-flash-bios
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service
new file mode 100644
index 000000000..c6dc553f4
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-ro@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Remove UBIFS volume pnor-ro-%I
+Wants=obmc-flash-bios-ubiattach.service
+After=obmc-flash-bios-ubiattach.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios ubiumount pnor-ro-%i
+SyslogIdentifier=obmc-flash-bios
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
new file mode 100644
index 000000000..c0ea8e628
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Remove UBIFS volume pnor-rw-%I
+Wants=obmc-flash-bios-ubiattach.service
+After=obmc-flash-bios-ubiattach.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios ubiumount pnor-rw-%i
+SyslogIdentifier=obmc-flash-bios
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
new file mode 100644
index 000000000..8323ccf29
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Updates symlinks for active PNOR version
+Before=mboxd.service
+Before=mboxd-reload@0.service
+After=org.open_power.Software.Host.Updater.service
+After=op-reset-chassis-running@0.service
+ConditionPathExists=!/run/openbmc/chassis@0-on
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env obmc-flash-bios updatesymlinks
+SyslogIdentifier=obmc-flash-bios
+
+[Install]
+WantedBy=mboxd.service mboxd-reload@.service
diff --git a/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service
new file mode 100644
index 000000000..2def481f7
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=OpenPower Software Update Manager
+Wants=xyz.openbmc_project.Software.Version.service
+Before=xyz.openbmc_project.Software.Version.service
+Before=mboxd.service
+Wants=obmc-flash-bios-ubipatch.service
+Before=obmc-flash-bios-ubipatch.service
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+ExecStart=/usr/bin/env openpower-update-manager
+SyslogIdentifier=openpower-update-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager.bbappend b/meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager.bbappend
new file mode 100644
index 000000000..c1799f127
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
+
+SYSTEMD_OVERRIDE_${PN}-updater += \
+ "software-bmc-updater.conf:xyz.openbmc_project.Software.BMC.Updater.service.d/software-bmc-updater.conf"
diff --git a/meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager/software-bmc-updater.conf b/meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager/software-bmc-updater.conf
new file mode 100644
index 000000000..587476244
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/flash/phosphor-software-manager/software-bmc-updater.conf
@@ -0,0 +1,3 @@
+[Unit]
+Wants=op-vpd-parser.service
+After=op-vpd-parser.service
diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb b/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb
new file mode 100644
index 000000000..840b649f6
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi.bb
@@ -0,0 +1,18 @@
+SUMMARY = "FSI Services"
+DESCRIPTION = "Install FSI related services"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+RDEPENDS_${PN} += "op-proc-control"
+
+TGTFMT = "obmc-chassis-poweron@{0}.target"
+
+TMPL_SCAN = "fsi-scan@.service"
+INSTFMT_SCAN = "fsi-scan@{0}.service"
+FMT_SCAN = "../${TMPL_SCAN}:${TGTFMT}.requires/${INSTFMT_SCAN}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL_SCAN} fsi-enable.service fsi-disable.service"
+
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_SCAN', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service
new file mode 100644
index 000000000..11c8563f3
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-disable.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Disable FSI
+Conflicts=fsi-enable.service
+
+[Service]
+ExecStart=/usr/sbin/openpower-proc-control setSyncFSIClock
+ExecStart=/bin/sh -c "echo 1 > /sys/devices/platform/gpio-fsi/external_mode"
+Type=oneshot
+RemainAfterExit=yes
diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service
new file mode 100644
index 000000000..e14803204
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-enable.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Enable FSI
+Conflicts=fsi-disable.service
+Wants=fsi-scan@0.service
+Before=fsi-scan@0.service
+
+[Service]
+ExecStart=/bin/sh -c "echo 0 > /sys/devices/platform/gpio-fsi/external_mode"
+Type=oneshot
+RemainAfterExit=yes
diff --git a/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service
new file mode 100644
index 000000000..d8f28882a
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/fsi/op-fsi/fsi-scan@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Scan FSI devices
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Conflicts=obmc-chassis-poweroff@%i.target
+
+[Service]
+ExecStart=/usr/bin/env openpower-proc-control scanFSI
+SyslogIdentifier=openpower-proc-control
+
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+RequiredBy=obmc-chassis-poweron@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl.bb b/meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl.bb
new file mode 100644
index 000000000..f37f2bec6
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl.bb
@@ -0,0 +1,15 @@
+SUMMARY = "ASPEED LPC Host Interface Control tool"
+DESCRIPTION = "Configures the BMC to expose memory regions to the host"
+PR = "r1"
+
+inherit obmc-phosphor-license
+inherit obmc-phosphor-systemd
+
+inherit autotools
+
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE_${PN} += "pnorboot.service"
+
+SRC_URI += "git://github.com/shenki/aspeed-lpc-control"
+SRCREV = "ab2012e749daf567049bf157c3bf037adc62c0e8"
diff --git a/meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl/pnorboot.service b/meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl/pnorboot.service
new file mode 100644
index 000000000..fffe13c48
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/aspeed-lpc-ctrl/pnorboot.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=ASPEED LPC boot from PNOR
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/pnorboot --size 32
+
+[Install]
+WantedBy=obmc-standby.target
diff --git a/meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb b/meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb
new file mode 100644
index 000000000..4959a3b73
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/checkstop-monitor.bb
@@ -0,0 +1,30 @@
+SUMMARY = "OpenPOWER Host checkstop monitor application"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+inherit allarch
+
+DEPENDS += "virtual/obmc-gpio-monitor"
+RDEPENDS_${PN} += "virtual/obmc-gpio-monitor"
+
+# For now, monitoring checkstop is the only usecase
+OBMC_HOST_MONITOR_INSTANCES = "checkstop"
+
+# Copies config file having arguments for monitoring host checkstop
+# via GPIO assertion
+SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/checkstop"
+
+# This package is not supplying the unit file and also this is not a native
+# recipe since state-mgmt needs this package at runtime. Unsetting this below
+# variable will let the build go through
+SYSTEMD_SERVICE_${PN} ?=""
+
+# Install the override to set up a Conflicts relation
+SYSTEMD_OVERRIDE_${PN} +="checkstop.conf:phosphor-gpio-monitor@checkstop.service.d/checkstop.conf"
+
+STATES = "startmin"
+GPIO_MONITOR_TMPL = "phosphor-gpio-monitor@.service"
+GPIO_MONITOR_TGTFMT = "phosphor-gpio-monitor@{1}.service"
+CHECKSTOP_MONITOR_FMT = "../${GPIO_MONITOR_TMPL}:obmc-host-{0}@{2}.target.wants/${GPIO_MONITOR_TGTFMT}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHECKSTOP_MONITOR_FMT', 'STATES', 'OBMC_HOST_MONITOR_INSTANCES', 'OBMC_HOST_INSTANCES')}"
diff --git a/meta-openpower/common/recipes-phosphor/host/checkstop-monitor/checkstop.conf b/meta-openpower/common/recipes-phosphor/host/checkstop-monitor/checkstop.conf
new file mode 100644
index 000000000..f47711ff6
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/checkstop-monitor/checkstop.conf
@@ -0,0 +1,3 @@
+[Unit]
+Conflicts=obmc-host-crash@0.target
+Conflicts=obmc-host-stop@0.target
diff --git a/meta-openpower/common/recipes-phosphor/host/checkstop-monitor/obmc/gpio/checkstop b/meta-openpower/common/recipes-phosphor/host/checkstop-monitor/obmc/gpio/checkstop
new file mode 100644
index 000000000..e856339b0
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/checkstop-monitor/obmc/gpio/checkstop
@@ -0,0 +1,4 @@
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=74
+POLARITY=1
+TARGET=obmc-host-crash@0.target
diff --git a/meta-openpower/common/recipes-phosphor/host/hostboot-settings.bb b/meta-openpower/common/recipes-phosphor/host/hostboot-settings.bb
new file mode 100644
index 000000000..39beb480c
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/hostboot-settings.bb
@@ -0,0 +1,19 @@
+SUMMARY = "OpenPower Hostboot Boot settings tool"
+PR = "r1"
+
+inherit obmc-phosphor-license
+inherit obmc-phosphor-systemd
+inherit allarch
+
+SRC_URI = "file://hb_settings"
+SYSTEMD_SERVICE_${PN} += "hostboot-settings.service"
+
+do_fetch[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/hb_settings ${D}${bindir}
+}
diff --git a/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings b/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings
new file mode 100644
index 000000000..d75d4b74d
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings
@@ -0,0 +1,110 @@
+#!/bin/sh
+# Copyright 2018 IBM Corp
+# SPDX-License-Identifier: Apache-2.0
+# Authored May 2018, Joel Stanley <joel@jms.id.au>
+#
+# This script sets the SIO scratch registers 0x2D in order to configure
+# hostboot. It supports boot flags v1 as defined in hostboot source:
+# src/usr/initservice/bootconfig/bootconfig_ast2400.C
+# src/usr/console/ast2400.C
+#
+# BOOT_FLAGS_VERSION_REG = 0x28,
+# Serial config reg: 0x2d
+# Serial config mask: 0xc0
+#
+# NONE = 0x00, // No output selected
+# SELECT_SUART = 0x40, // SIO Uart
+# SELECT_VUART = 0x80, // SOL virtual uart
+# RESERVED = 0xc0, // Reserved
+
+
+SYSFS_SIO=/sys/devices/platform/ahb/ahb:apb/1e789000.lpc/1e789080.lpc-host/1e789080.lpc-host:regs
+SYSFS_SIO28=$SYSFS_SIO/sio_28
+SYSFS_SIO2D=$SYSFS_SIO/sio_2d
+
+FLAGS_VERSION1=$((0x42))
+
+usage()
+{
+ echo "usage: hb_settings [[-u|--uart vuart|suart|none] | [-s|--show] | [-h]]"
+}
+
+show_regs()
+{
+ SIO28=$(cat $SYSFS_SIO28)
+ SIO2D=$(cat $SYSFS_SIO2D)
+
+ case $SIO28 in
+ $FLAGS_VERSION1)
+ echo "Boot flags version 1"
+ ;;
+ * )
+ echo "Unknown boot flags version"
+ ;;
+ esac
+
+ case $(($SIO2D >> 6)) in
+ 0)
+ echo "Hostboot serial output disabled"
+ ;;
+ 1)
+ echo "Hostboot serial output on SUART"
+ ;;
+ 2)
+ echo "Hostboot serial output on VUART"
+ ;;
+ 3)
+ echo "Reserved value"
+ ;;
+ * )
+ echo "Invalid uart value"
+ ;;
+ esac
+}
+
+set_regs()
+{
+ case $uart in
+ suart)
+ echo "Hostboot serial output on SUART"
+ VAL=0x40
+ ;;
+ vuart)
+ echo "Hostboot serial output on VUART"
+ VAL=0x80
+ ;;
+ none)
+ echo "Hostboot serial output disabled"
+ VAL=0x00
+ ;;
+ * )
+ echo "Invalid uart value"
+ usage
+ exit 1
+ esac
+
+ echo $FLAGS_VERSION1 > $SYSFS_SIO28
+ echo $VAL > $SYSFS_SIO2D
+}
+
+while [ "$1" != "" ]; do
+ case $1 in
+ -u | --uart) shift
+ uart=$1
+ set_regs
+ exit
+ ;;
+ -s | --show ) show_regs
+ exit
+ ;;
+ -h | --help ) usage
+ exit
+ ;;
+ * ) usage
+ exit 1
+ esac
+ shift
+done
+
+usage
+exit 0
diff --git a/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hostboot-settings.service b/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hostboot-settings.service
new file mode 100644
index 000000000..60e3ee998
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hostboot-settings.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Hostboot Boot Settings
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/hb_settings --uart vuart
+
+[Install]
+WantedBy=obmc-standby.target
diff --git a/meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service b/meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service
new file mode 100644
index 000000000..e6bc9389c
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/op-host-control/cfam_override@.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Applies user CFAM register overrides from file
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Wants=fsi-scan@%i.service
+After=fsi-scan@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+ConditionPathExists=/var/lib/obmc/cfam_overrides
+
+[Service]
+ExecStart=/usr/bin/env openpower-proc-control CFAMOverride
+SyslogIdentifier=openpower-proc-control
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service b/meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service
new file mode 100644
index 000000000..77a88e864
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Start host%i SBE
+After=obmc-host-start-pre@%i.target
+Wants=obmc-host-starting@%i.target
+Before=obmc-host-starting@%i.target
+Before=obmc-host-started@%i.target
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Conflicts=obmc-host-stop@%i.target
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+ExecStart=/usr/bin/env openpower-proc-control startHost
+SyslogIdentifier=openpower-proc-control
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service b/meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service
new file mode 100644
index 000000000..bd9db809b
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Run VCS workaround on host%i
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Wants=fsi-scan@%i.service
+After=fsi-scan@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+ExecStart=/usr/bin/env openpower-proc-control vcsWorkaround
+SyslogIdentifier=openpower-proc-control
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/host/op-proc-control.bb b/meta-openpower/common/recipes-phosphor/host/op-proc-control.bb
new file mode 100644
index 000000000..a9c030bdc
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/op-proc-control.bb
@@ -0,0 +1,26 @@
+SUMMARY = "OpenPower procedure control"
+DESCRIPTION = "Provides procedures that run against the host chipset"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig pythonnative
+
+SRC_URI += "git://github.com/openbmc/openpower-proc-control"
+SRCREV = "6d83ddf7691fed618b8d9e871f608b8754e2134e"
+
+DEPENDS += " \
+ autoconf-archive-native \
+ phosphor-logging \
+ phosphor-dbus-interfaces \
+ openpower-dbus-interfaces \
+ "
+
+RDEPENDS_${PN} += " \
+ phosphor-logging \
+ phosphor-dbus-interfaces \
+ openpower-dbus-interfaces \
+ "
diff --git a/meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb b/meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb
new file mode 100644
index 000000000..4f6a9c653
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/p9-cfam-override.bb
@@ -0,0 +1,19 @@
+SUMMARY = "POWER9 CFAM override"
+DESCRIPTION = "Applies user CFAM register overrides from file"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:"
+RDEPENDS_${PN} += "op-proc-control"
+
+S = "${WORKDIR}"
+
+TMPL = "cfam_override@.service"
+INSTFMT = "cfam_override@{0}.service"
+TGTFMT = "obmc-chassis-poweron@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb b/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
new file mode 100644
index 000000000..24b1b9c1f
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
@@ -0,0 +1,23 @@
+SUMMARY = "POWER9 start host"
+DESCRIPTION = "Service to start POWER9 IPL through SBE"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:"
+
+PROVIDES += 'virtual/obmc-host-ctl'
+RPROVIDES_${PN} += 'virtual-obmc-host-ctl'
+
+RDEPENDS_${PN} += "p9-vcs-workaround op-proc-control"
+
+S = "${WORKDIR}"
+
+TMPL = "start_host@.service"
+INSTFMT = "start_host@{0}.service"
+TGTFMT = "obmc-host-startmin@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb b/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb
new file mode 100644
index 000000000..11ad79cb1
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb
@@ -0,0 +1,19 @@
+SUMMARY = "POWER9 VCS workaround"
+DESCRIPTION = "Apply fixes over FSI to POWER9 CPUs prior to host power on"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:"
+RDEPENDS_${PN} += "virtual-p9-vcs-workaround op-proc-control"
+
+S = "${WORKDIR}"
+
+TMPL = "vcs_workaround@.service"
+INSTFMT = "vcs_workaround@{0}.service"
+TGTFMT = "obmc-chassis-poweron@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openpower/common/recipes-phosphor/initfs/obmc-phosphor-initfs.bbappend b/meta-openpower/common/recipes-phosphor/initfs/obmc-phosphor-initfs.bbappend
new file mode 100644
index 000000000..283f0b15c
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/initfs/obmc-phosphor-initfs.bbappend
@@ -0,0 +1 @@
+RDEPENDS_${PN} += "cf-fsi-firmware"
diff --git a/meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest.bbappend b/meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest.bbappend
new file mode 100644
index 000000000..72d991c7e
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest/url_config.json b/meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest/url_config.json
new file mode 100644
index 000000000..9d955f22f
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/interfaces/phosphor-rest/url_config.json
@@ -0,0 +1,14 @@
+{
+ "urls": [
+ "/org/openbmc/*",
+ "/org/open_power/*",
+ "/xyz/openbmc_project/*",
+ "/enumerate",
+ "/list",
+ "/login",
+ "/logout",
+ "/subscribe",
+ "/upload/image",
+ "/download/dump/*"
+ ]
+}
diff --git a/meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload.bb b/meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload.bb
new file mode 100644
index 000000000..8dcd48973
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Inventory upload"
+DESCRIPTION = "Inventory upload."
+HOMEPAGE = "http://github.com/openbmc/openpower-inventory-upload"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit allarch
+inherit setuptools
+inherit obmc-phosphor-systemd
+
+RDEPENDS_${PN} += " \
+ python-dbus \
+ python-pygobject \
+ pyphosphor \
+ dtc \
+ "
+
+SRC_URI += "git://github.com/openbmc/openpower-inventory-upload"
+
+SRCREV = "c115852fb5aa0890373d8c2dfca9b9f7b1e06527"
+
+S = "${WORKDIR}/git"
+
+TMPL = "op-inventory-upload@.service"
+INSTFMT = "op-inventory-upload@{0}.service"
+TGTFMT = "obmc-host-start@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload/op-inventory-upload@.service b/meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload/op-inventory-upload@.service
new file mode 100644
index 000000000..022f6e73e
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/inventory-upload/inventory-upload/op-inventory-upload@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Inventory Upload
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Conflicts=obmc-host-stop@%i.target
+
+[Service]
+Restart=no
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/env inventory_upload.py
+SyslogIdentifier=inventory_upload.py
+Environment="PYTHONUNBUFFERED=1"
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config-native.bb b/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config-native.bb
new file mode 100644
index 000000000..31aee2d7c
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Hostboot hostfw inventory map for phosphor-ipmi-fru"
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-fru
+inherit obmc-phosphor-license
+
+SRC_URI += "file://config.yaml"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-hostfw-config"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${hostfw_datadir}
+
+ install -d ${DEST}
+ install config.yaml ${DEST}
+}
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config/config.yaml b/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config/config.yaml
new file mode 100644
index 000000000..2233913aa
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config/config.yaml
@@ -0,0 +1,117 @@
+PROC:
+ EntityID: 3
+ Interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Name"
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruSection: Board
+ # Custom Field 2 is EC.
+ IPMIFruProperty: "Custom Field 2"
+ # Delimiter value in ascii as YAML parser
+ # was not allowing certain characters like ":" as value
+ IPMIFruValueDelimiter: "58"
+ xyz.openbmc_project.Inventory.Item.Cpu:
+
+SYS:
+ # same entity ID as it is Associated type of NODE
+ EntityID: 7
+ Interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ Model:
+ IPMIFruSection: Chassis
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Chassis
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item.System:
+
+NODE:
+ EntityID: 7
+ Interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Name"
+ xyz.openbmc_project.Inventory.Item.Board:
+ AssociatedTypes:
+ - SYS
+
+DIMM:
+ EntityID: 32
+ Interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Serial Number"
+ Model:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Model Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Name"
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Version"
+ xyz.openbmc_project.Inventory.Item.Dimm:
+
+MEMBUFF:
+ EntityID: 8
+ Interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Name"
+ xyz.openbmc_project.Inventory.Item.MemoryBuffer:
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-error-native.bb b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-error-native.bb
new file mode 100644
index 000000000..b02976074
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-error-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Copy error yaml files to known path for elog parsing"
+
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-dbus-yaml
+
+require openpower-ipmi-oem.inc
+
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ SRC=${S}/org/open_power/OCC
+ DEST=${D}${yaml_dir}/org/open_power/OCC
+ install -d ${DEST}
+ install ${SRC}/Metrics.errors.yaml ${DEST}
+ install ${SRC}/Metrics.metadata.yaml ${DEST}
+}
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw-native.bb b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw-native.bb
new file mode 100644
index 000000000..3e434b52f
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw-native.bb
@@ -0,0 +1,16 @@
+SUMMARY = "OEM sensor config for phosphor-host-ipmid"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-ipmi-host
+
+SRC_URI += "file://openpower-config.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${sensor_yamldir}
+ install -d ${DEST}
+ install openpower-config.yaml ${DEST}/openpower-config.yaml
+}
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml
new file mode 100644
index 000000000..cf61b0521
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml
@@ -0,0 +1,34 @@
+occ_active_sensor:
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ org.open_power.OCC.Status:
+ OccActive:
+ Offsets:
+ 0x00:
+ type: "bool"
+ assert: "false"
+ deassert: "true"
+ 0x01:
+ type: "bool"
+ assert: "true"
+ deassert: "false"
+
+hb_volatile_sensor:
+ path: /org/open_power/control/volatile
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Object.Enable:
+ Enabled:
+ Offsets:
+ 0x00:
+ type: "bool"
+ assert: false
+ 0x01:
+ type: "bool"
+ assert: true
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist-native.bb b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist-native.bb
new file mode 100644
index 000000000..425901894
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist-native.bb
@@ -0,0 +1,6 @@
+SUMMARY = "Whitelisted OpenBMC IPMI OEM commands"
+DESCRIPTION = "Whitelisted OpenBMC IPMI OEM commands for OpenPOWER based systems"
+
+inherit obmc-phosphor-license
+inherit native
+inherit phosphor-ipmi-host-whitelist \ No newline at end of file
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist/openpower-ipmi-oem-whitelist-native.conf b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist/openpower-ipmi-oem-whitelist-native.conf
new file mode 100644
index 000000000..402056c67
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-whitelist/openpower-ipmi-oem-whitelist-native.conf
@@ -0,0 +1,2 @@
+#<NetFn>:<Command>
+0x3A:0xF0 //<OpenPower IBM OEM>:<Add Partial eSEL command>
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb
new file mode 100644
index 000000000..118c1c2b0
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Phosphor IPMI plugin for OpenPOWER OEM Commands"
+DESCRIPTION = "Phosphor IPMI plugin for OpenPOWER OEM Commands"
+PR = "r1"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-license
+inherit obmc-phosphor-ipmiprovider-symlink
+inherit pythonnative
+
+require ${PN}.inc
+
+DEPENDS += "phosphor-ipmi-host"
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus sdbusplus-native"
+DEPENDS += "phosphor-logging"
+DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native"
+DEPENDS += "openpower-dbus-interfaces openpower-dbus-interfaces-native"
+DEPENDS += "sdbus++-native"
+
+RDEPENDS_${PN} += " \
+ sdbusplus \
+ phosphor-logging \
+ openpower-dbus-interfaces \
+ phosphor-dbus-interfaces \
+ "
+
+TARGET_CFLAGS += "-fpic"
+
+HOSTIPMI_PROVIDER_LIBRARY += "liboemhandler.so"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
+FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
+FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.inc b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.inc
new file mode 100644
index 000000000..784ff9c52
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/openpower-host-ipmi-oem"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+SRC_URI += "git://github.com/openbmc/openpower-host-ipmi-oem"
+SRCREV = "8fb3f03c0d34cfe89acb3f373fa820a53dc5ba35"
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-config-native.bbappend b/meta-openpower/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-config-native.bbappend
new file mode 100644
index 000000000..ad56a88cd
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-config-native.bbappend
@@ -0,0 +1 @@
+OBMC_IPMI_SENSORS_PROVIDERS_append_df-openpower = " openpower-ipmi-oem-sensor-inventory-mrw-native"
diff --git a/meta-openpower/common/recipes-phosphor/ipmi/phosphor-logging-error-logs-native.bbappend b/meta-openpower/common/recipes-phosphor/ipmi/phosphor-logging-error-logs-native.bbappend
new file mode 100644
index 000000000..00d44c886
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/ipmi/phosphor-logging-error-logs-native.bbappend
@@ -0,0 +1 @@
+DEPENDS_append_df-openpower = " openpower-ipmi-oem-error-native"
diff --git a/meta-openpower/common/recipes-phosphor/logging/phosphor-logging.bbappend b/meta-openpower/common/recipes-phosphor/logging/phosphor-logging.bbappend
new file mode 100644
index 000000000..e5de414f7
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/logging/phosphor-logging.bbappend
@@ -0,0 +1,5 @@
+DEPENDS_append_df-openpower = " \
+ openpower-debug-collector-native \
+ openpower-dbus-interfaces-native \
+ openpower-occ-control-native \
+ "
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-example-native.bb b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-example-native.bb
new file mode 100644
index 000000000..72b82a0b3
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-example-native.bb
@@ -0,0 +1,17 @@
+SUMMARY = "OpenPower OCC Control with example occ sensor IDs"
+PR = "r1"
+
+inherit native
+require openpower-occ-control.inc
+inherit openpower-occ-control
+
+PROVIDES += "virtual/openpower-occ-control-config-native"
+
+S = "${WORKDIR}/git"
+
+# Copies example occ sensor ID yaml file
+do_install() {
+ SRC=${S}
+ install -d ${YAML_DEST}/
+ install -D ${SRC}/example/occ_sensor.yaml ${YAML_DEST}/occ_sensor.yaml
+}
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb
new file mode 100644
index 000000000..e851ee1b3
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "OpenPower OCC Control with MRW generated sensor IDs"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit openpower-occ-control
+inherit mrw-xml
+
+PROVIDES += "virtual/openpower-occ-control-config-native"
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# Generate a YAML files based on MRW input
+do_install_append() {
+ install -d ${YAML_DEST}/
+ ${STAGING_BINDIR_NATIVE}/perl-native/perl \
+ ${STAGING_BINDIR_NATIVE}/gen_occ_map.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -o ${YAML_DEST}/occ_sensor.yaml
+}
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
new file mode 100644
index 000000000..18b298cc3
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.bb
@@ -0,0 +1,111 @@
+SUMMARY = "OpenPOWER OCC controller"
+DESCRIPTION = "Application to control the OpenPOWER On-Chip-Controller"
+HOMEPAGE = "https://github.com/openbmc/openpower-occ-control"
+PR = "r1"
+
+inherit autotools \
+ pkgconfig \
+ obmc-phosphor-dbus-service \
+ pythonnative \
+ phosphor-dbus-yaml
+
+require ${PN}.inc
+
+SRC_URI += "file://occ-active.sh"
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/occ-active.sh \
+ ${D}${bindir}/occ-active.sh
+}
+
+DBUS_SERVICE_${PN} += "org.open_power.OCC.Control.service"
+SYSTEMD_SERVICE_${PN} += "op-occ-enable@.service"
+SYSTEMD_SERVICE_${PN} += "op-occ-disable@.service"
+
+DEPENDS += "virtual/${PN}-config-native"
+DEPENDS += " \
+ sdbusplus \
+ sdbusplus-native \
+ phosphor-logging \
+ openpower-dbus-interfaces \
+ phosphor-dbus-interfaces \
+ openpower-dbus-interfaces-native \
+ autoconf-archive-native \
+ obmc-targets \
+ systemd \
+ "
+
+RDEPENDS_${PN} += " \
+ sdbusplus \
+ phosphor-logging \
+ openpower-dbus-interfaces \
+ phosphor-dbus-interfaces \
+ "
+
+EXTRA_OECONF = " \
+ YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN} \
+ PS_DERATING_FACTOR=${POWER_SUPPLY_DERATING_FACTOR} \
+ "
+EXTRA_OECONF_append = "${@bb.utils.contains('OBMC_MACHINE_FEATURES', 'i2c-occ', ' --enable-i2c-occ', '', d)}"
+
+OCC_ENABLE = "enable"
+OCC_DISABLE = "disable"
+HOST_START = "startmin"
+HOST_STOP = "stop"
+
+# Ensure host-stop and host-startmin targets require needed occ states
+OCC_TMPL = "op-occ-{0}@.service"
+HOST_TGTFMT = "obmc-host-{1}@{2}.target"
+OCC_INSTFMT = "op-occ-{0}@{2}.service"
+HOST_OCC_FMT = "../${OCC_TMPL}:${HOST_TGTFMT}.requires/${OCC_INSTFMT}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_ENABLE', 'HOST_START', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_OCC_FMT', 'OCC_DISABLE', 'HOST_STOP', 'OBMC_HOST_INSTANCES')}"
+
+# Set the occ disable service to be executed on host error
+HOST_ERROR_TARGETS = "crash timeout"
+
+OCC_DISABLE_TMPL = "op-occ-disable@.service"
+HOST_ERROR_TGTFMT = "obmc-host-{0}@{1}.target"
+OCC_DISABLE_INSTFMT = "op-occ-disable@{1}.service"
+HOST_ERROR_FMT = "../${OCC_DISABLE_TMPL}:${HOST_ERROR_TGTFMT}.wants/${OCC_DISABLE_INSTFMT}"
+
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_ERROR_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}"
+
+S = "${WORKDIR}/git"
+
+# Remove packages not required for native build
+DEPENDS_remove_class-native = " \
+ phosphor-logging \
+ obmc-targets \
+ systemd \
+ virtual/${PN}-config-native \
+ "
+# Remove packages not required for native SDK build
+DEPENDS_remove_class-nativesdk = " \
+ phosphor-logging \
+ obmc-targets \
+ systemd \
+ virtual/${PN}-config-native \
+ "
+
+# Provide a means to enable/disable install_error_yaml feature
+PACKAGECONFIG ??= "install_error_yaml"
+PACKAGECONFIG[install_error_yaml] = "\
+ --enable-install_error_yaml,\
+ --disable-install_error_yaml,\
+ ,\
+ "
+
+# Enable install_error_yaml during native and native SDK build
+PACKAGECONFIG_add_class-native = "install_error_yaml"
+PACKAGECONFIG_add_class-nativesdk = "install_error_yaml"
+
+# Disable install_error_yaml during target build
+PACKAGECONFIG_remove_class-target = "install_error_yaml"
+
+# Disable generating elog error header file during bitbake. Applications
+# should be using the elog header generated by phosphor-logging recipe
+EXTRA_OECONF += "--disable-gen_errors"
+
+BBCLASSEXTEND += "native nativesdk"
+
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc
new file mode 100644
index 000000000..a54412e4b
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/openpower-occ-control"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/openpower-occ-control"
+SRCREV = "f7d9e76dc7094214ab11bb4cb21ff6bd853ce750"
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh
new file mode 100755
index 000000000..a6097e527
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# set and unset occ active for all occ's in system
+
+if [ "$1" == "disable" ]; then
+ value='false'
+elif [ "$1" == "enable" ]; then
+ value='true'
+else
+ echo "Usage: occ-active.sh [argument]"
+ echo " enable - set occ's to active state"
+ echo " disable - set occ's to inactive state"
+ exit -1
+fi
+
+OCC_CONTROL_SERVICE="org.open_power.OCC.Control"
+
+busctl tree $OCC_CONTROL_SERVICE --list | grep occ | xargs -r -n1 -I{} \
+ busctl set-property $OCC_CONTROL_SERVICE {} org.open_power.OCC.Status \
+ OccActive b $value
+exit 0
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-disable@.service b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-disable@.service
new file mode 100644
index 000000000..0179a5083
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-disable@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenPOWER OCC Active Disable
+Before=obmc-host-stop-pre@%i.target
+Conflicts=op-occ-enable@%i.service
+
+[Service]
+ExecStart=/usr/bin/env occ-active.sh disable
+SyslogIdentifier=occ-active.sh
+Type=oneshot
+
+[Install]
+WantedBy=obmc-host-stop@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-enable@.service b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-enable@.service
new file mode 100644
index 000000000..b97253cf0
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/op-occ-enable@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=OpenPOWER OCC Active Enable for host %I
+Conflicts=obmc-host-stop@%i.target
+Conflicts=op-occ-disable@%i.service
+Wants=org.open_power.OCC.Control.service
+After=org.open_power.OCC.Control.service
+Wants=fsi-scan@%i.service
+After=fsi-scan@%i.service
+ConditionPathExists=/run/openbmc/host@%i-on
+
+[Service]
+ExecStart=/usr/bin/env occ-active.sh enable
+SyslogIdentifier=occ-active.sh
+Type=oneshot
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service
new file mode 100644
index 000000000..a63e18611
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=OpenPOWER OCC controller
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+
+[Service]
+ExecStart=/usr/bin/env openpower-occ-control
+SyslogIdentifier=openpower-occ-control
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-openpower/common/recipes-phosphor/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/meta-openpower/common/recipes-phosphor/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
new file mode 100644
index 000000000..adccb9b12
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -0,0 +1,4 @@
+RDEPENDS_${PN}_append_df-openpower = " \
+ nativesdk-openpower-dbus-interfaces-yaml \
+ nativesdk-openpower-debug-collector-yaml \
+ "
diff --git a/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
new file mode 100644
index 000000000..7eb88fb71
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
@@ -0,0 +1,24 @@
+RDEPENDS_${PN}-extrasdevtools_append_df-openpower = " obmc-pydevtools"
+
+# Add the deprecated /org/openbmc inventory namespace providing
+# obmc-mgr-inventory application to the inventory packagegroup
+# until all applications have been updated to use the new,
+# officially spec'ed xyz.openbmc_project.Inventory.Manager
+# provider (VIRTUAL-RUNTIME_obmc-inventory-manager).
+RDEPENDS_${PN}-inventory_append_df-openpower = " obmc-mgr-inventory"
+
+# Add the deprecated /org/openbmc sensor namespace providing
+# the obmc-mgr-sensor application to the sensor
+# packagegroup until all applications have been updated to use
+# the new, officially spec'ed xyz.openbmc_project.SensorValue
+# providers (VIRTUAL-RUNTIME_obmc-sensor-hwmon).
+RDEPENDS_${PN}-sensors_append_df-openpower = " obmc-mgr-sensor"
+
+# Add checkstop monitor as part of host state management package
+# This will kick start a gpio monitor that will catch the
+# host checkstop conditions and takes necessary actions
+RDEPENDS_${PN}-host-state-mgmt_append_df-openpower = " checkstop-monitor"
+
+# Add openpower debug collector as a requirement for state-mgmt
+# since it is used during checkstop handling.
+RDEPENDS_${PN}-host-state-mgmt_append_df-openpower = " openpower-debug-collector"
diff --git a/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-ipmid-providers.bbappend b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-ipmid-providers.bbappend
new file mode 100644
index 000000000..20e12e618
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-ipmid-providers.bbappend
@@ -0,0 +1 @@
+VIRTUAL-RUNTIME_phosphor-ipmi-providers_append_df-openpower = " openpower-ipmi-oem"
diff --git a/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-debugtools.bbappend b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-debugtools.bbappend
new file mode 100644
index 000000000..5ba7c47eb
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-debugtools.bbappend
@@ -0,0 +1,5 @@
+RDEPENDS_${PN}_append_df-openpower = " \
+ pflash \
+ gard \
+ fsidbg \
+ "
diff --git a/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
new file mode 100644
index 000000000..fa5e5350a
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
@@ -0,0 +1,61 @@
+SUMMARY = "OpenBMC for OpenPOWER - Applications"
+PR = "r1"
+
+inherit packagegroup
+inherit obmc-phosphor-license
+inherit obmc-phosphor-utils
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = " \
+ ${PN}-chassis \
+ ${PN}-fans \
+ ${PN}-flash \
+ ${PN}-system \
+ "
+
+PROVIDES += "virtual/obmc-chassis-mgmt"
+PROVIDES += "virtual/obmc-fan-mgmt"
+PROVIDES += "virtual/obmc-flash-mgmt"
+PROVIDES += "virtual/obmc-system-mgmt"
+
+RPROVIDES_${PN}-chassis += "virtual-obmc-chassis-mgmt"
+RPROVIDES_${PN}-fans += "virtual-obmc-fan-mgmt"
+RPROVIDES_${PN}-flash += "virtual-obmc-flash-mgmt"
+RPROVIDES_${PN}-system += "virtual-obmc-system-mgmt"
+
+SUMMARY_${PN}-chassis = "OpenPOWER Chassis"
+RDEPENDS_${PN}-chassis = " \
+ obmc-button-power \
+ obmc-button-reset \
+ obmc-control-chassis \
+ obmc-op-control-power \
+ obmc-pcie-detect \
+ obmc-host-failure-reboots \
+ "
+#Pull in obmc-fsi on all P9 OpenPOWER systems
+RDEPENDS_${PN}-chassis += "${@mf_enabled(d, 'op-fsi', 'op-fsi')}"
+
+#Pull in p9-cfam-override on all P9 OpenPOWER systems
+RDEPENDS_${PN}-chassis += "${@mf_enabled(d, 'p9-cfam-override', 'p9-cfam-override')}"
+
+SUMMARY_${PN}-fans = "OpenPOWER Fans"
+RDEPENDS_${PN}-fans = " \
+ obmc-control-fan \
+ "
+
+SUMMARY_${PN}-flash = "OpenPOWER Flash"
+RDEPENDS_${PN}-flash = " \
+ obmc-flash-bios \
+ obmc-mgr-download \
+ obmc-op-flasher \
+ "
+RDEPENDS_${PN}-flash_df-openpower-ubi-fs = " \
+ openpower-software-manager \
+ "
+
+SUMMARY_${PN}-system = "OpenPOWER System"
+RDEPENDS_${PN}-system = " \
+ obmc-mgr-system \
+ hostboot-settings \
+ pdbg \
+ "
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example-native.bb b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example-native.bb
new file mode 100644
index 000000000..8f9bd050b
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Inventory config for openpower-vpd-parser"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit openpower-fru-vpd
+
+SRC_URI += "file://inventory"
+
+PROVIDES += "virtual/openpower-fru-inventory"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe is supposed to create a systemd environment file
+ # with values for FRU types and paths. This example recipe
+ # uses a pre-defined file ($PN/inventory).
+
+ DEST=${D}${inventory_datadir_native}
+ install -d ${DEST}
+ install inventory ${DEST}
+}
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example/inventory b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example/inventory
new file mode 100644
index 000000000..1f6a5e349
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-example/inventory
@@ -0,0 +1,2 @@
+FRUS=BMC
+PATHS=/system/chassis/bmc
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb
new file mode 100644
index 000000000..6eb76ac4e
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Inventory config for openpower-vpd-parser"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit openpower-fru-vpd
+inherit mrw-xml
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ virtual/openpower-fru-vpd-layout \
+ "
+
+PROVIDES += "virtual/openpower-fru-inventory"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${inventory_datadir_native}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_openpower_fru.pl \
+ -m ${mrw_datadir}/${MRW_XML} \
+ -c ${vpdlayout_datadir}/layout.yaml \
+ -o ${DEST}/inventory
+}
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example-native.bb b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example-native.bb
new file mode 100644
index 000000000..7ed83b3a4
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "FRU properties config for openpower-vpd-parser"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit openpower-fru-vpd
+
+SRC_URI += "file://example.yaml"
+
+PROVIDES += "virtual/openpower-fru-properties"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe is supposed to create an output yaml file with
+ # FRU property values extracted from the MRW. This example recipe
+ # provides a sample output file.
+
+ DEST=${D}${properties_datadir}
+ install -d ${DEST}
+ install example.yaml ${DEST}/out.yaml
+}
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example/example.yaml b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example/example.yaml
new file mode 100644
index 000000000..6ec9b0c35
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-example/example.yaml
@@ -0,0 +1,6 @@
+/system/chassis/motherboard/boxelder/bmc:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+/system/chassis/motherboard/boxelder/bmc/ethernet:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb
new file mode 100644
index 000000000..2dc5820e3
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb
@@ -0,0 +1,29 @@
+SUMMARY = "FRU properties config for openpower-vpd-parser"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit openpower-fru-vpd
+inherit mrw-xml
+
+SRC_URI += "file://config.yaml"
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ "
+
+PROVIDES += "virtual/openpower-fru-properties"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${properties_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_fru_properties.pl \
+ -m ${mrw_datadir}/${MRW_XML} \
+ -c config.yaml \
+ -o ${DEST}/out.yaml
+}
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw/config.yaml b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw/config.yaml
new file mode 100644
index 000000000..7a9f34ec5
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw/config.yaml
@@ -0,0 +1,11 @@
+BMC:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+
+ETHERNET:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout-native.bb b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout-native.bb
new file mode 100644
index 000000000..de0cc649f
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "VPD layout for openpower-fru-vpd"
+PR = "r1"
+
+inherit native
+inherit openpower-fru-vpd
+inherit obmc-phosphor-license
+
+SRC_URI += "file://layout.yaml"
+
+PROVIDES += "virtual/openpower-fru-vpd-layout"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${vpdlayout_datadir}
+
+ install -d ${DEST}
+ install layout.yaml ${DEST}
+}
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout/layout.yaml b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout/layout.yaml
new file mode 100644
index 000000000..9aa746232
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd-layout/layout.yaml
@@ -0,0 +1,15 @@
+BMC:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ OPFR,VP: PartNumber
+ OPFR,VS: SerialNumber
+ OPFR,VN: Manufacturer
+ xyz.openbmc_project.Inventory.Item:
+ VINI,DR: PrettyName
+ xyz.openbmc_project.Common.UUID:
+ OPFR,UD: UUID
+ xyz.openbmc_project.Inventory.Item.Bmc:
+ETHERNET:
+ xyz.openbmc_project.Inventory.Item.NetworkInterface:
+ VINI,B1: MACAddress
+ OPFR,B1: MACAddress
+ xyz.openbmc_project.Inventory.Item.Ethernet:
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.bb b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.bb
new file mode 100644
index 000000000..4d7114a73
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Parser for OpenPOWER-format FRU VPD"
+DESCRIPTION = "Parse OpenPOWER-format FRU VPD and update inventory"
+PR = "r1"
+
+inherit autotools pkgconfig
+inherit openpower-fru-vpd
+inherit pythonnative
+inherit obmc-phosphor-systemd
+
+require ${PN}.inc
+
+SRC_URI += "file://70-op-vpd.rules"
+
+DEPENDS += " \
+ virtual/openpower-fru-vpd-layout \
+ virtual/openpower-fru-inventory \
+ virtual/openpower-fru-properties \
+ sdbusplus \
+ phosphor-logging \
+ python-mako-native \
+ python-pyyaml-native \
+ autoconf-archive-native \
+ "
+
+RDEPENDS_${PN} += " \
+ sdbusplus \
+ phosphor-logging \
+ "
+
+SYSTEMD_SERVICE_${PN} += "op-vpd-parser.service"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " \
+ FRU_YAML=${STAGING_DIR_NATIVE}${vpdlayout_datadir}/layout.yaml \
+ PROP_YAML=${STAGING_DIR_NATIVE}${properties_datadir}/out.yaml \
+ "
+
+do_install_append() {
+ SRC=${STAGING_DATADIR_NATIVE}${inventory_datadir_name}
+ DEST=${D}${inventory_envdir}
+ install -d ${DEST}
+ install ${SRC}/inventory ${DEST}
+
+ install -d ${D}/${base_libdir}/udev/rules.d/
+ install ${WORKDIR}/70-op-vpd.rules ${D}/${base_libdir}/udev/rules.d/
+}
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.inc b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.inc
new file mode 100644
index 000000000..db1b736d6
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/openpower-vpd-parser"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/openpower-vpd-parser"
+SRCREV = "0097cced1f5633d14e3304fbcc6279e7026c3abf"
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/70-op-vpd.rules b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/70-op-vpd.rules
new file mode 100644
index 000000000..4b86b9186
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/70-op-vpd.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="i2c", ENV{OF_NAME}=="eeprom", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="op-vpd-parser"
diff --git a/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/op-vpd-parser.service b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/op-vpd-parser.service
new file mode 100644
index 000000000..6eadebf8d
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd/op-vpd-parser.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Read OpenPOWER-format VPD from EEPROM
+ConditionFileNotEmpty={envfiledir}/obmc/inventory
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+
+[Service]
+Restart=no
+Type=oneshot
+EnvironmentFile={envfiledir}/obmc/inventory
+ExecStart=/usr/bin/env openpower-read-vpd --vpd $EEPROM --fru $FRUS --object $PATHS
+SyslogIdentifier=openpower-read-vpd
diff --git a/meta-openpower/common/recipes-phosphor/webui/phosphor-webui.bbappend b/meta-openpower/common/recipes-phosphor/webui/phosphor-webui.bbappend
new file mode 100644
index 000000000..ea818947e
--- /dev/null
+++ b/meta-openpower/common/recipes-phosphor/webui/phosphor-webui.bbappend
@@ -0,0 +1,16 @@
+do_install_append () {
+
+# The webui content is served as pre-compressed gzip content. While nginx can
+# handle this via the gzip_static directive (and we use that), the nginx
+# try_files directive (which we also use) searches the URI as-is. The suggested
+# workaround is to have an empty uncompressed file with the same name as the
+# compressed file. This does not impact the functionality of gzip_static.
+# So for eg if there's an index.html.gz, create an empty index.html. Same goes
+# for all the webui content.
+# https://serverfault.com/questions/571733/nginx-gzip-static-why-are-the-non-compressed-files-required
+# https://www.ruby-forum.com/topic/4402481
+# https://trac.nginx.org/nginx/ticket/1367
+
+find ${D}${datadir}/www -type f -name '*.gz' -exec sh -c 'touch `dirname "$0"`/`basename "$0" .gz`' '{}' \;
+
+}
OpenPOWER on IntegriCloud