diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000000000000000000000000000000000000..89de354795ec7a7cdab07c091029653d3618540d
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/COPYING.apache-2.0 b/COPYING.apache-2.0
new file mode 100644
index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9
--- /dev/null
+++ b/COPYING.apache-2.0
@@ -0,0 +1,175 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..d929607d0711b9af1123997aac4052b355c06c54
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,12 @@
+Different components of meta-phosphor are under different licenses (a mix
+of MIT and Apache-2.0). Please see:
+
+COPYING.Apache-2.0
+COPYING.MIT (MIT)
+
+All metadata is MIT licensed unless otherwise stated. Source code
+included in tree for individual recipes is under the LICENSE stated in
+the associated recipe (.bb file) unless otherwise stated.
+
+License information for any other files is either explicitly stated
+or defaults to Apache-2.0.
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000000000000000000000000000000000000..66dc0f23403b6c5d7c7461d6ec7eb1a81c7e72e6
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,5 @@
+owners:
+- bradleyb@fuzziesquirrel.com
+- edtanous@google.com
+- geissonator@yahoo.com
+- patrick@stwcx.xyz
diff --git a/README.en.md b/README.en.md
deleted file mode 100644
index 5ed106a7922ba4d08766b08da51c28af9bc4192d..0000000000000000000000000000000000000000
--- a/README.en.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# yocto-meta-phosphor
-
-#### Description
-OpenBMC core layer
-
-#### Software Architecture
-Software architecture description
-
-#### Installation
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Instructions
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Contribution
-
-1. Fork the repository
-2. Create Feat_xxx branch
-3. Commit your code
-4. Create Pull Request
-
-
-#### Gitee Feature
-
-1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
-2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
-3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
-4. The most valuable open source project [GVP](https://gitee.com/gvp)
-5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
-6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
diff --git a/README.md b/README.md
index c700bfc985e57427786d27debda401bec9f5de86..5a4b025c8755982fab31feba834703368854af03 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,13 @@
# yocto-meta-phosphor
#### 介绍
-OpenBMC core layer
+This repository is for holding the meta-phosphor layer from upstream: https://github.com/openbmc/openbmc.
-#### 软件架构
-软件架构说明
+OpenBMC
+================
+meta-phosphor contains core functionalities for OpenBMC systems, while other layers in OpenBMC repository
+contain hardware-specific adaption and company-specific modification. Since our aim is to support
+OpenBMC with openEuler Embedded, only transplant this layer is enough.
-#### 安装教程
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### 使用说明
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### 参与贡献
-
-1. Fork 本仓库
-2. 新建 Feat_xxx 分支
-3. 提交代码
-4. 新建 Pull Request
-
-
-#### 特技
-
-1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
-2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
-3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
-4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
-5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
-6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
diff --git a/classes/dbus-dir.bbclass b/classes/dbus-dir.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..a8ed3e7ecd9ffc14cc9833b22692cdfed2d6ec93
--- /dev/null
+++ b/classes/dbus-dir.bbclass
@@ -0,0 +1,2 @@
+dbus_system_confdir="${datadir}/dbus-1/system.d/"
+dbus_system_servicesdir="${datadir}/dbus-1/system-services/"
diff --git a/classes/image_types_phosphor.bbclass b/classes/image_types_phosphor.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..206b080206e57fe5a0676f58aa89b4dcfc01b2a6
--- /dev/null
+++ b/classes/image_types_phosphor.bbclass
@@ -0,0 +1,580 @@
+# Base image class extension, inlined into every image.
+
+inherit image_version
+
+# Phosphor image types
+#
+# Phosphor OpenBMC supports a fixed partition mtd layout,
+# A dynamic mtd with ubi layout, and a tar file for use with
+# The reference BMC software update implementation.
+
+# Image composition
+FLASH_KERNEL_IMAGE ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}"
+FLASH_KERNEL_IMAGE:df-obmc-ubi-fs ?= "fitImage-${MACHINE}.bin"
+
+IMAGE_BASETYPE ?= "squashfs-xz"
+OVERLAY_BASETYPE ?= "jffs2"
+FLASH_UBI_BASETYPE ?= "${IMAGE_BASETYPE}"
+FLASH_UBI_OVERLAY_BASETYPE ?= "ubifs"
+FLASH_EXT4_BASETYPE ?= "ext4"
+FLASH_EXT4_OVERLAY_BASETYPE ?= "ext4"
+
+IMAGE_TYPES += "mtd-static mtd-static-alltar mtd-static-tar mtd-ubi mtd-ubi-tar mmc-ext4-tar"
+
+IMAGE_TYPEDEP:mtd-static = "${IMAGE_BASETYPE}"
+IMAGE_TYPEDEP:mtd-static-tar = "${IMAGE_BASETYPE}"
+IMAGE_TYPEDEP:mtd-static-alltar = "mtd-static"
+IMAGE_TYPEDEP:mtd-ubi = "${FLASH_UBI_BASETYPE}"
+IMAGE_TYPEDEP:mtd-ubi-tar = "${FLASH_UBI_BASETYPE}"
+IMAGE_TYPEDEP:mmc-ext4-tar = "${FLASH_EXT4_BASETYPE}"
+IMAGE_TYPES_MASKED += "mtd-static mtd-static-alltar mtd-static-tar mtd-ubi mtd-ubi-tar mmc-ext4-tar"
+
+# Flash characteristics in KB unless otherwise noted
+DISTROOVERRIDES .= ":flash-${FLASH_SIZE}"
+FLASH_SIZE ?= "32768"
+FLASH_PEB_SIZE ?= "64"
+# Flash page and overhead sizes in bytes
+FLASH_PAGE_SIZE ?= "1"
+FLASH_NOR_UBI_OVERHEAD ?= "64"
+
+# Fixed partition offsets
+FLASH_UBOOT_SPL_SIZE ?= "64"
+FLASH_UBOOT_OFFSET ?= "0"
+FLASH_KERNEL_OFFSET ?= "512"
+FLASH_KERNEL_OFFSET:flash-65536 ?= "1024"
+FLASH_KERNEL_OFFSET:flash-131072 ?= "1024"
+FLASH_UBI_OFFSET ?= "${FLASH_KERNEL_OFFSET}"
+FLASH_ROFS_OFFSET ?= "4864"
+FLASH_ROFS_OFFSET:flash-65536 ?= "10240"
+FLASH_ROFS_OFFSET:flash-131072 ?= "10240"
+FLASH_RWFS_OFFSET ?= "28672"
+FLASH_RWFS_OFFSET:flash-65536 ?= "43008"
+FLASH_RWFS_OFFSET:flash-131072 ?= "98304"
+
+# UBI volume sizes in KB unless otherwise noted.
+FLASH_UBI_RWFS_SIZE ?= "6144"
+FLASH_UBI_RWFS_SIZE:flash-131072 ?= "32768"
+FLASH_UBI_RWFS_TXT_SIZE ?= "6MiB"
+FLASH_UBI_RWFS_TXT_SIZE:flash-131072 ?= "32MiB"
+
+# eMMC sizes in KB unless otherwise noted.
+MMC_UBOOT_SIZE ?= "1024"
+MMC_BOOT_PARTITION_SIZE ?= "65536"
+
+SIGNING_KEY ?= "${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv"
+INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}"
+SIGNING_KEY_DEPENDS = "${@oe.utils.conditional('INSECURE_KEY', 'True', 'phosphor-insecure-signing-key-native:do_populate_sysroot', '', d)}"
+
+VERSION_PURPOSE ?= "xyz.openbmc_project.Software.Version.VersionPurpose.BMC"
+
+UBOOT_SUFFIX ?= "bin"
+
+python() {
+ # Compute rwfs LEB count and LEB size.
+ page_size = d.getVar('FLASH_PAGE_SIZE', True)
+ nor_overhead_size = d.getVar('FLASH_NOR_UBI_OVERHEAD', True)
+ overhead_size = max(int(page_size), int(nor_overhead_size))
+ peb_size = d.getVar('FLASH_PEB_SIZE', True)
+ leb_size = (int(peb_size) * 1024) - (2 * overhead_size)
+ d.setVar('FLASH_LEB_SIZE', str(leb_size)) # In bytes
+
+ rwfs_size = d.getVar('FLASH_UBI_RWFS_SIZE', True)
+ rwfs_size = int(rwfs_size) * 1024
+ lebs = int((rwfs_size + leb_size - 1) / leb_size) # Rounding up
+ d.setVar('FLASH_UBI_RWFS_LEBS', str(lebs))
+}
+
+# Allow rwfs mkfs configuration through OVERLAY_MKFS_OPTS and OVERRIDES. However,
+# avoid setting 'ext4' or 'jffs2' in OVERRIDES as such raw filesystem types are
+# reserved for the primary image (and setting them currently breaks the build).
+# Instead, prefix the overlay override value with 'rwfs-' to avoid collisions.
+DISTROOVERRIDES .= ":static-rwfs-${OVERLAY_BASETYPE}"
+DISTROOVERRIDES .= ":ubi-rwfs-${FLASH_UBI_OVERLAY_BASETYPE}"
+DISTROOVERRIDES .= ":mmc-rwfs-${FLASH_EXT4_OVERLAY_BASETYPE}"
+
+JFFS2_RWFS_CMD = "mkfs.jffs2 --root=jffs2 --faketime --output=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.jffs2"
+UBIFS_RWFS_CMD = "mkfs.ubifs -r ubifs -c ${FLASH_UBI_RWFS_LEBS} -m ${FLASH_PAGE_SIZE} -e ${FLASH_LEB_SIZE} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ubifs"
+EXT4_RWFS_CMD = "mkfs.ext4 -F ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.ext4"
+
+FLASH_STATIC_RWFS_CMD:static-rwfs-jffs2 = "${JFFS2_RWFS_CMD}"
+FLASH_UBI_RWFS_CMD:ubi-rwfs-jffs2 = "${JFFS2_RWFS_CMD}"
+FLASH_UBI_RWFS_CMD:ubi-rwfs-ubifs = "${UBIFS_RWFS_CMD}"
+FLASH_EXT4_RWFS_CMD:mmc-rwfs-ext4 = "${EXT4_RWFS_CMD}"
+
+mk_empty_image() {
+ image_dst="$1"
+ image_size_kb=$2
+ dd if=/dev/zero bs=1k count=$image_size_kb \
+ | tr '\000' '\377' > $image_dst
+}
+
+mk_empty_image_zeros() {
+ image_dst="$1"
+ image_size_kb=$2
+ dd if=/dev/zero of=$image_dst bs=1k count=$image_size_kb
+}
+
+clean_rwfs() {
+ type=$1
+ shift
+
+ rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type
+ rm -rf $type
+ mkdir $type
+}
+
+make_rwfs() {
+ type=$1
+ cmd=$2
+ shift
+ shift
+ opts="$@"
+
+ mkdir -p $type
+
+ $cmd $opts
+}
+
+do_generate_rwfs_static() {
+ clean_rwfs ${OVERLAY_BASETYPE}
+ make_rwfs ${OVERLAY_BASETYPE} "${FLASH_STATIC_RWFS_CMD}" ${OVERLAY_MKFS_OPTS}
+}
+do_generate_rwfs_static[dirs] = " ${S}/static"
+do_generate_rwfs_static[depends] += " \
+ mtd-utils-native:do_populate_sysroot \
+ "
+
+do_generate_rwfs_ubi() {
+ clean_rwfs ${FLASH_UBI_OVERLAY_BASETYPE}
+ make_rwfs ${FLASH_UBI_OVERLAY_BASETYPE} "${FLASH_UBI_RWFS_CMD}"
+}
+do_generate_rwfs_ubi[dirs] = " ${S}/ubi"
+do_generate_rwfs_ubi[depends] += " \
+ mtd-utils-native:do_populate_sysroot \
+ "
+
+do_generate_rwfs_ext4() {
+ clean_rwfs rwfs.${FLASH_EXT4_OVERLAY_BASETYPE}
+ mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.ext4 1024
+ make_rwfs ${FLASH_EXT4_OVERLAY_BASETYPE} "${FLASH_EXT4_RWFS_CMD}" ${OVERLAY_MKFS_OPTS}
+}
+do_generate_rwfs_ext4[dirs] = " ${S}/ext4"
+do_generate_rwfs_ext4[depends] += " \
+ e2fsprogs-native:do_populate_sysroot \
+ "
+
+add_volume() {
+ config_file=$1
+ vol_id=$2
+ vol_type=$3
+ vol_name=$4
+ image=$5
+ vol_size=$6
+
+ echo \[$vol_name\] >> $config_file
+ echo mode=ubi >> $config_file
+ echo image=$image >> $config_file
+ echo vol_type=$vol_type >> $config_file
+ echo vol_name=$vol_name >> $config_file
+ echo vol_id=$vol_id >> $config_file
+ if [ ! -z $vol_size ]; then
+ echo vol_size=$vol_size >> $config_file
+ fi
+}
+
+python do_generate_ubi() {
+ version_id = do_get_versionID(d)
+ d.setVar('VERSION_ID', version_id)
+ bb.build.exec_func("do_make_ubi", d)
+}
+do_generate_ubi[dirs] = "${S}/ubi"
+do_generate_ubi[depends] += " \
+ ${PN}:do_image_${@d.getVar('FLASH_UBI_BASETYPE', True).replace('-', '_')} \
+ virtual/kernel:do_deploy \
+ u-boot:do_deploy \
+ mtd-utils-native:do_populate_sysroot \
+ "
+
+do_make_ubi() {
+ cfg=ubinize-${IMAGE_NAME}.cfg
+ rm -f $cfg ubi-img
+ # Construct the ubinize config file
+ add_volume $cfg 0 static kernel-${VERSION_ID} \
+ ${DEPLOY_DIR_IMAGE}/${FLASH_KERNEL_IMAGE}
+
+ add_volume $cfg 1 static rofs-${VERSION_ID} \
+ ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_UBI_BASETYPE}
+
+ add_volume $cfg 2 dynamic rwfs ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_RWFS_TXT_SIZE}
+
+ # Build the ubi partition image
+ ubinize -p ${FLASH_PEB_SIZE}KiB -m ${FLASH_PAGE_SIZE} -o ubi-img $cfg
+
+ # Concatenate the uboot and ubi partitions
+ mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd ${FLASH_SIZE}
+ dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \
+ if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \
+ of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd
+ dd bs=1k conv=notrunc seek=${FLASH_UBI_OFFSET} \
+ if=ubi-img \
+ of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd
+
+ cd ${IMGDEPLOYDIR}
+ ln -sf ${IMAGE_NAME}.ubi.mtd ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ubi.mtd
+}
+do_make_ubi[dirs] = "${S}/ubi"
+do_make_ubi[depends] += " \
+ ${PN}:do_image_${@d.getVar('FLASH_UBI_BASETYPE', True).replace('-', '_')} \
+ virtual/kernel:do_deploy \
+ u-boot:do_deploy \
+ mtd-utils-native:do_populate_sysroot \
+ "
+
+do_mk_static_nor_image() {
+ # Assemble the flash image
+ mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_NAME}.static.mtd ${FLASH_SIZE}
+}
+
+do_generate_image_uboot_file() {
+ image_dst="$1"
+ uboot_offset=${FLASH_UBOOT_OFFSET}
+
+ if [ ! -z ${SPL_BINARY} ]; then
+ dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \
+ if=${DEPLOY_DIR_IMAGE}/u-boot-spl.${UBOOT_SUFFIX} \
+ of=${image_dst}
+ uboot_offset=${FLASH_UBOOT_SPL_SIZE}
+ fi
+
+ dd bs=1k conv=notrunc seek=${uboot_offset} \
+ if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \
+ of=${image_dst}
+}
+
+python do_generate_static() {
+ import subprocess
+
+ bb.build.exec_func("do_mk_static_nor_image", d)
+
+ nor_image = os.path.join(d.getVar('IMGDEPLOYDIR', True),
+ '%s.static.mtd' % d.getVar('IMAGE_NAME', True))
+
+ def _append_image(imgpath, start_kb, finish_kb):
+ imgsize = os.path.getsize(imgpath)
+ maxsize = (finish_kb - start_kb) * 1024
+ bb.debug(1, 'Considering file size=' + str(imgsize) + ' name=' + imgpath)
+ bb.debug(1, 'Spanning start=' + str(start_kb) + 'K end=' + str(finish_kb) + 'K')
+ bb.debug(1, 'Compare needed=' + str(imgsize) + ' available=' + str(maxsize) + ' margin=' + str(maxsize - imgsize))
+ if imgsize > maxsize:
+ bb.fatal("Image '%s' is too large!" % imgpath)
+
+ subprocess.check_call(['dd', 'bs=1k', 'conv=notrunc',
+ 'seek=%d' % start_kb,
+ 'if=%s' % imgpath,
+ 'of=%s' % nor_image])
+
+ uboot_offset = int(d.getVar('FLASH_UBOOT_OFFSET', True))
+
+ spl_binary = d.getVar('SPL_BINARY', True)
+ if spl_binary:
+ _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),
+ 'u-boot-spl.%s' % d.getVar('UBOOT_SUFFIX',True)),
+ int(d.getVar('FLASH_UBOOT_OFFSET', True)),
+ int(d.getVar('FLASH_UBOOT_SPL_SIZE', True)))
+ uboot_offset += int(d.getVar('FLASH_UBOOT_SPL_SIZE', True))
+
+ _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),
+ 'u-boot.%s' % d.getVar('UBOOT_SUFFIX',True)),
+ uboot_offset,
+ int(d.getVar('FLASH_KERNEL_OFFSET', True)))
+
+ _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),
+ d.getVar('FLASH_KERNEL_IMAGE', True)),
+ int(d.getVar('FLASH_KERNEL_OFFSET', True)),
+ int(d.getVar('FLASH_ROFS_OFFSET', True)))
+
+ _append_image(os.path.join(d.getVar('IMGDEPLOYDIR', True),
+ '%s.%s' % (
+ d.getVar('IMAGE_LINK_NAME', True),
+ d.getVar('IMAGE_BASETYPE', True))),
+ int(d.getVar('FLASH_ROFS_OFFSET', True)),
+ int(d.getVar('FLASH_RWFS_OFFSET', True)))
+
+ _append_image(os.path.join(d.getVar('IMGDEPLOYDIR', True),
+ '%s.%s' % (
+ d.getVar('IMAGE_LINK_NAME', True),
+ d.getVar('OVERLAY_BASETYPE', True))),
+ int(d.getVar('FLASH_RWFS_OFFSET', True)),
+ int(d.getVar('FLASH_SIZE', True)))
+
+ bb.build.exec_func("do_mk_static_symlinks", d)
+}
+
+do_mk_static_symlinks() {
+ cd ${IMGDEPLOYDIR}
+ ln -sf ${IMAGE_NAME}.static.mtd ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.static.mtd
+
+ # Maintain non-standard legacy links
+ do_generate_image_uboot_file ${IMGDEPLOYDIR}/image-u-boot
+ ln -sf ${IMAGE_NAME}.static.mtd ${IMGDEPLOYDIR}/flash-${MACHINE}
+ ln -sf ${IMAGE_NAME}.static.mtd ${IMGDEPLOYDIR}/image-bmc
+ ln -sf ${FLASH_KERNEL_IMAGE} ${IMGDEPLOYDIR}/image-kernel
+ ln -sf ${IMAGE_LINK_NAME}.${IMAGE_BASETYPE} ${IMGDEPLOYDIR}/image-rofs
+ ln -sf ${IMAGE_LINK_NAME}.${OVERLAY_BASETYPE} ${IMGDEPLOYDIR}/image-rwfs
+}
+do_generate_static[dirs] = "${S}/static"
+do_generate_static[depends] += " \
+ ${PN}:do_image_${@d.getVar('IMAGE_BASETYPE', True).replace('-', '_')} \
+ virtual/kernel:do_deploy \
+ u-boot:do_deploy \
+ "
+
+make_signatures() {
+ signature_files=""
+ for file in "$@"; do
+ openssl dgst -sha256 -sign ${SIGNING_KEY} -out "${file}.sig" $file
+ signature_files="${signature_files} ${file}.sig"
+ done
+
+ if [ -n "$signature_files" ]; then
+ sort_signature_files=`echo "$signature_files" | tr ' ' '\n' | sort | tr '\n' ' '`
+ cat $sort_signature_files > image-full
+ openssl dgst -sha256 -sign ${SIGNING_KEY} -out image-full.sig image-full
+ signature_files="${signature_files} image-full.sig"
+ fi
+}
+
+do_generate_static_alltar() {
+ ln -sf ${S}/MANIFEST MANIFEST
+ ln -sf ${S}/publickey publickey
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.static.mtd image-bmc
+
+ make_signatures image-bmc MANIFEST publickey
+
+ tar -h -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}.static.mtd.all.tar \
+ image-bmc MANIFEST publickey ${signature_files}
+
+ cd ${IMGDEPLOYDIR}
+
+ ln -sf ${IMAGE_NAME}.static.mtd.all.tar \
+ ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.static.mtd.all.tar
+
+ # Maintain non-standard legacy link.
+ ln -sf ${IMAGE_NAME}.static.mtd.all.tar \
+ ${IMGDEPLOYDIR}/${MACHINE}-${DATETIME}.all.tar
+
+}
+do_generate_static_alltar[vardepsexclude] = "DATETIME"
+do_generate_static_alltar[dirs] = "${S}/static"
+do_generate_static_alltar[depends] += " \
+ openssl-native:do_populate_sysroot \
+ ${SIGNING_KEY_DEPENDS} \
+ ${PN}:do_copy_signing_pubkey \
+ "
+
+make_image_links() {
+ rwfs=$1
+ rofs=$2
+ shift
+ shift
+
+ # Create some links to help make the tar archive in the format
+ # expected by phosphor-bmc-code-mgmt.
+ do_generate_image_uboot_file image-u-boot
+ ln -sf ${DEPLOY_DIR_IMAGE}/${FLASH_KERNEL_IMAGE} image-kernel
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$rofs image-rofs
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$rwfs image-rwfs
+}
+
+make_tar_of_images() {
+ type=$1
+ shift
+ extra_files="$@"
+
+ # Create the tar archive
+ tar -h -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type.tar \
+ image-u-boot image-kernel image-rofs image-rwfs $extra_files
+
+ cd ${IMGDEPLOYDIR}
+ ln -sf ${IMAGE_NAME}.$type.tar ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type.tar
+}
+
+do_generate_static_tar() {
+ ln -sf ${S}/MANIFEST MANIFEST
+ ln -sf ${S}/publickey publickey
+ make_image_links ${OVERLAY_BASETYPE} ${IMAGE_BASETYPE}
+ make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey
+ make_tar_of_images static.mtd MANIFEST publickey ${signature_files}
+
+ # Maintain non-standard legacy link.
+ cd ${IMGDEPLOYDIR}
+ ln -sf ${IMAGE_NAME}.static.mtd.tar ${IMGDEPLOYDIR}/${MACHINE}-${DATETIME}.tar
+}
+do_generate_static_tar[dirs] = " ${S}/static"
+do_generate_static_tar[depends] += " \
+ ${PN}:do_image_${@d.getVar('IMAGE_BASETYPE', True).replace('-', '_')} \
+ virtual/kernel:do_deploy \
+ u-boot:do_deploy \
+ openssl-native:do_populate_sysroot \
+ ${SIGNING_KEY_DEPENDS} \
+ ${PN}:do_copy_signing_pubkey \
+ "
+do_generate_static_tar[vardepsexclude] = "DATETIME"
+
+do_generate_ubi_tar() {
+ ln -sf ${S}/MANIFEST MANIFEST
+ ln -sf ${S}/publickey publickey
+ make_image_links ${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_BASETYPE}
+ make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey
+ make_tar_of_images ubi.mtd MANIFEST publickey ${signature_files}
+}
+do_generate_ubi_tar[dirs] = " ${S}/ubi"
+do_generate_ubi_tar[depends] += " \
+ ${PN}:do_image_${@d.getVar('FLASH_UBI_BASETYPE', True).replace('-', '_')} \
+ virtual/kernel:do_deploy \
+ u-boot:do_deploy \
+ openssl-native:do_populate_sysroot \
+ ${SIGNING_KEY_DEPENDS} \
+ ${PN}:do_copy_signing_pubkey \
+ "
+
+do_generate_ext4_tar() {
+ # Generate the U-Boot image
+ mk_empty_image_zeros image-u-boot ${MMC_UBOOT_SIZE}
+ do_generate_image_uboot_file image-u-boot
+
+ # Generate a compressed ext4 filesystem with the fitImage file in it to be
+ # flashed to the boot partition of the eMMC
+ install -d boot-image
+ install -m 644 ${DEPLOY_DIR_IMAGE}/${FLASH_KERNEL_IMAGE} boot-image/fitImage
+ mk_empty_image_zeros boot-image.${FLASH_EXT4_BASETYPE} ${MMC_BOOT_PARTITION_SIZE}
+ mkfs.ext4 -F -i 4096 -d boot-image boot-image.${FLASH_EXT4_BASETYPE}
+ # Error codes 0-3 indicate successfull operation of fsck
+ fsck.ext4 -pvfD boot-image.${FLASH_EXT4_BASETYPE} || [ $? -le 3 ]
+ zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} boot-image.${FLASH_EXT4_BASETYPE} > boot-image.${FLASH_EXT4_BASETYPE}.zst
+
+ # Generate the compressed ext4 rootfs
+ zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_EXT4_BASETYPE} > ${IMAGE_LINK_NAME}.${FLASH_EXT4_BASETYPE}.zst
+
+ ln -sf boot-image.${FLASH_EXT4_BASETYPE}.zst image-kernel
+ ln -sf ${IMAGE_LINK_NAME}.${FLASH_EXT4_BASETYPE}.zst image-rofs
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.${FLASH_EXT4_OVERLAY_BASETYPE} image-rwfs
+ ln -sf ${S}/MANIFEST MANIFEST
+ ln -sf ${S}/publickey publickey
+
+ hostfw_update_file="${DEPLOY_DIR_IMAGE}/hostfw/update/image-hostfw"
+ if [ -e "${hostfw_update_file}" ]; then
+ ln -sf "${hostfw_update_file}" image-hostfw
+ make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey image-hostfw
+ make_tar_of_images ext4.mmc MANIFEST publickey ${signature_files} image-hostfw
+ else
+ make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey
+ make_tar_of_images ext4.mmc MANIFEST publickey ${signature_files}
+ fi
+}
+do_generate_ext4_tar[dirs] = " ${S}/ext4"
+do_generate_ext4_tar[depends] += " \
+ zstd-native:do_populate_sysroot \
+ ${PN}:do_image_${FLASH_EXT4_BASETYPE} \
+ virtual/kernel:do_deploy \
+ u-boot:do_deploy \
+ openssl-native:do_populate_sysroot \
+ ${SIGNING_KEY_DEPENDS} \
+ ${PN}:do_copy_signing_pubkey \
+ phosphor-hostfw-image:do_deploy \
+ "
+
+def get_pubkey_basedir(d):
+ return os.path.join(
+ d.getVar('STAGING_DIR_TARGET', True),
+ d.getVar('sysconfdir', True).strip(os.sep),
+ 'activationdata')
+
+def get_pubkey_type(d):
+ return os.listdir(get_pubkey_basedir(d))[0]
+
+def get_pubkey_path(d):
+ return os.path.join(
+ get_pubkey_basedir(d),
+ get_pubkey_type(d),
+ 'publickey')
+
+python do_generate_phosphor_manifest() {
+ purpose = d.getVar('VERSION_PURPOSE', True)
+ version = do_get_version(d)
+ build_id = do_get_buildID(d)
+ target_machine = d.getVar('MACHINE', True)
+ extended_version = d.getVar('EXTENDED_VERSION', True)
+ compatible_names = d.getVar('OBMC_COMPATIBLE_NAMES', True)
+ with open('MANIFEST', 'w') as fd:
+ fd.write('purpose={}\n'.format(purpose))
+ fd.write('version={}\n'.format(version.strip('"')))
+ fd.write('BuildId={}\n'.format(build_id.strip('"')))
+ if extended_version:
+ fd.write('ExtendedVersion={}\n'.format(extended_version))
+ if compatible_names:
+ for name in compatible_names.split():
+ fd.write('CompatibleName={}\n'.format(name))
+ fd.write('KeyType={}\n'.format(get_pubkey_type(d)))
+ fd.write('HashType=RSA-SHA256\n')
+ fd.write('MachineName={}\n'.format(target_machine))
+}
+do_generate_phosphor_manifest[dirs] = "${S}"
+do_generate_phosphor_manifest[depends] += " \
+ os-release:do_populate_sysroot \
+ phosphor-image-signing:do_populate_sysroot \
+ "
+
+python do_copy_signing_pubkey() {
+ with open(get_pubkey_path(d), 'r') as read_fd:
+ with open('publickey', 'w') as write_fd:
+ write_fd.write(read_fd.read())
+}
+
+do_copy_signing_pubkey[dirs] = "${S}"
+do_copy_signing_pubkey[depends] += " \
+ phosphor-image-signing:do_populate_sysroot \
+ "
+
+addtask copy_signing_pubkey after do_rootfs
+addtask generate_phosphor_manifest after do_rootfs
+addtask generate_rwfs_static after do_rootfs
+addtask generate_rwfs_ubi after do_rootfs
+addtask generate_rwfs_ext4 after do_rootfs
+
+python() {
+ types = d.getVar('IMAGE_FSTYPES', True).split()
+
+ if any([x in types for x in ['mtd-static', 'mtd-static-alltar']]):
+ bb.build.addtask(
+ 'do_generate_static',
+ 'do_image_complete',
+ 'do_generate_rwfs_static', d)
+ if 'mtd-static-alltar' in types:
+ bb.build.addtask(
+ 'do_generate_static_alltar',
+ 'do_image_complete',
+ 'do_generate_static do_generate_phosphor_manifest', d)
+ if 'mtd-static-tar' in types:
+ bb.build.addtask(
+ 'do_generate_static_tar',
+ 'do_image_complete',
+ 'do_generate_rwfs_static do_generate_phosphor_manifest', d)
+
+ if 'mtd-ubi' in types:
+ bb.build.addtask(
+ 'do_generate_ubi',
+ 'do_image_complete',
+ 'do_generate_rwfs_ubi', d)
+ if 'mtd-ubi-tar' in types:
+ bb.build.addtask(
+ 'do_generate_ubi_tar',
+ 'do_image_complete',
+ 'do_generate_rwfs_ubi do_generate_phosphor_manifest', d)
+
+ if 'mmc-ext4-tar' in types:
+ bb.build.addtask(
+ 'do_generate_ext4_tar',
+ 'do_image_complete',
+ 'do_generate_rwfs_ext4 do_generate_phosphor_manifest', d)
+}
diff --git a/classes/image_types_phosphor_nuvoton.bbclass b/classes/image_types_phosphor_nuvoton.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..8fefd827e0e2a7576f2185049ca13ac0280db949
--- /dev/null
+++ b/classes/image_types_phosphor_nuvoton.bbclass
@@ -0,0 +1,50 @@
+UBOOT_BINARY := "u-boot.${UBOOT_SUFFIX}"
+BOOTBLOCK = "Poleg_bootblock.bin"
+FULL_SUFFIX = "full"
+MERGED_SUFFIX = "merged"
+UBOOT_SUFFIX:append = ".${MERGED_SUFFIX}"
+
+IGPS_DIR = "${STAGING_DIR_NATIVE}/${datadir}/npcm7xx-igps"
+
+# Prepare the Bootblock and U-Boot images using npcm7xx-bingo
+do_prepare_bootloaders() {
+ local olddir="$(pwd)"
+ cd ${DEPLOY_DIR_IMAGE}
+ bingo ${IGPS_DIR}/BootBlockAndHeader_${IGPS_MACHINE}.xml \
+ -o ${DEPLOY_DIR_IMAGE}/${BOOTBLOCK}.${FULL_SUFFIX}
+
+ bingo ${IGPS_DIR}/UbootHeader_${IGPS_MACHINE}.xml \
+ -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${FULL_SUFFIX}
+
+ bingo ${IGPS_DIR}/mergedBootBlockAndUboot.xml \
+ -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${MERGED_SUFFIX}
+ cd "$olddir"
+}
+
+do_prepare_bootloaders[depends] += " \
+ u-boot:do_deploy \
+ npcm7xx-bootblock:do_deploy \
+ npcm7xx-bingo-native:do_populate_sysroot \
+ npcm7xx-igps-native:do_populate_sysroot \
+ "
+
+addtask do_prepare_bootloaders before do_generate_static after do_generate_rwfs_static
+
+# Include the full bootblock and u-boot in the final static image
+python do_generate_static:append() {
+ _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True),
+ 'u-boot.%s' % d.getVar('UBOOT_SUFFIX',True)),
+ int(d.getVar('FLASH_UBOOT_OFFSET', True)),
+ int(d.getVar('FLASH_KERNEL_OFFSET', True)))
+}
+
+do_make_ubi:append() {
+ # Concatenate the uboot and ubi partitions
+ dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \
+ if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \
+ of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd
+}
+
+do_make_ubi[depends] += "${PN}:do_prepare_bootloaders"
+do_generate_ubi_tar[depends] += "${PN}:do_prepare_bootloaders"
+do_generate_static_tar[depends] += "${PN}:do_prepare_bootloaders"
diff --git a/classes/image_version.bbclass b/classes/image_version.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..17f324e2e44cd5a4daf16cc89b77739e902c7cd0
--- /dev/null
+++ b/classes/image_version.bbclass
@@ -0,0 +1,46 @@
+# Base image version class extension
+
+DEPENDS:append = " os-release"
+
+def do_get_version(d):
+ import configparser
+ import io
+ path = d.getVar('STAGING_DIR_TARGET', True) + d.getVar('sysconfdir', True)
+ path = os.path.join(path, 'os-release')
+ parser = configparser.ConfigParser(strict=False)
+ parser.optionxform = str
+ version = ''
+ try:
+ with open(path, 'r') as fd:
+ buf = '[root]\n' + fd.read()
+ fd = io.StringIO(buf)
+ parser.readfp(fd)
+ version = parser['root']['VERSION_ID']
+ except:
+ pass
+ return version
+
+def do_get_versionID(d):
+ import hashlib
+ version = do_get_version(d)
+ version = version.strip('"')
+ version_id = (hashlib.sha512(version.encode('utf-8')).hexdigest())[:8]
+ return version_id
+
+def do_get_buildID(d):
+ import configparser
+ import io
+ path = d.getVar('STAGING_DIR_TARGET', True) + d.getVar('sysconfdir', True)
+ path = os.path.join(path, 'os-release')
+ parser = configparser.ConfigParser(strict=False)
+ parser.optionxform = str
+ build_id = ''
+ try:
+ with open(path, 'r') as fd:
+ buf = '[root]\n' + fd.read()
+ fd = io.StringIO(buf)
+ parser.readfp(fd)
+ build_id = parser['root']['BUILD_ID']
+ except:
+ pass
+ return build_id
diff --git a/classes/license_static.bbclass b/classes/license_static.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..dd7301758608695f336afa5016d31d8be235d021
--- /dev/null
+++ b/classes/license_static.bbclass
@@ -0,0 +1,64 @@
+####
+# Copyright 2021 Intel Corporation
+#
+# Add a class to support serving license info through bmcweb.
+#
+# bmcweb serves static content from the /usr/share/www folder, so this class
+# copies the license info from /usr/share/common-licenses to
+# /usr/share/www/common-licenses so it will be statically served by bmcweb.
+#
+# Requires 'COPY_LIC_DIRS' to be enabled to create /usr/share/common-licenses.
+#
+# Class can be inherited in a project bbclass to copy the license info.
+#
+# Example:
+# inherit license_static
+####
+
+STATIC_LICENSE_DIR = "${IMAGE_ROOTFS}/usr/share/www/common-licenses"
+
+
+def add_index_html_header(f):
+ f.write("")
+ f.write("")
+ f.write("
")
+ f.write("")
+
+
+def add_index_html_footer(f):
+ f.write("
")
+ f.write("")
+ f.write("")
+
+
+def create_index_files(d):
+ import os
+
+ static_license_dir = d.getVar('STATIC_LICENSE_DIR')
+ for dirpath, dirnames, filenames in os.walk(static_license_dir):
+ with open(os.path.join(dirpath, "index.html"), "w") as f:
+ add_index_html_header(f)
+ full_list = filenames+dirnames
+ full_list.sort()
+ f.write("
".join(full_list))
+ add_index_html_footer(f)
+
+
+def copy_license_files(d):
+ import shutil
+
+ rootfs_license_dir = d.getVar('ROOTFS_LICENSE_DIR')
+ static_license_dir = d.getVar('STATIC_LICENSE_DIR')
+ shutil.copytree(rootfs_license_dir, static_license_dir)
+
+
+python do_populate_static_lic() {
+ copy_lic_dirs = d.getVar('COPY_LIC_DIRS')
+ if copy_lic_dirs == "1":
+ copy_license_files(d)
+ create_index_files(d)
+ else:
+ bb.warn("Static licenses not copied because 'COPY_LIC_DIRS' is disabled.")
+}
+
+ROOTFS_POSTPROCESS_COMMAND:append = "do_populate_static_lic; "
diff --git a/classes/mrw-rev.bbclass b/classes/mrw-rev.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..5a5b33c13e8ed22f365fd19d6ecc0dbae443b1d8
--- /dev/null
+++ b/classes/mrw-rev.bbclass
@@ -0,0 +1,5 @@
+MRW_API_SRC_URI ?= "git://github.com/open-power/serverwiz.git;branch=master;protocol=https"
+MRW_API_SRCREV ?= "60c8e10cbb11768cd1ba394b35cb1d6627efec42"
+
+MRW_TOOLS_SRC_URI ?= "git://github.com/openbmc/phosphor-mrw-tools;branch=master;protocol=https"
+MRW_TOOLS_SRCREV ?= "721dcbd23da4f9679ddf58119c478922bf420a1e"
diff --git a/classes/mrw-xml.bbclass b/classes/mrw-xml.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..8876de706db2fb1c43370e2b37054c5fa2bf0d02
--- /dev/null
+++ b/classes/mrw-xml.bbclass
@@ -0,0 +1,4 @@
+MRW_XML ??= "${MACHINE}.xml"
+mrw_datadir = "${datadir}/obmc-mrw"
+SKIP_BROKEN_MRW ?= "0"
+EXTRA_MRW_SCRIPT_ARGS = "${@bb.utils.contains("SKIP_BROKEN_MRW", "0", "", "--skip-broken-mrw", d)}"
diff --git a/classes/obmc-phosphor-dbus-service.bbclass b/classes/obmc-phosphor-dbus-service.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..b60c9b84c2ce840628ee95ecf714461c531010e2
--- /dev/null
+++ b/classes/obmc-phosphor-dbus-service.bbclass
@@ -0,0 +1,177 @@
+# Utilities and shortcuts for recipes providing D-Bus services.
+# Variables:
+# DBUS_PACKAGES ?= "${PN}"
+# The list of packages to which files should be added.
+#
+# DBUS_SERVICE:${PN} += "org.openbmc.Foo.service"
+# A list of dbus service names. The class will look for a
+# dbus configuration file with the same base name with .conf
+# appended. If one is found, it is added to the package
+# and used verbatim. If it is not found, a default one
+# (with very open permissions) is generated and used.
+#
+# Additionally the class will instantiate obmc-phosphor-systemd
+# with any SYSTEMD_SERVICE:%s variables translated appropriately.
+#
+# If a service begins with 'dbus-' DBus activation will be
+# configured. The class will look for an activation file
+# with the 'dbus-' prefix removed. If found, it is added to
+# the package and used verbatim. If it is not found, a default
+# one is generated and used.
+
+
+inherit dbus-dir
+inherit obmc-phosphor-utils
+
+RDEPENDS:${PN}:append:class-target = " dbus-perms"
+DBUS_PACKAGES ?= "${PN}"
+
+_INSTALL_DBUS_CONFIGS=""
+_DEFAULT_DBUS_CONFIGS=""
+_INSTALL_DBUS_ACTIVATIONS=""
+_DEFAULT_DBUS_ACTIVATIONS=""
+
+
+python dbus_do_postinst() {
+ def make_default_dbus_config(d, unit, user):
+ bus = unit.base
+ if unit.is_template:
+ bus = '%s*' % bus
+
+ path = d.getVar('D', True)
+ path += d.getVar('dbus_system_confdir', True)
+ with open('%s/%s.conf' % (path, unit.base), 'w+') as fd:
+ fd.write('\n')
+ fd.write('\n')
+ fd.write(' \n' % user)
+ fd.write(' \n' % bus)
+ fd.write(' \n' % bus)
+ fd.write(' \n')
+ fd.write('\n')
+ fd.close()
+
+
+ def make_default_dbus_activation(d, unit, user):
+ dest = unit.base
+ sd_unit = unit.name
+ if unit.is_instance:
+ dest = '%s.%s' % (unit.base, unit.instance)
+ sd_unit = '%s@%s' % (unit.base, unit.instance)
+
+ path = d.getVar('D', True)
+ path += d.getVar('dbus_system_servicesdir', True)
+ with open('%s/%s.service' % (path, dest), 'w+') as fd:
+ fd.write('[D-BUS Service]\n')
+ fd.write('Name=%s\n' % dest)
+ fd.write('Exec=/bin/false\n')
+ fd.write('User=%s\n' % user)
+ fd.write('SystemdService=dbus-%s.service\n' % sd_unit)
+ fd.close()
+
+
+ for service_user in listvar_to_list(d, '_DEFAULT_DBUS_CONFIGS'):
+ service, user = service_user.split(':')
+ make_default_dbus_config(d, SystemdUnit(service), user)
+ for service_user in listvar_to_list(d, '_DEFAULT_DBUS_ACTIVATIONS'):
+ service, user = service_user.split(':')
+ make_default_dbus_activation(d, SystemdUnit(service), user)
+}
+
+
+python() {
+ searchpaths = d.getVar('FILESPATH', True)
+
+ def get_user(d, service, pkg):
+ user = d.getVar(
+ 'SYSTEMD_USER_%s' % service, True)
+ if user is None:
+ user = d.getVar(
+ 'SYSTEMD_USER_%s' % pkg, True) or 'root'
+ return user
+
+
+ def add_dbus_config(d, unit, pkg):
+ path = bb.utils.which(searchpaths, '%s.conf' % unit.base)
+ if not os.path.isfile(path):
+ user = get_user(d, unit.name, pkg)
+ set_doappend(d, '_DEFAULT_DBUS_CONFIGS', '%s:%s' % (
+ unit.name, user))
+ else:
+ set_doappend(d, 'SRC_URI', 'file://%s.conf' % unit.base)
+ set_doappend(d, '_INSTALL_DBUS_CONFIGS', '%s.conf' % unit.base)
+ set_doappend(d, 'FILES:%s' % pkg, '%s%s.conf' \
+ % (d.getVar('dbus_system_confdir', True), unit.base))
+
+
+ def add_dbus_activation(d, unit, pkg):
+ if not unit.is_activated or unit.is_template:
+ return
+ search_match = '%s.service' % unit.base
+ if unit.is_instance:
+ search_match = '%s.%s.service' % (unit.base, unit.instance)
+
+ path = bb.utils.which(searchpaths, search_match)
+
+ if not os.path.isfile(path):
+ user = get_user(d, unit.base, pkg)
+ set_doappend(d, '_DEFAULT_DBUS_ACTIVATIONS', '%s:%s' % (
+ unit.name, user))
+ else:
+ set_doappend(d, 'SRC_URI', 'file://%s' % search_match)
+ set_doappend(d, '_INSTALL_DBUS_ACTIVATIONS', search_match)
+ set_doappend(d, 'FILES:%s' % pkg, '%s%s' \
+ % (d.getVar('dbus_system_servicesdir', True), search_match))
+
+
+ if d.getVar('CLASSOVERRIDE', True) != 'class-target':
+ return
+
+ d.appendVarFlag('do_install', 'postfuncs', ' dbus_do_postinst')
+
+ for pkg in listvar_to_list(d, 'DBUS_PACKAGES'):
+ if pkg not in (d.getVar('SYSTEMD_PACKAGES', True) or ''):
+ set_doappend(d, 'SYSTEMD_PACKAGES', pkg)
+
+ svc = listvar_to_list(d, 'DBUS_SERVICE:%s' % pkg)
+ svc = [SystemdUnit(x) for x in svc]
+ inst = [x for x in svc if x.is_instance]
+ tmpl = [x.template for x in svc if x.is_instance]
+ tmpl = list(set(tmpl))
+ tmpl = [SystemdUnit(x) for x in tmpl]
+ svc = [x for x in svc if not x.is_instance]
+
+ for unit in inst:
+ set_doappend(
+ d, 'SYSTEMD_SERVICE:%s' % pkg, unit.name)
+
+ for unit in tmpl + svc:
+ add_dbus_config(d, unit, pkg)
+ add_dbus_activation(d, unit, pkg)
+ set_doappend(
+ d, 'SYSTEMD_SERVICE:%s' % pkg, unit.name)
+ set_doappend(d, 'SYSTEMD_SUBSTITUTIONS',
+ 'BUSNAME:%s:%s' % (unit.base, unit.name))
+}
+
+
+do_install:append() {
+ # install the dbus configuration files
+ [ -z "${_INSTALL_DBUS_CONFIGS}" ] && \
+ [ -z "${_DEFAULT_DBUS_CONFIGS}" ] || \
+ install -d ${D}${dbus_system_confdir}
+ for c in ${_INSTALL_DBUS_CONFIGS}; do
+ install -m 0644 ${WORKDIR}/$c \
+ ${D}${dbus_system_confdir}$c
+ done
+ # install the dbus activation files
+ [ -z "${_INSTALL_DBUS_ACTIVATIONS}" ] && \
+ [ -z "${_DEFAULT_DBUS_ACTIVATIONS}" ] || \
+ install -d ${D}${dbus_system_servicesdir}
+ for s in ${_INSTALL_DBUS_ACTIVATIONS}; do
+ install -m 0644 ${WORKDIR}/$s\
+ ${D}${dbus_system_servicesdir}$s
+ done
+}
+
+inherit obmc-phosphor-systemd
diff --git a/classes/obmc-phosphor-debug-tarball.bbclass b/classes/obmc-phosphor-debug-tarball.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..9262a946a673959c232f1ace6e4e74b5920824bc
--- /dev/null
+++ b/classes/obmc-phosphor-debug-tarball.bbclass
@@ -0,0 +1,21 @@
+# IMAGE_FSTYPES must appear before image.bbclass
+# is inherited otherwise image.bbclass will inherit
+# "live" image fstypes that we don't want.
+IMAGE_FSTYPES = "tar.xz"
+
+inherit image
+
+LICENSE = "Apache-2.0"
+
+IMAGE_INSTALL:append = " busybox packagegroup-obmc-phosphor-debugtools perf "
+
+# Override from image_types.bbclass to restrict tarball to /usr tree.
+IMAGE_CMD:tar = "${IMAGE_CMD_TAR} -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS}/usr ."
+
+# Remove packages installed by 'extrausers'.
+IMAGE_INSTALL:remove = "base-passwd shadow"
+EXTRA_USERS_PARAMS = ""
+
+# Remove extra packages defaulted by image.bbclass.
+PACKAGE_INSTALL = "${IMAGE_INSTALL}"
+IMAGE_LINGUAS = ""
diff --git a/classes/obmc-phosphor-discovery-service.bbclass b/classes/obmc-phosphor-discovery-service.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..5b12faa4d06c4bc052adff2bf634db8982501cff
--- /dev/null
+++ b/classes/obmc-phosphor-discovery-service.bbclass
@@ -0,0 +1,114 @@
+inherit obmc-phosphor-utils
+DISCOVERY_SVC_PACKAGES ?= "${PN}"
+
+python() {
+ avahi_enabled = bb.utils.contains(
+ 'DISTRO_FEATURES', 'avahi', True, False, d)
+ slp_enabled = bb.utils.contains(
+ 'DISTRO_FEATURES', 'slp', True, False, d)
+
+ if not avahi_enabled and not slp_enabled:
+ return
+
+ syscnfdir = d.getVar('sysconfdir', True)
+ dest_dir = d.getVar('D', True)
+
+ set_doappend(d, 'AVAHI_SERVICES_DIR', os.path.join(
+ dest_dir+syscnfdir,
+ 'avahi',
+ 'services'))
+ set_doappend(d, 'SLP_SERVICES_DIR', os.path.join(
+ dest_dir+syscnfdir,
+ 'slp',
+ 'services'))
+
+
+ for pkg in listvar_to_list(d, 'DISCOVERY_SVC_PACKAGES'):
+ for service in listvar_to_list(d, 'REGISTERED_SERVICES:%s' % pkg):
+ if avahi_enabled:
+ set_doappend(d, 'RRECOMMENDS:%s' % pkg, 'avahi-daemon')
+ svc_name, svc_type, svc_port, svc_txt_data = service.split(':')
+ set_doappend(d, 'FILES:%s' % pkg, os.path.join(
+ syscnfdir,
+ 'avahi',
+ 'services',
+ '%s.service' % svc_name))
+
+ if slp_enabled:
+ set_doappend(d, 'RRECOMMENDS:%s' % pkg, 'slpd-lite')
+ svc_name, svc_type, svc_port, svc_txt_data = service.split(':')
+ set_doappend(d, 'FILES:%s' % pkg, os.path.join(
+ syscnfdir,
+ 'slp',
+ 'services',
+ '%s.service' % svc_name))
+
+}
+
+python discovery_services_postinstall() {
+ avahi_enabled = bb.utils.contains(
+ 'DISTRO_FEATURES', 'avahi', True, False, d)
+ slp_enabled = bb.utils.contains(
+ 'DISTRO_FEATURES', 'slp', True, False, d)
+
+ if not avahi_enabled and not slp_enabled:
+ return
+
+ avahi_service_dir = d.getVar('AVAHI_SERVICES_DIR', True).strip()
+ slp_service_dir = d.getVar('SLP_SERVICES_DIR', True).strip()
+
+ if not os.path.exists(avahi_service_dir):
+ os.makedirs(avahi_service_dir)
+
+ if not os.path.exists(slp_service_dir):
+ os.makedirs(slp_service_dir)
+
+ def register_service_avahi(d, service_name, service_type, service_port, service_txt_data):
+ service_txt_data = service_txt_data.split('|')
+ service_file = os.path.join(
+ avahi_service_dir,
+ '%s.service' % service_name)
+ with open(service_file, 'w') as fd:
+ fd.write('\n')
+ fd.write('\n')
+ fd.write('\n')
+ fd.write(' %s on %%h\n'
+ % service_name)
+ fd.write(' \n')
+ fd.write(' %s\n' % service_type)
+ fd.write(' %s\n' % service_port)
+ for txt_record in service_txt_data:
+ if txt_record:
+ key, value = txt_record.split('=')
+ if key.strip() and value.strip():
+ fd.write(' %s\n' % txt_record)
+ else:
+ bb.fatal('Invalid Additional data : \'%s\'. Ignoring!' % txt_record)
+ fd.write(' \n')
+ fd.write('\n')
+
+ def register_service_slp(d, service_name, service_type, service_port):
+ service_file = os.path.join(
+ slp_service_dir,
+ '%s.service' % service_name)
+ with open(service_file, 'w') as fd:
+ fd.write('%s %s %s' % (service_name, service_type, service_port))
+
+ def register_services(d,pkg):
+ for service in listvar_to_list(d, 'REGISTERED_SERVICES:%s' % pkg):
+ svc_info = service.split(":")
+ try:
+ svc_name, svc_type, svc_port, svc_txt_data = svc_info
+ except:
+ continue
+ if avahi_enabled:
+ avahi_svc_type = "_" + svc_name + "._" + svc_type
+ register_service_avahi(d, svc_name, avahi_svc_type, svc_port, svc_txt_data)
+ if slp_enabled:
+ register_service_slp(d, svc_name, svc_type, svc_port)
+
+ for pkg in listvar_to_list(d, 'DISCOVERY_SVC_PACKAGES'):
+ register_services(d, pkg)
+
+}
+do_install[postfuncs] += "discovery_services_postinstall"
diff --git a/classes/obmc-phosphor-image.bbclass b/classes/obmc-phosphor-image.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..4143f34eb833c31b7e6e5b865d027bfe2233ed62
--- /dev/null
+++ b/classes/obmc-phosphor-image.bbclass
@@ -0,0 +1,103 @@
+# Common code for generating Phosphor OpenBMC images.
+
+# Additional IMAGE_FEATURES available with Phosphor OpenBMC:
+#
+# - obmc-bmc-state-mgmt - OpenBMC BMC state management
+# - obmc-bmcweb - OpenBMC webserver
+# - obmc-chassis-mgmt - OpenBMC chassis management
+# - obmc-chassis-state-mgmt - OpenBMC chassis state management
+# - obmc-console - OpenBMC serial over LAN
+# - obmc-dbus-monitor - OpenBMC dbus monitoring
+# - obmc-debug-collector - OpenBMC debug collector
+# - obmc-devtools - OpenBMC development and debugging tools
+# - obmc-fan-control - OpenBMC fan management
+# - obmc-fan-mgmt - Deprecated - use obmc-fan-control instead
+# - obmc-flash-mgmt - OpenBMC flash management
+# - obmc-fru-ipmi - OpenBMC IPMI FRU EEPROM support
+# - obmc-health-monitor - OpenBMC health monitoring
+# - obmc-host-ctl - OpenBMC host control
+# - obmc-host-ipmi - OpenBMC host IPMI
+# - obmc-host-state-mgmt - OpenBMC host state management
+# - obmc-ikvm - OpenBMC KVM over IP
+# - obmc-inventory - OpenBMC inventory support
+# - obmc-leds - OpenBMC LED support
+# - obmc-logging-mgmt - OpenBMC logging management
+# - obmc-remote-logging-mgmt - OpenBMC remote logging management
+# - obmc-rng - OpenBMC random number generator
+# - obmc-sensors - OpenBMC sensor support
+# - obmc-settings-mgmt - OpenBMC settings management
+# - obmc-software - OpenBMC software management
+# - obmc-system-mgmt - OpenBMC system management
+# - obmc-telemetry - OpenBMC telemetry solution
+# - obmc-user-mgmt - OpenBMC user management
+# - obmc-user-mgmt-ldap - OpenBMC LDAP users
+
+inherit core-image
+inherit obmc-phosphor-utils
+
+FEATURE_PACKAGES_obmc-bmc-state-mgmt ?= "packagegroup-obmc-apps-bmc-state-mgmt"
+FEATURE_PACKAGES_obmc-bmcweb ?= "packagegroup-obmc-apps-bmcweb"
+FEATURE_PACKAGES_obmc-chassis-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-chassis-mgmt', 'virtual-obmc-chassis-mgmt', '', d)}"
+FEATURE_PACKAGES_obmc-chassis-state-mgmt ?= "packagegroup-obmc-apps-chassis-state-mgmt"
+FEATURE_PACKAGES_obmc-console ?= "packagegroup-obmc-apps-console"
+FEATURE_PACKAGES_obmc-dbus-monitor ?= "packagegroup-obmc-apps-dbus-monitor"
+FEATURE_PACKAGES_obmc-devtools ?= "packagegroup-obmc-apps-devtools"
+FEATURE_PACKAGES_obmc-fan-control ?= "packagegroup-obmc-apps-fan-control"
+FEATURE_PACKAGES_obmc-fan-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-fan-mgmt', 'virtual-obmc-fan-mgmt', '', d)}"
+FEATURE_PACKAGES_obmc-flash-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-flash-mgmt', 'virtual-obmc-flash-mgmt', '', d)}"
+FEATURE_PACKAGES_obmc-fru-ipmi ?= "packagegroup-obmc-apps-fru-ipmi"
+FEATURE_PACKAGES_obmc-health-monitor ?= "packagegroup-obmc-apps-health-monitor"
+FEATURE_PACKAGES_obmc-host-ctl ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-host-ctl', 'virtual-obmc-host-ctl', '', d)}"
+FEATURE_PACKAGES_obmc-host-ipmi ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw', '', d)}"
+FEATURE_PACKAGES_obmc-host-state-mgmt ?= "packagegroup-obmc-apps-host-state-mgmt"
+FEATURE_PACKAGES_obmc-ikvm ?= "packagegroup-obmc-apps-ikvm"
+FEATURE_PACKAGES_obmc-inventory ?= "packagegroup-obmc-apps-inventory"
+FEATURE_PACKAGES_obmc-leds ?= "packagegroup-obmc-apps-leds"
+FEATURE_PACKAGES_obmc-logging-mgmt ?= "packagegroup-obmc-apps-logging"
+FEATURE_PACKAGES_obmc-remote-logging-mgmt ?= "packagegroup-obmc-apps-remote-logging"
+FEATURE_PACKAGES_obmc-rng ?= "packagegroup-obmc-apps-rng"
+FEATURE_PACKAGES_obmc-net-ipmi ?= "phosphor-ipmi-net"
+FEATURE_PACKAGES_obmc-sensors ?= "packagegroup-obmc-apps-sensors"
+FEATURE_PACKAGES_obmc-software ?= "packagegroup-obmc-apps-software"
+FEATURE_PACKAGES_obmc-system-mgmt ?= "${@bb.utils.contains('DISTRO_FEATURES', 'obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt', '', d)}"
+FEATURE_PACKAGES_obmc-debug-collector ?= "packagegroup-obmc-apps-debug-collector"
+FEATURE_PACKAGES_obmc-settings-mgmt ?= "packagegroup-obmc-apps-settings"
+FEATURE_PACKAGES_obmc-network-mgmt ?= "packagegroup-obmc-apps-network"
+FEATURE_PACKAGES_obmc-telemetry ?= "packagegroup-obmc-apps-telemetry"
+FEATURE_PACKAGES_obmc-user-mgmt ?= "packagegroup-obmc-apps-user-mgmt"
+FEATURE_PACKAGES_obmc-user-mgmt-ldap ?= "packagegroup-obmc-apps-user-mgmt-ldap"
+
+# FIXME: phosphor-net-ipmi depends on phosphor-ipmi-host !?!? and
+# cannot be built on core-qemu machines because of the dependency
+# tree under phosphor-ipmi-host
+FEATURE_PACKAGES_obmc-net-ipmi:qemuall = ""
+
+# EVB systems do not have a managed system.
+FEATURE_PACKAGES_obmc-system-mgmt:phosphor-evb = ""
+# QEMU systems are like EVBs and do not have a managed system.
+FEATURE_PACKAGES_obmc-system-mgmt:qemuall = ""
+
+# Add new packages to be installed to a package group in
+# packagegroup-obmc-apps, not here.
+OBMC_IMAGE_BASE_INSTALL = " \
+ packagegroup-obmc-apps-extras \
+ ${OBMC_IMAGE_EXTRA_INSTALL} \
+ "
+
+OBMC_IMAGE_EXTRA_INSTALL ?= ""
+
+CORE_IMAGE_EXTRA_INSTALL += "${OBMC_IMAGE_BASE_INSTALL}"
+
+remove_etc_version() {
+ rm ${IMAGE_ROOTFS}${sysconfdir}/version
+}
+
+enable_ldap_nsswitch() {
+ sed -i 's/\(\(passwd\|group\):\s*\).*/\1files systemd ldap/' \
+ "${IMAGE_ROOTFS}${sysconfdir}/nsswitch.conf"
+ sed -i 's/\(shadow:\s*\).*/\1files ldap/' \
+ "${IMAGE_ROOTFS}${sysconfdir}/nsswitch.conf"
+}
+
+ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('IMAGE_FEATURES', 'obmc-user-mgmt-ldap', 'enable_ldap_nsswitch ;', '', d)}"
+
diff --git a/classes/obmc-phosphor-ipmiprovider-symlink.bbclass b/classes/obmc-phosphor-ipmiprovider-symlink.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..a025b4299862b9adcbe1356e23d311dddade9fb9
--- /dev/null
+++ b/classes/obmc-phosphor-ipmiprovider-symlink.bbclass
@@ -0,0 +1,47 @@
+# Common code for recipes that create IPMI provider libraries
+
+inherit obmc-phosphor-utils
+
+# This LIBDIR is searched for the libraries.
+LIBDIR = "${D}/${libdir}/ipmid-providers/"
+
+# The symlinks are installed in the following directories depending on the
+# variable.
+HOSTIPMI_LIBDIR = "${D}/${libdir}/host-ipmid/"
+NETIPMI_LIBDIR = "${D}/${libdir}/net-ipmid/"
+BLOBIPMI_LIBDIR = "${D}/${libdir}/blob-ipmid/"
+
+python symlink_create_postinstall() {
+ def install_symlink(d, libname, install_dir):
+ import glob;
+
+ if not os.path.exists(install_dir):
+ os.makedirs(install_dir)
+
+ lib_dir = d.getVar('LIBDIR', True)
+
+ # find the library extension libxxx.so.?
+ install_file = lib_dir + libname + ".?"
+
+ filelist = glob.glob(install_file);
+
+ # get the library name
+ path, file = os.path.split(filelist[0])
+ source = "../ipmid-providers/" + file
+
+ # create the symlink
+ os.symlink(source, os.path.join(install_dir, file))
+
+ for libname in listvar_to_list(d, 'HOSTIPMI_PROVIDER_LIBRARY'):
+ install_dir = d.getVar('HOSTIPMI_LIBDIR', True)
+ install_symlink(d, libname, install_dir)
+
+ for libname in listvar_to_list(d, 'NETIPMI_PROVIDER_LIBRARY'):
+ install_dir = d.getVar('NETIPMI_LIBDIR', True)
+ install_symlink(d, libname, install_dir)
+
+ for libname in listvar_to_list(d, 'BLOBIPMI_PROVIDER_LIBRARY'):
+ install_dir = d.getVar('BLOBIPMI_LIBDIR', True)
+ install_symlink(d, libname, install_dir)
+}
+do_install[postfuncs] += "symlink_create_postinstall"
diff --git a/classes/obmc-phosphor-kernel-version.bbclass b/classes/obmc-phosphor-kernel-version.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..cc08dc386b2c4688c06f0a10a4897d4114f24cc2
--- /dev/null
+++ b/classes/obmc-phosphor-kernel-version.bbclass
@@ -0,0 +1,17 @@
+do_kernel_configme:append() {
+ # Remove previous CONFIG_LOCALVERSION
+ sed -i '/CONFIG_LOCALVERSION/d' ${B}/.config
+
+ # Latest version after yocto patched (if any)
+ latestVersion="-$(git rev-parse --verify HEAD)"
+ shortLatestVersion="$(echo ${latestVersion} | cut -c1-8)"
+
+ shortLinuxVersionExt="$(echo ${LINUX_VERSION_EXTENSION} | cut -c1-8)"
+
+ if [ "${latestVersion}" != "${LINUX_VERSION_EXTENSION}" ]; then
+ dirtyString="-dirty"
+ echo "CONFIG_LOCALVERSION="\"${shortLinuxVersionExt}${dirtyString}${shortLatestVersion}\" >> ${B}/.config
+ else
+ echo "CONFIG_LOCALVERSION="\"${shortLinuxVersionExt}\" >> ${B}/.config
+ fi
+}
diff --git a/classes/obmc-phosphor-py-daemon.bbclass b/classes/obmc-phosphor-py-daemon.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..09a5582aae99a5d09bb844574f27a04f5154e1eb
--- /dev/null
+++ b/classes/obmc-phosphor-py-daemon.bbclass
@@ -0,0 +1,14 @@
+# Common code for dbus applications using python.
+
+inherit allarch
+inherit obmc-phosphor-systemd
+
+RDEPENDS:${PN} += "python3-dbus python3-pygobject"
+INSTALL_NAME ?= "${PN}"
+SCRIPT_NAME ?= "${INSTALL_NAME}.py"
+
+do_install:append() {
+ # install the script
+ install -d ${D}${sbindir}
+ install -m 0755 ${S}/${SCRIPT_NAME} ${D}${sbindir}/${INSTALL_NAME}
+}
diff --git a/classes/obmc-phosphor-pydbus-service.bbclass b/classes/obmc-phosphor-pydbus-service.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..dc6f9e5ed823a80aeec3a5acf79476e2c5551460
--- /dev/null
+++ b/classes/obmc-phosphor-pydbus-service.bbclass
@@ -0,0 +1,6 @@
+# Common code for applications providing a D-Bus service using python-dbus bindings.
+
+# Class users should define DBUS_SERVICES prior to including.
+
+inherit obmc-phosphor-dbus-service
+inherit obmc-phosphor-py-daemon
diff --git a/classes/obmc-phosphor-sdbus-service.bbclass b/classes/obmc-phosphor-sdbus-service.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..e4578e6e1495d8594bf30e140ba8c2b76c355566
--- /dev/null
+++ b/classes/obmc-phosphor-sdbus-service.bbclass
@@ -0,0 +1,8 @@
+# Common code for applications providing a D-Bus service using sd-bus bindings.
+
+# Class users should define DBUS_SERVICES prior to including.
+
+DEPENDS += "systemd"
+RDEPENDS:${PN} += "libsystemd"
+
+inherit obmc-phosphor-dbus-service
diff --git a/classes/obmc-phosphor-systemd.bbclass b/classes/obmc-phosphor-systemd.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..b1398e0076f6a737fd22650fee9dac58c368c328
--- /dev/null
+++ b/classes/obmc-phosphor-systemd.bbclass
@@ -0,0 +1,347 @@
+# Common code for systemd based services.
+#
+# Prior to inheriting this class, recipes can define services like this:
+#
+# SYSTEMD_SERVICE:${PN} = "foo.service bar.socket baz@.service"
+#
+# and these files will be added to the main package if they exist.
+#
+# Alternatively this class can just be inherited and
+# ${PN}.service will be added to the main package.
+#
+# Other variables:
+# INHIBIT_SYSTEMD_RESTART_POLICY_${unit}
+# Inhibit the warning that is displayed if a service unit without a
+# restart policy is detected.
+#
+# SYSTEMD_SUBSTITUTIONS = "var:val:file"
+# A specification for making python style {format} string
+# substitutions where:
+# var: the format string to search for
+# val: the value to replace with
+# file: the file in which to make the substitution
+#
+# SYSTEMD_USER_${PN}.service = "foo"
+# SYSTEMD_USER_${unit}.service = "foo"
+# The user for the unit/package.
+#
+# SYSTEMD_ENVIRONMENT_FILE:${PN} = "foo"
+# One or more environment files to be installed.
+#
+# SYSTEMD_LINK:${PN} = "tgt:name"
+# A specification for installing arbitrary links in
+# the ${systemd_system_unitdir} namespace, where:
+# tgt: the link target
+# name: the link name, relative to ${systemd_system_unitdir}
+#
+# SYSTEMD_OVERRIDE:${PN} = "src:dest"
+# A specification for installing unit overrides where:
+# src: the override file template
+# dest: the override install location, relative to ${systemd_system_unitdir}
+#
+# Typically SYSTEMD_SUBSTITUTIONS is used to deploy a range
+# of overrides from a single template file. To simply install
+# a single override use "foo.conf:my-service.d/foo.conf"
+
+
+inherit obmc-phosphor-utils
+inherit systemd
+inherit useradd
+
+_INSTALL_SD_UNITS=""
+SYSTEMD_DEFAULT_TARGET ?= "multi-user.target"
+envfiledir ?= "${sysconfdir}/default"
+
+# Big ugly hack to prevent useradd.bbclass post-parse sanity checker failure.
+# If there are users to be added, we'll add them in our post-parse.
+# If not...there don't seem to be any ill effects...
+USERADD_PACKAGES ?= " "
+USERADD_PARAM:${PN} ?= ";"
+
+
+def SystemdUnit(unit):
+ class Unit(object):
+ def __init__(self, unit):
+ self.unit = unit
+
+ def __getattr__(self, item):
+ if item == 'name':
+ return self.unit
+ if item == 'is_activated':
+ return self.unit.startswith('dbus-')
+ if item == 'is_template':
+ return '@.' in self.unit
+ if item == 'is_instance':
+ return '@' in self.unit and not self.is_template
+ if item in ['is_service', 'is_target']:
+ return self.unit.split('.')[-1] == item
+ if item == 'base':
+ cls = self.unit.split('.')[-1]
+ base = self.unit.replace('dbus-', '')
+ base = base.replace('.%s' % cls, '')
+ if self.is_instance:
+ base = base.replace('@%s' % self.instance, '')
+ if self.is_template:
+ base = base.rstrip('@')
+ return base
+ if item == 'instance' and self.is_instance:
+ inst = self.unit.rsplit('@')[-1]
+ return inst.rsplit('.')[0]
+ if item == 'template' and self.is_instance:
+ cls = self.unit.split('.')[-1]
+ return '%s@.%s' % (self.base, cls)
+ if item == 'template' and self.is_template:
+ return '.'.join(self.base.split('@')[:-1])
+
+ raise AttributeError(item)
+ return Unit(unit)
+
+
+def systemd_parse_unit(d, path):
+ import configparser
+ parser = configparser.ConfigParser(strict=False)
+ parser.optionxform = str
+ parser.read('%s' % path)
+ return parser
+
+
+python() {
+ def check_sd_unit(d, unit):
+ searchpaths = d.getVar('FILESPATH', True)
+ path = bb.utils.which(searchpaths, '%s' % unit.name)
+ if not os.path.isfile(path):
+ # Unit does not exist in tree. Allow it to install from repo.
+ # Return False here to indicate it does not exist.
+ return False
+
+ parser = systemd_parse_unit(d, path)
+ inhibit = listvar_to_list(d, 'INHIBIT_SYSTEMD_RESTART_POLICY_WARNING')
+ if unit.is_service and \
+ not unit.is_template and \
+ unit.name not in inhibit and \
+ not parser.has_option('Service', 'Restart'):
+ bb.warn('Systemd unit \'%s\' does not '
+ 'have a restart policy defined.' % unit.name)
+ return True
+
+
+ def add_default_subs(d, file):
+ for x in [
+ 'base_bindir',
+ 'bindir',
+ 'sbindir',
+ 'libexecdir',
+ 'envfiledir',
+ 'sysconfdir',
+ 'localstatedir',
+ 'datadir',
+ 'SYSTEMD_DEFAULT_TARGET' ]:
+ set_doappend(d, 'SYSTEMD_SUBSTITUTIONS',
+ '%s:%s:%s' % (x, d.getVar(x, True), file))
+
+
+ def add_sd_unit(d, unit, pkg, unit_exist):
+ # Do not add unit if it does not exist in tree.
+ # It will be installed from repo.
+ if not unit_exist:
+ return
+
+ name = unit.name
+ unit_dir = d.getVar('systemd_system_unitdir', True)
+ set_doappend(d, 'SRC_URI', 'file://%s' % name)
+ set_doappend(d, 'FILES:%s' % pkg, '%s/%s' % (unit_dir, name))
+ set_doappend(d, '_INSTALL_SD_UNITS', name)
+ add_default_subs(d, name)
+
+
+ def add_sd_user(d, file, pkg):
+ opts = [
+ '--system',
+ '--home',
+ '/',
+ '--no-create-home',
+ '--shell /sbin/nologin',
+ '--user-group']
+
+ var = 'SYSTEMD_USER_%s' % file
+ user = listvar_to_list(d, var)
+ if len(user) == 0:
+ var = 'SYSTEMD_USER_%s' % pkg
+ user = listvar_to_list(d, var)
+ if len(user) != 0:
+ if len(user) != 1:
+ bb.fatal('Too many users assigned to %s: \'%s\'' % (var, ' '.join(user)))
+
+ user = user[0]
+ set_doappend(d, 'SYSTEMD_SUBSTITUTIONS',
+ 'USER:%s:%s' % (user, file))
+ if user not in d.getVar('USERADD_PARAM:%s' % pkg, True):
+ set_doappend(
+ d,
+ 'USERADD_PARAM:%s' % pkg,
+ '%s' % (' '.join(opts + [user])),
+ ';')
+ if pkg not in d.getVar('USERADD_PACKAGES', True):
+ set_doappend(d, 'USERADD_PACKAGES', pkg)
+
+
+ def add_env_file(d, name, pkg):
+ set_doappend(d, 'SRC_URI', 'file://%s' % name)
+ set_doappend(d, 'FILES:%s' % pkg, '%s/%s' \
+ % (d.getVar('envfiledir', True), name))
+ set_doappend(d, '_INSTALL_ENV_FILES', name)
+
+
+ def install_link(d, spec, pkg):
+ tgt, dest = spec.split(':')
+
+ set_doappend(d, 'FILES:%s' % pkg, '%s/%s' \
+ % (d.getVar('systemd_system_unitdir', True), dest))
+ set_doappend(d, '_INSTALL_LINKS', spec)
+
+
+ def add_override(d, spec, pkg):
+ tmpl, dest = spec.split(':')
+ set_doappend(d, '_INSTALL_OVERRIDES', '%s' % spec)
+ unit_dir = d.getVar('systemd_system_unitdir', True)
+ set_doappend(d, 'FILES:%s' % pkg, '%s/%s' % (unit_dir, dest))
+ add_default_subs(d, '%s' % dest)
+ add_sd_user(d, '%s' % dest, pkg)
+
+
+ if d.getVar('CLASSOVERRIDE', True) != 'class-target':
+ return
+
+ d.appendVarFlag('do_install', 'postfuncs', ' systemd_do_postinst')
+
+ pn = d.getVar('PN', True)
+ if d.getVar('SYSTEMD_SERVICE:%s' % pn, True) is None:
+ d.setVar('SYSTEMD_SERVICE:%s' % pn, '%s.service' % pn)
+
+ for pkg in listvar_to_list(d, 'SYSTEMD_PACKAGES'):
+ svc = listvar_to_list(d, 'SYSTEMD_SERVICE:%s' % pkg)
+ svc = [SystemdUnit(x) for x in svc]
+ tmpl = [x.template for x in svc if x.is_instance]
+ tmpl = list(set(tmpl))
+ tmpl = [SystemdUnit(x) for x in tmpl]
+ svc = [x for x in svc if not x.is_instance]
+
+ for unit in tmpl + svc:
+ unit_exist = check_sd_unit(d, unit)
+ add_sd_unit(d, unit, pkg, unit_exist)
+ add_sd_user(d, unit.name, pkg)
+ for name in listvar_to_list(d, 'SYSTEMD_ENVIRONMENT_FILE:%s' % pkg):
+ add_env_file(d, name, pkg)
+ for spec in listvar_to_list(d, 'SYSTEMD_LINK:%s' % pkg):
+ install_link(d, spec, pkg)
+ for spec in listvar_to_list(d, 'SYSTEMD_OVERRIDE:%s' % pkg):
+ add_override(d, spec, pkg)
+}
+
+
+python systemd_do_postinst() {
+ def make_subs(d):
+ all_subs = {}
+ for spec in listvar_to_list(d, 'SYSTEMD_SUBSTITUTIONS'):
+ spec, file = spec.rsplit(':', 1)
+ all_subs.setdefault(file, []).append(spec)
+
+ for f, v in all_subs.items():
+ subs = dict([ x.split(':') for x in v])
+ if not subs:
+ continue
+
+ path = d.getVar('D', True)
+ path += d.getVar('systemd_system_unitdir', True)
+ path += '/%s' % f
+ with open(path, 'r') as fd:
+ content = fd.read()
+ with open(path, 'w+') as fd:
+ try:
+ fd.write(content.format(**subs))
+ except KeyError as e:
+ bb.fatal('No substitution found for %s in '
+ 'file \'%s\'' % (e, f))
+
+
+ def install_envs(d):
+ install_dir = d.getVar('D', True)
+ install_dir += d.getVar('envfiledir', True)
+ searchpaths = d.getVar('FILESPATH', True)
+
+ for f in listvar_to_list(d, '_INSTALL_ENV_FILES'):
+ src = bb.utils.which(searchpaths, f)
+ if not os.path.isfile(src):
+ bb.fatal('Did not find SYSTEMD_ENVIRONMENT_FILE:'
+ '\'%s\'' % src)
+
+ dest = os.path.join(install_dir, f)
+ parent = os.path.dirname(dest)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+
+ with open(src, 'r') as fd:
+ content = fd.read()
+ with open(dest, 'w+') as fd:
+ fd.write(content)
+
+
+ def install_links(d):
+ install_dir = d.getVar('D', True)
+ install_dir += d.getVar('systemd_system_unitdir', True)
+
+ for spec in listvar_to_list(d, '_INSTALL_LINKS'):
+ tgt, dest = spec.split(':')
+ dest = os.path.join(install_dir, dest)
+ parent = os.path.dirname(dest)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+ os.symlink(tgt, dest)
+
+
+ def install_overrides(d):
+ install_dir = d.getVar('D', True)
+ install_dir += d.getVar('systemd_system_unitdir', True)
+ searchpaths = d.getVar('FILESPATH', True)
+
+ for spec in listvar_to_list(d, '_INSTALL_OVERRIDES'):
+ tmpl, dest = spec.split(':')
+ source = bb.utils.which(searchpaths, tmpl)
+ if not os.path.isfile(source):
+ bb.fatal('Did not find SYSTEMD_OVERRIDE '
+ 'template: \'%s\'' % source)
+
+ dest = os.path.join(install_dir, dest)
+ parent = os.path.dirname(dest)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+
+ with open(source, 'r') as fd:
+ content = fd.read()
+ with open('%s' % dest, 'w+') as fd:
+ fd.write(content)
+
+
+ install_links(d)
+ install_envs(d)
+ install_overrides(d)
+ make_subs(d)
+}
+
+
+do_install:append() {
+ # install systemd service/socket/template files
+ [ -z "${_INSTALL_SD_UNITS}" ] || \
+ install -d ${D}${systemd_system_unitdir}
+ for s in ${_INSTALL_SD_UNITS}; do
+ install -m 0644 ${WORKDIR}/$s \
+ ${D}${systemd_system_unitdir}/$s
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@LIBEXECDIR@,${libexecdir},g' \
+ -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
+ -e 's,@DATADIR@,${datadir},g' \
+ ${D}${systemd_system_unitdir}/$s
+ done
+}
diff --git a/classes/obmc-phosphor-utils.bbclass b/classes/obmc-phosphor-utils.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..b0f1fafc008e82ab5d4ba180f097d29216815e99
--- /dev/null
+++ b/classes/obmc-phosphor-utils.bbclass
@@ -0,0 +1,25 @@
+def set_doappend(d, var, val, sep=' '):
+ values = (d.getVar(var, True) or '').split(sep)
+ if filter(bool, values):
+ d.appendVar(var, '%s%s' %(sep, val))
+ else:
+ d.setVar(var, val)
+
+
+def listvar_to_list(d, list_var, sep=' '):
+ return list(filter(bool, (d.getVar(list_var, True) or '').split(sep)))
+
+
+def compose_list(d, fmtvar, *listvars, **kw):
+ import itertools
+ fmt = d.getVar(fmtvar, True)
+ lists = [listvar_to_list(d, x) for x in listvars]
+ lst = [fmt.format(*x) for x in itertools.product(*lists)]
+ return (kw.get('sep') or ' ').join(lst)
+
+
+def compose_list_zip(d, fmtvar, *listvars, **kw):
+ fmt = d.getVar(fmtvar, True)
+ lists = [listvar_to_list(d, x) for x in listvars]
+ lst = [fmt.format(*x) for x in zip(*lists)]
+ return (kw.get('sep') or ' ').join(lst)
diff --git a/classes/obmc-xmlpatch.bbclass b/classes/obmc-xmlpatch.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..3598206224420c853db1c3b01cce680ad02761c9
--- /dev/null
+++ b/classes/obmc-xmlpatch.bbclass
@@ -0,0 +1,74 @@
+#This class applies patches to an XML file during do_patch(). The
+#patches themselves are specified in XML in a separate file that must
+#be in SRC_URI and end in .patch.xml. The patch XML file must also
+#have a element that specifies the base name of the file
+#that needs to be patched.
+#
+#See patchxml.py for details on the XML patch format.
+#
+
+inherit python3native
+inherit obmc-phosphor-utils
+do_patch[depends] = "mrw-patch-native:do_populate_sysroot"
+
+
+def find_patch_files(d):
+ all_patches = listvar_to_list(d, 'SRC_URI')
+ xml_patches = [x for x in all_patches if x.endswith('.patch.xml') and
+ x.startswith('file://')]
+
+ return [x.lstrip('file://') for x in xml_patches]
+
+
+def apply_xml_patch(base_patch_name, d):
+ import xml.etree.ElementTree as et
+ import subprocess
+
+ patch_file = os.path.join(d.getVar("WORKDIR", True), base_patch_name)
+
+ if not os.path.exists(patch_file):
+ bb.fatal("Could not find patch file " + patch_file +
+ " specified in SRC_URI")
+
+ patch_tree = et.parse(patch_file)
+ patch_root = patch_tree.getroot()
+ target_file_element = patch_root.find("targetFile")
+
+ if target_file_element is None:
+ bb.fatal("Could not find element in patch file "
+ + patch_file)
+ else:
+ xml = target_file_element.text
+
+ xml = os.path.join(d.getVar("S", True), xml)
+
+ if not os.path.exists(xml):
+ bb.fatal("Could not find XML file to patch: " + xml)
+
+ print("Applying XML fixes found in " + patch_file + " to " + xml)
+
+ cmd = []
+ cmd.append(os.path.join(d.getVar("bindir", True), "obmc-mrw/patchxml.py"))
+ cmd.append("-x")
+ cmd.append(xml)
+ cmd.append("-p")
+ cmd.append(patch_file)
+ cmd.append("-o")
+ cmd.append(xml + ".patched")
+
+ try:
+ subprocess.check_call(cmd)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Failed patching XML:\n%s" % e.output)
+
+ os.rename(xml, xml + ".orig")
+ os.rename(xml + ".patched", xml)
+
+
+python xmlpatch_do_patch() {
+
+ for patch in find_patch_files(d):
+ apply_xml_patch(patch, d)
+}
+
+do_patch[postfuncs] += "xmlpatch_do_patch"
diff --git a/classes/phosphor-dbus-monitor.bbclass b/classes/phosphor-dbus-monitor.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..da282df16dbe84139dea6561b0fb88979acba42d
--- /dev/null
+++ b/classes/phosphor-dbus-monitor.bbclass
@@ -0,0 +1 @@
+config_dir="${datadir}/phosphor-dbus-monitor"
diff --git a/classes/phosphor-dbus-yaml.bbclass b/classes/phosphor-dbus-yaml.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..b42b349c7f23cbeec259f495beff8e85d69806a8
--- /dev/null
+++ b/classes/phosphor-dbus-yaml.bbclass
@@ -0,0 +1,4 @@
+yaml_dir = "${datadir}/phosphor-dbus-yaml/yaml"
+
+PACKAGE_BEFORE_PN += "${PN}-yaml"
+FILES:${PN}-yaml += "${yaml_dir}"
diff --git a/classes/phosphor-debug-collector.bbclass b/classes/phosphor-debug-collector.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..d5d49a2dbb0fe9a47bb7ac0263fa718362bd96b0
--- /dev/null
+++ b/classes/phosphor-debug-collector.bbclass
@@ -0,0 +1,5 @@
+bmc_dump_path="/var/lib/phosphor-debug-collector/dumps"
+dreport_plugin_dir = "${datadir}/dreport.d/plugins.d"
+dreport_include_dir = "${datadir}/dreport.d/include.d"
+dreport_conf_dir = "${datadir}/dreport.d/conf.d"
+dreport_dir = "${datadir}/dreport.d/"
diff --git a/classes/phosphor-deploy-ssh-keys.bbclass b/classes/phosphor-deploy-ssh-keys.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..277a55c0849500728faedaaaf8824f5256ff06f1
--- /dev/null
+++ b/classes/phosphor-deploy-ssh-keys.bbclass
@@ -0,0 +1,63 @@
+####
+# Copyright 2020 Hewlett Packard Enterprise Development LP.
+# Copyright 2021 Intel Corporation
+#
+# Add a basic class to add a privileged user from an ssh
+# standpoint and a public key passed as an input parameter
+# from the local.conf file
+# Example:
+# INHERIT += "phosphor-deploy-ssh-keys"
+#
+# SSH_KEYS = "vejmarie:/home/openbmc/openbmc/meta-hpe/keys/test.pub"
+# or
+# SSH_KEYS = "vejmarie:/home/openbmc/openbmc/meta-hpe/keys/test.pub;root:/path/to/id_rsa.pub"
+####
+
+inherit useradd_base
+
+IMAGE_PREPROCESS_COMMAND += "deploy_local_user;"
+
+deploy_local_user () {
+ if [ "${SSH_KEYS}" == "" ]; then
+ bbwarn "Trying to deploy SSH keys but input variable is empty (SSH_KEYS)"
+ return
+ fi
+
+ ssh_keys="${SSH_KEYS}"
+ while [ "${ssh_keys}" != "" ]; do
+ current_key=`echo "$ssh_keys" | cut -d ';' -f1`
+ ssh_keys=`echo "$ssh_keys" | cut -s -d ';' -f2-`
+
+ username=`echo "$current_key" | awk -F":" '{ print $1}'`
+ key_path=`echo "$current_key" | awk -F":" '{ print $2}'`
+
+ if [ ! -d ${IMAGE_ROOTFS}/home/${username} ]; then
+ perform_useradd "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} -p '' ${username}"
+ fi
+
+ if [ ! -d ${IMAGE_ROOTFS}/home/${username}.ssh/ ]; then
+ install -d ${IMAGE_ROOTFS}/home/${username}/.ssh/
+ fi
+
+ if [ ! -f ${IMAGE_ROOTFS}/home/${username}/.ssh/authorized_keys ]; then
+ install -m 0600 ${key_path} ${IMAGE_ROOTFS}/home/${username}/.ssh/authorized_keys
+ else
+ cat ${key_path} >> ${IMAGE_ROOTFS}/home/${username}/.ssh/authorized_keys
+ fi
+
+ uid=`cat ${IMAGE_ROOTFS}/etc/passwd | grep "${username}:" | awk -F ":" '{print $3}'`
+ guid=`cat ${IMAGE_ROOTFS}/etc/passwd | grep "${username}:" | awk -F ":" '{print $4}'`
+
+ chown -R ${uid}:${guid} ${IMAGE_ROOTFS}/home/${username}/.ssh
+ chmod 600 ${IMAGE_ROOTFS}/home/${username}/.ssh/authorized_keys
+ chmod 700 ${IMAGE_ROOTFS}/home/${username}/.ssh
+
+ is_group=`grep "priv-admin" ${IMAGE_ROOTFS}/etc/group || true`
+
+ if [ -z "${is_group}" ]; then
+ perform_groupadd "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} priv-admin"
+ fi
+
+ perform_usermod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} -a -G priv-admin ${username}"
+ done
+}
diff --git a/classes/phosphor-fan.bbclass b/classes/phosphor-fan.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..d0ffd99a0c37301dc42751e1ade7c3e9c0efa50f
--- /dev/null
+++ b/classes/phosphor-fan.bbclass
@@ -0,0 +1,3 @@
+presence_datadir="${datadir}/phosphor-fan-presence"
+control_datadir="${datadir}/phosphor-fan-control"
+monitor_datadir="${datadir}/phosphor-fan-monitor"
diff --git a/classes/phosphor-inventory-manager.bbclass b/classes/phosphor-inventory-manager.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..01fa37262b0db3b89616407c042f6cb08d4f0c64
--- /dev/null
+++ b/classes/phosphor-inventory-manager.bbclass
@@ -0,0 +1,2 @@
+base_datadir="${datadir}/phosphor-inventory-manager"
+rules_datadir="${base_datadir}/events.d"
diff --git a/classes/phosphor-ipmi-fru.bbclass b/classes/phosphor-ipmi-fru.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..d833eafcd56bee4231d8cf921a041718010aad1b
--- /dev/null
+++ b/classes/phosphor-ipmi-fru.bbclass
@@ -0,0 +1,4 @@
+hostfw_datadir="${datadir}/phosphor-ipmi-fru/hostfw"
+inventory_datadir="${datadir}/phosphor-ipmi-fru/inventory"
+config_datadir="${datadir}/phosphor-ipmi-fru/config"
+properties_datadir="${datadir}/phosphor-ipmi-fru/properties"
diff --git a/classes/phosphor-ipmi-host-whitelist.bbclass b/classes/phosphor-ipmi-host-whitelist.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..f2b041fe9d0b74588117282eff81d7bd9c185a12
--- /dev/null
+++ b/classes/phosphor-ipmi-host-whitelist.bbclass
@@ -0,0 +1,27 @@
+# Common code for recipes that implement Phosphor IPMI Whitelist
+# packages
+
+WHITELIST ?= "${PN}.conf"
+INSTALLDIR = "${D}${datadir}/phosphor-ipmi-host/"
+
+python phosphor_ipmi_host_whitelist_postinstall() {
+ def install_whitelist(d):
+ # Create the install directory if needed
+ whitelist_file = d.getVar('WHITELIST', True)
+ install_dir = d.getVar('INSTALLDIR', True)
+ if not os.path.exists(install_dir):
+ os.makedirs(install_dir)
+ install_file = os.path.join(install_dir, whitelist_file)
+
+ # Search for conf file in FILESPATH
+ searchpaths = d.getVar('FILESPATH', True)
+ path = bb.utils.which(searchpaths, whitelist_file)
+ if not os.path.isfile(path):
+ bb.fatal('Did not find conf file "%s"' % whitelist_file)
+
+ # Copy the conf file into install directory
+ bb.utils.copyfile(path, install_file)
+
+ install_whitelist(d)
+}
+do_install[postfuncs] += "phosphor_ipmi_host_whitelist_postinstall"
diff --git a/classes/phosphor-ipmi-host.bbclass b/classes/phosphor-ipmi-host.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..6f0bad5dfa17cc53ef8b1c8c7bad35760f656fb0
--- /dev/null
+++ b/classes/phosphor-ipmi-host.bbclass
@@ -0,0 +1,4 @@
+sensor_datadir="${datadir}/phosphor-ipmi-host/sensor"
+sensor_yamldir="${datadir}/phosphor-ipmi-host/sensor-yamls"
+hostfw_datadir="${datadir}/phosphor-ipmi-fru/hostfw"
+config_datadir="${datadir}/phosphor-ipmi-host/config"
diff --git a/classes/phosphor-logging-yaml-provider.bbclass b/classes/phosphor-logging-yaml-provider.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..f51e262b8b3db49b188e426c239d6999967b201a
--- /dev/null
+++ b/classes/phosphor-logging-yaml-provider.bbclass
@@ -0,0 +1,22 @@
+inherit phosphor-dbus-yaml
+
+LOGGING_YAML_SUBDIRS ??= "${OBMC_ORG_YAML_SUBDIRS}"
+
+do_install:append() {
+ for yaml_d in ${LOGGING_YAML_SUBDIRS} ;
+ do
+ if [ ! -d ${S}/${yaml_d} ];
+ then
+ continue
+ fi
+
+ for yaml_f in $(find ${S}/${yaml_d} -name "*.errors.yaml" -or \
+ -name "*.metadata.yaml") ;
+ do
+ subpath=$(realpath --relative-to=${S} ${yaml_f})
+ install -d $(dirname ${D}${yaml_dir}/$subpath)
+
+ install -m 0644 ${yaml_f} ${D}${yaml_dir}/$subpath
+ done
+ done
+}
diff --git a/classes/phosphor-logging.bbclass b/classes/phosphor-logging.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..18f53d4347d14fec55316c5ae3ad088c1f38c1c8
--- /dev/null
+++ b/classes/phosphor-logging.bbclass
@@ -0,0 +1 @@
+callouts_datadir="${datadir}/phosphor-logging/callouts"
diff --git a/classes/phosphor-mapper.bbclass b/classes/phosphor-mapper.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..1ee95d773512f10f589977ad2c012c5a32fdce17
--- /dev/null
+++ b/classes/phosphor-mapper.bbclass
@@ -0,0 +1,47 @@
+# Common code for recipes that modify the phosphor-mapper
+# configuration.
+#
+# Typically it is not desired to monitor all dbus traffic
+# on a system and as such, the phosphor-mapper has command
+# line options to control what path namespaces and dbus
+# interfaces it will keep track of.
+#
+# The Phosphor layer by default configures the mapper to
+# watch xyz.openbmc_project services and interfaces only.
+# This configuration file is intended to be inherited by
+# native recipes in other layers that wish to add namespaces
+# or interfaces to the mapper watchlist.
+
+# Add service namespaces to be monitored:
+# PHOSPHOR_MAPPER_SERVICE:append = " foo.bar"
+
+# Add interfaces to be monitored:
+# PHOSPHOR_MAPPER_INTERFACE:append = " foo.bar"
+
+# Blacklist services from being monitored:
+# PHOSPHOR_MAPPER_SERVICE_BLACKLIST:append = " foo.bar"
+
+inherit phosphor-mapperdir
+inherit obmc-phosphor-utils
+
+python phosphor_mapper_do_postinst() {
+ def process_var(d, var, dir):
+ for p in listvar_to_list(d, var):
+ parent = d.getVar('D', True) + d.getVar(dir, True)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+ path = os.path.join(
+ parent,
+ '-'.join(p.split(os.sep)))
+ with open(path, 'w+') as fd:
+ pass
+
+ process_var(d, 'PHOSPHOR_MAPPER_SERVICE', 'service_dir')
+ process_var(d, 'PHOSPHOR_MAPPER_INTERFACE', 'interface_dir')
+ process_var(d, 'PHOSPHOR_MAPPER_SERVICE_BLACKLIST', 'serviceblacklist_dir')
+}
+
+do_install[vardeps] += "PHOSPHOR_MAPPER_SERVICE"
+do_install[vardeps] += "PHOSPHOR_MAPPER_INTERFACE"
+do_install[vardeps] += "PHOSPHOR_MAPPER_SERVICE_BLACKLIST"
+do_install[postfuncs] += "phosphor_mapper_do_postinst"
diff --git a/classes/phosphor-mapperdir.bbclass b/classes/phosphor-mapperdir.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..4b6bc62b4f08ec41dff8977d93593c35afa8f15e
--- /dev/null
+++ b/classes/phosphor-mapperdir.bbclass
@@ -0,0 +1,3 @@
+service_dir="${datadir}/phosphor-mapper/service"
+interface_dir="${datadir}/phosphor-mapper/interface"
+serviceblacklist_dir="${datadir}/phosphor-mapper/serviceblacklist"
diff --git a/classes/phosphor-rootfs-postcommands.bbclass b/classes/phosphor-rootfs-postcommands.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..3485661b3d838d628fdba5870c25e583fbf30bf5
--- /dev/null
+++ b/classes/phosphor-rootfs-postcommands.bbclass
@@ -0,0 +1,10 @@
+#
+# This function is intended to add root to corresponding groups if 'debug-tweaks' or 'allow-root-login' is in IMAGE_FEATURES.
+#
+update_root_user_groups () {
+ if [ -e ${IMAGE_ROOTFS}/etc/group ]; then
+ sed -i '/^\(ipmi\|web\|redfish\|priv-admin\):.*:.*:$/s/$/root/' ${IMAGE_ROOTFS}/etc/group
+ fi
+}
+# Add root user to the needed groups
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "update_root_user_groups; ", "", d)}'
diff --git a/classes/phosphor-settings-manager.bbclass b/classes/phosphor-settings-manager.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..7e554f3ce87d79cfcf39cbd1f6666ef6ba058f38
--- /dev/null
+++ b/classes/phosphor-settings-manager.bbclass
@@ -0,0 +1 @@
+settings_datadir="${datadir}/phosphor-settings/default"
diff --git a/classes/phosphor-software-manager-mmc.bbclass b/classes/phosphor-software-manager-mmc.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..0590a835ec87678526a4df3350c4dceba61a018d
--- /dev/null
+++ b/classes/phosphor-software-manager-mmc.bbclass
@@ -0,0 +1,23 @@
+# eMMC-specific configuration for the phosphor-manager-software package
+
+PACKAGECONFIG:append = " mmc_layout"
+
+EXTRA_OEMESON:append = " \
+ -Dactive-bmc-max-allowed=2 \
+ -Dmedia-dir='/media' \
+ -Doptional-images='image-hostfw' \
+"
+
+RDEPENDS:phosphor-software-manager-updater-mmc += " \
+ gptfdisk \
+ parted \
+ zstd \
+"
+
+SYSTEMD_SERVICE:phosphor-software-manager-updater-mmc += " \
+ obmc-flash-mmc@.service \
+ obmc-flash-mmc-remove@.service \
+ obmc-flash-mmc-setprimary@.service \
+ obmc-flash-mmc-mount.service \
+ obmc-flash-mmc-umount.service \
+"
diff --git a/classes/phosphor-software-manager-ubi-fs.bbclass b/classes/phosphor-software-manager-ubi-fs.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..9d38adaf7f1793e086b019e90cc83a3e9fd4174b
--- /dev/null
+++ b/classes/phosphor-software-manager-ubi-fs.bbclass
@@ -0,0 +1,38 @@
+# UBI-specific configuration for the phosphor-manager-software package
+
+PACKAGECONFIG:append = " ubifs_layout"
+
+RDEPENDS:phosphor-software-manager-updater-ubi += " \
+ mtd-utils-ubifs \
+"
+
+# Add ubi-fs configs
+EXTRA_OEMESON:append = " \
+ -Dactive-bmc-max-allowed=2 \
+ -Dmedia-dir='/media' \
+"
+
+SYSTEMD_SERVICE:phosphor-software-manager-updater-ubi += " \
+ obmc-flash-bmc-ubirw.service \
+ obmc-flash-bmc-ubiro@.service \
+ obmc-flash-bmc-ubirw-remove.service \
+ obmc-flash-bmc-ubiro-remove@.service \
+ obmc-flash-bmc-ubiremount.service \
+ obmc-flash-bmc-updateubootvars@.service \
+ obmc-flash-bmc-cleanup.service \
+ obmc-flash-bmc-mirroruboot.service \
+"
+
+# Name of the mtd device where the ubi volumes should be created
+BMC_RW_MTD ??= "bmc"
+BMC_RO_MTD ??= "bmc"
+BMC_KERNEL_MTD ??= "bmc"
+FLASH_SIZE ?= "32768"
+DISTROOVERRIDES .= ":flash-${FLASH_SIZE}"
+BMC_RW_SIZE ??= "0x600000"
+BMC_RW_SIZE:flash-131072 = "0x2000000"
+SYSTEMD_SUBSTITUTIONS += "RW_MTD:${BMC_RW_MTD}:obmc-flash-bmc-ubirw.service"
+SYSTEMD_SUBSTITUTIONS += "RO_MTD:${BMC_RO_MTD}:obmc-flash-bmc-ubiro@.service"
+SYSTEMD_SUBSTITUTIONS += "KERNEL_MTD:${BMC_KERNEL_MTD}:obmc-flash-bmc-ubiro@.service"
+SYSTEMD_SUBSTITUTIONS += "RW_SIZE:${BMC_RW_SIZE}:obmc-flash-bmc-ubirw.service"
+
diff --git a/classes/skeleton-gdbus.bbclass b/classes/skeleton-gdbus.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..77870a530190949740a6d8194bca0d476db7e0fe
--- /dev/null
+++ b/classes/skeleton-gdbus.bbclass
@@ -0,0 +1,11 @@
+inherit skeleton
+
+DEPENDS:append:class-target = " glib-2.0 obmc-libobmc-intf"
+
+do_compile:class-native() {
+ :
+}
+
+do_install:append:class-target() {
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/classes/skeleton-python.bbclass b/classes/skeleton-python.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..935aaedc39522bfb1d57c68e90ae05f74396b5ff
--- /dev/null
+++ b/classes/skeleton-python.bbclass
@@ -0,0 +1,14 @@
+inherit setuptools3
+
+do_compile:class-native() {
+ :
+}
+
+do_install:class-native() {
+ :
+}
+
+DEPENDS:append:class-target = " python"
+
+inherit skeleton
+inherit allarch
diff --git a/classes/skeleton-rev.bbclass b/classes/skeleton-rev.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..8e98df20e2ee80e041a658b851e66418dccbdc59
--- /dev/null
+++ b/classes/skeleton-rev.bbclass
@@ -0,0 +1,4 @@
+SRCREV ?= "77b241c472efc5af618a839493aa8357544ea213"
+SKELETON_URI ?= "git://github.com/openbmc/skeleton;branch=master;protocol=https"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
diff --git a/classes/skeleton-sdbus.bbclass b/classes/skeleton-sdbus.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..c126b3153c133dd171ef1ae4fecbcda8d4c365c9
--- /dev/null
+++ b/classes/skeleton-sdbus.bbclass
@@ -0,0 +1,11 @@
+inherit skeleton
+
+DEPENDS:append:class-target = " systemd"
+
+do_compile:class-native() {
+ :
+}
+
+do_install:append:class-target() {
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/classes/skeleton.bbclass b/classes/skeleton.bbclass
new file mode 100644
index 0000000000000000000000000000000000000000..865ae44c89f61435e3362591b07cee1fa9db0487
--- /dev/null
+++ b/classes/skeleton.bbclass
@@ -0,0 +1,6 @@
+inherit skeleton-rev
+
+HOMEPAGE = "http://github.com/openbmc/skeleton"
+
+SRC_URI += "${SKELETON_URI}"
+S = "${WORKDIR}/git/${SKELETON_DIR}"
diff --git a/conf/bblayers.conf.sample b/conf/bblayers.conf.sample
new file mode 100644
index 0000000000000000000000000000000000000000..53243e32b970233fda4f04ec43206326fe4ccfcf
--- /dev/null
+++ b/conf/bblayers.conf.sample
@@ -0,0 +1,15 @@
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+LCONF_VERSION = "8"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+ ##OEROOT##/meta \
+ ##OEROOT##/meta-poky \
+ ##OEROOT##/meta-openembedded/meta-oe \
+ ##OEROOT##/meta-openembedded/meta-networking \
+ ##OEROOT##/meta-openembedded/meta-python \
+ ##OEROOT##/meta-phosphor \
+ "
diff --git a/conf/conf-notes.txt b/conf/conf-notes.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f2db15fcbd87c3799b4e86dca2e9ddfca3fbf6cf
--- /dev/null
+++ b/conf/conf-notes.txt
@@ -0,0 +1,5 @@
+Common targets are:
+ obmc-phosphor-image
+
+You can also run generated qemu images with a command like:
+ runqemu qemuarm
diff --git a/conf/distro/include/phosphor-aspeed-spi-master-mode.inc b/conf/distro/include/phosphor-aspeed-spi-master-mode.inc
new file mode 100644
index 0000000000000000000000000000000000000000..9c1b4894593ec7e685b02090f65e8e347df36cc1
--- /dev/null
+++ b/conf/distro/include/phosphor-aspeed-spi-master-mode.inc
@@ -0,0 +1,2 @@
+DISTRO_FEATURES += "obmc-aspeed-spi-master"
+DISTROOVERRIDES .= ":df-aspeed-spi-master"
diff --git a/conf/distro/include/phosphor-aspeednic-use-mac2.inc b/conf/distro/include/phosphor-aspeednic-use-mac2.inc
new file mode 100644
index 0000000000000000000000000000000000000000..20fad5bd77aaa59d94ce7e5bccfa58ca4d66fae0
--- /dev/null
+++ b/conf/distro/include/phosphor-aspeednic-use-mac2.inc
@@ -0,0 +1,2 @@
+DISTRO_FEATURES += "obmc-aspeednic-use-mac2"
+DISTROOVERRIDES .= ":df-aspeednic-use-mac2"
diff --git a/conf/distro/include/phosphor-base.inc b/conf/distro/include/phosphor-base.inc
new file mode 100644
index 0000000000000000000000000000000000000000..3c905387559e16fb464e879b7fb5780a44aa390e
--- /dev/null
+++ b/conf/distro/include/phosphor-base.inc
@@ -0,0 +1,139 @@
+require conf/distro/include/phosphor-defaults.inc
+
+# Override these in poky based distros
+POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland vulkan"
+POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
+POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
+
+DISTRO_EXTRA_RDEPENDS += " ${POKY_DEFAULT_EXTRA_RDEPENDS}"
+DISTRO_EXTRA_RRECOMMENDS += " ${POKY_DEFAULT_EXTRA_RRECOMMENDS}"
+
+DISTROOVERRIDES .= ":openbmc-phosphor"
+
+TCLIBCAPPEND = ""
+
+QEMU_TARGETS ?= "arm aarch64 i386 riscv32 riscv64 ppc64le x86_64"
+
+PREMIRRORS ??= "\
+bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
+
+MIRRORS =+ "\
+ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
+
+# The CONNECTIVITY_CHECK_URI's are used to test whether we can successfully
+# fetch from the network (and warn you if not). To disable the test set
+# the variable to be empty.
+# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=https;rev=master
+CONNECTIVITY_CHECK_URIS ?= "https://yoctoproject.org/connectivity.html"
+
+SANITY_TESTED_DISTROS ?= " \
+ poky-2.4 \n \
+ poky-2.5 \n \
+ ubuntu-15.04 \n \
+ ubuntu-16.04 \n \
+ ubuntu-16.10 \n \
+ ubuntu-17.04 \n \
+ fedora-26 \n \
+ centos-7 \n \
+ debian-8 \n \
+ debian-9 \n \
+ opensuse-42.1 \n \
+ opensuse-42.2 \n \
+ "
+#
+# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
+# an incompatible way. Such changes should usually be detailed in the commit
+# that breaks the format and have been previously discussed on the mailing list
+# with general agreement from the core team.
+#
+
+OELAYOUT_ABI = "12"
+
+# QA check settings - a little stricter than the OE-Core defaults
+WARN_TO_ERROR_QA = "already-stripped compile-host-path install-host-path \
+ installed-vs-shipped ldflags pn-overrides rpaths staticdev \
+ useless-rpaths"
+WARN_QA:remove = "${WARN_TO_ERROR_QA}"
+ERROR_QA:append = " ${WARN_TO_ERROR_QA}"
+
+require conf/distro/include/no-static-libs.inc
+require conf/distro/include/yocto-uninative.inc
+
+DISTRO_NAME = "Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
+TARGET_VENDOR="-openbmc"
+
+VIRTUAL-RUNTIME_keymaps = ""
+
+# Phosphor OpenBMC uses systemd and udev
+VIRTUAL-RUNTIME_init_manager = "systemd"
+VIRTUAL-RUNTIME_initscripts = ""
+
+DISTRO_FEATURES_BACKFILL_CONSIDERED = " \
+ bluez5 \
+ ldconfig \
+ gobject-introspection-data \
+ pulseaudio \
+ sysvinit \
+ "
+
+DISTRO_FEATURES_OBMC = " \
+ obmc-host-ctl \
+ obmc-host-ipmi \
+ obmc-phosphor-chassis-mgmt \
+ obmc-phosphor-fan-mgmt \
+ obmc-phosphor-flash-mgmt \
+ obmc-phosphor-system-mgmt \
+ "
+
+DISTRO_FEATURES_DEFAULT = " \
+ avahi \
+ ipv4 \
+ ipv6 \
+ pam \
+ security \
+ slp \
+ systemd \
+ seccomp \
+ "
+
+DISTRO_FEATURES += " \
+ ${DISTRO_FEATURES_DEFAULT} \
+ ${DISTRO_FEATURES_OBMC} \
+ "
+
+DISTRO_EXTRA_RDEPENDS:remove:qemuarm = "packagegroup-core-device-devel"
+
+include conf/distro/include/openbmc-phosphor/${MACHINE}.inc
+
+IMAGE_CLASSES:append = " image_types_phosphor phosphor-rootfs-postcommands"
+IMAGE_CLASSES:append:npcm7xx = " image_types_phosphor_nuvoton"
+
+IMAGE_INSTALL:append = " dbus-broker libnss-systemd"
+
+# Skip the udev database by default. It adds around 2MB
+# compressed to the root filesystem, and probably doesn't
+# make sense on a BMC anyway.
+BAD_RECOMMENDATIONS += "udev-hwdb"
+BAD_RECOMMENDATIONS += "shared-mime-info"
+
+# e2fsprogs isn't needed on a BMC without MMC, where it gets explicitly added
+BAD_RECOMMENDATIONS += "e2fsprogs-e2fsck"
+
+LAYER_CONF_VERSION ?= "8"
+
+KERNEL_CLASSES:append = " obmc-phosphor-kernel-version"
+
+# Some packages have directory trees of YAML files arranged based on
+# canonical organization names. 'xyz/openbmc_project' should be used
+# everywhere in phosphor, but some layers may append this with their
+# own organization(s).
+OBMC_ORG_YAML_SUBDIRS += " xyz/openbmc_project"
diff --git a/conf/distro/include/phosphor-defaults.inc b/conf/distro/include/phosphor-defaults.inc
new file mode 100644
index 0000000000000000000000000000000000000000..948a090514c9417b6679fd4739bf8a587e13ef1c
--- /dev/null
+++ b/conf/distro/include/phosphor-defaults.inc
@@ -0,0 +1,253 @@
+OBMC_BMC_INSTANCES ?= "0"
+OBMC_CHASSIS_INSTANCES ?= "0"
+OBMC_CHECKSTOP_INSTANCES ?= "0"
+OBMC_FAN_INSTANCES ?= ""
+OBMC_HOST_INSTANCES ?= "0"
+OBMC_POWER_BUTTON_INSTANCES ?= "0"
+OBMC_POWER_INSTANCES ?= "0"
+OBMC_RESET_BUTTON_INSTANCES ?= "0"
+OBMC_WATCHDOG_INSTANCES ?= "0"
+
+# obmc-bmc-state-manager
+#
+# Provides an implementation of the xyz.openbmc_project.State.BMC
+# interface.
+VIRTUAL-RUNTIME_obmc-bmc-state-manager ?= "phosphor-state-manager-bmc"
+
+# obmc-chassis-state-manager
+#
+# Provides an implementation of the xyz.openbmc_project.State.Chassis
+# interface.
+VIRTUAL-RUNTIME_obmc-chassis-state-manager ?= "phosphor-state-manager-chassis"
+
+# obmc-host-state-manager
+#
+# Provides an implementation of the xyz.openbmc_project.State.Host
+# interface.
+VIRTUAL-RUNTIME_obmc-host-state-manager ?= "phosphor-state-manager-host"
+
+# obmc-discover-system-state
+#
+# Provides an implementation of phosphor-discover-system-state, which, if the
+# host is powered off, will check the current power policy and, if necessary,
+# power the host back on.
+VIRTUAL-RUNTIME_obmc-discover-system-state ?= "phosphor-state-manager-discover"
+
+# obmc-fan-presence
+#
+# Provides implementations of fan presence detection
+VIRTUAL-RUNTIME_obmc-fan-presence ?= "phosphor-fan-presence-tach"
+
+# obmc-fan-control
+#
+# Provides implementations of fan control
+VIRTUAL-RUNTIME_obmc-fan-control ?= "phosphor-fan-control"
+
+# obmc-inventory-manager
+#
+# Provides an implementation of the xyz.openbmc_project.Inventory.Manager
+# interface.
+VIRTUAL-RUNTIME_obmc-inventory-manager ?= "phosphor-inventory-manager"
+
+# obmc-led-manager
+#
+# Provides an implementation of the xyz.openbmc_project.ledmanager interface.
+VIRTUAL-RUNTIME_obmc-leds-manager ?= "phosphor-led-manager"
+
+# obmc-led-monitor
+#
+# Provides an implementation of the FRU fault monitor.
+VIRTUAL-RUNTIME_obmc-led-monitor ?= "phosphor-led-manager-faultmonitor"
+
+# obmc-led-sysfs
+#
+# Provides an implementation of xyz.openbmc_project.Led.Physical for
+# Linux kernel LED subsystem LEDs.
+VIRTUAL-RUNTIME_obmc-leds-sysfs ?= "phosphor-led-sysfs"
+
+# obmc-bmc-download-mgr
+#
+# Provides an implementation of the xyz.openbmc_project.Common.TFTP
+# interface.
+VIRTUAL-RUNTIME_obmc-bmc-download-mgr ?= "phosphor-software-manager-download-mgr"
+
+# obmc-bmc-version
+#
+# Provides an implementation of the xyz.openbmc_project.Software.Version
+# interface.
+VIRTUAL-RUNTIME_obmc-bmc-version ?= "phosphor-software-manager-version"
+
+# obmc-bmc-updater
+#
+# Provides an implementation of the xyz.openbmc_project.Software.Activation
+# interface.
+VIRTUAL-RUNTIME_obmc-bmc-updater ?= "phosphor-software-manager-updater"
+
+# obmc-sensors-hwmon
+#
+# Provides an implementation of xyz.openbmc_project.Sensor.Value
+# for hwmon sensors.
+VIRTUAL-RUNTIME_obmc-sensors-hwmon ?= "phosphor-hwmon"
+
+# obmc-dump-manager
+# Provide support for managing dump
+VIRTUAL-RUNTIME_obmc-dump-manager ?= "phosphor-debug-collector-manager"
+
+# obmc-dump-monitor
+# Provide support for monitoring BMC core dumps
+VIRTUAL-RUNTIME_obmc-dump-monitor ?= "phosphor-debug-collector-monitor"
+
+# phosphor-hwmon-config
+#
+# The phosphor-hwmon package can have its configuration generated
+# automatically if the MRW feature is enabled.
+VIRTUAL-RUNTIME_phosphor-hwmon-config ?= ""
+
+# obmc-network-manager
+#
+# Provide support for managing network
+VIRTUAL-RUNTIME_obmc-network-manager ?= "phosphor-network"
+
+# Configuration overrides for phosphor-ipmi-fru.
+#
+# The phosphor-ipmi-fru application is data-driven and requires an input
+# mapping of how the host firmware reports inventory via IPMI and the mapping
+# of that inventory metadata to DBus objects interfaces and properties.
+
+# The phosphor-ipmi-fru application is data-driven and requires an input
+# mapping of how the host firmware reports inventory via IPMI.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-ipmi-fru build process.
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-hostfw-config ?= "phosphor-ipmi-fru-hostfw-config-example-native"
+
+# The phosphor-ipmi-fru application is data-driven and requires an input
+# mapping of IPMI inventory metadata to DBus objects interfaces and properties.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-ipmi-fru build process in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory ?= \
+ "phosphor-ipmi-fru-inventory-example-native"
+
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-properties ?= \
+ "phosphor-ipmi-fru-properties-native"
+
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-read-inventory ?= \
+ "phosphor-ipmi-fru-read-inventory-example-native"
+
+# Configuration overrides for phosphor-host-ipmid.
+#
+# The phosphor-host-ipmid application is data-driven.
+
+# The phosphor-host-ipmid application is data-driven and requires an input
+# mapping of IPMI inventory sensor metadata to DBus objects interfaces and properties.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-host-ipmid build process in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-sensor-inventory ?= \
+ "phosphor-ipmi-sensor-inventory-native"
+
+# The phosphor-host-ipmid application is data-driven and requires an input
+# mapping of inventory object path to the sensor number and sensor metadata.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-host-ipmid build process in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-inventory-sel ?= \
+ "phosphor-ipmi-inventory-sel-native"
+
+# Various other overrides.
+
+# The phosphor-led-manager application is data-driven and requires an input
+# yaml of LED group and members.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-led-manager build process in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native ?= \
+ "phosphor-led-manager-config-example-native"
+
+# The phosphor-logging application has a data driven plugin that adds FRU
+# callout information to error logs, when applications generating error logs
+# add the requisite callout metadata to the systemd journal. The plugin requires
+# an input mapping of Linux sysfs devices to OpenBMC DBus objects.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-logging build process in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-logging-callouts ?= \
+ "phosphor-logging-callouts-example-native"
+
+# The phosphor-fan-presence application is data driven and requires an input
+# YAML that maps fans to their tach sensors. This virtual is a recipe that
+# provides that mapping by installing configuration files in the format and
+# sysroot location expected by the phosphor-fan-presence build process in the
+# sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config ?= \
+ "phosphor-fan-presence-config"
+
+# The phosphor-fan-control application is data driven and requires a YAML file
+# to define the fans in the system. This virtual is a recipe that provides
+# that definition by installing the YAML file in the format and sysroot
+# location expected by the phosphor-fan-control build process in the sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config ?= \
+ "phosphor-fan-control-fan-config"
+
+# The phosphor-gpio-monitor application is data-driven and requires an input.
+# The application then watches the passed in input event entry for the
+# change in polarity for the value matching user input. Once the required
+# condition is met, it calls into a systemd target file if one is mentioned
+# in input.
+PREFERRED_PROVIDER_virtual/obmc-gpio-monitor ?= "phosphor-gpio-monitor"
+
+# The phosphor-watchdog application is data-driven and requires an input.
+# The application then starts a timer in disabled state. User of this timer
+# needs to first enable and then use it. This also provides a way for changing
+# the timeout if needed.
+PREFERRED_PROVIDER_virtual/obmc-watchdog ?= "phosphor-watchdog"
+
+# obmc-user-mgmt
+#
+# Provides an implementation of xyz.openbmc_project.User.Manager catering
+# to user management
+VIRTUAL-RUNTIME_obmc-user-mgmt ?= "phosphor-user-manager"
+
+OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project"
+OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project"
+
+# VIRTUAL-RUNTIME_phosphor-ipmi-providers are the set of shared library
+# plugins for the host-ipmid application. By default the IPMI FRU plugin
+# is enabled. Additionally the host-ipmid recipe uses
+# VIRTUAL-RUNTIME_phosphor-ipmi-providers to compute a list of potential
+# IPMI whitelist recipe dependencies. For example:
+#
+# VIRTUAL-RUNTIME_phosphor-ipmi-providers ?= "phosphor-ipmi-fru"
+#
+# Will add a build dependency to host-ipmid on the
+# phosphor-ipmi-fru-whitelist-native recipe.
+VIRTUAL-RUNTIME_phosphor-ipmi-providers ?= "phosphor-ipmi-fru"
+
+# Set security headers on builds
+require conf/distro/include/security_flags.inc
+
+# Disable security on croserver.
+# Remove if https://github.com/open-power/eCMD/pull/433 is ever merged
+SECURITY_STRINGFORMAT:pn-croserver = ""
+# obmc-libobmc-intf doesn't compile with security flags enabled
+SECURITY_CFLAGS:pn-obmc-libobmc-intf = ""
+
+# remove when https://gerrit.openbmc-project.xyz/c/openbmc/pldm/+/39984
+# is merged and rev bumped
+SECURITY_CFLAGS:pn-pldm = ""
+
+# We generally want to enable LTO with meson
+EXTRA_OEMESON:append:class-target = " -Db_lto=true"
+
+# Set the root password to '0penBmc'
+# Override this in your local.conf
+inherit extrausers
+
+# This is the default password for the OpenBMC root user account (0penBmc)
+# salted and hashed with SHA512 suitable for /etc/shadow or `usermod -p`.
+DEFAULT_OPENBMC_PASSWORD = "'\$6\$UGMqyqdG\$GqTb3tXPFx9AJlzTw/8X5RoW2Z.100dT.acuk8AFJfNQYr.ZRL8itMIgLqsdq46RNHgiv78XayOSl.IbR4DFU.'"
+
+EXTRA_USERS_PARAMS:pn-obmc-phosphor-image = " \
+ usermod -p ${DEFAULT_OPENBMC_PASSWORD} root; \
+ "
diff --git a/conf/distro/include/phosphor-isolation.inc b/conf/distro/include/phosphor-isolation.inc
new file mode 100644
index 0000000000000000000000000000000000000000..007f6760a4e702f8647680ce857a728bb40ec4d4
--- /dev/null
+++ b/conf/distro/include/phosphor-isolation.inc
@@ -0,0 +1,2 @@
+DISTRO_FEATURES += "isolate-bmc"
+DISTROOVERRIDES .= ":df-isolate-bmc"
diff --git a/conf/distro/include/phosphor-mmc.inc b/conf/distro/include/phosphor-mmc.inc
new file mode 100644
index 0000000000000000000000000000000000000000..05d79c71f1969cd768f88d1d8fc725f88c99a90c
--- /dev/null
+++ b/conf/distro/include/phosphor-mmc.inc
@@ -0,0 +1,2 @@
+DISTRO_FEATURES += "phosphor-mmc"
+DISTROOVERRIDES .= ":df-phosphor-mmc"
diff --git a/conf/distro/include/phosphor-mrw.inc b/conf/distro/include/phosphor-mrw.inc
new file mode 100644
index 0000000000000000000000000000000000000000..56e0d015cd09b1b4fd60cf0328a847674590fff4
--- /dev/null
+++ b/conf/distro/include/phosphor-mrw.inc
@@ -0,0 +1,17 @@
+DISTRO_FEATURES += "obmc-mrw"
+DISTRO_FEATURES_FILTER_NATIVE += "obmc-mrw"
+DISTRO_FEATURES_FILTER_NATIVESDK += "obmc-mrw"
+
+DISTROOVERRIDES .= ":df-mrw"
+
+VIRTUAL-RUNTIME_phosphor-hwmon-config:df-mrw ?= "phosphor-hwmon-config-mrw"
+
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory:df-mrw ?= "phosphor-ipmi-fru-inventory-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-properties:df-mrw ?= "phosphor-ipmi-fru-properties-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-read-inventory:df-mrw ?= "phosphor-ipmi-fru-read-inventory-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-sensor-inventory:df-mrw ?= "phosphor-ipmi-sensor-inventory-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-inventory-sel:df-mrw ?= "phosphor-ipmi-inventory-sel-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native:df-mrw ?= "phosphor-led-manager-config-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-logging-callouts:df-mrw ?= "phosphor-logging-callouts-mrw-native"
+PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config:df-mrw ?= "phosphor-fan-presence-mrw"
+PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config:df-mrw ?= "phosphor-fan-control-fan-config-mrw"
diff --git a/conf/distro/include/phosphor-ubi.inc b/conf/distro/include/phosphor-ubi.inc
new file mode 100644
index 0000000000000000000000000000000000000000..61604461a28bf82026e662c1a8907e3357ed8713
--- /dev/null
+++ b/conf/distro/include/phosphor-ubi.inc
@@ -0,0 +1,2 @@
+DISTRO_FEATURES += "obmc-ubi-fs"
+DISTROOVERRIDES .= ":df-obmc-ubi-fs"
diff --git a/conf/distro/openbmc-phosphor.conf b/conf/distro/openbmc-phosphor.conf
new file mode 100644
index 0000000000000000000000000000000000000000..de15fbcc6b34d64ffae0775bf5a825fcee133466
--- /dev/null
+++ b/conf/distro/openbmc-phosphor.conf
@@ -0,0 +1 @@
+require conf/distro/include/phosphor-base.inc
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000000000000000000000000000000000000..a11ff8a0975eeb4bef4034bf224ee181aa8060bd
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,26 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "phosphor-layer"
+BBFILE_PATTERN_phosphor-layer := "^${LAYERDIR}/"
+LAYERVERSION_phosphor-layer = "1"
+LAYERDEPENDS_phosphor-layer = "core"
+LAYERDEPENDS_phosphor-layer += "openembedded-layer"
+LAYERDEPENDS_phosphor-layer += "meta-python"
+LAYERDEPENDS_phosphor-layer += "networking-layer"
+LAYERSERIES_COMPAT_phosphor-layer = "honister kirkstone"
+
+IMAGE_FEATURES[validitems] += "tools-profile"
+
+BBFILES_DYNAMIC += " \
+ aspeed-layer:${LAYERDIR}/dynamic-layers/aspeed-layer/recipes-*/*/*.bb \
+ aspeed-layer:${LAYERDIR}/dynamic-layers/aspeed-layer/recipes-*/*/*.bbappend \
+ nuvoton-layer:${LAYERDIR}/dynamic-layers/nuvoton-layer/recipes-*/*/*.bb \
+ nuvoton-layer:${LAYERDIR}/dynamic-layers/nuvoton-layer/recipes-*/*/*.bbappend \
+ tpm-layer:${LAYERDIR}/dynamic-layers/tpm-layer/recipes-*/*/*.bb \
+ tpm-layer:${LAYERDIR}/dynamic-layers/tpm-layer/recipes-*/*/*.bbappend \
+"
diff --git a/conf/local.conf.sample b/conf/local.conf.sample
new file mode 100644
index 0000000000000000000000000000000000000000..b24f032647c4ea9698d3536d0743fc77218607ad
--- /dev/null
+++ b/conf/local.conf.sample
@@ -0,0 +1,19 @@
+MACHINE ??= "qemuarm"
+DISTRO ?= "openbmc-phosphor"
+PACKAGE_CLASSES ?= "package_ipk"
+SANITY_TESTED_DISTROS:append ?= " *"
+EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
+USER_CLASSES ?= "buildstats"
+PATCHRESOLVE = "noop"
+BB_DISKMON_DIRS ??= "\
+ STOPTASKS,${TMPDIR},1G,100K \
+ STOPTASKS,${DL_DIR},1G,100K \
+ STOPTASKS,${SSTATE_DIR},1G,100K \
+ STOPTASKS,/tmp,100M,100K \
+ HALT,${TMPDIR},100M,1K \
+ HALT,${DL_DIR},100M,1K \
+ HALT,${SSTATE_DIR},100M,1K \
+ HALT,/tmp,10M,1K"
+CONF_VERSION = "2"
+MACHINE_FEATURES_BACKFILL_CONSIDERED = "qemu-usermode"
+
diff --git a/conf/machine/include/ibm-power-cpu.inc b/conf/machine/include/ibm-power-cpu.inc
new file mode 100644
index 0000000000000000000000000000000000000000..1ff6dd3046cb9e31787c57f5b3c206e814a36d03
--- /dev/null
+++ b/conf/machine/include/ibm-power-cpu.inc
@@ -0,0 +1 @@
+MACHINEOVERRIDES =. "ibm-power-cpu:"
diff --git a/conf/machine/include/ibm-power10-cpu.inc b/conf/machine/include/ibm-power10-cpu.inc
new file mode 100644
index 0000000000000000000000000000000000000000..7d518ddaa135c9fce21b7ce027d78ae5d78d57d2
--- /dev/null
+++ b/conf/machine/include/ibm-power10-cpu.inc
@@ -0,0 +1,2 @@
+MACHINEOVERRIDES =. "ibm-power10-cpu:"
+require conf/machine/include/ibm-power-cpu.inc
diff --git a/conf/machine/include/ibm-power8-cpu.inc b/conf/machine/include/ibm-power8-cpu.inc
new file mode 100644
index 0000000000000000000000000000000000000000..8be9d53956b6a3a3b8e2f5b96ad89d0b7a566ac5
--- /dev/null
+++ b/conf/machine/include/ibm-power8-cpu.inc
@@ -0,0 +1,2 @@
+MACHINEOVERRIDES =. "ibm-power8-cpu:"
+require conf/machine/include/ibm-power-cpu.inc
diff --git a/conf/machine/include/ibm-power9-cpu.inc b/conf/machine/include/ibm-power9-cpu.inc
new file mode 100644
index 0000000000000000000000000000000000000000..d92cbdf37d354fc18def554da8a12bd254b58c53
--- /dev/null
+++ b/conf/machine/include/ibm-power9-cpu.inc
@@ -0,0 +1,2 @@
+MACHINEOVERRIDES =. "ibm-power9-cpu:"
+require conf/machine/include/ibm-power-cpu.inc
diff --git a/conf/machine/include/obmc-bsp-common.inc b/conf/machine/include/obmc-bsp-common.inc
new file mode 100644
index 0000000000000000000000000000000000000000..9098a8a4adf84e7ec7092884a7e2a3841e79b41a
--- /dev/null
+++ b/conf/machine/include/obmc-bsp-common.inc
@@ -0,0 +1,29 @@
+#@TYPE: Machine
+#@NAME: OpenBMC
+#@DESCRIPTION: Common machine configuration for OpenBMC chips
+
+KERNEL_CLASSES ?= "kernel-fitimage"
+KERNEL_IMAGETYPES ?= "fitImage vmlinux"
+
+# Static images. This is the default if no other layout is specified.
+IMAGE_FSTYPES += "${@bb.utils.contains_any('DISTRO_FEATURES', \
+ 'obmc-ubi-fs phosphor-mmc', \
+ '', \
+ 'mtd-static mtd-static-tar mtd-static-alltar', d)}"
+
+# UBI images.
+IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', \
+ 'obmc-ubi-fs', \
+ 'mtd-ubi mtd-ubi-tar', \
+ '', d)}"
+
+# eMMC images.
+IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', \
+ 'phosphor-mmc', \
+ 'wic.xz mmc-ext4-tar', \
+ '', d)}"
+
+INITRAMFS_CTYPE ?= "xz"
+INITRAMFS_FSTYPES = "cpio.${INITRAMFS_CTYPE}"
+INITRAMFS_IMAGE = "obmc-phosphor-initramfs"
+INITRAMFS_IMAGE:df-obmc-ubi-fs = ""
diff --git a/conf/machine/include/obmc-evb-common.inc b/conf/machine/include/obmc-evb-common.inc
new file mode 100644
index 0000000000000000000000000000000000000000..0d41a1b9784350d28d0c31f3d935ad8ac2331821
--- /dev/null
+++ b/conf/machine/include/obmc-evb-common.inc
@@ -0,0 +1,4 @@
+# EVB systems have different packages they can support, due to not having a
+# managed host. Enable this machine override to allow other recipes to know
+# that the machine is a special type.
+MACHINEOVERRIDES =. "phosphor-evb:"
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0001-aspeed-Disable-unnecessary-features.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0001-aspeed-Disable-unnecessary-features.patch
new file mode 100644
index 0000000000000000000000000000000000000000..3ba91f5d6e41c5e91988b61b94820b925a0eac6f
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0001-aspeed-Disable-unnecessary-features.patch
@@ -0,0 +1,278 @@
+From 97566253f336d85d23abef777b54dc572ca7ac9a Mon Sep 17 00:00:00 2001
+From: Andrew Jeffery
+Date: Mon, 23 Jul 2018 15:22:34 +0930
+Subject: [PATCH] aspeed: Disable unnecessary features
+
+Adjust board_init() to disable hardware features that we don't need
+available during normal BMC operation.
+
+Signed-off-by: Andrew Jeffery
+---
+ arch/arm/include/asm/arch-aspeed/regs-lpc.h | 29 +++++++++++
+ arch/arm/include/asm/arch-aspeed/regs-scu.h | 8 ++-
+ arch/arm/include/asm/arch-aspeed/regs-sdmc.h | 17 +++++++
+ board/aspeed/ast-g4/ast-g4.c | 46 ++++++++++++++++-
+ board/aspeed/ast-g5/ast-g5.c | 52 +++++++++++++++++++-
+ 5 files changed, 149 insertions(+), 3 deletions(-)
+ create mode 100644 arch/arm/include/asm/arch-aspeed/regs-lpc.h
+
+diff --git a/arch/arm/include/asm/arch-aspeed/regs-lpc.h b/arch/arm/include/asm/arch-aspeed/regs-lpc.h
+new file mode 100644
+index 000000000000..b0162ae4f37c
+--- /dev/null
++++ b/arch/arm/include/asm/arch-aspeed/regs-lpc.h
+@@ -0,0 +1,29 @@
++/* arch/arm/mach-aspeed/include/mach/regs-sdmc.h
++ *
++ * Copyright (C) 2018 IBM Corp
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * History :
++ * 1. 2018/07/23 Andrew Jeffery Create
++ *
++ ******************************************************************************/
++#ifndef __AST_REGS_LPC_H
++#define __AST_REGS_LPC_H
++
++/*
++ * Register for LPC
++ */
++
++#define AST_LPC_HICR5 0x80
++#define AST_LPC_HICRB 0x100
++
++/* AST_LPC_HICR5 : 0x80 Host Interface Control Register 5 */
++#define LPC_HICR5_ENFWH (0x1 << 10)
++
++/* AST_LPC_HICRB : 0x100 Host Interface Control Register B */
++#define LPC_HICRB_ILPC2AHB (0x1 << 6)
++
++#endif
+diff --git a/arch/arm/include/asm/arch-aspeed/regs-scu.h b/arch/arm/include/asm/arch-aspeed/regs-scu.h
+index b714fa92341d..c9b91795d1aa 100644
+--- a/arch/arm/include/asm/arch-aspeed/regs-scu.h
++++ b/arch/arm/include/asm/arch-aspeed/regs-scu.h
+@@ -466,6 +466,7 @@
+ #define SCU_MISC_JTAG__M_TO_PCIE_EN (0x1 << 14)
+ #define SCU_MISC_VUART_TO_CTRL (0x1 << 13)
+ #define SCU_MISC_DIV13_EN (0x1 << 12)
++#define SCU_MISC_DEBUG_UART (0x1 << 10)
+ #define SCU_MISC_Y_CLK_INVERT (0x1 << 11)
+ #define SCU_MISC_OUT_DELAY (0x1 << 9)
+ #define SCU_MISC_PCI_TO_AHB_DIS (0x1 << 8)
+@@ -548,6 +549,7 @@
+ /* AST_SCU_VGA_SCRATCH7 0x6c - VGA Scratch register */
+
+ /* AST_SCU_HW_STRAP1 0x70 - hardware strapping register */
++#define SCU_HW_STRAP_LPC_DEC_SUPER_IO (0x1 << 20)
+ #ifdef AST_SOC_G5
+
+ #define CLK_25M_IN (0x1 << 23)
+@@ -593,7 +595,6 @@
+
+ #define SCU_HW_STRAP_GPIOE_PT_EN (0x1 << 22)
+ #define SCU_HW_STRAP_GPIOD_PT_EN (0x1 << 21)
+-#define SCU_HW_STRAP_LPC_DEC_SUPER_IO (0x1 << 20)
+ #define SCU_HW_STRAP_ACPI_DIS (0x1 << 19)
+
+ /* bit 23, 18 [1,0] */
+@@ -940,6 +941,11 @@
+
+ /* AST_SCU_UART24_REF 0x160 - Generate UART 24Mhz Ref from H-PLL when CLKIN is 25Mhz */
+ /* AST_SCU_PCIE_CONFIG_SET 0x180 - PCI-E Configuration Setting Control Register */
++#define SCU_PCIE_CONFIG_SET_BMC_DMA (0x1 << 14)
++#define SCU_PCIE_CONFIG_SET_BMC_MMIO (0x1 << 9)
++#define SCU_PCIE_CONFIG_SET_BMC_EN (0x1 << 8)
++#define SCU_PCIE_CONFIG_SET_VGA_MMIO (0x1 << 1)
++
+ /* AST_SCU_BMC_MMIO_DEC 0x184 - BMC MMIO Decode Setting Register */
+ /* AST_SCU_DEC_AREA1 0x188 - 1st relocated controller decode area location */
+ /* AST_SCU_DEC_AREA2 0x18C - 2nd relocated controller decode area location */
+diff --git a/arch/arm/include/asm/arch-aspeed/regs-sdmc.h b/arch/arm/include/asm/arch-aspeed/regs-sdmc.h
+index 2cc26d29aa9e..2773d3c19e5a 100644
+--- a/arch/arm/include/asm/arch-aspeed/regs-sdmc.h
++++ b/arch/arm/include/asm/arch-aspeed/regs-sdmc.h
+@@ -13,11 +13,14 @@
+ #ifndef __AST_REGS_SDMC_H
+ #define __AST_REGS_SDMC_H
+
++#include
++
+ /*
+ * Register for SDMC
+ */
+ #define AST_SDMC_PROTECT 0x00 /* protection key register */
+ #define AST_SDMC_CONFIG 0x04 /* Configuration register */
++#define AST_SDMC_GFX_PROT 0x08 /* Graphics protection register */
+
+ /* AST_SDMC_PROTECT: 0x00 - protection key register */
+ #define SDMC_PROTECT_UNLOCK 0xFC600309
+@@ -29,4 +32,18 @@
+ #define SDMC_CONFIG_CACHE_EN (0x1 << 10)
+ #define SDMC_CONFIG_EEC_EN (0x1 << 7)
+
++/* AST_SDMC_GFX_PROT : 0x08 - Graphics protection register */
++#define SDMC_GFX_PROT_VGA_CURSOR (0x1 << 0)
++#define SDMC_GFX_PROT_VGA_CG_READ (0x1 << 1)
++#define SDMC_GFX_PROT_VGA_ASCII_READ (0x1 << 2)
++#define SDMC_GFX_PROT_VGA_CRT (0x1 << 3)
++
++#if defined(AST_SOC_G5)
++#define SDMC_GFX_PROT_PCIE (0x1 << 16)
++#define SDMC_GFX_PROT_XDMA (0x1 << 17)
++#elif defined(AST_SOC_G4)
++#define SDMC_GFX_PROT_PCIE (0x1 << 10)
++#define SDMC_GFX_PROT_XDMA (0x1 << 16)
++#endif
++
+ #endif
+diff --git a/board/aspeed/ast-g4/ast-g4.c b/board/aspeed/ast-g4/ast-g4.c
+index 656495307b03..5b137e7d74bc 100644
+--- a/board/aspeed/ast-g4/ast-g4.c
++++ b/board/aspeed/ast-g4/ast-g4.c
+@@ -1,6 +1,6 @@
+ /*
+ * (C) Copyright 2002 Ryan Chen
+- * Copyright 2016 IBM Corporation
++ * Copyright 2016,2018 IBM Corporation
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+@@ -12,13 +12,57 @@
+ #include
+ #include
+ #include
++#include
+ #include
++#include
+ #include
+
+ DECLARE_GLOBAL_DATA_PTR;
+
+ int board_init(void)
+ {
++ bool sdmc_unlocked;
++ u32 val;
++
++ /* iLPC2AHB */
++ val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
++ val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
++ writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);
++
++ val = readl(AST_LPC_BASE + AST_LPC_HICRB);
++ val |= LPC_HICRB_ILPC2AHB;
++ writel(val, AST_LPC_BASE + AST_LPC_HICRB);
++
++ /* P2A, PCIe BMC */
++ val = readl(AST_SCU_BASE + AST_SCU_PCIE_CONFIG_SET);
++ val &= ~(SCU_PCIE_CONFIG_SET_BMC_DMA
++ | SCU_PCIE_CONFIG_SET_BMC_MMIO
++ | SCU_PCIE_CONFIG_SET_BMC_EN
++ | SCU_PCIE_CONFIG_SET_VGA_MMIO);
++ writel(val, AST_SCU_BASE + AST_SCU_PCIE_CONFIG_SET);
++
++ /* X-DMA */
++ sdmc_unlocked = readl(AST_SDMC_BASE + AST_SDMC_PROTECT);
++ if (!sdmc_unlocked)
++ writel(SDMC_PROTECT_UNLOCK, AST_SDMC_BASE + AST_SDMC_PROTECT);
++
++ val = readl(AST_SDMC_BASE + AST_SDMC_GFX_PROT);
++ val |= (SDMC_GFX_PROT_VGA_CURSOR
++ | SDMC_GFX_PROT_VGA_CG_READ
++ | SDMC_GFX_PROT_VGA_ASCII_READ
++ | SDMC_GFX_PROT_VGA_CRT
++ | SDMC_GFX_PROT_PCIE
++ | SDMC_GFX_PROT_XDMA);
++ writel(val, AST_SDMC_BASE + AST_SDMC_GFX_PROT);
++
++ if (!sdmc_unlocked)
++ writel(~SDMC_PROTECT_UNLOCK, AST_SDMC_BASE + AST_SDMC_PROTECT);
++
++ /* LPC2AHB */
++ val = readl(AST_LPC_BASE + AST_LPC_HICR5);
++ val &= ~LPC_HICR5_ENFWH;
++ writel(val, AST_LPC_BASE + AST_LPC_HICR5);
++
+ /* address of boot parameters */
+ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+ gd->flags = 0;
+diff --git a/board/aspeed/ast-g5/ast-g5.c b/board/aspeed/ast-g5/ast-g5.c
+index e67a4bf8b2b4..12496cea09b7 100644
+--- a/board/aspeed/ast-g5/ast-g5.c
++++ b/board/aspeed/ast-g5/ast-g5.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright 2016 IBM Corporation
++ * Copyright 2016,2018 IBM Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+@@ -12,12 +12,62 @@
+
+ #include
+ #include
++#include
++#include
++#include
+ #include
+
+ DECLARE_GLOBAL_DATA_PTR;
+
+ int board_init(void)
+ {
++ bool sdmc_unlocked;
++ u32 val;
++
++ /* iLPC2AHB */
++ val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
++ val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
++ writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);
++
++ val = readl(AST_LPC_BASE + AST_LPC_HICRB);
++ val |= LPC_HICRB_ILPC2AHB;
++ writel(val, AST_LPC_BASE + AST_LPC_HICRB);
++
++ /* P2A, PCIe BMC */
++ val = readl(AST_SCU_BASE + AST_SCU_PCIE_CONFIG_SET);
++ val &= ~(SCU_PCIE_CONFIG_SET_BMC_DMA
++ | SCU_PCIE_CONFIG_SET_BMC_MMIO
++ | SCU_PCIE_CONFIG_SET_BMC_EN
++ | SCU_PCIE_CONFIG_SET_VGA_MMIO);
++ writel(val, AST_SCU_BASE + AST_SCU_PCIE_CONFIG_SET);
++
++ /* Debug UART */
++ val = readl(AST_SCU_BASE + AST_SCU_MISC1_CTRL);
++ val |= SCU_MISC_DEBUG_UART;
++ writel(val, AST_SCU_BASE + AST_SCU_MISC1_CTRL);
++
++ /* X-DMA */
++ sdmc_unlocked = readl(AST_SDMC_BASE + AST_SDMC_PROTECT);
++ if (!sdmc_unlocked)
++ writel(SDMC_PROTECT_UNLOCK, AST_SDMC_BASE + AST_SDMC_PROTECT);
++
++ val = readl(AST_SDMC_BASE + AST_SDMC_GFX_PROT);
++ val |= (SDMC_GFX_PROT_VGA_CURSOR
++ | SDMC_GFX_PROT_VGA_CG_READ
++ | SDMC_GFX_PROT_VGA_ASCII_READ
++ | SDMC_GFX_PROT_VGA_CRT
++ | SDMC_GFX_PROT_PCIE
++ | SDMC_GFX_PROT_XDMA);
++ writel(val, AST_SDMC_BASE + AST_SDMC_GFX_PROT);
++
++ if (!sdmc_unlocked)
++ writel(~SDMC_PROTECT_UNLOCK, AST_SDMC_BASE + AST_SDMC_PROTECT);
++
++ /* LPC2AHB */
++ val = readl(AST_LPC_BASE + AST_LPC_HICR5);
++ val &= ~LPC_HICR5_ENFWH;
++ writel(val, AST_LPC_BASE + AST_LPC_HICR5);
++
+ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+ gd->flags = 0;
+
+--
+2.19.1
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ee115e8e2868e388934dfc78ab2cca6cfa5e74e0
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch
@@ -0,0 +1,33 @@
+From 8ef2f4dcd208e072ab491874c06722c3a8ec69e3 Mon Sep 17 00:00:00 2001
+From: "Edward A. James"
+Date: Thu, 13 Jul 2017 13:42:18 -0500
+Subject: [PATCH 1/4] configs/ast: Add redundnant env
+
+Configure ast chips to run redundant u-boot environments.
+
+Signed-off-by: Edward A. James
+---
+ include/configs/ast-common.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
+index eff6d2b529..a0243083bd 100644
+--- a/include/configs/ast-common.h
++++ b/include/configs/ast-common.h
+@@ -104,9 +104,12 @@
+ #define CONFIG_SYS_MAX_FLASH_SECT (8192) /* max number of sectors on one chip */
+ #define CONFIG_ENV_IS_IN_FLASH 1
+ #define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + 0x60000)
++#define CONFIG_ENV_ADDR_REDUND (AST_FMC_CS0_BASE + 0x70000)
+
+ #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */
+-#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
++#define CONFIG_ENV_OFFSET_REDUND 0x70000
++#define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */
++#define CONFIG_ENV_SIZE_REDUND 0x10000
+
+ #define CONFIG_BOOTCOMMAND "bootm 20080000"
+ #define CONFIG_ENV_OVERWRITE
+--
+2.14.3
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2de2d823451baec84eb638705569650a8036427b
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch
@@ -0,0 +1,43 @@
+From cbb09e400a5283e5b543e2b01b8c0038890a5260 Mon Sep 17 00:00:00 2001
+From: Xo Wang
+Date: Thu, 20 Oct 2016 17:42:13 -0700
+Subject: [PATCH 2/2] board/aspeed, aspeednic: Use MAC2 for networking
+
+Enable and select MAC2 for aspeednic.
+
+Signed-off-by: Xo Wang
+---
+ drivers/net/aspeednic.c | 4 ++--
+ include/configs/ast-g5-ncsi.h | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
+index 8b85893..cff8370 100644
+--- a/drivers/net/aspeednic.c
++++ b/drivers/net/aspeednic.c
+@@ -18,8 +18,8 @@
+ /* From the board config file */
+ #define CONFIG_MAC1_PHY_SETTING 2
+ #define CONFIG_MAC2_PHY_SETTING 0
+-#define CONFIG_ASPEED_MAC_NUMBER 1
+-#define CONFIG_ASPEED_MAC_CONFIG 1 // config MAC1
++#define CONFIG_ASPEED_MAC_NUMBER 2
++#define CONFIG_ASPEED_MAC_CONFIG 2 // config MAC2
+ #define _PHY_SETTING_CONCAT(mac) CONFIG_MAC##mac##_PHY_SETTING
+ #define _GET_MAC_PHY_SETTING(mac) _PHY_SETTING_CONCAT(mac)
+ #define CONFIG_ASPEED_MAC_PHY_SETTING \
+diff --git a/include/configs/ast-g5-ncsi.h b/include/configs/ast-g5-ncsi.h
+index f73a8f1..1408618 100644
+--- a/include/configs/ast-g5-ncsi.h
++++ b/include/configs/ast-g5-ncsi.h
+@@ -22,6 +22,7 @@
+ /* Ethernet */
+ #define CONFIG_LIB_RAND
+ #define CONFIG_ASPEEDNIC
++#define CONFIG_MAC2_ENABLE
+
+ /* platform.S settings */
+ #define CONFIG_DRAM_ECC_SIZE 0x10000000
+--
+2.8.0.rc3.226.g39d4020
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d04156712c6a108ec01acdd5e4a1f2c84de23a04
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch
@@ -0,0 +1,28 @@
+From c678bbdad037604850613e775baacc52ed92c9c1 Mon Sep 17 00:00:00 2001
+From: Patrick Williams
+Date: Fri, 21 Jul 2017 16:30:01 -0500
+Subject: [PATCH 2/4] config/ast-common: hack bootopts
+
+Signed-off-by: Patrick Williams
+---
+ include/configs/ast-common.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
+index a0243083bd..7ddba62298 100644
+--- a/include/configs/ast-common.h
++++ b/include/configs/ast-common.h
+@@ -96,7 +96,10 @@
+ #define CONFIG_CMD_MTDPARTS
+ #endif
+
++#if 0
+ #define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/ram rw"
++#endif
++#define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/mtdblock4 ro"
+
+ #define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */
+ #define CONFIG_FMC_CS 1
+--
+2.14.3
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2c8dee01951ade4e0002cb6e294374b2591492e9
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch
@@ -0,0 +1,69 @@
+From 0c77be343fc4781719dcc0748bc29a26ea83e0a3 Mon Sep 17 00:00:00 2001
+From: Adriana Kobylak
+Date: Wed, 9 Aug 2017 14:11:56 -0500
+Subject: [PATCH 3/4] config/ast-common: Add bootopts to support ubi and mtd
+ partitioning
+
+Signed-off-by: Adriana Kobylak
+---
+ include/configs/ast-common.h | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
+index 7ddba62298..14191e4ab0 100644
+--- a/include/configs/ast-common.h
++++ b/include/configs/ast-common.h
+@@ -84,6 +84,12 @@
+ #define CONFIG_SYS_MAXARGS 16
+ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
+
++/*
++ * Dynamic MTD Partition support
++ */
++#define MTDIDS_DEFAULT "nor0=bmc"
++#define MTDPARTS_DEFAULT "mtdparts=bmc:384k(u-boot),128k(u-boot-env),-(obmc-ubi)"
++
+ /*
+ * Optional MTD and UBI support
+ */
+@@ -99,7 +105,7 @@
+ #if 0
+ #define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/ram rw"
+ #endif
+-#define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/mtdblock4 ro"
++#define CONFIG_BOOTARGS "console=ttyS4,115200n8 ubi.mtd=obmc-ubi,0,0,0 ubi.mtd=alt-obmc-ubi,0,0,4 ro rootfstype=squashfs"
+
+ #define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */
+ #define CONFIG_FMC_CS 1
+@@ -108,18 +114,27 @@
+ #define CONFIG_ENV_IS_IN_FLASH 1
+ #define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + 0x60000)
+ #define CONFIG_ENV_ADDR_REDUND (AST_FMC_CS0_BASE + 0x70000)
++#define CONFIG_LOADADDR 80800000
+
+ #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */
+ #define CONFIG_ENV_OFFSET_REDUND 0x70000
+ #define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */
+ #define CONFIG_ENV_SIZE_REDUND 0x10000
+
+-#define CONFIG_BOOTCOMMAND "bootm 20080000"
++#define CONFIG_BOOTCOMMAND "run set_bootargs; run obmc_bootcmd"
+ #define CONFIG_ENV_OVERWRITE
+
+ #define ASPEED_ENV_SETTINGS \
++ "ubiblock=0,1 \0" \
++ "root=/dev/ubiblock0_1 \0" \
++ "kernelname=kernel-0 \0" \
++ "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" \
++ "set_bootargs=setenv bootargs " CONFIG_BOOTARGS " ubi.block=\${ubiblock} root=\${root} \0" \
++ "obmc_bootcmd=ubi part obmc-ubi; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \
+ "verify=yes\0" \
+ "spi_dma=yes\0" \
++ "mtdids=" MTDIDS_DEFAULT "\0" \
++ "mtdparts=" MTDPARTS_DEFAULT "\0" \
+ ""
+
+ #endif /* __AST_COMMON_CONFIG_H */
+--
+2.14.3
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch
new file mode 100644
index 0000000000000000000000000000000000000000..7712f4d1bbc85856fea7149588960395754e99e5
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch
@@ -0,0 +1,46 @@
+From 878651bbaa8a7da203fafccb164ca7b32287b8f9 Mon Sep 17 00:00:00 2001
+From: "Edward A. James"
+Date: Thu, 9 Nov 2017 11:39:10 -0600
+Subject: [PATCH 4/4] config/ast-common: Add conditional factory reset command
+
+Factory reset (removing persistent rwfs) has to occur before we've
+mounted the rwfs. However, the variable to determine whether or not to
+do the reset is stored in the u-boot env. This is tricky to access
+before rwfs is mounted except in u-boot. So, check it before every boot.
+
+Signed-off-by: Edward A. James
+---
+ include/configs/ast-common.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
+index 14191e4ab0..aaa5155e00 100644
+--- a/include/configs/ast-common.h
++++ b/include/configs/ast-common.h
+@@ -121,6 +121,8 @@
+ #define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */
+ #define CONFIG_ENV_SIZE_REDUND 0x10000
+
++#define CONFIG_RWFS_SIZE 0x600000
++
+ #define CONFIG_BOOTCOMMAND "run set_bootargs; run obmc_bootcmd"
+ #define CONFIG_ENV_OVERWRITE
+
+@@ -130,11 +132,13 @@
+ "kernelname=kernel-0 \0" \
+ "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" \
+ "set_bootargs=setenv bootargs " CONFIG_BOOTARGS " ubi.block=\${ubiblock} root=\${root} \0" \
+- "obmc_bootcmd=ubi part obmc-ubi; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \
++ "obmc_bootcmd=ubi part obmc-ubi; run do_rwreset; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \
+ "verify=yes\0" \
+ "spi_dma=yes\0" \
+ "mtdids=" MTDIDS_DEFAULT "\0" \
+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
++ "rwfs_size=" __stringify(CONFIG_RWFS_SIZE) "\0" \
++ "do_rwreset=if test \"\${rwreset}\" = \"true\"; then ubi remove rwfs; ubi create rwfs \${rwfs_size}; fi \0" \
+ ""
+
+ #endif /* __AST_COMMON_CONFIG_H */
+--
+2.14.3
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch
new file mode 100644
index 0000000000000000000000000000000000000000..c54b73475841aaa2011de5d096ab39c9cd612b55
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch
@@ -0,0 +1,34 @@
+From 345b1ade63576f5a8a1c3a4a1b75aab41d84b714 Mon Sep 17 00:00:00 2001
+From: Andrew Jeffery
+Date: Fri, 20 Apr 2018 13:29:58 +0930
+Subject: [PATCH] config/ast-common: Fall-back to secondary flash on failed
+ bootm
+
+Signed-off-by: Andrew Jeffery
+---
+ include/configs/ast-common.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
+index ad08016ec110..10ef6a1955b7 100644
+--- a/include/configs/ast-common.h
++++ b/include/configs/ast-common.h
+@@ -127,12 +127,14 @@
+ #define CONFIG_ENV_OVERWRITE
+
+ #define ASPEED_ENV_SETTINGS \
++ "wdt2bite=mw.l 0x1e785024 0xa 1; mw.b 0x1e78502c 0xb3 1 \0" \
++ "bootalt=run wdt2bite \0" \
+ "ubiblock=0,1 \0" \
+ "root=/dev/ubiblock0_1 \0" \
+ "kernelname=kernel-0 \0" \
+ "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" \
+ "set_bootargs=setenv bootargs " CONFIG_BOOTARGS " ubi.block=\${ubiblock} root=\${root} \0" \
+- "obmc_bootcmd=ubi part obmc-ubi; run do_rwreset; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \
++ "obmc_bootcmd=ubi part obmc-ubi; run do_rwreset; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} || run bootalt \0" \
+ "verify=yes\0" \
+ "spi_dma=yes\0" \
+ "mtdids=" MTDIDS_DEFAULT "\0" \
+--
+2.14.1
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0006-aspeed-Enable-SPI-master-mode-by-default.patch b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0006-aspeed-Enable-SPI-master-mode-by-default.patch
new file mode 100644
index 0000000000000000000000000000000000000000..bdb9a0c8f020f31f03452fc427b5bd76382e6b9e
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/files/0006-aspeed-Enable-SPI-master-mode-by-default.patch
@@ -0,0 +1,34 @@
+From 7947dbbfb21e10e8fb0f852a14485cedf5df1d36 Mon Sep 17 00:00:00 2001
+From: Chanh Nguyen
+Date: Sun, 10 Oct 2021 11:57:20 +0700
+Subject: [PATCH] aspeed: Enable SPI master mode by default
+
+The ast2500 share the RGMII1 pin and the hw strap pins
+for SPI interface mode selection ( pin[12:13] ).
+In some systems, the RGMII/NCSI interface will use the pin.
+It makes the SPI interface mode setting is not correct.
+
+This patch will enable the SPI master mode by default.
+
+Signed-off-by: Chanh Nguyen
+---
+ board/aspeed/ast-g5/ast-g5.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/board/aspeed/ast-g5/ast-g5.c b/board/aspeed/ast-g5/ast-g5.c
+index e67a4bf8b2..82e9f81acc 100644
+--- a/board/aspeed/ast-g5/ast-g5.c
++++ b/board/aspeed/ast-g5/ast-g5.c
+@@ -21,6 +21,9 @@ int board_init(void)
+ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+ gd->flags = 0;
+
++ //pin switch by trap[13:12] -- [0:1] Enable SPI Master
++ ast_scu_spi_master(1); /* enable SPI master */
++
+ return 0;
+ }
+
+--
+2.17.1
+
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..0e18a7c1d2b80a833f6e8798bcfbc2cede38c5e1
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
@@ -0,0 +1,2 @@
+FLASH_SIZE ?= "32768"
+ASPEED_IMAGE_SIZE_KB = "${FLASH_SIZE}"
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed.inc b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed.inc
new file mode 100644
index 0000000000000000000000000000000000000000..5a0b7e66f24946d1f26568da3cb12ac4371c38f4
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed.inc
@@ -0,0 +1,32 @@
+inherit image_version
+
+SRC_URI:append:aspeed = " file://0001-configs-ast-Add-redundnant-env.patch"
+
+SRC_URI:append:aspeed:df-obmc-ubi-fs = " \
+ file://0002-config-ast-common-hack-bootopts.patch \
+ file://0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch \
+ file://0004-config-ast-common-Add-conditional-factory-reset-comm.patch \
+ file://0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch \
+ "
+
+SRC_URI:append:aspeed:df-isolate-bmc = " \
+ file://0001-aspeed-Disable-unnecessary-features.patch \
+ "
+SRC_URI:append:aspeed:df-aspeednic-use-mac2 = " \
+ file://0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch \
+ "
+SRC_URI:append:aspeed:df-aspeed-spi-master = " \
+ file://0006-aspeed-Enable-SPI-master-mode-by-default.patch \
+ "
+do_patch[depends] += "os-release:do_populate_sysroot"
+
+python do_patch:append:aspeed:df-obmc-ubi-fs () {
+ version_id=do_get_versionID(d)
+ d.setVar('VERSION_ID', version_id)
+ bb.build.exec_func("patch_kernelname", d)
+}
+
+patch_kernelname () {
+ sed -ri "s/kernel-(0|[a-fA-F0-9]{8})/kernel-${VERSION_ID}/g" \
+ ${S}/include/configs/ast-common.h &> /dev/null
+}
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..6ae4b1b3baf962b78716e8e661c4e701413ade10
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+require u-boot-aspeed.inc
+require recipes-bsp/u-boot/u-boot-obmc.inc
diff --git a/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..452ef7eccf701afbd8f1e289d0e09bc47fd4acc2
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-bsp/u-boot/u-boot-fw-utils-aspeed_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+require u-boot-aspeed.inc
diff --git a/dynamic-layers/aspeed-layer/recipes-connectivity/jsnbd/jsnbd/state_hook b/dynamic-layers/aspeed-layer/recipes-connectivity/jsnbd/jsnbd/state_hook
new file mode 100644
index 0000000000000000000000000000000000000000..3f5a974b9514dc0196bacc427a924c59eeb79b02
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-connectivity/jsnbd/jsnbd/state_hook
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+if [ $# -ne 2 ]
+then
+ echo "usage: $0 " >&2
+ exit 1
+fi
+
+action=$1
+config=$2
+
+gadget_name=mass-storage
+gadget_dir=/sys/kernel/config/usb_gadget/$gadget_name
+
+case "$config" in
+0)
+ nbd_device=/dev/nbd0
+ ;;
+1)
+ nbd_device=/dev/nbd1
+ ;;
+*)
+ echo "invalid config $config" >&2
+ exit 1
+ ;;
+esac
+
+set -ex
+
+case "$action" in
+start)
+ mkdir -p $gadget_dir
+ (
+ cd $gadget_dir
+ # http://www.linux-usb.org/usb.ids
+ # |-> 1d6b Linux Foundation
+ # |-> 0104 Multifunction Composite Gadget
+ echo "0x1d6b" > idVendor
+ echo "0x0104" > idProduct
+ mkdir -p strings/0x409
+ echo "OpenBMC" > strings/0x409/manufacturer
+ echo "Virtual Media Device" > strings/0x409/product
+ mkdir -p configs/c.1/strings/0x409
+ echo "config 1" > configs/c.1/strings/0x409/configuration
+ mkdir -p functions/mass_storage.usb0
+ ln -s functions/mass_storage.usb0 configs/c.1
+ echo 1 > functions/mass_storage.usb0/lun.0/removable
+ echo 1 > functions/mass_storage.usb0/lun.0/ro
+ echo 0 > functions/mass_storage.usb0/lun.0/cdrom
+ echo $nbd_device > functions/mass_storage.usb0/lun.0/file
+ echo "1e6a0000.usb-vhub:p4" > UDC
+ )
+ ;;
+stop)
+ (
+ cd $gadget_dir
+ rm configs/c.1/mass_storage.usb0
+ rmdir functions/mass_storage.usb0
+ rmdir configs/c.1/strings/0x409
+ rmdir configs/c.1
+ rmdir strings/0x409
+ )
+ rmdir $gadget_dir
+ ;;
+*)
+ echo "invalid action $action" >&2
+ exit 1
+esac
+
+exit 0
+
diff --git a/dynamic-layers/aspeed-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend b/dynamic-layers/aspeed-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..1061a9271fa79f4cd99b4f5e5b992ec65ec9530f
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+FILES:${PN} += "${sysconfdir}/nbd-proxy/state"
+SRC_URI += "file://state_hook"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/nbd-proxy/
+ install -m 0755 ${WORKDIR}/state_hook ${D}${sysconfdir}/nbd-proxy/state
+}
diff --git a/dynamic-layers/aspeed-layer/recipes-kernel/cf-fsi-firmware/cf-fsi-firmware_git.bb b/dynamic-layers/aspeed-layer/recipes-kernel/cf-fsi-firmware/cf-fsi-firmware_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..f199e10cd33e20114cba6a53d3a7eb8666d869ad
--- /dev/null
+++ b/dynamic-layers/aspeed-layer/recipes-kernel/cf-fsi-firmware/cf-fsi-firmware_git.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Firmware for using the ASPEED ColdFire FSI master"
+SECTION = "kernel"
+
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+SRCREV = "bae32e353a3641b5164211f6bf06c5620f6e384d"
+SRC_URI = "git://github.com/ozbenh/cf-fsi.git;branch=master;protocol=https"
+
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+do_compile() {
+ :
+}
+
+firmware_dir="${nonarch_base_libdir}/firmware/"
+
+do_install() {
+ install -d ${D}${firmware_dir}
+ install -m 0644 ${S}/dist-bin/cf-fsi-fw.bin ${D}${firmware_dir}
+}
+
+FILES:${PN} = "${firmware_dir}"
diff --git a/dynamic-layers/nuvoton-layer/recipes-bsp/u-boot/u-boot-nuvoton_%.bbappend b/dynamic-layers/nuvoton-layer/recipes-bsp/u-boot/u-boot-nuvoton_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..ab57dadb318d7f7ef19d0efc61f844f005c3da89
--- /dev/null
+++ b/dynamic-layers/nuvoton-layer/recipes-bsp/u-boot/u-boot-nuvoton_%.bbappend
@@ -0,0 +1 @@
+require recipes-bsp/u-boot/u-boot-obmc.inc
diff --git a/dynamic-layers/nuvoton-layer/recipes-connectivity/jsnbd/jsnbd/state_hook b/dynamic-layers/nuvoton-layer/recipes-connectivity/jsnbd/jsnbd/state_hook
new file mode 100644
index 0000000000000000000000000000000000000000..d317e2e9b714e2efb15dad04d3152243124c9e1d
--- /dev/null
+++ b/dynamic-layers/nuvoton-layer/recipes-connectivity/jsnbd/jsnbd/state_hook
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+if [ $# -ne 2 ]
+then
+ echo "usage: $0 " >&2
+ exit 1
+fi
+
+action=$1
+config=$2
+
+gadget_name=mass-storage
+gadget_dir=/sys/kernel/config/usb_gadget/$gadget_name
+
+case "$config" in
+0)
+ nbd_device=/dev/nbd0
+ ;;
+*)
+ echo "invalid config $config" >&2
+ exit 1
+ ;;
+esac
+
+set -ex
+
+case "$action" in
+start)
+ mkdir -p $gadget_dir
+ (
+ cd $gadget_dir
+ # http://www.linux-usb.org/usb.ids
+ # |-> 1d6b Linux Foundation
+ # |-> 0104 Multifunction Composite Gadget
+ echo "0x1d6b" > idVendor
+ echo "0x0104" > idProduct
+ mkdir -p strings/0x409
+ echo "OpenBMC" > strings/0x409/manufacturer
+ echo "Virtual Media Device" > strings/0x409/product
+ mkdir -p configs/c.1/strings/0x409
+ echo "config 1" > configs/c.1/strings/0x409/configuration
+ mkdir -p functions/mass_storage.usb0
+ ln -s functions/mass_storage.usb0 configs/c.1
+ echo 1 > functions/mass_storage.usb0/lun.0/removable
+ echo 1 > functions/mass_storage.usb0/lun.0/ro
+ echo 0 > functions/mass_storage.usb0/lun.0/cdrom
+ echo $nbd_device > functions/mass_storage.usb0/lun.0/file
+ echo "f0831000.udc" > UDC
+ )
+ ;;
+stop)
+ (
+ cd $gadget_dir
+ rm configs/c.1/mass_storage.usb0
+ rmdir functions/mass_storage.usb0
+ rmdir configs/c.1/strings/0x409
+ rmdir configs/c.1
+ rmdir strings/0x409
+ )
+ rmdir $gadget_dir
+ ;;
+*)
+ echo "invalid action $action" >&2
+ exit 1
+esac
+
+exit 0
+
diff --git a/dynamic-layers/nuvoton-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend b/dynamic-layers/nuvoton-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..1061a9271fa79f4cd99b4f5e5b992ec65ec9530f
--- /dev/null
+++ b/dynamic-layers/nuvoton-layer/recipes-connectivity/jsnbd/jsnbd_git.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+FILES:${PN} += "${sysconfdir}/nbd-proxy/state"
+SRC_URI += "file://state_hook"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/nbd-proxy/
+ install -m 0755 ${WORKDIR}/state_hook ${D}${sysconfdir}/nbd-proxy/state
+}
diff --git a/dynamic-layers/nuvoton-layer/recipes-kernel/linux/linux-nuvoton_%.bbappend b/dynamic-layers/nuvoton-layer/recipes-kernel/linux/linux-nuvoton_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..848627ac75cd3238273da678bc8ae0f6af7e84c6
--- /dev/null
+++ b/dynamic-layers/nuvoton-layer/recipes-kernel/linux/linux-nuvoton_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+# OpenBMC loads in kernel features via other mechanisms so this check
+# in the kernel-yocto.bbclass is not required
+KERNEL_DANGLING_FEATURES_WARN_ONLY="1"
diff --git a/dynamic-layers/nuvoton-layer/recipes-phosphor/host/phosphor-host-postd_%.bbappend b/dynamic-layers/nuvoton-layer/recipes-phosphor/host/phosphor-host-postd_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..7ab27ce0bd5259dea3175bdf92a19ca78c841d6e
--- /dev/null
+++ b/dynamic-layers/nuvoton-layer/recipes-phosphor/host/phosphor-host-postd_%.bbappend
@@ -0,0 +1 @@
+SNOOP_DEVICE:npcm7xx = "npcm7xx-lpc-bpc0"
diff --git a/dynamic-layers/tpm-layer/recipes-core/packagegroups/packagegroup-security-tpm2.bbappend b/dynamic-layers/tpm-layer/recipes-core/packagegroups/packagegroup-security-tpm2.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..06774b707c0ccb331ce562fb161cc46c59249b33
--- /dev/null
+++ b/dynamic-layers/tpm-layer/recipes-core/packagegroups/packagegroup-security-tpm2.bbappend
@@ -0,0 +1,3 @@
+# We don't need pkcs11 support on the BMC by default and it ends up causing a
+# dependency chain that brings in Rust.
+RDEPENDS:packagegroup-security-tpm2:remove = "tpm2-pkcs11"
diff --git a/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..4fc41d0580112b0fc8c8d4d7cdd4dc49e4de49ea
--- /dev/null
+++ b/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
diff --git a/recipes-bsp/u-boot/files/disable-u-boot-shell.cfg b/recipes-bsp/u-boot/files/disable-u-boot-shell.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..8876eb271c5c48e1a73bd7278253a0fafbaaa9f4
--- /dev/null
+++ b/recipes-bsp/u-boot/files/disable-u-boot-shell.cfg
@@ -0,0 +1,2 @@
+# Setting boot delay to -2 disables entering into U-boot shell
+CONFIG_BOOTDELAY=-2
diff --git a/recipes-bsp/u-boot/u-boot-obmc.inc b/recipes-bsp/u-boot/u-boot-obmc.inc
new file mode 100644
index 0000000000000000000000000000000000000000..47529af44e3e62da886d22a523f34acacd6fe1d5
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-obmc.inc
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI:append = '${@bb.utils.contains_any("DISTRO_FEATURES", "disable-u-boot-shell", \
+ " file://disable-u-boot-shell.cfg", \
+ "", d)}'
diff --git a/recipes-connectivity/avahi/avahi-daemon/avahi-daemon-override.conf b/recipes-connectivity/avahi/avahi-daemon/avahi-daemon-override.conf
new file mode 100644
index 0000000000000000000000000000000000000000..9a594c6e1c346c741ff699b78c2c32d9405f5f66
--- /dev/null
+++ b/recipes-connectivity/avahi/avahi-daemon/avahi-daemon-override.conf
@@ -0,0 +1,3 @@
+[Service]
+ExecStartPre=/bin/sh -c "grep -q avahi: /etc/group || /usr/sbin/addgroup --system avahi"
+ExecStartPre=/bin/sh -c "grep -q avahi: /etc/passwd || /usr/sbin/adduser --system --no-create-home --ingroup avahi avahi"
diff --git a/recipes-connectivity/avahi/avahi_%.bbappend b/recipes-connectivity/avahi/avahi_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..18cb48e306397978dc861091ac655eb974738fa0
--- /dev/null
+++ b/recipes-connectivity/avahi/avahi_%.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/avahi-daemon:"
+
+SRC_URI += "file://avahi-daemon-override.conf"
+
+FILES:avahi-daemon:append = " ${systemd_system_unitdir}/avahi-daemon.service.d/avahi-daemon-override.conf"
+
+do_install:append() {
+
+ install -m 644 -D ${WORKDIR}/avahi-daemon-override.conf \
+ ${D}${systemd_system_unitdir}/avahi-daemon.service.d/avahi-daemon-override.conf
+}
diff --git a/recipes-connectivity/jsnbd/jsnbd_git.bb b/recipes-connectivity/jsnbd/jsnbd_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..6cf09350d9ac20457d6bc6528962b374a7486c9e
--- /dev/null
+++ b/recipes-connectivity/jsnbd/jsnbd_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Network Block Device Proxy"
+HOMEPAGE = "https://github.com/openbmc/jsnbd"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+inherit autotools pkgconfig
+
+DEPENDS += "json-c"
+DEPENDS += "udev"
+
+RDEPENDS:${PN} += "nbd-client"
+
+S = "${WORKDIR}/git"
+
+SRC_URI = "git://github.com/openbmc/jsnbd;branch=master;protocol=https"
+SRCREV = "7b7c29369cfeb267efa7f45b271aca6910687461"
+
+NBD_PROXY_CONFIG_JSON ??= "${S}/config.sample.json"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/nbd-proxy/
+ install -m 0644 ${NBD_PROXY_CONFIG_JSON} ${D}${sysconfdir}/nbd-proxy/config.json
+}
diff --git a/recipes-connectivity/openssh/openssh_%.bbappend b/recipes-connectivity/openssh/openssh_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..72d59f6a71b1d77e78b6845733dda23a618331f1
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh_%.bbappend
@@ -0,0 +1,4 @@
+# Don't create an empty openssh-dev package. That would pull in openssh-sshd
+# even it we are only depending on openssh-sftp, which causes conflicts
+# with dropbear
+ALLOW_EMPTY:${PN}-dev = "0"
diff --git a/recipes-connectivity/openssl/openssl_%.bbappend b/recipes-connectivity/openssl/openssl_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..0581dcd638543d842ac5c893ae36025238eea32c
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl_%.bbappend
@@ -0,0 +1,24 @@
+# General config settings.
+EXTRA_OECONF:append:class-target = " shared no-hw no-err no-psk no-srp "
+
+# Disable SSL (keep TLS only).
+EXTRA_OECONF:append:class-target = " no-ssl2 no-ssl3 "
+
+# Disable various algorithms.
+EXTRA_OECONF:append:class-target = " \
+ no-rmd160 \
+ no-whirlpool \
+ no-rc2 \
+ no-rc4 \
+ no-bf \
+ no-cast \
+ no-gost \
+"
+
+do_configure:append() {
+ oe_runmake depend
+}
+
+# We don't want to depend on perl in our image
+RDEPENDS:${PN}-bin:remove = "perl"
+FILES:${PN}-misc:append = " ${bindir}/c_rehash"
diff --git a/recipes-core/base-files/base-files/50-rp_filter.conf b/recipes-core/base-files/base-files/50-rp_filter.conf
new file mode 100644
index 0000000000000000000000000000000000000000..7194eb85dbf75950339d60f886d39376013735dc
--- /dev/null
+++ b/recipes-core/base-files/base-files/50-rp_filter.conf
@@ -0,0 +1,5 @@
+# Turn on Source Address Verification in all interfaces to
+# prevent some spoofing attacks
+net.ipv4.conf.default.rp_filter = 2
+net.ipv4.conf.all.rp_filter = 2
+
diff --git a/recipes-core/base-files/base-files/df-mmc/fstab b/recipes-core/base-files/base-files/df-mmc/fstab
new file mode 100644
index 0000000000000000000000000000000000000000..4a076687680ffdae8cc7b5b0645e49bda1d6b100
--- /dev/null
+++ b/recipes-core/base-files/base-files/df-mmc/fstab
@@ -0,0 +1,9 @@
+# openbmc fstab
+
+/dev/root / auto defaults 1 1
+proc /proc proc defaults 0 0
+devpts /dev/pts devpts mode=0620,gid=5 0 0
+tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
+tmpfs /var/volatile tmpfs defaults 0 0
+tmpfs /media tmpfs defaults 0 0
+/var/persist/home /home none bind 0 0
diff --git a/recipes-core/base-files/base-files/df-ubi/fstab b/recipes-core/base-files/base-files/df-ubi/fstab
new file mode 100644
index 0000000000000000000000000000000000000000..4a076687680ffdae8cc7b5b0645e49bda1d6b100
--- /dev/null
+++ b/recipes-core/base-files/base-files/df-ubi/fstab
@@ -0,0 +1,9 @@
+# openbmc fstab
+
+/dev/root / auto defaults 1 1
+proc /proc proc defaults 0 0
+devpts /dev/pts devpts mode=0620,gid=5 0 0
+tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
+tmpfs /var/volatile tmpfs defaults 0 0
+tmpfs /media tmpfs defaults 0 0
+/var/persist/home /home none bind 0 0
diff --git a/recipes-core/base-files/base-files_%.bbappend b/recipes-core/base-files/base-files_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..3eef9d8b5fff02731462bc4162992b49a6387f5f
--- /dev/null
+++ b/recipes-core/base-files/base-files_%.bbappend
@@ -0,0 +1,20 @@
+FILESEXTRAPATHS:prepend:df-obmc-ubi-fs := "${THISDIR}/${PN}/df-ubi:"
+FILESEXTRAPATHS:prepend:df-phosphor-mmc := "${THISDIR}/${PN}/df-mmc:"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+RDEPENDS:${PN}:append:df-obmc-ubi-fs = " preinit-mounts"
+
+SRC_URI += " \
+ file://50-rp_filter.conf \
+"
+
+do_install:append() {
+ sed -i 's/\(\(passwd\|group\):\s*\).*/\1files systemd/' \
+ "${D}${sysconfdir}/nsswitch.conf"
+
+ install -d ${D}/srv
+
+ install -d ${D}/${libdir}/sysctl.d
+ install -D -m 644 ${WORKDIR}/50-rp_filter.conf ${D}/${libdir}/sysctl.d/50-rp_filter.conf
+}
diff --git a/recipes-core/busybox/busybox/busybox.cfg b/recipes-core/busybox/busybox/busybox.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..99e83dbd93e491212c0ade6f5606960e92cf38c5
--- /dev/null
+++ b/recipes-core/busybox/busybox/busybox.cfg
@@ -0,0 +1,6 @@
+CONFIG_DEVMEM=y
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+CONFIG_FEATURE_LESS_TRUNCATE=y
+CONFIG_FEATURE_LESS_REGEXP=y
+CONFIG_WATCHDOG=y
+CONFIG_EXPAND=y
diff --git a/recipes-core/busybox/busybox/flash.cfg b/recipes-core/busybox/busybox/flash.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..39ba10d74f01b1dfbd8558cddcd0d0acad04babd
--- /dev/null
+++ b/recipes-core/busybox/busybox/flash.cfg
@@ -0,0 +1,4 @@
+CONFIG_FLASHCP=y
+CONFIG_FLASH_LOCK=y
+CONFIG_FLASH_UNLOCK=y
+CONFIG_FLASH_ERASEALL=y
diff --git a/recipes-core/busybox/busybox/less.cfg b/recipes-core/busybox/busybox/less.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..2b452279b3ba6705ccdcee3eb93d9b1d0122c833
--- /dev/null
+++ b/recipes-core/busybox/busybox/less.cfg
@@ -0,0 +1,10 @@
+## In orer to make systemd-pager work well there are a number of busybox less
+## features we need to enable.
+CONFIG_FEATURE_LESS_DASHCMD=y
+CONFIG_FEATURE_LESS_RAW=y
+CONFIG_FEATURE_LESS_ENV=y
+
+## These are nice features for users.
+CONFIG_FEATURE_LESS_WINCH=y
+CONFIG_FEATURE_LESS_ASK_TERMINAL=y
+CONFIG_FEATURE_LESS_REGEXP=y
diff --git a/recipes-core/busybox/busybox/mountpoint.cfg b/recipes-core/busybox/busybox/mountpoint.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..8b009511ab1781379fb90084791e00d776722c3c
--- /dev/null
+++ b/recipes-core/busybox/busybox/mountpoint.cfg
@@ -0,0 +1 @@
+CONFIG_MOUNTPOINT=y
diff --git a/recipes-core/busybox/busybox/reboot.cfg b/recipes-core/busybox/busybox/reboot.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..bbd85f40245d2bd79df293e0c07ff382faa15bf6
--- /dev/null
+++ b/recipes-core/busybox/busybox/reboot.cfg
@@ -0,0 +1 @@
+CONFIG_REBOOT=y
diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..f8800b45a3101ff834edd6bfd523eaad1f0e570c
--- /dev/null
+++ b/recipes-core/busybox/busybox_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI += " \
+ file://busybox.cfg \
+ file://flash.cfg \
+ file://less.cfg \
+ file://mountpoint.cfg \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'obmc-ubi-fs', \
+ '', 'file://reboot.cfg', d)} \
+"
diff --git a/recipes-core/dropbear/dropbear/dropbear.default b/recipes-core/dropbear/dropbear/dropbear.default
new file mode 100644
index 0000000000000000000000000000000000000000..b2f1ecc7d7c812293071e252e0d6bead9a9364a2
--- /dev/null
+++ b/recipes-core/dropbear/dropbear/dropbear.default
@@ -0,0 +1 @@
+DROPBEAR_EXTRA_ARGS="-G priv-admin"
diff --git a/recipes-core/dropbear/dropbear/dropbearkey.service b/recipes-core/dropbear/dropbear/dropbearkey.service
new file mode 100644
index 0000000000000000000000000000000000000000..dfeb17f41d07bfca22bdd42a6a4662612f210e5e
--- /dev/null
+++ b/recipes-core/dropbear/dropbear/dropbearkey.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=SSH Key Generation
+
+[Service]
+# Set the default RSA key path then load environment variables from the
+# environment file, which might override the default RSA key path.
+Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
+EnvironmentFile=-/etc/default/dropbear
+Type=oneshot
+ExecStart=@BASE_BINDIR@/sh -c \
+ "if [[ ! -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key ]]; then \
+ @BASE_BINDIR@/mkdir -p ${DROPBEAR_RSAKEY_DIR}; \
+ @SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key; \
+ fi"
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-core/dropbear/dropbear/localoptions.h b/recipes-core/dropbear/dropbear/localoptions.h
new file mode 100644
index 0000000000000000000000000000000000000000..8aec3b3a7cad67ffe1d8814eb0b022227f0ab4b9
--- /dev/null
+++ b/recipes-core/dropbear/dropbear/localoptions.h
@@ -0,0 +1,6 @@
+// Disable CBC ciphers for modern security.
+#define DROPBEAR_ENABLE_CBC_MODE 0
+
+#define DROPBEAR_SHA1_96_HMAC 0
+#define DROPBEAR_SHA2_256_HMAC 1
+#define DROPBEAR_SHA2_512_HMAC 1
diff --git a/recipes-core/dropbear/dropbear/options.patch b/recipes-core/dropbear/dropbear/options.patch
new file mode 100644
index 0000000000000000000000000000000000000000..52122439401aa3000b0c6f2ddbcec5d90928fdb0
--- /dev/null
+++ b/recipes-core/dropbear/dropbear/options.patch
@@ -0,0 +1,33 @@
+diff --git a/options.h b/options.h
+index 0c51bb1..3df2d67 100644
+--- a/options.h
++++ b/options.h
+@@ -95,12 +95,12 @@ much traffic. */
+ #define DROPBEAR_AES256
+ /* Compiling in Blowfish will add ~6kB to runtime heap memory usage */
+ /*#define DROPBEAR_BLOWFISH*/
+-#define DROPBEAR_TWOFISH256
+-#define DROPBEAR_TWOFISH128
++/*#define DROPBEAR_TWOFISH256*/
++/*#define DROPBEAR_TWOFISH128*/
+
+ /* Enable CBC mode for ciphers. This has security issues though
+ * is the most compatible with older SSH implementations */
+-#define DROPBEAR_ENABLE_CBC_MODE
++/*#define DROPBEAR_ENABLE_CBC_MODE*/
+
+ /* Enable "Counter Mode" for ciphers. This is more secure than normal
+ * CBC mode against certain attacks. It is recommended for security
+@@ -131,10 +131,10 @@ If you test it please contact the Dropbear author */
+ * If you disable MD5, Dropbear will fall back to SHA1 fingerprints,
+ * which are not the standard form. */
+ #define DROPBEAR_SHA1_HMAC
+-#define DROPBEAR_SHA1_96_HMAC
++/*#define DROPBEAR_SHA1_96_HMAC*/
+ #define DROPBEAR_SHA2_256_HMAC
+ #define DROPBEAR_SHA2_512_HMAC
+-#define DROPBEAR_MD5_HMAC
++/*#define DROPBEAR_MD5_HMAC*/
+
+ /* You can also disable integrity. Don't bother disabling this if you're
+ * still using a cipher, it's relatively cheap. If you disable this it's dead
diff --git a/recipes-core/dropbear/dropbear_%.bbappend b/recipes-core/dropbear/dropbear_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..5113c66bba2be2b6f4a536e1f1b14850bcbb5e01
--- /dev/null
+++ b/recipes-core/dropbear/dropbear_%.bbappend
@@ -0,0 +1,12 @@
+# 0001-Only-load-dropbear-default-host-keys-if-a-key-is-not.patch
+# has been upstreamed. This patch can be removed once we upgrade
+# to yocto 2.5 or later which will pull in the latest dropbear code.
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://dropbearkey.service \
+ file://localoptions.h \
+ file://dropbear.default \
+ "
+
+# pull in OpenSSH's /usr/libexec/sftp-server so we don't have to rely
+# on the crufty old scp protocol for file transfer
+RDEPENDS:${PN} += "openssh-sftp-server"
diff --git a/recipes-core/glib-2.0/glib-2.0%.bbappend b/recipes-core/glib-2.0/glib-2.0%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..f003a6b431d7abe96450bf7a8ce8dc5aaac6ce08
--- /dev/null
+++ b/recipes-core/glib-2.0/glib-2.0%.bbappend
@@ -0,0 +1,4 @@
+## We do not currently use any gio-modules, set clear this variable to prevent
+## the postinstall hook from being done. The postinstall hook prevents
+## the read-only-rootfs IMAGE_FEATURE.
+GIO_MODULE_PACKAGES = ""
diff --git a/recipes-core/os-release/os-release.bbappend b/recipes-core/os-release/os-release.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..c1dda480ff41e2699ad51b3fddec5caca8884a5d
--- /dev/null
+++ b/recipes-core/os-release/os-release.bbappend
@@ -0,0 +1,39 @@
+# WARNING!
+#
+# These modifications to os-release disable the bitbake parse
+# cache (for the os-release recipe only). Before copying
+# and pasting into another recipe ensure it is understood
+# what that means!
+
+OS_RELEASE_ROOTPATH ?= "${COREBASE}"
+
+def run_git(d, cmd):
+ try:
+ oeroot = d.getVar('OS_RELEASE_ROOTPATH', True)
+ return bb.process.run(("export PSEUDO_DISABLED=1; " +
+ "git --work-tree %s --git-dir %s/.git %s")
+ % (oeroot, oeroot, cmd))[0].strip('\n')
+ except Exception as e:
+ bb.warn("Unexpected exception from 'git' call: %s" % e)
+ pass
+
+# DISTRO_VERSION can be overridden by a bbappend or config, so it must be a
+# weak override. But, when a variable is weakly overridden the definition
+# and not the contents are used in the task-hash (for sstate reuse). We need
+# a strong variable in the vardeps chain for do_compile so that we get the
+# contents of the 'git describe --dirty' call. Create a strong/immediate
+# indirection via PHOSPHOR_OS_RELEASE_DISTRO_VERSION.
+PHOSPHOR_OS_RELEASE_DISTRO_VERSION := "${@run_git(d, 'describe --dirty')}"
+DISTRO_VERSION ??= "${PHOSPHOR_OS_RELEASE_DISTRO_VERSION}"
+
+VERSION = "${@'-'.join(d.getVar('VERSION_ID').split('-')[0:2])}"
+
+OPENBMC_TARGET_MACHINE = "${MACHINE}"
+
+OS_RELEASE_FIELDS:append = " BUILD_ID OPENBMC_TARGET_MACHINE EXTENDED_VERSION"
+
+# Ensure the git commands run every time bitbake is invoked.
+BB_DONT_CACHE = "1"
+
+# Make os-release available to other recipes.
+SYSROOT_DIRS:append = " ${sysconfdir}"
diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..694aa2f42d63d7d6cd391119ec49123468a3a6a6
--- /dev/null
+++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -0,0 +1,5 @@
+RDEPENDS:${PN}:append = " \
+ nativesdk-autoconf-archive \
+ nativesdk-meson \
+ nativesdk-python3-sdbus++ \
+ "
diff --git a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..f8d6292362986c2592647b19bc61db9e721affda
--- /dev/null
+++ b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend
@@ -0,0 +1,7 @@
+RRECOMMENDS:${PN}:append = " \
+ googletest \
+ libstdc++-staticdev \
+ phosphor-dbus-interfaces-yaml \
+ phosphor-logging \
+ sdbusplus \
+ "
diff --git a/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend b/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..0068ccdb3295f126d583a046be14c5add0db731a
--- /dev/null
+++ b/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend
@@ -0,0 +1,7 @@
+RDEPENDS:${PN}:remove = " \
+ lttng-tools \
+ lttng-ust \
+ lttng-modules \
+ powertop \
+ latencytop \
+ "
diff --git a/recipes-core/systemd/obmc-targets.bb b/recipes-core/systemd/obmc-targets.bb
new file mode 100644
index 0000000000000000000000000000000000000000..10631126ed2fe6b9ab77fa45ee6ea5a7a67fdf66
--- /dev/null
+++ b/recipes-core/systemd/obmc-targets.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Phosphor Systemd targets"
+DESCRIPTION = "Provides well known Systemd synchronization points for OpenBMC."
+HOMEPAGE = "http://github.com/openbmc"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch obmc-phosphor-systemd
+
+SRC_URI += "\
+ file://obmc-mapper.target \
+"
+
+SYSTEMD_SERVICE:${PN} += " \
+ obmc-mapper.target \
+"
diff --git a/recipes-core/systemd/obmc-targets/obmc-mapper.target b/recipes-core/systemd/obmc-targets/obmc-mapper.target
new file mode 100644
index 0000000000000000000000000000000000000000..5e52f4cd53a3f275d31dfc916164c140205b2ca5
--- /dev/null
+++ b/recipes-core/systemd/obmc-targets/obmc-mapper.target
@@ -0,0 +1,4 @@
+[Unit]
+Description=Phosphor Object Mapper
+RefuseManualStart=yes
+RefuseManualStop=yes
diff --git a/recipes-core/systemd/phosphor-systemd-policy.bb b/recipes-core/systemd/phosphor-systemd-policy.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ea9beabd5d1832fe5b57e9818a1c8cbc990ec774
--- /dev/null
+++ b/recipes-core/systemd/phosphor-systemd-policy.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Phosphor systemd configuration overrides"
+DESCRIPTION = "Overrides for systemd and its applications"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS += "systemd"
+
+SRC_URI += "file://service-restart-policy.conf"
+SRC_URI += "file://journald-maxlevel-policy.conf"
+
+FILES:${PN} += "${systemd_unitdir}/system.conf.d/service-restart-policy.conf"
+FILES:${PN} += "${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf"
+
+
+do_install() {
+ install -m 644 -D ${WORKDIR}/service-restart-policy.conf ${D}${systemd_unitdir}/system.conf.d/service-restart-policy.conf
+ install -m 644 -D ${WORKDIR}/journald-maxlevel-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf
+}
diff --git a/recipes-core/systemd/phosphor-systemd-policy/journald-maxlevel-policy.conf b/recipes-core/systemd/phosphor-systemd-policy/journald-maxlevel-policy.conf
new file mode 100644
index 0000000000000000000000000000000000000000..f5f3d0ff17a6a4a6cb6818651a9be1a13cdfd1b3
--- /dev/null
+++ b/recipes-core/systemd/phosphor-systemd-policy/journald-maxlevel-policy.conf
@@ -0,0 +1,6 @@
+# Don't store "debug" messages, only "info" and below.
+# Reference: journald.conf(5)
+
+[Journal]
+MaxLevelStore=info
+MaxLevelSyslog=info
diff --git a/recipes-core/systemd/phosphor-systemd-policy/service-restart-policy.conf b/recipes-core/systemd/phosphor-systemd-policy/service-restart-policy.conf
new file mode 100644
index 0000000000000000000000000000000000000000..54516c2d47b49a9d597e74188e7daceb6a874da5
--- /dev/null
+++ b/recipes-core/systemd/phosphor-systemd-policy/service-restart-policy.conf
@@ -0,0 +1,31 @@
+# This file overrides some defaults for systemd
+#
+# - Change the RestartSec from 100ms to 1s.
+# When a service hits a failure, our new debug collection service kicks
+# in. When a core file is involved, it's been found that generating 5 core
+# files within ~500ms puts a huge strain on the BMC. Also, if the bmc is
+# going to get a fix on a restart of a service, the more time the better
+# (think retries on device driver scenarios).
+#
+# - Change the StartLimitBurst to 2
+# Five just seems excessive for our services in openbmc. In all fail
+# scenarios seen so far (other then with phosphor-hwmon), either
+# restarting once does the job or restarting all 5 times does not help
+# and we just end up hitting the 5 limit anyway.
+#
+# - Change the StartLimitIntervalSec to 30s
+# The BMC CPU performance is already challenged. When a service is
+# failing and a core dump is being generated and collected into a dump,
+# it's even more challenged. Recent failures have shown situations where
+# the service does not fail again until 15-20 seconds after the initial
+# failure which means the default of 10s for this results in the service
+# being restarted indefinitely. Change this to 30s to only allow a service
+# to be restarted StartLimitBurst times within a 30s interval before
+# being put in a permanent fail state.
+#
+# See systemd-system.conf(5) for details on the conf files
+
+[Manager]
+DefaultRestartSec=1s
+DefaultStartLimitBurst=2
+DefaultStartLimitIntervalSec=30s
diff --git a/recipes-core/systemd/systemd/0001-sd-bus-Don-t-automatically-add-ObjectManager.patch b/recipes-core/systemd/systemd/0001-sd-bus-Don-t-automatically-add-ObjectManager.patch
new file mode 100644
index 0000000000000000000000000000000000000000..f8f5b08a9610acd425560e4ebe09b397329ba714
--- /dev/null
+++ b/recipes-core/systemd/systemd/0001-sd-bus-Don-t-automatically-add-ObjectManager.patch
@@ -0,0 +1,56 @@
+From 44562e33655668033a8ee0a7a686671226da2110 Mon Sep 17 00:00:00 2001
+From: Brad Bishop
+Date: Tue, 13 Mar 2018 15:34:30 -0400
+Subject: [PATCH] sd-bus: Don't automatically add ObjectManager
+
+Even though sdbus helps manage org.freedesktop.DBus.ObjectManager
+it must still be explicitly enabled by a library client.
+
+As such do not automatically add ObjectManager to GetManagedObjects
+method call responses or InterfacesAdded/Removed signals. Bus
+service client applications can potentially react to the appearance
+of ObjectManager in these messages and follow up with a method call
+on the interface, which isn't actually implemented on the objects
+within the subtree, below the manager.
+---
+ src/libsystemd/sd-bus/bus-objects.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
+index 6e00255b2..59f698402 100644
+--- a/src/libsystemd/sd-bus/bus-objects.c
++++ b/src/libsystemd/sd-bus/bus-objects.c
+@@ -1076,10 +1076,6 @@ static int object_manager_serialize_path(
+ if (r < 0)
+ return r;
+
+- r = sd_bus_message_append(reply, "{sa{sv}}", "org.freedesktop.DBus.ObjectManager", 0);
+- if (r < 0)
+- return r;
+-
+ found_something = true;
+ }
+
+@@ -2302,9 +2298,6 @@ static int object_added_append_all(sd_bus *bus, sd_bus_message *m, const char *p
+ if (r < 0)
+ return r;
+ r = sd_bus_message_append(m, "{sa{sv}}", "org.freedesktop.DBus.Properties", 0);
+- if (r < 0)
+- return r;
+- r = sd_bus_message_append(m, "{sa{sv}}", "org.freedesktop.DBus.ObjectManager", 0);
+ if (r < 0)
+ return r;
+
+@@ -2473,9 +2466,6 @@ static int object_removed_append_all(sd_bus *bus, sd_bus_message *m, const char
+ if (r < 0)
+ return r;
+ r = sd_bus_message_append(m, "s", "org.freedesktop.DBus.Properties");
+- if (r < 0)
+- return r;
+- r = sd_bus_message_append(m, "s", "org.freedesktop.DBus.ObjectManager");
+ if (r < 0)
+ return r;
+
+--
+2.14.3
+
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..074dced6c00d9a7fa4187f05979c22d2955de36a
--- /dev/null
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -0,0 +1,31 @@
+FILES:${PN}-catalog-extralocales = \
+ "${exec_prefix}/lib/systemd/catalog/*.*.catalog"
+PACKAGES =+ "${PN}-catalog-extralocales"
+PACKAGECONFIG = "\
+ coredump \
+ hostnamed \
+ kmod \
+ networkd \
+ nss \
+ pam \
+ randomseed \
+ resolved \
+ seccomp \
+ sysusers \
+ sysvinit \
+ timedated \
+ timesyncd \
+ zstd \
+ "
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://0001-sd-bus-Don-t-automatically-add-ObjectManager.patch"
+
+EXTRA_OEMESON:append = " -Ddns-servers=''"
+
+ALTERNATIVE:${PN} += "init"
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+RRECOMMENDS:${PN}:append:openbmc-phosphor = " phosphor-systemd-policy"
diff --git a/recipes-devtools/i2c-tools/i2c-tools/0001-4-byte-read-support-466.patch b/recipes-devtools/i2c-tools/i2c-tools/0001-4-byte-read-support-466.patch
new file mode 100644
index 0000000000000000000000000000000000000000..307091dbf8a61894ff222d9b1aaf1d2fb0181a9f
--- /dev/null
+++ b/recipes-devtools/i2c-tools/i2c-tools/0001-4-byte-read-support-466.patch
@@ -0,0 +1,92 @@
+From 1a0c89e6cd3fec862718d48e9b94275a0dc6e52f Mon Sep 17 00:00:00 2001
+From: Sergey Solomin
+Date: Tue, 6 Sep 2016 15:36:43 -0500
+Subject: [PATCH] 4 byte read support 466
+
+---
+ tools/i2cdump.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+diff --git a/tools/i2cdump.c b/tools/i2cdump.c
+index b638c3d..6af44a8 100644
+--- a/tools/i2cdump.c
++++ b/tools/i2cdump.c
+@@ -25,6 +25,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+ #include
+ #include
+@@ -33,6 +34,8 @@
+ #include "util.h"
+ #include "../version.h"
+
++#define I2C_SMBUS_DWORD 7
++
+ static void help(void)
+ {
+ fprintf(stderr,
+@@ -46,6 +49,7 @@ static void help(void)
+ " s (SMBus block, deprecated)\n"
+ " i (I2C block)\n"
+ " c (consecutive byte)\n"
++ " d (double word)\n"
+ " Append p for SMBus PEC\n");
+ }
+
+@@ -187,6 +191,9 @@ int main(int argc, char *argv[])
+ } else if (!strncmp(argv[flags+3], "c", 1)) {
+ size = I2C_SMBUS_BYTE;
+ pec = argv[flags+3][1] == 'p';
++ } else if (!strncmp(argv[flags+3], "d", 1)) {
++ size = I2C_SMBUS_DWORD;
++ pec = argv[flags+3][1] == 'p';
+ } else if (!strcmp(argv[flags+3], "i"))
+ size = I2C_SMBUS_I2C_BLOCK_DATA;
+ else {
+@@ -289,6 +296,7 @@ int main(int argc, char *argv[])
+ size == I2C_SMBUS_BLOCK_DATA ? "smbus block" :
+ size == I2C_SMBUS_I2C_BLOCK_DATA ? "i2c block" :
+ size == I2C_SMBUS_BYTE ? "byte consecutive read" :
++ size == I2C_SMBUS_DWORD ? "double word" :
+ size == I2C_SMBUS_BYTE_DATA ? "byte" : "word");
+ if (pec)
+ fprintf(stderr, "PEC checking enabled.\n");
+@@ -317,6 +325,32 @@ int main(int argc, char *argv[])
+ }
+ }
+
++ /* handle mode 'd' (double word read) */
++ if (size == I2C_SMBUS_DWORD) {
++ unsigned char buff[sizeof(uint32_t)];
++ struct i2c_rdwr_ioctl_data msgset;
++ struct i2c_msg msg[1];
++
++ msg[0].addr = address;
++ msg[0].flags = I2C_M_RD;
++ msg[0].len = sizeof(buff);
++ msg[0].buf = buff;
++
++ msgset.msgs = msg;
++ msgset.nmsgs = 1;
++
++ if (ioctl( file, I2C_RDWR, &msgset ) < 0) {
++ fprintf(stderr, "Error: Could not read "
++ "double word. %s\n", strerror(errno));
++ exit(1);
++ }
++ for (uint8_t n = 0; n < sizeof(buff); n++) {
++ printf ("%02x ", buff[n]);
++ }
++ printf ("\n");
++ exit(0);
++ }
++
+ /* See Winbond w83781d data sheet for bank details */
+ if (bank && size != I2C_SMBUS_BLOCK_DATA) {
+ res = i2c_smbus_read_byte_data(file, bankreg);
+--
+2.31.1
+
diff --git a/recipes-devtools/i2c-tools/i2c-tools_%.bbappend b/recipes-devtools/i2c-tools/i2c-tools_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..fefe06252de157649693cb734d9f0c6169773c5f
--- /dev/null
+++ b/recipes-devtools/i2c-tools/i2c-tools_%.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI =+ "file://0001-4-byte-read-support-466.patch"
diff --git a/recipes-devtools/iotools/iotools/iotools-setup.service b/recipes-devtools/iotools/iotools/iotools-setup.service
new file mode 100644
index 0000000000000000000000000000000000000000..a5f8f6885c76b6425afa6cf039b120ac8a8774ac
--- /dev/null
+++ b/recipes-devtools/iotools/iotools/iotools-setup.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Install iotool links
+
+[Service]
+RemainAfterExit=no
+Type=oneshot
+ExecStart=/usr/bin/env iotools --make-links
+SyslogIdentifier=iotools
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-devtools/iotools/iotools_1.6.bb b/recipes-devtools/iotools/iotools_1.6.bb
new file mode 100644
index 0000000000000000000000000000000000000000..54303fa0bd680885a0222872adc743ae12eae2b5
--- /dev/null
+++ b/recipes-devtools/iotools/iotools_1.6.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "Command line tools for hardware device registers"
+HOMEPAGE = "https://github.com/jonmayergoogle/iotools"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+SRCREV = "8d928b3360246b8ead95b442ca3887ce8b8f942f"
+SRC_URI = "git://git@github.com/jonmayergoogle/iotools.git;protocol=https;branch=master"
+PV = "v1.6+git${SRCPV}"
+
+inherit obmc-phosphor-systemd
+
+S = "${WORKDIR}/git"
+FILES:${PN} = "${sbindir}"
+
+do_compile() {
+ # CC is overridden in the Makefile, so override it harder in the invocation
+ oe_runmake CC="${CC}" DEBUG="${DEBUG_BUILD-0}" STATIC=0
+}
+
+# The "install" make target runs the binary to create links for subcommands.
+# The links are excessive and this doesn't work for cross compiling.
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 iotools ${D}${sbindir}
+}
+
+SYSTEMD_SERVICE:${PN} += "iotools-setup.service"
diff --git a/recipes-devtools/perl/yaml-tiny_1.73.bb b/recipes-devtools/perl/yaml-tiny_1.73.bb
new file mode 100644
index 0000000000000000000000000000000000000000..845242b4f65c7f7541551b2fe3775a243658ae9f
--- /dev/null
+++ b/recipes-devtools/perl/yaml-tiny_1.73.bb
@@ -0,0 +1,20 @@
+SUMMARY = "YAML::Tiny Version 1.73"
+PR = "r1"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+HOMEPAGE = "https://metacpan.org/release/YAML-Tiny"
+
+inherit cpan
+inherit allarch
+
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
+file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61"
+
+
+SRC_URI += "https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.73.tar.gz"
+
+SRC_URI[md5sum] = "d1bb2525e4ab46bfab4b22842c467529"
+SRC_URI[sha256sum] = "bc315fa12e8f1e3ee5e2f430d90b708a5dc7e47c867dba8dce3a6b8fbe257744"
+
+S = "${WORKDIR}/YAML-Tiny-${PV}"
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-devtools/python/pyphosphor_git.bb b/recipes-devtools/python/pyphosphor_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..c2cfdb4cb9cec85743e096b73056dea15eac68c9
--- /dev/null
+++ b/recipes-devtools/python/pyphosphor_git.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Phosphor python library"
+DESCRIPTION = "Phosphor python library."
+HOMEPAGE = "http://github.com/openbmc/pyphosphor"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit allarch
+inherit setuptools3
+inherit python3-dir
+
+PACKAGE_BEFORE_PN = " \
+ ${PN}-ns \
+ ${PN}-utils-ns \
+ ${PN}-dbus-ns \
+ ${PN}-wsgi-ns \
+ ${PN}-wsgi-apps-ns \
+ ${PN}-utils \
+ ${PN}-dbus \
+ "
+
+RDEPENDS:${PN}-utils-ns += "${PN}-ns"
+RDEPENDS:${PN}-dbus-ns += "${PN}-ns"
+RDEPENDS:${PN}-utils += "${PN}-utils-ns"
+RDEPENDS:${PN}-wsgi-apps-ns += "${PN}-wsgi-ns"
+RDEPENDS:${PN}-wsgi-ns += "${PN}-ns"
+RDEPENDS:${PN}-dbus += " \
+ ${PN}-dbus-ns \
+ python-dbus \
+ python-xml \
+ python-json \
+ python-pickle \
+ "
+RDEPENDS:${PN} += " \
+ ${PN}-ns \
+ ${PN}-dbus \
+ python-subprocess \
+ python-dbus \
+ "
+
+FILES:${PN}-ns = "${PYTHON_SITEPACKAGES_DIR}/obmc/__init__.py*"
+FILES:${PN}-utils-ns = "${PYTHON_SITEPACKAGES_DIR}/obmc/utils/__init__.py*"
+FILES:${PN}-dbus-ns = "${PYTHON_SITEPACKAGES_DIR}/obmc/dbuslib/__init__.py*"
+FILES:${PN}-wsgi-ns = "${PYTHON_SITEPACKAGES_DIR}/obmc/wsgi/__init__.py*"
+FILES:${PN}-wsgi-apps-ns = "${PYTHON_SITEPACKAGES_DIR}/obmc/wsgi/apps/__init__.py*"
+
+FILES:${PN}-utils = "${PYTHON_SITEPACKAGES_DIR}/obmc/utils"
+FILES:${PN}-dbus = "${PYTHON_SITEPACKAGES_DIR}/obmc/dbuslib"
+
+SRC_URI += "git://github.com/openbmc/pyphosphor;branch=master;protocol=https"
+
+SRCREV = "cb240aa1ed95799d2ea8bde951c6ed443839a7e0"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-devtools/python/python3_%.bbappend b/recipes-devtools/python/python3_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..a2dafcf6c3d736afd1bc3f66f3ee7cf9285458d8
--- /dev/null
+++ b/recipes-devtools/python/python3_%.bbappend
@@ -0,0 +1,13 @@
+inherit update-alternatives
+
+ALTERNATIVE:${PN}-core += "python"
+ALTERNATIVE_LINK_NAME[python] = "${bindir}/python"
+ALTERNATIVE_TARGET[python] = "${bindir}/python3"
+
+# python3 takes up a lot of space that most embedded systems
+# do not have, so remove some un-needed files from the rootfs
+do_install:append:class-target() {
+ # Even though python3 is built with --without-ensurepip, it still installs
+ # a large, compressed version of pip. Remove it to free up the space.
+ rm -rf ${D}${libdir}/python${PYTHON_MAJMIN}/ensurepip
+}
diff --git a/recipes-devtools/rsync/rsync_%.bbappend b/recipes-devtools/rsync/rsync_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..e921c809c726270f4806fa1580006b9603c5ff1f
--- /dev/null
+++ b/recipes-devtools/rsync/rsync_%.bbappend
@@ -0,0 +1,7 @@
+EXTRA_OECONF:append:class-target = " --disable-largefile --disable-locale \
+ --disable-iconv --without-included-popt \
+ --without-included-zlib"
+
+PACKAGECONFIG = ""
+
+DEPENDS:append:class-target = " popt zlib"
diff --git a/recipes-extended/gpioplus/gpioplus_git.bb b/recipes-extended/gpioplus/gpioplus_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e611b460991896c5fc5030e5f31d073f4266bc9f
--- /dev/null
+++ b/recipes-extended/gpioplus/gpioplus_git.bb
@@ -0,0 +1,19 @@
+SUMMARY = "C++ bindings for linux gpio APIs"
+DESCRIPTION = "C++ bindings for linux gpio APIs."
+HOMEPAGE = "http://github.com/openbmc/gpioplus"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit meson pkgconfig
+
+EXTRA_OEMESON = " \
+ -Dexamples=false \
+ -Dtests=disabled \
+ "
+
+SRC_URI += "git://github.com/openbmc/gpioplus;branch=master;protocol=https"
+SRCREV = "8944f2e24ad8152793af010906faf06607f0e04b"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-extended/pam/libpam/pam.d/common-account b/recipes-extended/pam/libpam/pam.d/common-account
new file mode 100644
index 0000000000000000000000000000000000000000..82449cad03becab092e30dee8901f749a14a3c67
--- /dev/null
+++ b/recipes-extended/pam/libpam/pam.d/common-account
@@ -0,0 +1,27 @@
+#
+# /etc/pam.d/common-account - authorization settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authorization modules that define
+# the central access policy for use on the system. The default is to
+# only deny service to users whose accounts are expired in /etc/shadow.
+#
+# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
+# To take advantage of this, it is recommended that you configure any
+# local modules either before or after the default block, and use
+# pam-auth-update to manage selection of other modules. See
+# pam-auth-update(8) for details.
+#
+
+# here are the per-package modules (the "Primary" block)
+account [success=2 new_authtok_reqd=done default=ignore] pam_unix.so
+-account [success=1 new_authtok_reqd=done default=ignore] pam_ldap.so ignore_unknown_user ignore_authinfo_unavail
+# here's the fallback if no module succeeds
+account requisite pam_deny.so
+account required pam_tally2.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+account required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+# end of pam-auth-update config
diff --git a/recipes-extended/pam/libpam/pam.d/common-auth b/recipes-extended/pam/libpam/pam.d/common-auth
new file mode 100644
index 0000000000000000000000000000000000000000..8eef164d12fcbf911da15c784b8bca69df98e483
--- /dev/null
+++ b/recipes-extended/pam/libpam/pam.d/common-auth
@@ -0,0 +1,21 @@
+#
+# /etc/pam.d/common-auth - authentication settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authentication modules that define
+# the central authentication scheme for use on the system
+# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
+# traditional Unix authentication mechanisms.
+
+# here are the per-package modules (the "Primary" block)
+auth [success=ok user_unknown=ignore default=2] pam_tally2.so deny=0 unlock_time=0
+# Try for local user first, and then try for ldap
+auth [success=2 default=ignore] pam_unix.so quiet
+-auth [success=1 default=ignore] pam_ldap.so ignore_unknown_user ignore_authinfo_unavail
+# here's the fallback if no module succeeds
+auth requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+auth required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
diff --git a/recipes-extended/pam/libpam/pam.d/common-password b/recipes-extended/pam/libpam/pam.d/common-password
new file mode 100644
index 0000000000000000000000000000000000000000..ef706f3080786b9737323cc73ceda4f5d139c9a0
--- /dev/null
+++ b/recipes-extended/pam/libpam/pam.d/common-password
@@ -0,0 +1,30 @@
+#
+# /etc/pam.d/common-password - password-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define the services to be
+# used to change user passwords. The default is pam_unix.
+
+# Explanation of pam_unix options:
+#
+# The "sha512" option enables salted SHA512 passwords. Without this option,
+# the default is Unix crypt. Prior releases used the option "md5".
+#
+# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
+# login.defs.
+#
+# See the pam_unix manpage for other options.
+
+# here are the per-package modules (the "Primary" block)
+password [success=ok default=die] pam_cracklib.so debug enforce_for_root reject_username minlen=8 difok=0 lcredit=0 ocredit=0 dcredit=0 ucredit=0
+password [success=ok default=die] pam_ipmicheck.so spec_grp_name=ipmi use_authtok
+password [success=ok ignore=ignore default=die] pam_pwhistory.so debug enforce_for_root remember=0 use_authtok
+password [success=ok default=die] pam_unix.so sha512 use_authtok
+password [success=1 default=die] pam_ipmisave.so spec_grp_name=ipmi spec_pass_file=/etc/ipmi_pass key_file=/etc/key_file
+# here's the fallback if no module succeeds
+password requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+password required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
diff --git a/recipes-extended/pam/libpam/pam.d/common-session b/recipes-extended/pam/libpam/pam.d/common-session
new file mode 100644
index 0000000000000000000000000000000000000000..e8751d2ee847776d246a8b774a4054100fad47b7
--- /dev/null
+++ b/recipes-extended/pam/libpam/pam.d/common-session
@@ -0,0 +1,19 @@
+#
+# /etc/pam.d/common-session - session-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define tasks to be performed
+# at the start and end of sessions of *any* kind (both interactive and
+# non-interactive).
+#
+
+# here are the per-package modules (the "Primary" block)
+session [default=1] pam_permit.so
+# here's the fallback if no module succeeds
+session requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+session required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+session required pam_unix.so quiet
diff --git a/recipes-extended/pam/libpam_%.bbappend b/recipes-extended/pam/libpam_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..682f132b53177c8374614d65d549233e6649bfc3
--- /dev/null
+++ b/recipes-extended/pam/libpam_%.bbappend
@@ -0,0 +1,22 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " file://pam.d/common-password \
+ file://pam.d/common-account \
+ file://pam.d/common-auth \
+ file://pam.d/common-session \
+ "
+
+RDEPENDS:${PN}-runtime += "${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-tally2-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-localuser-${libpam_suffix} \
+ "
+
+do_install:append() {
+ # The libpam recipe will always add a pam_systemd.so line to
+ # common-session if systemd is enabled; however systemd only
+ # builds pam_systemd.so if logind is enabled, and we disable
+ # that package. So, remove the pam_systemd.so line here.
+ sed -i '/pam_systemd.so/d' ${D}${sysconfdir}/pam.d/common-session
+}
diff --git a/recipes-extended/pam/pam-ipmi_git.bb b/recipes-extended/pam/pam-ipmi_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..bca1dbbec8fe6e3cb72e1a444dc24576fd948dcd
--- /dev/null
+++ b/recipes-extended/pam/pam-ipmi_git.bb
@@ -0,0 +1,23 @@
+SUMMARY = "PAM modules for IPMI support"
+DESCRIPTION = "PAM modules managing password for IPMI"
+HOMEPAGE = "http://github.com/openbmc/pam-ipmi"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+SRC_URI += "git://github.com/openbmc/pam-ipmi;branch=master;protocol=https"
+SRCREV = "08be868a6d18bca99d3580f4b3247c0c953f0f84"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "openssl libpam"
+
+FILES:${PN} += " \
+ ${base_libdir}/security/ \
+ ${sysconfdir}/key_file \
+ ${sysconfdir}/ipmi_pass \
+ "
diff --git a/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/recipes-extended/rsyslog/rsyslog/rsyslog.conf
new file mode 100644
index 0000000000000000000000000000000000000000..ebdf14dfc3ed8ade9178c764f68144aa66279a8c
--- /dev/null
+++ b/recipes-extended/rsyslog/rsyslog/rsyslog.conf
@@ -0,0 +1,3 @@
+$ModLoad imuxsock
+
+$IncludeConfig /etc/rsyslog.d/*.conf
diff --git a/recipes-extended/rsyslog/rsyslog/server.conf b/recipes-extended/rsyslog/rsyslog/server.conf
new file mode 100644
index 0000000000000000000000000000000000000000..d2a7c5ea3f1e07f2f548cf56cb3b195a698557a0
--- /dev/null
+++ b/recipes-extended/rsyslog/rsyslog/server.conf
@@ -0,0 +1 @@
+*.* /dev/null
diff --git a/recipes-extended/rsyslog/rsyslog_%.bbappend b/recipes-extended/rsyslog/rsyslog_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..f04f63dd25709086471c8ca658690e654c3c6eed
--- /dev/null
+++ b/recipes-extended/rsyslog/rsyslog_%.bbappend
@@ -0,0 +1,16 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+ file://rsyslog.conf \
+ file://server.conf \
+"
+
+PACKAGECONFIG ??= " \
+ rsyslogd rsyslogrt inet regexp uuid \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+"
+
+do_install:append(){
+ install -m 0644 -D ${WORKDIR}/server.conf \
+ ${D}${sysconfdir}/rsyslog.d/server.conf
+}
diff --git a/recipes-extended/sdbusplus/python3-sdbus++_git.bb b/recipes-extended/sdbusplus/python3-sdbus++_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d0443d1ce64f7710c9a854a9bb69996f74e65e49
--- /dev/null
+++ b/recipes-extended/sdbusplus/python3-sdbus++_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "sdbus++ dbus API / binding generator"
+DESCRIPTION = "Generates bindings against sdbusplus for dbus APIs"
+
+PYPI_PACKAGE = "sdbusplus"
+PV = "1.0"
+inherit setuptools3
+
+include sdbusplus-rev.inc
+
+## The sdbusplus repository has an Apache LICENSE file, which we would
+## normally check here, but the python setup script is in a subdirectory
+## which requires us to set ${S} below. When we change ${S} from the root
+## of the repository, bitbake can no longer find the LICENSE file. Point
+## to the common Apache license file in poky's meta instead.
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+S="${WORKDIR}/git/tools"
+
+DEPENDS += " \
+ ${PYTHON_PN}-inflection-native \
+ ${PYTHON_PN}-mako-native \
+ ${PYTHON_PN}-pyyaml-native \
+ "
+
+RDEPENDS:${PN} += " \
+ ${PYTHON_PN}-inflection \
+ ${PYTHON_PN}-mako \
+ ${PYTHON_PN}-pyyaml \
+ "
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/recipes-extended/sdbusplus/sdbusplus-rev.inc b/recipes-extended/sdbusplus/sdbusplus-rev.inc
new file mode 100644
index 0000000000000000000000000000000000000000..a4986a4aaffe1b8d8bdbe04dfeebe8ae03e105fc
--- /dev/null
+++ b/recipes-extended/sdbusplus/sdbusplus-rev.inc
@@ -0,0 +1,6 @@
+HOMEPAGE = "http://github.com/openbmc/sdbusplus"
+PR = "r1"
+PV ?= "1.0+git${SRCPV}"
+
+SRC_URI += "git://github.com/openbmc/sdbusplus;branch=master;protocol=https"
+SRCREV = "b7329a90eef04a24c03a2afef43c2145a0033ae6"
diff --git a/recipes-extended/sdbusplus/sdbusplus_git.bb b/recipes-extended/sdbusplus/sdbusplus_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..454ca60974f537b050403d5e2c7b29d7e84b7bbd
--- /dev/null
+++ b/recipes-extended/sdbusplus/sdbusplus_git.bb
@@ -0,0 +1,24 @@
+SUMMARY = "C++ bindings for systemd dbus APIs"
+DESCRIPTION = "C++ bindings for systemd dbus APIs."
+
+inherit pkgconfig meson
+inherit python3native
+include sdbusplus-rev.inc
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+S = "${WORKDIR}/git"
+
+DEPENDS += " \
+ ${PYTHON_PN}-inflection-native \
+ ${PYTHON_PN}-mako-native \
+ ${PYTHON_PN}-pyyaml-native \
+ boost \
+ systemd \
+ "
+
+EXTRA_OEMESON:append = " \
+ -Dtests=disabled \
+ -Dexamples=disabled \
+ "
diff --git a/recipes-extended/sdeventplus/sdeventplus_git.bb b/recipes-extended/sdeventplus/sdeventplus_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d61a0083799d796615c1480dc29cd0737f504013
--- /dev/null
+++ b/recipes-extended/sdeventplus/sdeventplus_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "C++ bindings for systemd event APIs"
+DESCRIPTION = "C++ bindings for systemd event APIs."
+HOMEPAGE = "http://github.com/openbmc/sdeventplus"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit meson pkgconfig
+
+DEPENDS += " \
+ function2 \
+ stdplus \
+ systemd \
+ "
+
+EXTRA_OEMESON = " \
+ -Dexamples=false \
+ -Dtests=disabled \
+ "
+
+SRC_URI += "git://github.com/openbmc/sdeventplus;branch=master;protocol=https"
+SRCREV = "02316409089ce12fa7c188f316469be8681b850b"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-extended/stdplus/stdplus_git.bb b/recipes-extended/stdplus/stdplus_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..9689ea32d79e406534730ac60fbfefe8d2e92d00
--- /dev/null
+++ b/recipes-extended/stdplus/stdplus_git.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Common C++ functions"
+DESCRIPTION = "Common C++ functions."
+HOMEPAGE = "http://github.com/openbmc/stdplus"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson pkgconfig
+
+DEPENDS += " \
+ fmt \
+ liburing \
+ "
+
+EXTRA_OEMESON = " \
+ -Dexamples=false \
+ -Dtests=disabled \
+ "
+
+SRC_URI += "git://github.com/openbmc/stdplus;branch=master;protocol=https"
+SRCREV = "68975b90a5e98f90fbcd779b59870c1cbf81bf49"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-graphics/libvncserver/libvncserver_%.bbappend b/recipes-graphics/libvncserver/libvncserver_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..76d915c245592c0d74d41be4da2e49ec3e4588c7
--- /dev/null
+++ b/recipes-graphics/libvncserver/libvncserver_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG = "jpeg lzo systemd zlib openssl pthread"
diff --git a/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb b/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..67dc6603cee6d0806f0f0b6e82d4c80a9f88e8b3
--- /dev/null
+++ b/recipes-graphics/obmc-ikvm/obmc-ikvm_git.bb
@@ -0,0 +1,17 @@
+SUMMARY = "OpenBMC VNC server and ipKVM daemon"
+DESCRIPTION = "obmc-ikvm is a vncserver for JPEG-serving V4L2 devices to allow ipKVM"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=75859989545e37968a99b631ef42722e"
+
+DEPENDS = " libvncserver systemd sdbusplus phosphor-logging phosphor-dbus-interfaces"
+
+SRC_URI = "git://github.com/openbmc/obmc-ikvm;branch=master;protocol=https"
+SRCREV = "a4f63b38f1e72a3c34c54e275803d945b949483b"
+
+PV = "1.0+git${SRCPV}"
+
+SYSTEMD_SERVICE:${PN} += "start-ipkvm.service"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson systemd
diff --git a/recipes-graphics/ttf-fonts/liberation-fonts_%.bbappend b/recipes-graphics/ttf-fonts/liberation-fonts_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..5283a7841ffc87a8c997b6aafd411f20ef50e2e1
--- /dev/null
+++ b/recipes-graphics/ttf-fonts/liberation-fonts_%.bbappend
@@ -0,0 +1,9 @@
+
+do_install () {
+ install -d ${D}${datadir}/fonts/ttf/
+ for i in LiberationMono-Regular.ttf; do
+ install -m 0644 $i ${D}${prefix}/share/fonts/ttf/${i}
+ done
+ install -d ${D}${sysconfdir}/fonts/conf.d/
+ install -m 0644 ${WORKDIR}/30-liberation-aliases.conf ${D}${sysconfdir}/fonts/conf.d/
+}
diff --git a/recipes-phosphor/bios/biosconfig-manager_git.bb b/recipes-phosphor/bios/biosconfig-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..510d79b6540dc0af773df3a94932bee7c24d95b8
--- /dev/null
+++ b/recipes-phosphor/bios/biosconfig-manager_git.bb
@@ -0,0 +1,30 @@
+HOMEPAGE = "https://github.com/openbmc/bios-settings-mgr"
+
+SUMMARY = "Remote BIOS Configuration via BMC"
+
+DESCRIPTION = "Provides ability for the user to view and modify the BIOS setup \
+ configuration parameters remotely via BMC at any Host state. \
+ Modifications to the parameters take place upon the next system \
+ reboot or immediate based on the host firmware."
+
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bcd9ada3a943f58551867d72893cc9ab"
+
+SRC_URI = "git://github.com/openbmc/bios-settings-mgr;branch=master;protocol=https"
+SRCREV = "616f9228daa5b94447c3c9d519b63f1686e751f5"
+
+inherit meson pkgconfig systemd
+
+S = "${WORKDIR}/git"
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.biosconfig_manager.service \
+ xyz.openbmc_project.biosconfig_password.service"
+
+DEPENDS = " boost \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ systemd \
+ nlohmann-json "
+
diff --git a/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb b/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..7b4541d18d3c807fb24eef957a4d4ae1caf76880
--- /dev/null
+++ b/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Phosphor Certificate Manager"
+DESCRIPTION = "Manages client and server certificates"
+HOMEPAGE = "https://github.com/openbmc/phosphor-certificate-manager"
+
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+SRC_URI = "git://github.com/openbmc/phosphor-certificate-manager;branch=master;protocol=https"
+SRCREV = "ebd21ba4fc36577a70cad207e42d66594b73ed13"
+
+inherit meson pkgconfig systemd
+
+DEPENDS = " \
+ cli11 \
+ openssl \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ sdeventplus \
+ "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMESON += "-Dtests=disabled"
+
+SYSTEMD_SERVICE:${PN} = "phosphor-certificate-manager@.service"
+
+PACKAGECONFIG ??= "bmcweb-cert nslcd-authority-cert"
+PACKAGECONFIG[ibm-hypervisor-cert] = "-Dca-cert-extension=enabled,-Dca-cert-extension=disabled"
+PACKAGECONFIG[bmcweb-cert] = "-Dconfig-bmcweb=enabled,-Dconfig-bmcweb=disabled"
+PACKAGECONFIG[nslcd-authority-cert] = "-Dconfig-nslcd=enabled,-Dconfig-nslcd=disabled"
+
+SYSTEMD_SERVICE:${PN} = " \
+ phosphor-certificate-manager@.service \
+ ${@bb.utils.contains('PACKAGECONFIG', 'ibm-hypervisor-cert', 'bmc-vmi-ca-manager.service', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'nslcd-authority-cert', 'phosphor-certificate-manager@authority.service', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'bmcweb', 'phosphor-certificate-manager@bmcweb.service', '', d)} \
+ "
+
+FILES:${PN}:append = " ${systemd_system_unitdir}/* ${datadir}/dbus-1"
diff --git a/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service b/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service
new file mode 100644
index 0000000000000000000000000000000000000000..cfda54a026e6fc09e0c455af0ca59fd8f066a098
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-control-chassis/org.openbmc.control.Chassis@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Phosphor Chassis%i Control
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env chassis_control.py
+SyslogIdentifier=chassis_control.py
+Type=dbus
+BusName={BUSNAME}
+Environment="PYTHONUNBUFFERED=1"
+TimeoutStartSec=180s
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/chassis/obmc-control-chassis_git.bb b/recipes-phosphor/chassis/obmc-control-chassis_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..3c62552c6471e01966edce1d2533a8b0b483128f
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-control-chassis_git.bb
@@ -0,0 +1,19 @@
+SUMMARY = "OpenBMC org.openbmc.control.Chassis example implementation"
+DESCRIPTION = "An example implementation of the org.openbmc.control.Chassis DBUS API."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-python
+inherit obmc-phosphor-dbus-service
+
+RDEPENDS:${PN} += "\
+ python-dbus \
+ python-pygobject \
+ python-netclient \
+ pyphosphor-dbus \
+ "
+
+SKELETON_DIR = "pychassisctl"
+
+FMT = "org.openbmc.control.Chassis@{0}.service"
+DBUS_SERVICE:${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/recipes-phosphor/chassis/obmc-host-failure-reboots.bb b/recipes-phosphor/chassis/obmc-host-failure-reboots.bb
new file mode 100644
index 0000000000000000000000000000000000000000..b21440d89bd534475eefd8ba0377a65ffcf8c4ea
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-host-failure-reboots.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Enables reboots on host failures"
+DESCRIPTION = "Manages the settings entry that controls reboots \
+on host failures"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit obmc-phosphor-systemd
+
+TMPL = "host-failure-reboots@.service"
+INSTFMT = "host-failure-reboots@{0}.service"
+LINK_FMT = "${TMPL}:${INSTFMT}"
+
+SYSTEMD_SERVICE:${PN} += "${TMPL}"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'LINK_FMT', 'OBMC_HOST_INSTANCES')}"
diff --git a/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots@.service b/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots@.service
new file mode 100644
index 0000000000000000000000000000000000000000..26345ee5fa886c424656eb115a5d7d4dfcdb8f9d
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Enable reboot on host failures
+Wants=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
+After=mapper-wait@-xyz-openbmc_project-control-host0-auto_reboot.service
+
+[Service]
+ExecStart = /bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/control/host0/auto_reboot` /xyz/openbmc_project/control/host0/auto_reboot xyz.openbmc_project.Control.Boot.RebootPolicy AutoReboot b true"
+ExecStop = /bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/control/host0/auto_reboot` /xyz/openbmc_project/control/host0/auto_reboot xyz.openbmc_project.Control.Boot.RebootPolicy AutoReboot b false"
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/obmc/power_control b/recipes-phosphor/chassis/obmc-op-control-power/obmc/power_control
new file mode 100644
index 0000000000000000000000000000000000000000..8db8890347e85b5dd94f238c0e061882f1478c14
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/obmc/power_control
@@ -0,0 +1,2 @@
+POLL_INTERVAL="3000"
+PGOOD_TIMEOUT="10"
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service b/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
new file mode 100644
index 0000000000000000000000000000000000000000..82b7938667b9a06d8163b5256be4d25743becbb6
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/op-power-start@.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Start Power%i
+Wants=obmc-power-start@%i.target
+Before=obmc-power-start@%i.target
+Wants=obmc-power-start-pre@%i.target
+After=obmc-power-start-pre@%i.target
+After=obmc-fan-control.target
+Wants=mapper-wait@-org-openbmc-control-power%i.service
+After=mapper-wait@-org-openbmc-control-power%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart=/bin/sh -c "busctl call `mapper get-service /org/openbmc/control/power%i` /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 1"
+SyslogIdentifier=op-power-start
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service b/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
new file mode 100644
index 0000000000000000000000000000000000000000..40dbf36377367d0d5a41260c106c2b799af9029a
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/op-power-stop@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Stop Power%i
+Wants=obmc-power-stop@%i.target
+Before=obmc-power-stop@%i.target
+Wants=obmc-power-stop-pre@%i.target
+After=obmc-power-stop-pre@%i.target
+Wants=mapper-wait@-org-openbmc-control-power%i.service
+After=mapper-wait@-org-openbmc-control-power%i.service
+Conflicts=obmc-chassis-poweron@%i.target
+
+[Service]
+RemainAfterExit=yes
+ExecStart=/bin/sh -c "busctl call `mapper get-service /org/openbmc/control/power%i` /org/openbmc/control/power%i org.openbmc.control.Power setPowerState i 0"
+SyslogIdentifier=op-power-stop
+
+[Install]
+WantedBy=obmc-host-stop@%i.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/op-powered-off@.service b/recipes-phosphor/chassis/obmc-op-control-power/op-powered-off@.service
new file mode 100644
index 0000000000000000000000000000000000000000..b76db7bf41b88b36dbf76983e630538eebfe369c
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/op-powered-off@.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Power is off to chassis%i
+After=op-wait-power-off@%i.service
+Requires=op-wait-power-off@%i.service
+
+[Service]
+RemainAfterExit=no
+# systemd starts all wanted targets in parallel and a Conflict
+# statement will resolve itself when the target starts, not when
+# completes. Some services have a requirement to stop
+# once power is off. The solution is to create a new target,
+# obmc-chassis-powered-off@.target, that is started after it is
+# verified that power has been removed from the chassis. Then
+# services may conflict with this target to ensure they
+# are stopped at the appropriate time.
+ExecStart=/bin/systemctl start obmc-chassis-powered-off@%i.target
+
+
+[Install]
+WantedBy=obmc-chassis-poweroff@%i.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-on@.service b/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-on@.service
new file mode 100644
index 0000000000000000000000000000000000000000..f2a7103254d127c58a4c83943ec71dc7600b46e9
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-on@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Start chassis%i on after BMC reset
+Requires=op-reset-chassis-running@%i.service
+After=op-reset-chassis-running@%i.service
+After=obmc-power-reset-on@%i.target
+Requires=obmc-power-reset-on@%i.target
+ConditionPathExists=/run/openbmc/chassis@%i-on
+
+[Service]
+RemainAfterExit=no
+ExecStart=/bin/systemctl start obmc-chassis-poweron@%i.target
+
+
+[Install]
+WantedBy=obmc-chassis-powerreset@%i.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-running@.service b/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-running@.service
new file mode 100644
index 0000000000000000000000000000000000000000..381f89dfcacaf4b7126a6671dd83b453fe4e41b7
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/op-reset-chassis-running@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Check Chassis%i pgood and create a file to indicate it
+Wants=mapper-wait@-org-openbmc-control-power%i.service
+After=mapper-wait@-org-openbmc-control-power%i.service
+Wants=obmc-power-reset-on@%i.target
+Before=obmc-power-reset-on@%i.target
+Conflicts=obmc-chassis-poweroff@%i.target
+
+[Service]
+RemainAfterExit=no
+Type=oneshot
+ExecStart=/bin/sh -c "if [ $(busctl get-property `mapper get-service /org/openbmc/control/power%i` /org/openbmc/control/power%i org.openbmc.control.Power pgood | sed 's/i\s*[1]/on/' | grep on | wc -l) != 0 ]; then mkdir -p /run/openbmc/ && touch /run/openbmc/chassis@%i-on; fi"
+
+[Install]
+WantedBy=obmc-chassis-powerreset@%i.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service b/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
new file mode 100644
index 0000000000000000000000000000000000000000..092409e402f035c8bde1fe0b96f937dac8d94273
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-off@.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Wait for Power%i to turn off
+Before=obmc-power-off@%i.target
+Wants=obmc-power-stop@%i.target
+Before=obmc-power-stop@%i.target
+Wants=obmc-power-stop-pre@%i.target
+After=obmc-power-stop-pre@%i.target
+Wants=mapper-wait@-org-openbmc-control-power%i.service
+After=mapper-wait@-org-openbmc-control-power%i.service
+Conflicts=obmc-chassis-poweron@%i.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/env pgood_wait /org/openbmc/control/power%i off
+SyslogIdentifier=pgood_wait
+ExecStart=/bin/rm -f /run/openbmc/host@%i-request
+ExecStart=/bin/rm -f /run/openbmc/mpreboot@%i
+
+[Install]
+WantedBy=obmc-host-stop@%i.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service b/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
new file mode 100644
index 0000000000000000000000000000000000000000..df8383274694dde8413b4c70e2ec3c410d6d31e1
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/op-wait-power-on@.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Wait for Power%i to turn on
+Wants=obmc-power-start-pre@%i.target
+After=obmc-power-start-pre@%i.target
+Wants=obmc-power-start@%i.target
+Before=obmc-power-start@%i.target
+Wants=mapper-wait@-org-openbmc-control-power%i.service
+After=mapper-wait@-org-openbmc-control-power%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/env pgood_wait /org/openbmc/control/power%i on
+SyslogIdentifier=pgood_wait
+TimeoutSec=30
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service b/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service
new file mode 100644
index 0000000000000000000000000000000000000000..21494ca5d1b11ac2bda2d1f5d2f17ca80c222158
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power/org.openbmc.control.Power@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor Power%i Control
+
+[Service]
+EnvironmentFile={envfiledir}/obmc/power_control
+Restart=always
+ExecStart=/usr/bin/env power_control.exe $POLL_INTERVAL $PGOOD_TIMEOUT
+SyslogIdentifier=power_control.exe
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/chassis/obmc-op-control-power_git.bb b/recipes-phosphor/chassis/obmc-op-control-power_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..4d8fb37ba16cbda29916e5ab12763206005b454d
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-op-control-power_git.bb
@@ -0,0 +1,96 @@
+SUMMARY = "org.openbmc.control.Power implementation for OpenPOWER"
+DESCRIPTION = "A power control implementation suitable for OpenPOWER systems."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-gdbus
+inherit obmc-phosphor-dbus-service
+inherit pkgconfig
+
+DEPENDS += "phosphor-mapper systemd"
+
+SKELETON_DIR = "op-pwrctl"
+
+OBMC_CONTROL_POWER_FMT ?= "org.openbmc.control.Power@{0}.service"
+DBUS_SERVICE:${PN} += "${@compose_list(d, 'OBMC_CONTROL_POWER_FMT', 'OBMC_POWER_INSTANCES')}"
+
+SYSTEMD_SERVICE:${PN} += " \
+ op-power-start@.service \
+ op-wait-power-on@.service \
+ op-power-stop@.service \
+ op-wait-power-off@.service \
+ op-reset-chassis-running@.service \
+ op-reset-chassis-on@.service \
+ op-powered-off@.service \
+ "
+
+SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/power_control"
+
+START_TMPL = "op-power-start@.service"
+START_TGTFMT = "obmc-chassis-poweron@{1}.target"
+START_INSTFMT = "op-power-start@{0}.service"
+START_FMT = "../${START_TMPL}:${START_TGTFMT}.requires/${START_INSTFMT}"
+
+STOP_TMPL = "op-power-stop@.service"
+STOP_TGTFMT = "obmc-chassis-poweroff@{1}.target"
+STOP_INSTFMT = "op-power-stop@{0}.service"
+STOP_FMT = "../${STOP_TMPL}:${STOP_TGTFMT}.requires/${STOP_INSTFMT}"
+
+POWERED_OFF_TMPL = "op-powered-off@.service"
+POWERED_OFF_INSTFMT = "op-powered-off@{0}.service"
+POWERED_OFF_FMT = "../${POWERED_OFF_TMPL}:${STOP_TGTFMT}.requires/${POWERED_OFF_INSTFMT}"
+
+ON_TMPL = "op-wait-power-on@.service"
+ON_INSTFMT = "op-wait-power-on@{0}.service"
+ON_FMT = "../${ON_TMPL}:${START_TGTFMT}.requires/${ON_INSTFMT}"
+
+OFF_TMPL = "op-wait-power-off@.service"
+OFF_INSTFMT = "op-wait-power-off@{0}.service"
+OFF_FMT = "../${OFF_TMPL}:${STOP_TGTFMT}.requires/${OFF_INSTFMT}"
+
+RESET_TGTFMT = "obmc-chassis-powerreset@{1}.target"
+
+RESET_ON_TMPL = "op-reset-chassis-running@.service"
+RESET_ON_INSTFMT = "op-reset-chassis-running@{0}.service"
+RESET_ON_FMT = "../${RESET_ON_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_INSTFMT}"
+
+RESET_ON_CHASSIS_TMPL = "op-reset-chassis-on@.service"
+RESET_ON_CHASSIS_INSTFMT = "op-reset-chassis-on@{0}.service"
+RESET_ON_CHASSIS_FMT = "../${RESET_ON_CHASSIS_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_CHASSIS_INSTFMT}"
+
+# Build up requires relationship for START_TGTFMT and STOP_TGTFMT
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'STOP_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'POWERED_OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'OFF_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'RESET_ON_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'RESET_ON_CHASSIS_FMT', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+
+# Now show that the main control target requires these power targets
+START_TMPL_CTRL = "obmc-chassis-poweron@.target"
+START_TGTFMT_CTRL = "obmc-host-startmin@{1}.target"
+START_INSTFMT_CTRL = "obmc-chassis-poweron@{0}.target"
+START_FMT_CTRL = "../${START_TMPL_CTRL}:${START_TGTFMT_CTRL}.requires/${START_INSTFMT_CTRL}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'START_FMT_CTRL', 'OBMC_POWER_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
+
+# Chassis off requires host off
+STOP_TMPL_CTRL = "obmc-host-stop@.target"
+STOP_TGTFMT_CTRL = "obmc-chassis-poweroff@{0}.target"
+STOP_INSTFMT_CTRL = "obmc-host-stop@{1}.target"
+STOP_FMT_CTRL = "../${STOP_TMPL_CTRL}:${STOP_TGTFMT_CTRL}.requires/${STOP_INSTFMT_CTRL}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'STOP_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+
+# Hard power off requires chassis off
+HARD_OFF_TMPL_CTRL = "obmc-chassis-poweroff@.target"
+HARD_OFF_TGTFMT_CTRL = "obmc-chassis-hard-poweroff@{0}.target"
+HARD_OFF_INSTFMT_CTRL = "obmc-chassis-poweroff@{0}.target"
+HARD_OFF_FMT_CTRL = "../${HARD_OFF_TMPL_CTRL}:${HARD_OFF_TGTFMT_CTRL}.requires/${HARD_OFF_INSTFMT_CTRL}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HARD_OFF_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"
+
+# Force the standby target to run the chassis reset check target
+RESET_TMPL_CTRL = "obmc-chassis-powerreset@.target"
+SYSD_TGT = "multi-user.target"
+RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target"
+RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb b/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..58fe57be6dbff69de1c3a790c8e5fc99710cc045
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
@@ -0,0 +1,35 @@
+SUMMARY = "OpenBMC Buttons"
+DESCRIPTION = "OpenBMC All buttons"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+S = "${WORKDIR}/git"
+SRC_URI += "git://github.com/openbmc/phosphor-buttons.git;branch=master;protocol=https"
+SRCREV = "3bd1cfcb7d8293b1694aebb7f0e47fd53f7a5f60"
+
+inherit cmake pkgconfig systemd
+
+BUTTON_PACKAGES="${PN}-signals ${PN}-handler"
+
+ALLOW_EMPTY:${PN} = "1"
+PACKAGE_BEFORE_PN += "${BUTTON_PACKAGES}"
+PACKAGECONFIG ??= "signals handler"
+SYSTEMD_PACKAGES = "${BUTTON_PACKAGES}"
+
+PACKAGECONFIG[signals] = ",,gpioplus nlohmann-json,"
+PACKAGECONFIG[handler] = ",,,phosphor-state-manager-chassis phosphor-state-manager-host"
+
+FILES:${PN}-signals = "${bindir}/buttons"
+SYSTEMD_SERVICE:${PN}-signals = "xyz.openbmc_project.Chassis.Buttons.service"
+
+FILES:${PN}-handler = "${bindir}/button-handler"
+SYSTEMD_SERVICE:${PN}-handler = "phosphor-button-handler.service"
+
+DEPENDS += " \
+ systemd \
+ sdbusplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ "
diff --git a/recipes-phosphor/chassis/obmc-phosphor-power_git.bb b/recipes-phosphor/chassis/obmc-phosphor-power_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..cea4102cc4be8d40e489b6148e7c28c4ff58d884
--- /dev/null
+++ b/recipes-phosphor/chassis/obmc-phosphor-power_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Chassis Power Control"
+HOMEPAGE = "https://github.com/openbmc/phosphor-power-control"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit autotools pkgconfig
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "phosphor-logging"
+DEPENDS += "nlohmann-json"
+DEPENDS += "gpioplus"
+
+S = "${WORKDIR}/git"
+
+SRC_URI = "git://github.com/openbmc/phosphor-power-control;branch=master;protocol=https"
+SRCREV = "ca9aa00180423b548369a7485bbca641581cc1ab"
diff --git a/recipes-phosphor/clear-once/clear-once.bb b/recipes-phosphor/clear-once/clear-once.bb
new file mode 100644
index 0000000000000000000000000000000000000000..acd0dbb157b244689ee2f6e8c74e5624124a1298
--- /dev/null
+++ b/recipes-phosphor/clear-once/clear-once.bb
@@ -0,0 +1,9 @@
+SUMMARY = "Clear boot-once variables"
+DESCRIPTION = "Clear u-boot variables used for one-time boot flow"
+
+RDEPENDS:${PN} = "${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or 'u-boot-fw-utils'}"
+
+inherit obmc-phosphor-systemd
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
diff --git a/recipes-phosphor/clear-once/clear-once/clear-once.service b/recipes-phosphor/clear-once/clear-once/clear-once.service
new file mode 100644
index 0000000000000000000000000000000000000000..132d11d6973a9a106e3b430fa32b37e2d9378fb8
--- /dev/null
+++ b/recipes-phosphor/clear-once/clear-once/clear-once.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Clear one time boot overrides
+
+ConditionFileNotEmpty=/etc/fw_env.config
+RequiresMountsFor=/run /sbin /etc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+
+# It took 7 seconds to erase and write flash, be conservative
+TimeoutStartSec=60
+Restart=no
+
+ExecStart=/sbin/fw_setenv openbmconce
+ExecStart=/sbin/fw_setenv openbmconce
diff --git a/recipes-phosphor/configuration/entity-manager/blocklist.json b/recipes-phosphor/configuration/entity-manager/blocklist.json
new file mode 100644
index 0000000000000000000000000000000000000000..f112a7b6ce3624323d16405450c8b41885adc606
--- /dev/null
+++ b/recipes-phosphor/configuration/entity-manager/blocklist.json
@@ -0,0 +1,3 @@
+{
+ "buses": []
+}
diff --git a/recipes-phosphor/configuration/entity-manager/ibm-power10-cpu/blocklist.json b/recipes-phosphor/configuration/entity-manager/ibm-power10-cpu/blocklist.json
new file mode 100644
index 0000000000000000000000000000000000000000..e0f80f6047c0c5fef97cfc73db329da6e5621826
--- /dev/null
+++ b/recipes-phosphor/configuration/entity-manager/ibm-power10-cpu/blocklist.json
@@ -0,0 +1,3 @@
+{
+ "buses": [100, 101, 110, 111, 112, 113, 114, 115, 202, 203, 210, 211, 214, 215, 216, 217, 300, 301, 310, 311, 312, 313, 314, 315, 402, 403, 410, 411, 414, 415, 416, 417]
+}
diff --git a/recipes-phosphor/configuration/entity-manager/ibm-power9-cpu/blocklist.json b/recipes-phosphor/configuration/entity-manager/ibm-power9-cpu/blocklist.json
new file mode 100644
index 0000000000000000000000000000000000000000..2dbf22d5d7f1682092336bcdbd5ba5af4eb7958b
--- /dev/null
+++ b/recipes-phosphor/configuration/entity-manager/ibm-power9-cpu/blocklist.json
@@ -0,0 +1,3 @@
+{
+ "buses": [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214]
+}
diff --git a/recipes-phosphor/configuration/entity-manager_git.bb b/recipes-phosphor/configuration/entity-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..18ab49fd3c13f3f1101b972399ff1acc4c7bf532
--- /dev/null
+++ b/recipes-phosphor/configuration/entity-manager_git.bb
@@ -0,0 +1,48 @@
+SUMMARY = "Entity Manager"
+DESCRIPTION = "Entity Manager provides d-bus configuration data \
+and configures system sensors"
+
+SRC_URI = "git://github.com/openbmc/entity-manager.git;branch=master;protocol=https \
+ file://blocklist.json \
+ "
+SRCREV = "b0c7bd18c20983a565c21e1921d647132329f789"
+PV = "0.1+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=a6a4edad4aed50f39a66d098d74b265b"
+
+DEPENDS = "boost \
+ dbus \
+ nlohmann-json \
+ sdbusplus \
+ valijson \
+ ${PYTHON_PN}-jsonschema-native \
+"
+
+S = "${WORKDIR}/git"
+inherit pkgconfig meson systemd python3native
+
+EXTRA_OEMESON = "-Dtests=disabled"
+
+PACKAGECONFIG ??= "ipmi-fru"
+PACKAGECONFIG[ipmi-fru] = "-Dfru-device=true, -Dfru-device=false, i2c-tools,"
+
+EXTRA_ENTITY_MANAGER_PACKAGES = " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'ipmi-fru', 'fru-device', '', d)} \
+ "
+
+PACKAGE_BEFORE_PN = "${EXTRA_ENTITY_MANAGER_PACKAGES}"
+
+do_install:append() {
+ install -D ${WORKDIR}/blocklist.json ${D}${datadir}/${BPN}/blacklist.json
+}
+
+FILES:${PN} += " \
+ ${datadir}/dbus-1/system-services/xyz.openbmc_project.EntityManager.service \
+ "
+FILES:fru-device = "${bindir}/fru-device ${datadir}/${BPN}/blacklist.json"
+
+SYSTEMD_PACKAGES = "${PN} ${EXTRA_ENTITY_MANAGER_PACKAGES}"
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.EntityManager.service"
+SYSTEMD_SERVICE:fru-device = "xyz.openbmc_project.FruDevice.service"
+SYSTEMD_AUTO_ENABLE:fru-device_ibm-power-cpu = "disable"
diff --git a/recipes-phosphor/console/obmc-console/obmc-console.conf b/recipes-phosphor/console/obmc-console/obmc-console.conf
new file mode 100644
index 0000000000000000000000000000000000000000..d42caa93555c24b953a119c1050c799a0d1d3ca4
--- /dev/null
+++ b/recipes-phosphor/console/obmc-console/obmc-console.conf
@@ -0,0 +1,2 @@
+lpc-address = 0x3f8
+sirq = 4
diff --git a/recipes-phosphor/console/obmc-console_git.bb b/recipes-phosphor/console/obmc-console_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..714e1e50827d564315a91dd75c2950d21b29ea5e
--- /dev/null
+++ b/recipes-phosphor/console/obmc-console_git.bb
@@ -0,0 +1,89 @@
+SUMMARY = "OpenBMC console daemon"
+DESCRIPTION = "Daemon to handle UART console connections"
+HOMEPAGE = "http://github.com/openbmc/obmc-console"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-discovery-service
+inherit systemd
+
+S = "${WORKDIR}/git"
+
+TARGET_CFLAGS += "-fpic -O2"
+
+PACKAGECONFIG ??= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[udev] = "--with-udevdir=`pkg-config --variable=udevdir udev`,\
+ --without-udevdir,udev"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, \
+ --without-systemdsystemunitdir"
+
+DEPENDS += "autoconf-archive-native \
+ systemd \
+ "
+
+SRC_URI += "git://github.com/openbmc/obmc-console;branch=master;protocol=https"
+SRC_URI += "file://${BPN}.conf"
+
+SRCREV = "93fd8a39d8d20cdf965490f594a2d6f6d90f506c"
+PV = "1.0+git${SRCPV}"
+
+REGISTERED_SERVICES:${PN} += "obmc_console:tcp:2200:"
+
+SYSTEMD_SERVICE:${PN} += "obmc-console-ssh@.service \
+ obmc-console-ssh.socket \
+ obmc-console@.service \
+ "
+
+FILES:${PN} += "${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf"
+
+OBMC_CONSOLE_HOST_TTY ?= "ttyVUART0"
+
+# Support multiple TTY ports using space separated list.
+# Ex. OBMC_CONSOLE_TTYS = "ttyS1 ttyS2"
+OBMC_CONSOLE_TTYS ?= "${OBMC_CONSOLE_HOST_TTY}"
+
+do_install:append() {
+ # Install the server configuration
+ install -m 0755 -d ${D}${sysconfdir}/${BPN}
+
+ # If the OBMC_CONSOLE_TTYS variable is used without the default OBMC_CONSOLE_HOST_TTY
+ # the port specific config file should be provided. If it is just OBMC_CONSOLE_HOST_TTY,
+ # use the old style which supports both port specific or obmc-console.conf method.
+ if [ "${OBMC_CONSOLE_TTYS}" != "${OBMC_CONSOLE_HOST_TTY}" ]; then
+ rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
+
+ for CONSOLE in ${OBMC_CONSOLE_TTYS}
+ do
+ if test -f "${WORKDIR}/server.${CONSOLE}.conf" ; then
+ install -m 0644 ${WORKDIR}/server.${CONSOLE}.conf ${D}${sysconfdir}/${BPN}/
+ else
+ bberror "Must provide port specific config files when using OBMC_CONSOLE_TTYS" \
+ "Missing server.${CONSOLE}.conf"
+ fi
+ done
+ else
+ # Port specific config file is prioritized over generic conf file.
+ # If port specific config file is not present and generic "obmc-console.conf"
+ # exists, it will be used.
+ if test -f "${WORKDIR}/server.${OBMC_CONSOLE_TTYS}.conf" ; then
+ # Remove the upstream-provided server configuration
+ rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
+ # Install the package-provided new-style configuration
+ install -m 0644 ${WORKDIR}/server.${OBMC_CONSOLE_TTYS}.conf ${D}${sysconfdir}/${BPN}/
+ elif test -f "${WORKDIR}/${BPN}.conf"; then
+ # Remove the upstream-provided server configuration
+ rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf
+ # Install the old-style server configuration
+ install -m 0644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/
+ # Link the custom configuration to the required location
+ ln -sr ${D}${sysconfdir}/${BPN}.conf ${D}${sysconfdir}/${BPN}/server.${OBMC_CONSOLE_TTYS}.conf
+ else
+ # Otherwise, remove socket-id from the shipped configuration to
+ # align with the lack of a client configuration file
+ sed -ri '/^socket-id =/d' ${D}${sysconfdir}/${BPN}/server.${OBMC_CONSOLE_TTYS}.conf
+ fi
+ fi
+
+}
diff --git a/recipes-phosphor/datetime/phosphor-time-manager_git.bb b/recipes-phosphor/datetime/phosphor-time-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..3e43cdaea7d00d389395a262c4db995c4e0e4b62
--- /dev/null
+++ b/recipes-phosphor/datetime/phosphor-time-manager_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Phosphor Time Manager daemon"
+DESCRIPTION = "Daemon to cater to BMC and HOST time management"
+HOMEPAGE = "http://github.com/openbmc/phosphor-time-manager"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+inherit meson pkgconfig python3native
+inherit obmc-phosphor-dbus-service
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "phosphor-mapper"
+DEPENDS += "systemd"
+DEPENDS += "sdbusplus"
+DEPENDS += "${PYTHON_PN}-sdbus++-native"
+DEPENDS += "phosphor-logging"
+DEPENDS += "phosphor-dbus-interfaces"
+RDEPENDS:${PN} += "phosphor-settings-manager"
+RDEPENDS:${PN} += "phosphor-network"
+RDEPENDS:${PN} += "phosphor-mapper"
+
+SRC_URI += "git://github.com/openbmc/phosphor-time-manager;branch=master;protocol=https"
+SRCREV = "076f9ecef94b5329cc0361352e7af30851010e73"
+PV = "1.0+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+DBUS_SERVICE:${PN} += "xyz.openbmc_project.Time.Manager.service"
diff --git a/recipes-phosphor/dbus/dbus-perms.bb b/recipes-phosphor/dbus/dbus-perms.bb
new file mode 100644
index 0000000000000000000000000000000000000000..9097222f025bed1b2c4b3de87f6d07e954887a98
--- /dev/null
+++ b/recipes-phosphor/dbus/dbus-perms.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Phosphor OpenBMC DBUS Permissions"
+DESCRIPTION = "Phosphor OpenBMC DBUS Permissions."
+HOMEPAGE = "http://github.com/openbmc/"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit dbus-dir
+
+SRC_URI += "file://org.openbmc.conf"
+
+FILES:${PN}:append = " ${dbus_system_confdir}"
+
+do_install:append() {
+ install -d ${D}${dbus_system_confdir}
+ install -m 0644 ${WORKDIR}/org.openbmc.conf \
+ ${D}${dbus_system_confdir}
+}
diff --git a/recipes-phosphor/dbus/dbus-perms/org.openbmc.conf b/recipes-phosphor/dbus/dbus-perms/org.openbmc.conf
new file mode 100644
index 0000000000000000000000000000000000000000..b51293b19e739bb6a51f4b759a9cb8b7b984971f
--- /dev/null
+++ b/recipes-phosphor/dbus/dbus-perms/org.openbmc.conf
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb b/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..dda33fa997e4e4bc0882a6e37370ccb2c09b49f1
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
@@ -0,0 +1,13 @@
+SUMMARY="Add xyz.openbmc_project namespace to phosphor-mapper"
+DESCRIPTION="Add the xyz.openbmc_project service namespace and \
+xyz.openbmc_project interface prefix to the mapper \
+watch list."
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-mapper
+inherit native
+
+PHOSPHOR_MAPPER_SERVICE:append = " xyz.openbmc_project"
+PHOSPHOR_MAPPER_INTERFACE:append = " xyz.openbmc_project org.freedesktop.DBus.ObjectManager"
diff --git a/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb b/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..7a013abcf99241baeb6e6aaada20e18706947468
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Phosphor DBus Interfaces"
+DESCRIPTION = "Generated bindings, using sdbus++, for the phosphor YAML"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+S = "${WORKDIR}/git"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit pkgconfig meson
+inherit obmc-phosphor-utils
+inherit phosphor-dbus-yaml
+inherit python3native
+
+DEPENDS += " \
+ ${PYTHON_PN}-sdbus++-native \
+ sdbusplus \
+ systemd \
+ "
+
+SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces;branch=master;protocol=https"
+SRCREV = "56936f52f25667f233f981e5aacc52981b003b39"
+
+# Process OBMC_ORG_YAML_SUBDIRS to create Meson config options.
+# ex. xyz/openbmc_project -> -Ddata_xyz_openbmc_project=true
+def pdi_meson_config(d):
+ return ' '.join([
+ '-Ddata_' + x.replace('/', '_') + '=true' \
+ for x in listvar_to_list(d, 'OBMC_ORG_YAML_SUBDIRS')
+ ])
+pdi_meson_config[vardeps] = "OBMC_ORG_YAML_SUBDIRS"
+EXTRA_OEMESON += "${@pdi_meson_config(d)}"
+
+# Remove all schemas by default regardless of the meson_options.txt config
+do_write_config:append() {
+ for intf in $(grep "^option('data_" ${S}/meson_options.txt | sed "s,^.*\(data_[^']*\).*$,\1,"); do
+ sed -i "/^\[built-in options\]\$/a$intf = false" ${WORKDIR}/meson.cross
+ done
+}
+
+# Markdown files are installed into /usr/share/phosphor-dbus-interfaces so
+# add them to the 'doc' subpackage.
+FILES:${PN}-doc += "${datadir}/${BPN}"
diff --git a/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bb b/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..dddf9c04c2b3c96a1defcef8040c36f84ad6476a
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor DBus Monitor Configuration"
+DESCRIPTION = "Meta-recipe, pulling in non-native recipes that wish to add \
+configuration files to the /usr/share/phosphor-dbus-monitor filesystem."
+HOMEPAGE = "http://github.com/openbmc/phosphor-dbus-monitor"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-dbus-monitor
+
+PHOSPHOR_DBUS_MONITOR_CONFIGS ??= ""
+
+# To add additional config files, create a recipe in your layer,
+# and add it to PHOSPHOR_DBUS_MONITOR_CONFIGS with a bbappend to this recipe.
+
+DEPENDS += "${PHOSPHOR_DBUS_MONITOR_CONFIGS}"
+
+do_install() {
+ mkdir -p ${D}${config_dir}
+}
+
+FILES:${PN} += "${config_dir}"
diff --git a/recipes-phosphor/dbus/phosphor-dbus-monitor/phosphor-dbus-monitor.service b/recipes-phosphor/dbus/phosphor-dbus-monitor/phosphor-dbus-monitor.service
new file mode 100644
index 0000000000000000000000000000000000000000..b9d93608be1ba04286d56d4cfc6d0d076e05def5
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-dbus-monitor/phosphor-dbus-monitor.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Phosphor DBus Monitor
+After=obmc-mapper.target
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env phosphor-dbus-monitor
+SyslogIdentifier=phosphor-dbus-monitor
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/dbus/phosphor-dbus-monitor/phosphor-msl-verify.service b/recipes-phosphor/dbus/phosphor-dbus-monitor/phosphor-msl-verify.service
new file mode 100644
index 0000000000000000000000000000000000000000..cbefdeab14ae277c86971e64aa620947d688fc0b
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-dbus-monitor/phosphor-msl-verify.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Phosphor MSL Verification
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/env phosphor-msl-verify
+SyslogIdentifier=phosphor-msl-verify
diff --git a/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb b/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ecbc5bf568a6fecbd8025306788577bfa6ed6805
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Phosphor DBus Monitor"
+DESCRIPTION = "Phosphor DBus Monitor is a general purpose DBus application \
+that watches DBus traffic for events and takes actions based on those events."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+HOMEPAGE = "http://github.com/openbmc/phosphor-dbus-monitor"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI = "git://github.com/openbmc/phosphor-dbus-monitor;branch=master;protocol=https"
+SRCREV = "2beffa634d4e899745510af4e8fa2c387ec5d3ad"
+
+inherit autotools \
+ pkgconfig \
+ python3native \
+ phosphor-dbus-monitor \
+ obmc-phosphor-systemd
+
+PACKAGE_BEFORE_PN = "phosphor-msl-verify"
+SYSTEMD_PACKAGES = "${PN} phosphor-msl-verify"
+SYSTEMD_SERVICE:phosphor-msl-verify = "phosphor-msl-verify.service"
+
+DEPENDS += " \
+ ${PN}-config \
+ phosphor-logging \
+ autoconf-archive-native \
+ ${PYTHON_PN}-sdbus++-native \
+ sdeventplus \
+ gtest \
+ phosphor-snmp \
+ ${PYTHON_PN}-native \
+ ${PYTHON_PN}-pyyaml-native \
+ ${PYTHON_PN}-setuptools-native \
+ ${PYTHON_PN}-mako-native \
+ "
+
+FILES:phosphor-msl-verify = "${bindir}/phosphor-msl-verify"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " \
+ YAML_PATH=${STAGING_DIR_HOST}${config_dir} \
+ "
diff --git a/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb b/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..2682ba37c2c6df3db5913a62f7bd5ff58ebb3de0
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
@@ -0,0 +1,12 @@
+SUMMARY="Add org.openbmc namespace to phosphor-mapper"
+DESCRIPTION="Add the legacy org.openbmc service namespace and \
+org.openbmc interface prefix to the mapper watch list."
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-mapper
+inherit native
+
+PHOSPHOR_MAPPER_SERVICE:append = " org.openbmc"
+PHOSPHOR_MAPPER_INTERFACE:append = " org.openbmc"
diff --git a/recipes-phosphor/dbus/phosphor-mapper-config-native.bb b/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ca88023d9bded9977c15ef77257bf89e7bb9783c
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Phosphor Mapper Configuration"
+DESCRIPTION = "Meta-recipe, pulling in native recipes that wish to add \
+configuration files to the native /usr/share/phosphor-mapper filesystem."
+HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-mapper
+inherit native
+
+PHOSPHOR_MAPPER_CONFIGS = " \
+ phosphor-dbus-interfaces-mapper-config-native \
+ phosphor-legacy-namespace-mapper-config-native \
+ "
+
+DEPENDS += "${PHOSPHOR_MAPPER_CONFIGS}"
+
+# To add namespaces and blacklists to the mapper configuration,
+# create a native recipe in your layer, and add it to
+# PHOSPHOR_MAPPER_CONFIGS with a bbappend to this recipe.
+# Recipes should set one of the variables below.
+# Consult phosphor-mapper.bbclass for additional information.
+
+# Add services to be monitored.
+PHOSPHOR_MAPPER_SERVICE = ""
+
+# Add interfaces to be monitored.
+PHOSPHOR_MAPPER_INTERFACE = ""
+
+# Blacklist services from being monitored.
+PHOSPHOR_MAPPER_SERVICE_BLACKLIST = ""
+
+do_install() {
+ install -d ${D}/${namespace_dir}
+ install -d ${D}/${interface_dir}
+ install -d ${D}/${serviceblacklist_dir}
+}
diff --git a/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service b/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
new file mode 100644
index 0000000000000000000000000000000000000000..835c947bbed9b043b6eea74c6191aeb665974ea2
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=mapper subtree-remove %I
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+Restart=on-failure
+TimeoutStartSec=infinity
+ExecStart=/usr/bin/mapper subtree-remove %I
diff --git a/recipes-phosphor/dbus/phosphor-mapper/mapper-wait@.service b/recipes-phosphor/dbus/phosphor-mapper/mapper-wait@.service
new file mode 100644
index 0000000000000000000000000000000000000000..06e2e46509691822437bfef420783972acc6458b
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-mapper/mapper-wait@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Wait for %I
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=on-failure
+TimeoutStartSec=infinity
+ExecStart=/usr/bin/mapper wait %I
diff --git a/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.conf b/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.conf
new file mode 100644
index 0000000000000000000000000000000000000000..3d9fcc32717308b444fc47a3d1c4fe0ce6b520cc
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.conf
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service b/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service
new file mode 100644
index 0000000000000000000000000000000000000000..d57ec3129928f8f9150c67174a01832ec5576bc3
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Phosphor DBus Service Discovery Manager
+Before=obmc-mapper.target
+After=dbus.service
+
+[Service]
+Restart=always
+Type=dbus
+ExecStart=/usr/bin/mapperx \
+ --service-namespaces="${{MAPPER_SERVICES}}" \
+ --interface-namespaces="${{MAPPER_INTERFACES}}" \
+ --service-blacklists="${{MAPPER_SERVICEBLACKLISTS}}"
+BusName={BUSNAME}
+TimeoutStartSec=300
+RestartSec=5
+EnvironmentFile={envfiledir}/obmc/mapper
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/dbus/phosphor-mapper_git.bb b/recipes-phosphor/dbus/phosphor-mapper_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..c1eae05f1a1dc48dce220f142d4ad4780af0d418
--- /dev/null
+++ b/recipes-phosphor/dbus/phosphor-mapper_git.bb
@@ -0,0 +1,79 @@
+SUMMARY = "Phosphor DBUS Object Manager"
+DESCRIPTION = "Phosphor DBUS object manager."
+HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit meson pkgconfig
+inherit obmc-phosphor-dbus-service
+inherit obmc-phosphor-systemd
+inherit phosphor-mapperdir
+
+DEPENDS += "systemd"
+DEPENDS += "boost"
+DEPENDS += "libtinyxml2"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "${PN}-config-native"
+
+DBUS_SERVICE:${PN} += "xyz.openbmc_project.ObjectMapper.service"
+SYSTEMD_SERVICE:${PN} += " \
+ mapper-wait@.service \
+ mapper-subtree-remove@.service \
+ "
+SRC_URI += "git://github.com/openbmc/phosphor-objmgr;branch=master;protocol=https"
+
+SRCREV = "af3d797b011f3f0dfc6ad7eae44e5b312f5a3d6e"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMESON += "-Dtests=disabled"
+
+python populate_packages:prepend () {
+ mapperlibdir = d.getVar("libdir", True)
+ do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^libmapper.*"
+FILES:${PN}:remove = "${libdir}/lib*.so.* ${libdir}/*"
+
+# Construct a systemd environment file with mapper commandline
+# from the native sysroot /usr/share/phosphor-mapper filesystem.
+python do_emit_env() {
+ path = d.getVar('STAGING_DIR_NATIVE', True) + \
+ d.getVar('service_dir', True)
+ services = []
+ for s in os.listdir(path):
+ services.append('.'.join(s.split('-')))
+
+ path = d.getVar('STAGING_DIR_NATIVE', True) + \
+ d.getVar('interface_dir', True)
+ interfaces = []
+ for i in os.listdir(path):
+ interfaces.append('.'.join(i.split('-')))
+
+ path = d.getVar('STAGING_DIR_NATIVE', True) + \
+ d.getVar('serviceblacklist_dir', True)
+ service_blacklists = []
+ for x in os.listdir(path):
+ service_blacklists.append('.'.join(x.split('-')))
+
+ path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
+ path.append('obmc')
+ path.append('mapper')
+ parent = os.path.join(*path[:-1])
+ path = os.path.join(*path)
+
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+ with open(path, 'w+') as fd:
+ fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
+ fd.write('\n')
+ fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
+ fd.write('\n')
+ fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
+ fd.write('\n')
+}
+
+do_install[postfuncs] += "do_emit_env"
diff --git a/recipes-phosphor/dump/debug-trigger_git.bb b/recipes-phosphor/dump/debug-trigger_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..860c6f356961c0caedd96a20dcb8f2d155d743b1
--- /dev/null
+++ b/recipes-phosphor/dump/debug-trigger_git.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Debug trigger"
+DESCRIPTION = "Forcibly crash an unresponsive system to collect debug data"
+HOMEPAGE = "https://github.com/openbmc/debug-trigger"
+
+SRC_URI = "git://github.com/openbmc/debug-trigger;branch=master;protocol=https"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+S = "${WORKDIR}/git"
+
+inherit meson
+inherit pkgconfig
+inherit systemd
+
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+SRCREV = "1161642d2288f71549f0c9f89d09807ca251b58f"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+DEBUG_TRIGGERS ?= ""
+
+PACKAGECONFIG[systemd] = " \
+ -Dsystemd=true, \
+ -Dsystemd=false, \
+ systemd"
+
+PACKAGECONFIG[triggers] = " \
+ -Dtriggers=${DEBUG_TRIGGERS}, \
+ -Dtriggers=[], \
+ systemd udev"
+
+SYSTEMD_SERVICE:${PN} += "debug-trigger@.service"
diff --git a/recipes-phosphor/dump/phosphor-debug-collector.inc b/recipes-phosphor/dump/phosphor-debug-collector.inc
new file mode 100644
index 0000000000000000000000000000000000000000..e97251eb201f429738b190ac94d97e279cfb3530
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-collector.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/phosphor-debug-collector"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/phosphor-debug-collector;branch=master;protocol=https"
+SRCREV = "124d31f09cbb0eebd0f14aceade5c2fd290520fe"
diff --git a/recipes-phosphor/dump/phosphor-debug-collector/coretemp.conf b/recipes-phosphor/dump/phosphor-debug-collector/coretemp.conf
new file mode 100644
index 0000000000000000000000000000000000000000..b9a36e6de578a0c816034cb6140baa0bd32fea13
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-collector/coretemp.conf
@@ -0,0 +1,8 @@
+# This configuration file will help in
+# removing all the hidden files in the
+# coredump folder at boot time.
+#
+# See tmpfiles.d for more details
+
+R! /var/lib/systemd/coredump/.[^.] - - - -
+R! /var/lib/systemd/coredump/.??* - - - -
diff --git a/recipes-phosphor/dump/phosphor-debug-collector/obmc-dump-monitor.service b/recipes-phosphor/dump/phosphor-debug-collector/obmc-dump-monitor.service
new file mode 100644
index 0000000000000000000000000000000000000000..5d1e959d38c8e451cc17837d7dd0c1637ae46430
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-collector/obmc-dump-monitor.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Phosphor Dump core monitor.
+ConditionPathExists=/var/lib/systemd/coredump
+
+[Service]
+ExecStart=/usr/bin/env phosphor-dump-monitor
+SyslogIdentifier=phosphor-dump-monitor
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/dump/phosphor-debug-collector/ramoops-monitor.service b/recipes-phosphor/dump/phosphor-debug-collector/ramoops-monitor.service
new file mode 100644
index 0000000000000000000000000000000000000000..efb95c39ea26ee565bd441ae045a6b6db466289a
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-collector/ramoops-monitor.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Ramoops monitor.
+ConditionPathExists=/var/lib/systemd/pstore
+After=xyz.openbmc_project.Dump.Manager.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/phosphor-ramoops-monitor
+SyslogIdentifier=ramoops-monitor
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/recipes-phosphor/dump/phosphor-debug-collector/xyz.openbmc_project.Dump.Manager.service b/recipes-phosphor/dump/phosphor-debug-collector/xyz.openbmc_project.Dump.Manager.service
new file mode 100644
index 0000000000000000000000000000000000000000..515f8fc007e2515bcbe8402ac5c37da0a385a027
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-collector/xyz.openbmc_project.Dump.Manager.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor Dump Manager
+
+[Service]
+ExecStartPre=/bin/sh -c 'mkdir -p {BMC_DUMP_PATH}'
+ExecStart=/usr/bin/env phosphor-dump-manager
+SyslogIdentifier=phosphor-dump-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/dump/phosphor-debug-collector_git.bb b/recipes-phosphor/dump/phosphor-debug-collector_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..c57e90f527ed041eecba3970a3725b38441a0067
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-collector_git.bb
@@ -0,0 +1,201 @@
+SUMMARY = "Phosphor Debug Collector"
+DESCRIPTION = "Phosphor Debug Collector provides mechanisms \
+to collect various log files and system parameters. \
+This will be helpful for troubleshooting the problems in OpenBMC \
+based systems."
+
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+DEBUG_COLLECTOR_PKGS = " \
+ ${PN}-manager \
+ ${PN}-monitor \
+ ${PN}-dreport \
+ ${PN}-scripts \
+"
+PACKAGE_BEFORE_PN += "${DEBUG_COLLECTOR_PKGS}"
+ALLOW_EMPTY:${PN} = "1"
+
+DBUS_PACKAGES = "${PN}-manager"
+
+SYSTEMD_PACKAGES = "${PN}-monitor"
+
+inherit pkgconfig meson \
+ obmc-phosphor-dbus-service \
+ python3native \
+ phosphor-debug-collector
+
+require phosphor-debug-collector.inc
+
+DEPENDS += " \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ ${PYTHON_PN}-sdbus++-native \
+ autoconf-archive-native \
+ virtual/phosphor-debug-errors \
+ ${PYTHON_PN}-native \
+ ${PYTHON_PN}-pyyaml-native \
+ ${PYTHON_PN}-setuptools-native \
+ ${PYTHON_PN}-mako-native \
+ fmt \
+"
+
+RDEPENDS:${PN}-manager += " \
+ ${PN}-dreport \
+"
+RDEPENDS:${PN}-dreport += " \
+ systemd \
+ ${VIRTUAL-RUNTIME_base-utils} \
+ bash \
+ xz \
+"
+RDEPENDS:${PN}-scripts += " \
+ bash \
+"
+
+MGR_SVC ?= "xyz.openbmc_project.Dump.Manager.service"
+
+SYSTEMD_SUBSTITUTIONS += "BMC_DUMP_PATH:${bmc_dump_path}:${MGR_SVC}"
+
+FILES:${PN}-manager += " \
+ ${bindir}/phosphor-dump-manager \
+ ${bindir}/phosphor-offload-handler \
+ ${exec_prefix}/lib/tmpfiles.d/coretemp.conf \
+ ${datadir}/dump/ \
+ "
+FILES:${PN}-monitor += "${bindir}/phosphor-dump-monitor"
+FILES:${PN}-monitor += "${bindir}/phosphor-ramoops-monitor"
+FILES:${PN}-dreport += "${bindir}/dreport"
+FILES:${PN}-scripts += "${dreport_dir}"
+
+DBUS_SERVICE:${PN}-manager += "${MGR_SVC}"
+SYSTEMD_SERVICE:${PN}-monitor += "obmc-dump-monitor.service"
+SYSTEMD_SERVICE:${PN}-monitor += "ramoops-monitor.service"
+
+EXTRA_OEMESON = " \
+ -DBMC_DUMP_PATH=${bmc_dump_path} \
+ -DERROR_MAP_YAML=${STAGING_DIR_NATIVE}/${datadir}/dump/errors_watch.yaml \
+ "
+
+S = "${WORKDIR}/git"
+SRC_URI += "file://coretemp.conf"
+
+do_install:append() {
+ install -d ${D}${exec_prefix}/lib/tmpfiles.d
+ install -m 644 ${WORKDIR}/coretemp.conf ${D}${exec_prefix}/lib/tmpfiles.d/
+}
+
+# Install dreport script
+# From tools/dreport.d/dreport to /usr/bin/dreport
+install_dreport() {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/tools/dreport.d/dreport \
+ ${D}${bindir}/dreport
+}
+
+# Install dreport sample configuration file
+# From tools/dreport.d/sample.conf
+# to /usr/share/dreport.d/conf.d/dreport.conf
+install_dreport_conf_file() {
+ install -d ${D}${dreport_conf_dir}
+ install -m 0644 ${S}/tools/dreport.d/sample.conf \
+ ${D}${dreport_conf_dir}/dreport.conf
+}
+
+# Install dreport plugins
+# From tools/dreport.d/plugins.d to /usr/share/dreport.d/plugins.d
+install_dreport_plugins_scripts() {
+ install -d ${D}${dreport_plugin_dir}
+ install -m 0755 ${S}/tools/dreport.d/plugins.d/* ${D}${dreport_plugin_dir}/
+}
+
+# Install dreport utility functions
+# From tools/dreport.d/include.d to /usr/share/dreport.d/include.d
+install_dreport_include_scripts() {
+ install -d ${D}${dreport_include_dir}
+ install -m 0755 ${S}/tools/dreport.d/include.d/* \
+ ${D}${dreport_include_dir}/
+}
+
+# Make the links for a single user plugin script
+# Create user directories based on the dump type value in the config section
+# Create softlinks for the base scripts in the user directories
+def install_dreport_user_script(script_path, d):
+ import re
+ import configparser
+
+ #Read the user types from the dreport.conf file
+ configure = configparser.ConfigParser()
+ conf_dir = d.getVar('D', True) + d.getVar('dreport_conf_dir', True)
+ confsource = os.path.join(conf_dir, "dreport.conf")
+ configure.read(confsource)
+
+ config = ("config:")
+ section = "DumpType"
+ dreport_dir = d.getVar('D', True) + d.getVar('dreport_dir', True)
+
+ script = os.path.basename(script_path)
+ srclink = os.path.join(d.getVar('dreport_plugin_dir', True), script)
+
+ file = open(script_path, "r")
+
+ for line in file:
+ if not config in line:
+ continue
+ revalue = re.search('[0-9]+.[0-9]+', line)
+ if not revalue:
+ bb.warn("Invalid format for config value =%s" % line)
+ continue
+ parse_value = revalue.group(0)
+ config_values = re.split(r'\W+', parse_value, 1)
+ if(len(config_values) != 2):
+ bb.warn("Invalid config value=%s" % parse_value)
+ break;
+ priority = config_values[1]
+ types = [int(d) for d in str(config_values[0])]
+ for type in types:
+ if not configure.has_option(section, str(type)):
+ bb.warn("Invalid dump type id =%s" % (str(type)))
+ continue
+ typestr = configure.get(section, str(type))
+ destdir = os.path.join(dreport_dir, ("pl_" + typestr + ".d"))
+ if not os.path.exists(destdir):
+ os.makedirs(destdir)
+ linkname = "E" + priority + script
+ destlink = os.path.join(destdir, linkname)
+ os.symlink(srclink, destlink)
+ file.close()
+
+#Make the links for all the plugins
+python install_dreport_user_scripts() {
+
+ source = d.getVar('S', True)
+ source_path = os.path.join(source, "tools", "dreport.d", "plugins.d")
+ scripts = os.listdir(source_path)
+
+ for script in scripts:
+ srcname = os.path.join(source_path, script)
+ install_dreport_user_script(srcname, d)
+}
+
+PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', \
+ 'obmc-ubi-fs phosphor-mmc', '', 'jffs-workaround', d)}"
+PACKAGECONFIG[jffs-workaround] = "-Djffs-workaround=enabled, \
+ -Djffs-workaround=disabled"
+
+PACKAGECONFIG[host-dump-transport-pldm] = " \
+ -Dhost-transport=pldm,, \
+ pldm \
+ "
+
+PACKAGECONFIG[openpower-dumps-extension] = " \
+ -Dopenpower-dumps-extension=enabled, \
+ -Dopenpower-dumps-extension=disabled \
+"
+
+do_install[postfuncs] += "install_dreport"
+do_install[postfuncs] += "install_dreport_conf_file"
+do_install[postfuncs] += "install_dreport_plugins_scripts"
+do_install[postfuncs] += "install_dreport_include_scripts"
+do_install[postfuncs] += "install_dreport_user_scripts"
diff --git a/recipes-phosphor/dump/phosphor-debug-errors-native.bb b/recipes-phosphor/dump/phosphor-debug-errors-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ea2420363165bf52a946441970290fd29c25641a
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-errors-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Debug collector error watch config file"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit native
+
+SRC_URI += "file://errors_watch.yaml"
+
+PROVIDES += "virtual/phosphor-debug-errors"
+
+S = "${WORKDIR}"
+
+do_install:append() {
+ DEST=${D}${datadir}/dump
+ install -d ${DEST}
+ install errors_watch.yaml ${DEST}/
+}
+
diff --git a/recipes-phosphor/dump/phosphor-debug-errors/errors_watch.yaml b/recipes-phosphor/dump/phosphor-debug-errors/errors_watch.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..cb38153e180d6b02ef3b3d308fdf92a9a65450f1
--- /dev/null
+++ b/recipes-phosphor/dump/phosphor-debug-errors/errors_watch.yaml
@@ -0,0 +1,2 @@
+elog:
+ - xyz.openbmc_project.Common.Error.InternalFailure
diff --git a/recipes-phosphor/ecc/phosphor-ecc_git.bb b/recipes-phosphor/ecc/phosphor-ecc_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..90919a9310aaface9d397e5592d8f892c967a514
--- /dev/null
+++ b/recipes-phosphor/ecc/phosphor-ecc_git.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor BMC Memory ECC Logging"
+DESCRIPTION = "Daemon to monitor and report the BMC memory ECC"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+PR = "r1"
+
+inherit meson pkgconfig
+inherit systemd
+
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-logging"
+
+RDEPENDS:${PN} += "phosphor-sel-logger"
+
+SRC_URI = "git://github.com/openbmc/phosphor-ecc.git;branch=master;protocol=https"
+SRCREV = "c33f294ecc59cd31698ada37827bb5c9f00adc8b"
+
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE:${PN} = " ${PN}.service"
diff --git a/recipes-phosphor/fans/obmc-control-fan/obmc-max-fans.service b/recipes-phosphor/fans/obmc-control-fan/obmc-max-fans.service
new file mode 100644
index 0000000000000000000000000000000000000000..f062fc9c8cb6e47b0cfce1afeb44c1f40d44b0a8
--- /dev/null
+++ b/recipes-phosphor/fans/obmc-control-fan/obmc-max-fans.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Set Fans to Maximum
+Wants=mapper-wait@-org-openbmc-control-fans.service
+After=mapper-wait@-org-openbmc-control-fans.service
+After=obmc-fan-control.target
+
+[Service]
+Type=oneshot
+Restart=no
+ExecStart=/bin/sh -c "busctl call `mapper get-service /org/openbmc/control/fans` /org/openbmc/control/fans org.openbmc.control.Fans setMax"
+SyslogIdentifier=obmc-max-fans
diff --git a/recipes-phosphor/fans/obmc-control-fan/org.openbmc.control.Fans.service b/recipes-phosphor/fans/obmc-control-fan/org.openbmc.control.Fans.service
new file mode 100644
index 0000000000000000000000000000000000000000..adcee268436850bd8adb0a43c1a7faaef237e6a2
--- /dev/null
+++ b/recipes-phosphor/fans/obmc-control-fan/org.openbmc.control.Fans.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Phosphor Fan Control
+Wants=obmc-fans-ready.target
+After=obmc-fans-ready.target
+Wants=obmc-fan-control.target
+Before=obmc-fan-control.target
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env fan_control.exe -f 6
+SyslogIdentifier=fan_control.exe
+Type=dbus
+BusName={BUSNAME}
+Environment="PYTHONUNBUFFERED=1"
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/fans/obmc-control-fan_git.bb b/recipes-phosphor/fans/obmc-control-fan_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..a138f7a378905828beabb711565e30b8f41e3062
--- /dev/null
+++ b/recipes-phosphor/fans/obmc-control-fan_git.bb
@@ -0,0 +1,15 @@
+SUMMARY = "OpenBMC fan control"
+DESCRIPTION = "OpenBMC fan control."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-sdbus
+inherit obmc-phosphor-dbus-service
+inherit pkgconfig
+
+DEPENDS = "systemd"
+
+SKELETON_DIR = "fanctl"
+
+DBUS_SERVICE:${PN} += "org.openbmc.control.Fans.service"
+SYSTEMD_SERVICE:${PN} += "obmc-max-fans.service"
diff --git a/recipes-phosphor/fans/phosphor-fan-control-events-config.bb b/recipes-phosphor/fans/phosphor-fan-control-events-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..7d9fbde757ad42c9f9be8a7972b9cd1dccca8988
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-events-config.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Phosphor zone events definition default data"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-fan
+
+S = "${WORKDIR}"
+
+SRC_URI = "file://events.yaml"
+
+do_install() {
+ install -D events.yaml ${D}${control_datadir}/events.yaml
+}
+
+FILES:${PN} += "${control_datadir}/events.yaml"
diff --git a/recipes-phosphor/fans/phosphor-fan-control-events-config/events.yaml b/recipes-phosphor/fans/phosphor-fan-control-events-config/events.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..b89d1dca7fd6516b20d7f55417efdca5605bb807
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-events-config/events.yaml
@@ -0,0 +1,2 @@
+#Default zone events definition YAML - empty.
+#For format, see documentation in fan control code repository example yaml.
diff --git a/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw.bb b/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw.bb
new file mode 100644
index 0000000000000000000000000000000000000000..428c21245b978d7201b6fee95cb9ef6d1fec3172
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Generate fan control YAML from the MRW"
+PR = "r1"
+LICENSE = "Apache-2.0"
+
+inherit allarch
+inherit phosphor-fan
+inherit mrw-xml
+
+S = "${WORKDIR}"
+DEPENDS = "mrw-native mrw-perl-tools-native"
+PROVIDES += "virtual/phosphor-fan-control-fan-config"
+
+do_compile() {
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_fan_zone_yaml.pl \
+ -i ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} \
+ -o fans.yaml
+}
+
+do_install() {
+ install -D fans.yaml ${D}${control_datadir}/fans.yaml
+}
+
+FILES:${PN} += "${control_datadir}/fans.yaml"
diff --git a/recipes-phosphor/fans/phosphor-fan-control-fan-config.bb b/recipes-phosphor/fans/phosphor-fan-control-fan-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..54e6045bfb4dc3fb5e16db4dc25d56026d437a1f
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-fan-config.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Phosphor fan definition example data"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-fan
+
+S = "${WORKDIR}"
+PROVIDES += "virtual/phosphor-fan-control-fan-config"
+
+SRC_URI = "file://fans.yaml"
+
+do_install() {
+ install -D fans.yaml ${D}${control_datadir}/fans.yaml
+}
+
+FILES:${PN} += "${control_datadir}/fans.yaml"
diff --git a/recipes-phosphor/fans/phosphor-fan-control-fan-config/fans.yaml b/recipes-phosphor/fans/phosphor-fan-control-fan-config/fans.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..8a6c271f2dffda45eaf325067e5bcb6f17fc8cd0
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-fan-config/fans.yaml
@@ -0,0 +1,2 @@
+#Default fan definition YAML - empty.
+#For format, see documentation in fan control code repository example yaml.
diff --git a/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config.bb b/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..8d040e1cc97a6bf1a1c9cfbb7190de84ea0aa8ff
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Phosphor zone conditions definition default data"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-fan
+
+S = "${WORKDIR}"
+
+SRC_URI = "file://zone_conditions.yaml"
+
+do_install() {
+ install -D zone_conditions.yaml ${D}${control_datadir}/zone_conditions.yaml
+}
+
+FILES:${PN} += "${control_datadir}/zone_conditions.yaml"
diff --git a/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config/zone_conditions.yaml b/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config/zone_conditions.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..13406207c71afeda32ad9b7a4cd622fcf74fa7fe
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-zone-conditions-config/zone_conditions.yaml
@@ -0,0 +1,2 @@
+#Default zone conditions definition YAML - empty.
+#For format, see documentation in fan control code repository example yaml.
diff --git a/recipes-phosphor/fans/phosphor-fan-control-zone-config.bb b/recipes-phosphor/fans/phosphor-fan-control-zone-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e2136f70ead04d5e6670ede55bc0800dc4ac6183
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-zone-config.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Phosphor fan zone definition default data"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-fan
+
+S = "${WORKDIR}"
+
+SRC_URI = "file://zones.yaml"
+
+do_install() {
+ install -D zones.yaml ${D}${control_datadir}/zones.yaml
+}
+
+FILES:${PN} += "${control_datadir}/zones.yaml"
diff --git a/recipes-phosphor/fans/phosphor-fan-control-zone-config/zones.yaml b/recipes-phosphor/fans/phosphor-fan-control-zone-config/zones.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..d25803ce69aec975ed162e4f8af7e5782f4b80e5
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-control-zone-config/zones.yaml
@@ -0,0 +1,2 @@
+#Default fan zone definition YAML - empty.
+#For format, see documentation in fan control code repository example yaml.
diff --git a/recipes-phosphor/fans/phosphor-fan-monitor-config.bb b/recipes-phosphor/fans/phosphor-fan-monitor-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d49bda495f94c183f5b6e8823dfff22f5eaac062
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-monitor-config.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Phosphor fan monitor definition default data"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-fan
+
+S = "${WORKDIR}"
+
+SRC_URI = "file://monitor.yaml"
+
+do_install() {
+ DEST=${D}${monitor_datadir}
+ install -D monitor.yaml ${D}${monitor_datadir}/monitor.yaml
+}
+
+FILES:${PN} += "${monitor_datadir}/monitor.yaml"
diff --git a/recipes-phosphor/fans/phosphor-fan-monitor-config/monitor.yaml b/recipes-phosphor/fans/phosphor-fan-monitor-config/monitor.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..ce60a22022948528e3c2b68f5049a6fea529ea7b
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-monitor-config/monitor.yaml
@@ -0,0 +1,2 @@
+#Default fan monitor definition YAML - empty.
+#For format, see documentation in fan monitor code repository example yaml.
diff --git a/recipes-phosphor/fans/phosphor-fan-presence-config.bb b/recipes-phosphor/fans/phosphor-fan-presence-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d2df636d4536760ffab8b028e7b5b68034ed2e63
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-presence-config.bb
@@ -0,0 +1,24 @@
+# Provides the config file for the phosphor-fan-presence application.
+# The default config file is empty. To provide a real one,
+# append this recipe in a layer, add:
+# FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
+# and provide a config file.
+
+SUMMARY = "Config file for phosphor-fan-presence"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-fan
+
+S = "${WORKDIR}"
+PROVIDES += "virtual/phosphor-fan-presence-config"
+
+SRC_URI = "file://config.yaml"
+
+do_install() {
+ install -D config.yaml ${D}${presence_datadir}/config.yaml
+}
+
+FILES:${PN} += "${presence_datadir}/config.yaml"
diff --git a/recipes-phosphor/fans/phosphor-fan-presence-config/config.yaml b/recipes-phosphor/fans/phosphor-fan-presence-config/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..15a10f4094942d3e80e2b9eda4fb1faeeb8695b8
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-presence-config/config.yaml
@@ -0,0 +1,3 @@
+# This file is a stub. Consult
+# https://github.com/openbmc/phosphor-fan-presence
+# for file format description and examples.
diff --git a/recipes-phosphor/fans/phosphor-fan-presence-mrw.bb b/recipes-phosphor/fans/phosphor-fan-presence-mrw.bb
new file mode 100644
index 0000000000000000000000000000000000000000..aa0e80798b15c40c530edcce94d54633655b04fd
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan-presence-mrw.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Generate fan presence YAML from the MRW"
+PR = "r1"
+LICENSE = "Apache-2.0"
+
+inherit allarch
+inherit phosphor-fan
+inherit mrw-xml
+
+DEPENDS = "mrw-native mrw-perl-tools-native"
+PROVIDES += "virtual/phosphor-fan-presence-config"
+
+FILES:${PN} += "${presence_datadir}/config.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${presence_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_presence_yaml.pl \
+ -i ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} \
+ -o ${DEST}/config.yaml
+}
diff --git a/recipes-phosphor/fans/phosphor-fan.inc b/recipes-phosphor/fans/phosphor-fan.inc
new file mode 100644
index 0000000000000000000000000000000000000000..0653f94f9489033f94c816ad509c3dae27625461
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/phosphor-fan-presence;branch=master;protocol=https"
+SRCREV = "0461bd2fdc3d57fa33d933ac9d9fd9452ed39bbb"
diff --git a/recipes-phosphor/fans/phosphor-fan_git.bb b/recipes-phosphor/fans/phosphor-fan_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..28da7fe2d9dd49e81d9eabb778e7acee704ae7d9
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-fan_git.bb
@@ -0,0 +1,167 @@
+SUMMARY = "Phosphor Fan"
+DESCRIPTION = "Phosphor fan provides a set of fan monitoring and \
+control applications."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+require ${BPN}.inc
+
+inherit autotools pkgconfig python3native
+inherit obmc-phosphor-systemd
+inherit phosphor-fan
+
+S = "${WORKDIR}/git"
+
+# Common build dependencies
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "${PYTHON_PN}-pyyaml-native"
+DEPENDS += "${PYTHON_PN}-mako-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "${PYTHON_PN}-sdbus++-native"
+DEPENDS += "sdeventplus"
+DEPENDS += "gpioplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "libevdev"
+DEPENDS += "nlohmann-json"
+DEPENDS += "cli11"
+
+# Package configuration
+FAN_PACKAGES = " \
+ ${PN}-presence-tach \
+ ${PN}-control \
+ ${PN}-monitor \
+"
+
+ALLOW_EMPTY:${PN} = "1"
+PACKAGE_BEFORE_PN += "${FAN_PACKAGES}"
+PACKAGECONFIG ?= "presence control monitor"
+SYSTEMD_PACKAGES = "${FAN_PACKAGES}"
+PKG_DEFAULT_MACHINE ??= "${MACHINE}"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# The control, monitor, and presence apps can either be JSON or YAML driven.
+PACKAGECONFIG[json] = "--enable-json, --disable-json"
+
+# --------------------------------------
+# ${PN}-presence-tach specific configuration
+PACKAGECONFIG[presence] = "--enable-presence \
+ MACHINE=${PKG_DEFAULT_MACHINE} \
+ PRESENCE_CONFIG=${STAGING_DIR_HOST}${presence_datadir}/config.yaml, \
+ --disable-presence, \
+ virtual/phosphor-fan-presence-config \
+ , \
+"
+
+MULTI_USR_TGT = "multi-user.target"
+TMPL_TACH = "phosphor-fan-presence-tach@.service"
+INSTFMT_TACH = "phosphor-fan-presence-tach@{0}.service"
+POWERON_TGT = "obmc-chassis-poweron@{0}.target"
+FMT_TACH = "../${TMPL_TACH}:${POWERON_TGT}.requires/${INSTFMT_TACH}"
+FMT_TACH_MUSR = "../${TMPL_TACH}:${MULTI_USR_TGT}.wants/${INSTFMT_TACH}"
+
+FILES:${PN}-presence-tach = "${bindir}/phosphor-fan-presence-tach"
+SYSTEMD_SERVICE:${PN}-presence-tach += "${TMPL_TACH}"
+SYSTEMD_LINK:${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_INSTANCES')}"
+
+# JSON mode also gets linked into multi-user
+SYSTEMD_LINK:${PN}-presence-tach += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ compose_list(d, 'FMT_TACH_MUSR', 'OBMC_CHASSIS_INSTANCES'), '', d)}"
+
+# Package the JSON config files installed from the repo
+FILES:${PN}-presence-tach += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ '${datadir}/phosphor-fan-presence/presence/*', '', d)}"
+
+# --------------------------------------
+# ${PN}-control specific configuration
+PACKAGECONFIG[control] = "--enable-control \
+ MACHINE=${PKG_DEFAULT_MACHINE} \
+ FAN_DEF_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/fans.yaml \
+ FAN_ZONE_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/zones.yaml \
+ ZONE_EVENTS_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/events.yaml \
+ ZONE_CONDITIONS_YAML_FILE=${STAGING_DIR_HOST}${control_datadir}/zone_conditions.yaml, \
+ --disable-control, \
+ virtual/phosphor-fan-control-fan-config \
+ phosphor-fan-control-zone-config \
+ phosphor-fan-control-events-config \
+ phosphor-fan-control-zone-conditions-config \
+ , \
+"
+
+FAN_CONTROL_TGT = "obmc-fan-control-ready@{0}.target"
+
+TMPL_CONTROL = "phosphor-fan-control@.service"
+INSTFMT_CONTROL = "phosphor-fan-control@{0}.service"
+FMT_CONTROL = "../${TMPL_CONTROL}:${FAN_CONTROL_TGT}.requires/${INSTFMT_CONTROL}"
+FMT_CONTROL_MUSR = "../${TMPL_CONTROL}:${MULTI_USR_TGT}.wants/${INSTFMT_CONTROL}"
+FMT_CONTROL_PWRON = "../${TMPL_CONTROL}:${POWERON_TGT}.wants/${INSTFMT_CONTROL}"
+
+TMPL_CONTROL_INIT = "phosphor-fan-control-init@.service"
+INSTFMT_CONTROL_INIT = "phosphor-fan-control-init@{0}.service"
+FMT_CONTROL_INIT = "../${TMPL_CONTROL_INIT}:${POWERON_TGT}.wants/${INSTFMT_CONTROL_INIT}"
+
+FILES:${PN}-control = "${bindir}/phosphor-fan-control"
+FILES:${PN}-control += "${bindir}/fanctl"
+SYSTEMD_SERVICE:${PN}-control += "${TMPL_CONTROL}"
+SYSTEMD_SERVICE:${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', '', '${TMPL_CONTROL_INIT}', d)}"
+
+# JSON: Linked to multi-user and poweron
+# YAML: Linked to fans-ready and fan control-init poweron
+SYSTEMD_LINK:${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ compose_list(d, 'FMT_CONTROL_MUSR', 'OBMC_CHASSIS_INSTANCES'), \
+ compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES'), d)}"
+SYSTEMD_LINK:${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES'), \
+ compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES'), d)}"
+
+# Package the JSON config files installed from the repo
+FILES:${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ '${datadir}/phosphor-fan-presence/control/*', '', d)}"
+
+# --------------------------------------
+# ${PN}-monitor specific configuration
+PACKAGECONFIG[monitor] = "--enable-monitor \
+ MACHINE=${PKG_DEFAULT_MACHINE} \
+ FAN_MONITOR_YAML_FILE=${STAGING_DIR_HOST}${monitor_datadir}/monitor.yaml, \
+ --disable-monitor, \
+ phosphor-fan-monitor-config \
+ , \
+"
+
+TMPL_MONITOR = "phosphor-fan-monitor@.service"
+INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service"
+FMT_MONITOR_FANSREADY = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}"
+FMT_MONITOR_PWRON = "../${TMPL_MONITOR}:${POWERON_TGT}.wants/${INSTFMT_MONITOR}"
+FMT_MONITOR_MUSR = "../${TMPL_MONITOR}:${MULTI_USR_TGT}.wants/${INSTFMT_MONITOR}"
+
+TMPL_MONITOR_INIT = "phosphor-fan-monitor-init@.service"
+INSTFMT_MONITOR_INIT = "phosphor-fan-monitor-init@{0}.service"
+FMT_MONITOR_INIT = "../${TMPL_MONITOR_INIT}:${POWERON_TGT}.wants/${INSTFMT_MONITOR_INIT}"
+
+FILES:${PN}-monitor = "${bindir}/phosphor-fan-monitor"
+SYSTEMD_SERVICE:${PN}-monitor += "${TMPL_MONITOR}"
+SYSTEMD_SERVICE:${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', '', '${TMPL_MONITOR_INIT}', d)}"
+
+# JSON: power on and multi-user links. YAML: fans-ready and fan monitor init links
+SYSTEMD_LINK:${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ compose_list(d, 'FMT_MONITOR_PWRON', 'OBMC_CHASSIS_INSTANCES'), \
+ compose_list(d, 'FMT_MONITOR_FANSREADY', 'OBMC_CHASSIS_INSTANCES'), d)}"
+
+SYSTEMD_LINK:${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ compose_list(d, 'FMT_MONITOR_MUSR', 'OBMC_CHASSIS_INSTANCES'), \
+ compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES'), d)}"
+
+# Package the JSON config files installed from the repo
+FILES:${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
+ '${datadir}/phosphor-fan-presence/monitor/*', '', d)}"
+
+# --------------------------------------
+# phosphor-cooling-type specific configuration
+PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,,"
+
+# --------------------------------------
+# ${PN}-sensor-monitor specific configuration
+PACKAGECONFIG[sensor-monitor] = "--enable-sensor-monitor, --disable-sensor-monitor"
+
+FILES:sensor-monitor += " ${bindir}/sensor-monitor"
+SYSTEMD_SERVICE:sensor-monitor += "sensor-monitor.service"
+SYSTEMD_LINK:sensor-monitor += "../sensor-monitor.service:${MULTI_USR_TGT}.wants/sensor-monitor.service"
diff --git a/recipes-phosphor/fans/phosphor-pid-control_git.bb b/recipes-phosphor/fans/phosphor-pid-control_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..20f0260d271e2d3fa884b04f1765665515c31785
--- /dev/null
+++ b/recipes-phosphor/fans/phosphor-pid-control_git.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Phosphor PID Fan Control"
+DESCRIPTION = "Fan Control"
+HOMEPAGE = "github.com/openbmc/phosphor-pid-control"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit autotools pkgconfig
+
+inherit obmc-phosphor-ipmiprovider-symlink
+inherit systemd
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/phosphor-pid-control;branch=master;protocol=https"
+SRCREV = "ac3a21911e4f6b796310a510299bafe6e46b5afb"
+
+# Each platform will need a service file that starts
+# at an appropriate time per system. For instance, if
+# your system relies on passive dbus for fans or other
+# sensors then it may be prudent to wait for all of them.
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "phosphor-logging"
+DEPENDS += "libevdev"
+DEPENDS += "nlohmann-json"
+DEPENDS += "cli11"
+DEPENDS += "boost"
+
+# We depend on this to be built first so we can build our providers.
+DEPENDS += "phosphor-ipmi-host"
+
+SERVICE_FILE = "phosphor-pid-control.service"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "${SERVICE_FILE}"
+
+EXTRA_OECONF = " \
+ SYSTEMD_TARGET="multi-user.target" \
+ --disable-tests \
+ "
+
+FILES:${PN} = "${bindir}/swampd ${bindir}/setsensor"
+
+# The following installs the OEM IPMI handler for the fan controls.
+FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
+FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
+FILES:${PN}:append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
+FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
+
+HOSTIPMI_PROVIDER_LIBRARY += "libmanualcmds.so"
+
+config_datadir="${datadir}/swampd/"
+# config_path is the location swampd expects to find a json configuration.
+# the file is expected to be named config.json
+config_path="${config_datadir}config.json"
diff --git a/recipes-phosphor/flash/files/OpenBMC.priv b/recipes-phosphor/flash/files/OpenBMC.priv
new file mode 100644
index 0000000000000000000000000000000000000000..223d318098368ec4d561d3058b5219ec01c9b257
--- /dev/null
+++ b/recipes-phosphor/flash/files/OpenBMC.priv
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAPvSDLu6slkP1gri
+PaeQXL9ysD69J/HjbBCIQ0RPfeWBb75US1tRTjPP0Ub8CtH8ExVf8iF1ulsZA78B
+zIjBYZVp9pyD6LbpZ/hjV7rIH6dTNhoVpdA+F8LzmQ7cyhHG8l2JMvdunwF2uX5k
+D4WDcZt/ITKZNQNavPtmIyD5HprdAgMBAAECgYEAuQkTSi5ZNpAoWz76xtGRFSwU
+zUT4wQi3Mz6tDtjKTYXasiQGa0dHC1M9F8fDu6BZ9W7W4Dc9hArRcdzEighuxoI/
+nZI/0uL89iUEywnDEIHuS6D5JlZaj86/nx9YvQnO8F/seM+MX0EAWVrd5wC7aAF1
+h6Fu7ykZB4ggUjQAWwECQQD+AUiDOEO+8btLJ135dQfSGc5VFcZiequnKWVm6uXt
+rX771hEYjYMjLqWGFg9G4gE3GuABM5chMINuQQUivy8tAkEA/cxfy19XkjtqcMgE
+x/UDt6Nr+Ky/tk+4Y65WxPRDas0uxFOPk/vEjgVmz1k/TAy9G4giisluTvtmltr5
+DCLocQJBAJnRHx9PiD7uVhRJz6/L/iNuOzPtTsi+Loq5F83+O6T15qsM1CeBMsOw
+cM5FN5UeMcwz+yjfHAsePMkcmMaU7jUCQHlg9+N8upXuIo7Dqj2zOU7nMmkgvSNE
+5yuNImRZabC3ZolwaTdd7nf5r1y1Eyec5Ag5yENV6JKPe1Xkbb1XKJECQDngA0h4
+6ATvfP1Vrx4CbP11eKXbCsZ9OGPHSgyvVjn68oY5ZP3uPsIattoN7dE2BRfuJm7m
+F0nIdUAhR0yTfKM=
+-----END PRIVATE KEY-----
diff --git a/recipes-phosphor/flash/noverify-bmc-update.bb b/recipes-phosphor/flash/noverify-bmc-update.bb
new file mode 100644
index 0000000000000000000000000000000000000000..4fa3ff73f8edc28515f4f074fbdce0a0b6a6a6b0
--- /dev/null
+++ b/recipes-phosphor/flash/noverify-bmc-update.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "phosphor-ipmi-flash config to update without verifying the image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit systemd
+
+SRC_URI += "file://noverify-bmc-update.service"
+SRC_URI += "file://noverify-bmc-verify.service"
+SRC_URI += "file://config-bmc.json"
+
+SYSTEMD_SERVICE:${PN} += "noverify-bmc-update.service"
+SYSTEMD_SERVICE:${PN} += "noverify-bmc-verify.service"
+FILES:${PN} += "${datadir}/phosphor-ipmi-flash/config-bmc.json"
+
+do_install() {
+ install -d ${D}${datadir}/phosphor-ipmi-flash
+ install -m 0644 ${WORKDIR}/config-bmc.json ${D}${datadir}/phosphor-ipmi-flash
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/noverify-bmc-update.service ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/noverify-bmc-verify.service ${D}${systemd_system_unitdir}
+}
diff --git a/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json b/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json
new file mode 100644
index 0000000000000000000000000000000000000000..31df4a1efcfdd0a3e3537939d8eec4d27cdc3128
--- /dev/null
+++ b/recipes-phosphor/flash/noverify-bmc-update/config-bmc.json
@@ -0,0 +1,20 @@
+[{
+ "blob": "/flash/image",
+ "handler": {
+ "type": "file",
+ "path": "/run/initramfs/bmc-image"
+ },
+ "actions": {
+ "preparation": {
+ "type": "skip"
+ },
+ "verification": {
+ "type": "systemd",
+ "unit": "noverify-bmc-verify.service"
+ },
+ "update": {
+ "type": "systemd",
+ "unit": "noverify-bmc-update.service"
+ }
+ }
+}]
diff --git a/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service b/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service
new file mode 100644
index 0000000000000000000000000000000000000000..e30d6472322e5b06276199e8818d9b89936819e1
--- /dev/null
+++ b/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-update.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Commit image for update and reboot
+
+[Service]
+Type=oneshot
+ExecStart=/bin/mv /run/initramfs/bmc-image-verified /run/initramfs/image-bmc
+# This command is intentionally blocking to ensure this unit doesn't complete
+# before the BMC reboots.
+ExecStart=/usr/bin/systemctl start --job-mode=replace-irreversibly reboot.target
diff --git a/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service b/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service
new file mode 100644
index 0000000000000000000000000000000000000000..a535329fb01b3f79871c5e34d4c2bc41dd0fae58
--- /dev/null
+++ b/recipes-phosphor/flash/noverify-bmc-update/noverify-bmc-verify.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Don't verify the image, just stage it for update
+
+[Service]
+Type=oneshot
+ExecStart=/bin/mv /run/initramfs/bmc-image /run/initramfs/bmc-image-verified
diff --git a/recipes-phosphor/flash/obmc-flash-bios/obmc-flash-init.service b/recipes-phosphor/flash/obmc-flash-bios/obmc-flash-init.service
new file mode 100644
index 0000000000000000000000000000000000000000..dcb561e0dd0ff2963c187a369853df5e54c90809
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-flash-bios/obmc-flash-init.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Initialize BIOS Flash
+Wants=mapper-wait@-org-openbmc-control-flash-bios.service
+After=mapper-wait@-org-openbmc-control-flash-bios.service
+
+[Service]
+Restart=no
+ExecStart=/bin/sh -c "busctl call `mapper get-service /org/openbmc/control/flash/bios` /org/openbmc/control/flash/bios org.openbmc.Flash init"
+SyslogIdentifier=obmc-flash-init
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/flash/obmc-flash-bios/org.openbmc.control.Flash.service b/recipes-phosphor/flash/obmc-flash-bios/org.openbmc.control.Flash.service
new file mode 100644
index 0000000000000000000000000000000000000000..53502fc23575995173784cd3c30b293d49c75de9
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-flash-bios/org.openbmc.control.Flash.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Phosphor BIOS Code Update
+Wants=mapper-wait@-org-openbmc-managers-Download.service
+After=mapper-wait@-org-openbmc-managers-Download.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env flash_bios.exe
+SyslogIdentifier=flash_bios.exe
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/flash/obmc-flash-bios_git.bb b/recipes-phosphor/flash/obmc-flash-bios_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d5e24a3d01069eab8ed266151b3d125b758af0db
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-flash-bios_git.bb
@@ -0,0 +1,14 @@
+SUMMARY = "OpenBMC org.openbmc.Flash example implementation"
+DESCRIPTION = "A sample implementation for the org.openbmc.Flash DBUS API. \
+org.openbmc.Flash provides APIs for functions like BIOS flash access control \
+and updating."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-gdbus
+inherit obmc-phosphor-dbus-service
+inherit pkgconfig
+
+SKELETON_DIR = "flashbios"
+DBUS_SERVICE:${PN} += "org.openbmc.control.Flash.service"
+SYSTEMD_SERVICE:${PN} += "obmc-flash-init.service"
diff --git a/recipes-phosphor/flash/obmc-flash-bmc/org.openbmc.control.BmcFlash.service b/recipes-phosphor/flash/obmc-flash-bmc/org.openbmc.control.BmcFlash.service
new file mode 100644
index 0000000000000000000000000000000000000000..95396e30a107628ac30b02c7ac8ae33215054a30
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-flash-bmc/org.openbmc.control.BmcFlash.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Phosphor BMC Code Update
+Wants=mapper-wait@-org-openbmc-managers-Download.service
+After=mapper-wait@-org-openbmc-managers-Download.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env bmc_update.py
+SyslogIdentifier=bmc_update.py
+Environment="PYTHONUNBUFFERED=1"
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/flash/obmc-flash-bmc_git.bb b/recipes-phosphor/flash/obmc-flash-bmc_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..cd2b55581622313f2d85eac65a437f47309a5031
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-flash-bmc_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "OpenBMC BMC update utility"
+DESCRIPTION = "OpenBMC BMC update utility."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-python
+inherit obmc-phosphor-dbus-service
+
+RDEPENDS:${PN} += "\
+ python-dbus \
+ python-compression \
+ python-shell \
+ python-pygobject \
+ python-subprocess \
+ python-io \
+ pyphosphor-dbus \
+ "
+
+SKELETON_DIR = "pyflashbmc"
+DBUS_SERVICE:${PN} += "org.openbmc.control.BmcFlash.service"
diff --git a/recipes-phosphor/flash/obmc-mgr-download/org.openbmc.managers.Download.service b/recipes-phosphor/flash/obmc-mgr-download/org.openbmc.managers.Download.service
new file mode 100644
index 0000000000000000000000000000000000000000..55ee6d40c811fbd2a8558f6263959e942a5f904f
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-mgr-download/org.openbmc.managers.Download.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor Download Manager
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env download_manager.py
+SyslogIdentifier=download_manager.py
+Environment="PYTHONUNBUFFERED=1"
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/flash/obmc-mgr-download_git.bb b/recipes-phosphor/flash/obmc-mgr-download_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..a6cd6605878e2c7330ac418560b8688be51f90d9
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-mgr-download_git.bb
@@ -0,0 +1,17 @@
+SUMMARY = "OpenBMC org.openbmc.managers.Download example implementation"
+DESCRIPTION = "An example implementation for the org.openbmc.managers.Download DBUS API."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-python
+inherit obmc-phosphor-dbus-service
+
+RDEPENDS:${PN} += "\
+ python-dbus \
+ python-pygobject \
+ python-subprocess \
+ pyphosphor-dbus \
+ "
+
+SKELETON_DIR = "pydownloadmgr"
+DBUS_SERVICE:${PN} += "org.openbmc.managers.Download.service"
diff --git a/recipes-phosphor/flash/obmc-op-flasher_git.bb b/recipes-phosphor/flash/obmc-op-flasher_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..8c5d263a64ddb8e1e8ed95363cb9e6708ef94a8e
--- /dev/null
+++ b/recipes-phosphor/flash/obmc-op-flasher_git.bb
@@ -0,0 +1,12 @@
+SUMMARY = "OpenPOWER flashing utility."
+DESCRIPTION = "A BMC/BIOS flashing utility for use on OpenPOWER system."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-gdbus
+inherit pkgconfig
+
+DEPENDS += "pflash"
+RDEPENDS:${PN} += "pflash"
+
+SKELETON_DIR = "op-flasher"
diff --git a/recipes-phosphor/flash/phosphor-hostfw-image.bb b/recipes-phosphor/flash/phosphor-hostfw-image.bb
new file mode 100644
index 0000000000000000000000000000000000000000..a9123b1b4a6e0f916de9e67bbc62da06c9846c3d
--- /dev/null
+++ b/recipes-phosphor/flash/phosphor-hostfw-image.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Provides a host firmware image"
+DESCRIPTION = "Use a bbappend to add the image files"
+PR = "r1"
+
+inherit allarch
+inherit deploy
+
+HOSTFW_LICENSE ?= "Apache-2.0"
+HOSTFW_LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+LICENSE = "${HOSTFW_LICENSE}"
+LIC_FILES_CHKSUM = "${HOSTFW_LIC_FILES_CHKSUM}"
+
+do_compile() {
+ # The image directory can be used as the source to create a filesystem to
+ # add to the BMC image.
+ install -d ${B}/image
+
+ # Install an image-hostfw file in the update directory to be included in
+ # the code update tarball.
+ install -d ${B}/update
+}
+
+do_deploy() {
+ install -d ${DEPLOYDIR}/hostfw/image
+ install -d ${DEPLOYDIR}/hostfw/update
+ cp -R --no-dereference --preserve=mode,links ${B}/image/ ${DEPLOYDIR}/hostfw/
+ cp -R --no-dereference --preserve=mode,links ${B}/update/ ${DEPLOYDIR}/hostfw/
+}
+
+addtask deploy before do_build after do_compile
diff --git a/recipes-phosphor/flash/phosphor-image-signing.bb b/recipes-phosphor/flash/phosphor-image-signing.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d10eceffa0cc4b95f7035d26c470ea7e8e87ca6b
--- /dev/null
+++ b/recipes-phosphor/flash/phosphor-image-signing.bb
@@ -0,0 +1,30 @@
+SUMMARY = "OpenBMC image signing public key"
+DESCRIPTION = "Public key information to be included in images for image verification."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+
+INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}"
+
+DEPENDS += "openssl-native"
+DEPENDS += "${@oe.utils.conditional('INSECURE_KEY', 'True', 'phosphor-insecure-signing-key-native', '', d)}"
+
+FILES:${PN} += "${sysconfdir}/activationdata/"
+
+SIGNING_KEY ?= "${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv"
+SIGNING_KEY_TYPE = "${@os.path.splitext(os.path.basename('${SIGNING_KEY}'))[0]}"
+
+do_install() {
+ openssl pkey -in "${SIGNING_KEY}" -pubout -out ${WORKDIR}/publickey
+ echo HashType=RSA-SHA256 > "${WORKDIR}/hashfunc"
+
+ idir="${D}${sysconfdir}/activationdata/${SIGNING_KEY_TYPE}"
+
+ install -d ${idir}
+ install -m 644 ${WORKDIR}/publickey ${idir}
+ install -m 644 ${WORKDIR}/hashfunc ${idir}
+}
+
+SYSROOT_DIRS:append = " ${sysconfdir}"
diff --git a/recipes-phosphor/flash/phosphor-insecure-signing-key-native.bb b/recipes-phosphor/flash/phosphor-insecure-signing-key-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d16cea3135826dfea5d2a7a829e8298cdc73efe9
--- /dev/null
+++ b/recipes-phosphor/flash/phosphor-insecure-signing-key-native.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Insecure private key for testing and development"
+DESCRIPTION = "Do not use this key to sign images."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit native
+
+SRC_URI += "file://OpenBMC.priv"
+
+do_install() {
+ bbplain "Using an insecure image signing key!"
+ install -d ${D}${datadir}
+ install -m 400 ${WORKDIR}/OpenBMC.priv ${D}${datadir}
+}
diff --git a/recipes-phosphor/flash/phosphor-software-manager-error-native_git.bb b/recipes-phosphor/flash/phosphor-software-manager-error-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ffc343b93101dc7833ee279f5f38d20bd677697b
--- /dev/null
+++ b/recipes-phosphor/flash/phosphor-software-manager-error-native_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Copy error yaml files to known path for elog parsing"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-dbus-yaml
+inherit native
+
+require phosphor-software-manager.inc
+
+S = "${WORKDIR}/git"
+
+do_install:append() {
+ SRC=${S}/xyz/openbmc_project/Software/
+ DEST=${D}${yaml_dir}/xyz/openbmc_project/Software/
+ install -d ${DEST}
+ install ${SRC}/*.errors.yaml ${DEST}
+ install ${SRC}/*.metadata.yaml ${DEST}
+}
diff --git a/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb b/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..84450eb611197a0ca82a41f47a1037606e7f8557
--- /dev/null
+++ b/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb
@@ -0,0 +1,10 @@
+SUMMARY = "phosphor-software-manager: install phosphor-logging yaml"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-logging-yaml-provider
+require phosphor-software-manager.inc
+
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/flash/phosphor-software-manager.inc b/recipes-phosphor/flash/phosphor-software-manager.inc
new file mode 100644
index 0000000000000000000000000000000000000000..f423943332bfb8e404ad8e288632077442072222
--- /dev/null
+++ b/recipes-phosphor/flash/phosphor-software-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt;branch=master;protocol=https"
+SRCREV = "119e5a2c07b2e87ec2e75c98c06522c76bd59832"
diff --git a/recipes-phosphor/flash/phosphor-software-manager_git.bb b/recipes-phosphor/flash/phosphor-software-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..9c71ad3528b383bc34918474c80d29f16565f5e2
--- /dev/null
+++ b/recipes-phosphor/flash/phosphor-software-manager_git.bb
@@ -0,0 +1,111 @@
+SUMMARY = "Phosphor Software Management"
+DESCRIPTION = "Phosphor Software Manager provides a set of system software \
+management daemons. It is suitable for use on a wide variety of OpenBMC \
+platforms."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+require ${BPN}.inc
+
+SOFTWARE_MGR_PACKAGES = " \
+ ${PN}-version \
+ ${PN}-download-mgr \
+ ${PN}-updater \
+ ${PN}-updater-ubi \
+ ${PN}-updater-mmc \
+ ${PN}-sync \
+ ${PN}-usb \
+ ${PN}-side-switch \
+"
+PACKAGE_BEFORE_PN += "${SOFTWARE_MGR_PACKAGES}"
+ALLOW_EMPTY:${PN} = "1"
+
+DBUS_PACKAGES = "${SOFTWARE_MGR_PACKAGES}"
+
+# Set SYSTEMD_PACKAGES to empty because we do not want ${PN} and DBUS_PACKAGES
+# handles the rest.
+SYSTEMD_PACKAGES = ""
+
+PACKAGECONFIG[verify_signature] = " \
+ -Dverify-full-signature=enabled, \
+ -Dverify-full-signature=disabled"
+PACKAGECONFIG[sync_bmc_files] = "-Dsync-bmc-files=enabled, -Dsync-bmc-files=disabled"
+PACKAGECONFIG[usb_code_update] = "-Dusb-code-update=enabled, -Dusb-code-update=disabled, cli11"
+PACKAGECONFIG[side_switch_on_boot] = "-Dside-switch-on-boot=enabled, -Dside-switch-on-boot=disabled, cli11"
+PACKAGECONFIG[ubifs_layout] = "-Dbmc-layout=ubi"
+PACKAGECONFIG[mmc_layout] = "-Dbmc-layout=mmc"
+PACKAGECONFIG[flash_bios] = "-Dhost-bios-upgrade=enabled, -Dhost-bios-upgrade=disabled"
+PACKAGECONFIG[static-dual-image] = "-Dbmc-static-dual-image=enabled, -Dbmc-static-dual-image=disabled"
+
+inherit meson pkgconfig
+inherit obmc-phosphor-dbus-service
+inherit python3native
+inherit ${@bb.utils.contains('DISTRO_FEATURES', 'obmc-ubi-fs', 'phosphor-software-manager-ubi-fs', '', d)}
+inherit ${@bb.utils.contains('DISTRO_FEATURES', 'phosphor-mmc', 'phosphor-software-manager-mmc', '', d)}
+
+DEPENDS += " \
+ openssl \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ ${PYTHON_PN}-sdbus++-native \
+ sdbusplus \
+"
+
+# The repo installs several scripts that depends on bash
+RDEPENDS:${PN} += " bash"
+
+RDEPENDS:${PN}-updater += " \
+ bash \
+ virtual-obmc-image-manager \
+ ${@bb.utils.contains('PACKAGECONFIG', 'verify_signature', 'phosphor-image-signing', '', d)} \
+"
+
+RPROVIDES:${PN}-version += " \
+ virtual-obmc-image-manager \
+"
+
+FILES:${PN}-version += "${bindir}/phosphor-version-software-manager ${exec_prefix}/lib/tmpfiles.d/software.conf"
+FILES:${PN}-download-mgr += "${bindir}/phosphor-download-manager"
+FILES:${PN}-updater += " \
+ ${bindir}/phosphor-image-updater \
+ ${bindir}/obmc-flash-bmc \
+ /usr/local \
+ "
+FILES:${PN}-sync += " \
+ ${bindir}/phosphor-sync-software-manager \
+ ${sysconfdir}/synclist \
+ "
+FILES:${PN}-usb += "\
+ ${base_libdir}/udev/rules.d/70-bmc-usb.rules \
+ ${bindir}/phosphor-usb-code-update \
+ "
+FILES:${PN}-side-switch += "\
+ ${bindir}/phosphor-bmc-side-switch \
+ "
+DBUS_SERVICE:${PN}-version += "xyz.openbmc_project.Software.Version.service"
+DBUS_SERVICE:${PN}-download-mgr += "xyz.openbmc_project.Software.Download.service"
+DBUS_SERVICE:${PN}-updater += "xyz.openbmc_project.Software.BMC.Updater.service"
+DBUS_SERVICE:${PN}-sync += "xyz.openbmc_project.Software.Sync.service"
+
+SYSTEMD_SERVICE:${PN}-updater += " \
+ force-reboot.service \
+ obmc-flash-bmc-setenv@.service \
+ reboot-guard-disable.service \
+ reboot-guard-enable.service \
+ usr-local.mount \
+"
+
+SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'flash_bios', 'obmc-flash-host-bios@.service', '', d)}"
+SYSTEMD_SERVICE:${PN}-usb += "${@bb.utils.contains('PACKAGECONFIG', 'usb_code_update', 'usb-code-update@.service', '', d)}"
+SYSTEMD_SERVICE:${PN}-side-switch += "${@bb.utils.contains('PACKAGECONFIG', 'side_switch_on_boot', 'phosphor-bmc-side-switch.service', '', d)}"
+SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-alt@.service', '', d)}"
+SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-static-mount-alt.service', '', d)}"
+SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-prepare-for-sync.service', '', d)}"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
+
+do_install:append() {
+ install -d ${D}/usr/local
+}
diff --git a/recipes-phosphor/gpio/phosphor-gpio-monitor_git.bb b/recipes-phosphor/gpio/phosphor-gpio-monitor_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..5615bf374c6e9133388603f6ae15778ef61a2e76
--- /dev/null
+++ b/recipes-phosphor/gpio/phosphor-gpio-monitor_git.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Phosphor GPIO monitor application"
+DESCRIPTION = "Application to monitor gpio assertions"
+HOMEPAGE = "http://github.com/openbmc/phosphor-gpio-monitor"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+inherit meson pkgconfig
+inherit obmc-phosphor-dbus-service
+
+GPIO_PACKAGES = " \
+ ${PN}-monitor \
+ ${PN}-presence \
+"
+
+PACKAGE_BEFORE_PN += "${GPIO_PACKAGES}"
+ALLOW_EMPTY:${PN} = "1"
+SYSTEMD_PACKAGES = "${GPIO_PACKAGES}"
+
+RPROVIDES:${PN}-monitor += "virtual/obmc-gpio-monitor"
+RPROVIDES:${PN}-presence += "virtual/obmc-gpio-presence"
+
+PROVIDES += "virtual/obmc-gpio-monitor"
+PROVIDES += "virtual/obmc-gpio-presence"
+
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "libevdev"
+DEPENDS += "phosphor-logging"
+DEPENDS += "systemd"
+DEPENDS += "boost"
+DEPENDS += "libgpiod"
+DEPENDS += "cli11"
+DEPENDS += "nlohmann-json"
+
+SYSTEMD_SERVICE:${PN}-monitor += "phosphor-multi-gpio-monitor.service"
+SYSTEMD_SERVICE:${PN}-monitor += "phosphor-gpio-monitor@.service"
+SYSTEMD_SERVICE:${PN}-presence += "phosphor-gpio-presence@.service"
+
+FILES:${PN}-monitor += "${bindir}/phosphor-gpio-monitor"
+FILES:${PN}-monitor += "${bindir}/phosphor-multi-gpio-monitor"
+FILES:${PN}-monitor += "${bindir}/phosphor-gpio-util"
+FILES:${PN}-monitor += "${nonarch_base_libdir}/udev/rules.d/99-gpio-keys.rules"
+FILES:${PN}-presence += "${bindir}/phosphor-gpio-presence"
+
+SRC_URI += "git://github.com/openbmc/phosphor-gpio-monitor;branch=master;protocol=https"
+SRCREV = "c4b6ce728089737ad85ab5cfa7f34e2a912f091b"
+S = "${WORKDIR}/git"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
diff --git a/recipes-phosphor/health/phosphor-health-monitor_git.bb b/recipes-phosphor/health/phosphor-health-monitor_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..a8fddf5f8a631106865b997e34b8897a286c6d70
--- /dev/null
+++ b/recipes-phosphor/health/phosphor-health-monitor_git.bb
@@ -0,0 +1,21 @@
+SUMMARY = "BMC Health Monitoring"
+DESCRIPTION = "Daemon to collect and monitor bmc health statistics"
+HOMEPAGE = "https://github.com/openbmc/phosphor-health-monitor"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9e69ba356fa59848ffd865152a3ccc13"
+
+inherit meson pkgconfig
+inherit systemd
+
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "nlohmann-json"
+
+SRC_URI = "git://github.com/openbmc/phosphor-health-monitor.git;protocol=https;branch=master"
+SRCREV = "a1ed140b5351e1b264471b0462cc4eab753fbda6"
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE:${PN} = "phosphor-health-monitor.service"
diff --git a/recipes-phosphor/host/obmc-op-control-host/op-start-host@.service b/recipes-phosphor/host/obmc-op-control-host/op-start-host@.service
new file mode 100644
index 0000000000000000000000000000000000000000..8703a4301f233f40c8bd0f887aa2273ff4cafd66
--- /dev/null
+++ b/recipes-phosphor/host/obmc-op-control-host/op-start-host@.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Start Host%i
+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
+Wants=mapper-wait@-org-openbmc-control-host%i.service
+After=mapper-wait@-org-openbmc-control-host%i.service
+Conflicts=obmc-host-stop@%i.target
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/sh -c "busctl call `mapper get-service /org/openbmc/control/host%i` /org/openbmc/control/host%i org.openbmc.control.Host boot"
+SyslogIdentifier=op-start-host
+
+[Install]
+WantedBy=obmc-host-start@%i.target
diff --git a/recipes-phosphor/host/obmc-op-control-host/org.openbmc.control.Host@.service b/recipes-phosphor/host/obmc-op-control-host/org.openbmc.control.Host@.service
new file mode 100644
index 0000000000000000000000000000000000000000..6619c1898fe3f7598d758f20a8dc9a813a685999
--- /dev/null
+++ b/recipes-phosphor/host/obmc-op-control-host/org.openbmc.control.Host@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenPOWER Host%i Control
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env control_host.exe
+SyslogIdentifier=control_host.exe
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/host/obmc-op-control-host_git.bb b/recipes-phosphor/host/obmc-op-control-host_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ffe2f366ea94559039c8e45acccfeabe4ac7361e
--- /dev/null
+++ b/recipes-phosphor/host/obmc-op-control-host_git.bb
@@ -0,0 +1,26 @@
+SUMMARY = "org.openbmc.control.Host implementation for OpenPOWER"
+DESCRIPTION = "A host control implementation suitable for OpenPOWER systems."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-gdbus
+inherit obmc-phosphor-dbus-service
+inherit pkgconfig
+
+PROVIDES += "virtual/obmc-host-ctl"
+RPROVIDES:${PN} += "virtual-obmc-host-ctl"
+
+SKELETON_DIR = "op-hostctl"
+
+FMT = "org.openbmc.control.Host@{0}.service"
+DBUS_SERVICE:${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_SERVICE:${PN} = " \
+ op-start-host@.service \
+ "
+
+START_TMPL = "op-start-host@.service"
+START_TGTFMT = "obmc-host-startmin@{1}.target"
+START_INSTFMT = "op-start-host@{0}.service"
+START_FMT = "../${START_TMPL}:${START_TGTFMT}.requires/${START_INSTFMT}"
+
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'START_FMT', 'OBMC_HOST_INSTANCES', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/recipes-phosphor/host/phosphor-host-postd_git.bb b/recipes-phosphor/host/phosphor-host-postd_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..60ae56f84e37ea3654412b48cc70d8c64ee073fc
--- /dev/null
+++ b/recipes-phosphor/host/phosphor-host-postd_git.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Phosphor OpenBMC Post Code Daemon"
+DESCRIPTION = "Phosphor OpenBMC Post Code Daemon"
+HOMEPAGE = "http://github.com/openbmc/phosphor-host-postd"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson
+inherit pkgconfig
+inherit systemd
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[7seg] = "-D7seg=enabled,-D7seg=disabled,,udev"
+
+DEPENDS += "sdbusplus"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "systemd"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/phosphor-host-postd;branch=master;protocol=https"
+SRCREV = "80be5d8335f31c12edae7edd2fc32a0583d765f9"
+
+SNOOP_DEVICE ?= "aspeed-lpc-snoop0"
+POST_CODE_BYTES ?= "1"
+
+SERVICE_FILE = "lpcsnoop.service"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} += "${SERVICE_FILE}"
+
+EXTRA_OEMESON:append = " \
+ -Dsnoop-device=${SNOOP_DEVICE} \
+ -Dpost-code-bytes=${POST_CODE_BYTES} \
+ -Dsystemd-target=multi-user.target \
+ -Dtests=disabled \
+"
+
+POSTCODE_SEVENSEG_DEVICE ?= "seven_seg_disp_val"
+SERVICE_FILE_7SEG = " \
+ postcode-7seg@.service \
+ postcode-7seg@${POSTCODE_SEVENSEG_DEVICE}.service \
+"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', '7seg', '${SERVICE_FILE_7SEG}', '', d)}"
diff --git a/recipes-phosphor/images/obmc-phosphor-debug-tarball.bb b/recipes-phosphor/images/obmc-phosphor-debug-tarball.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e00e928433770fd2029304ff0963e1868e53cf33
--- /dev/null
+++ b/recipes-phosphor/images/obmc-phosphor-debug-tarball.bb
@@ -0,0 +1,3 @@
+DESCRIPTION = "Debug tools tarball for use with OpenBMC Phosphor"
+
+inherit obmc-phosphor-debug-tarball
diff --git a/recipes-phosphor/images/obmc-phosphor-image-base.bb b/recipes-phosphor/images/obmc-phosphor-image-base.bb
new file mode 100644
index 0000000000000000000000000000000000000000..38b1c2d42677df2d7f858bb1fed80b58222e46a1
--- /dev/null
+++ b/recipes-phosphor/images/obmc-phosphor-image-base.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "A basic OpenBMC image with no features enabled."
+
+IMAGE_LINGUAS = ""
+LICENSE = "Apache-2.0"
+
+inherit obmc-phosphor-image
+
+# The /etc/version file is misleading and not useful. Remove it.
+# Users should instead rely on /etc/os-release.
+ROOTFS_POSTPROCESS_COMMAND += "remove_etc_version ; "
diff --git a/recipes-phosphor/images/obmc-phosphor-image.bb b/recipes-phosphor/images/obmc-phosphor-image.bb
new file mode 100644
index 0000000000000000000000000000000000000000..f276e64399c9f7cf4d7d72d4a09d3d75ac9f09ea
--- /dev/null
+++ b/recipes-phosphor/images/obmc-phosphor-image.bb
@@ -0,0 +1,53 @@
+DESCRIPTION = "Image with Phosphor, a software stack for hardware management \
+in devices with baseboard management controllers. The image supports the \
+full OpenBMC feature set for devices of all types."
+
+IMAGE_LINGUAS = ""
+
+IMAGE_FEATURES += " \
+ obmc-bmc-state-mgmt \
+ obmc-bmcweb \
+ obmc-chassis-mgmt \
+ obmc-chassis-state-mgmt \
+ obmc-console \
+ obmc-devtools \
+ obmc-fan-control \
+ obmc-fan-mgmt \
+ obmc-flash-mgmt \
+ obmc-fru-ipmi \
+ obmc-health-monitor \
+ obmc-host-ctl \
+ obmc-host-ipmi \
+ obmc-host-state-mgmt \
+ obmc-ikvm \
+ obmc-inventory \
+ obmc-leds \
+ obmc-logging-mgmt \
+ obmc-remote-logging-mgmt \
+ obmc-rng \
+ obmc-net-ipmi \
+ obmc-sensors \
+ obmc-software \
+ obmc-system-mgmt \
+ obmc-user-mgmt \
+ obmc-user-mgmt-ldap \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'obmc-ubi-fs', 'read-only-rootfs', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'phosphor-mmc', 'read-only-rootfs', '', d)} \
+ ssh-server-dropbear \
+ obmc-debug-collector \
+ obmc-network-mgmt \
+ obmc-settings-mgmt \
+ obmc-telemetry \
+ "
+
+LICENSE = "Apache-2.0"
+
+inherit obmc-phosphor-image
+
+# The /etc/version file is misleading and not useful. Remove it.
+# Users should instead rely on /etc/os-release.
+ROOTFS_POSTPROCESS_COMMAND += "remove_etc_version ; "
+
+# The shadow recipe provides the binaries(like useradd, usermod) needed by the
+# phosphor-user-manager.
+ROOTFS_RO_UNNEEDED:remove = "shadow"
diff --git a/recipes-phosphor/images/obmc-phosphor-initramfs.bb b/recipes-phosphor/images/obmc-phosphor-initramfs.bb
new file mode 100644
index 0000000000000000000000000000000000000000..9df4432fe51f145711a3f97ec9077dfea192aaf5
--- /dev/null
+++ b/recipes-phosphor/images/obmc-phosphor-initramfs.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Small image capable of booting a device. The kernel includes \
+the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
+first 'init' program more efficiently."
+
+# Init scripts
+INIT_PACKAGE = "obmc-phosphor-initfs"
+INIT_PACKAGE:df-phosphor-mmc = "phosphor-mmc-init"
+
+PACKAGE_INSTALL = "${VIRTUAL-RUNTIME_base-utils} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} ${INIT_PACKAGE}"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = "read-only-rootfs"
+
+export IMAGE_BASENAME = "obmc-phosphor-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+# Needed for the set_user_group functions to succeed
+DEPENDS += "shadow-native"
+
+PACKAGE_INSTALL:remove = "shadow"
+PACKAGE_EXCLUDE = "shadow"
+BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/recipes-phosphor/initrdscripts/files/obmc-init.sh b/recipes-phosphor/initrdscripts/files/obmc-init.sh
new file mode 100644
index 0000000000000000000000000000000000000000..e61ede91110abdfd7e1fa7c54991649c416873b4
--- /dev/null
+++ b/recipes-phosphor/initrdscripts/files/obmc-init.sh
@@ -0,0 +1,438 @@
+#!/bin/sh
+
+fslist="proc sys dev run"
+rodir=run/initramfs/ro
+rwdir=run/initramfs/rw
+upper=$rwdir/cow
+work=$rwdir/work
+
+cd /
+mkdir -p $fslist
+mount dev dev -tdevtmpfs
+mount sys sys -tsysfs
+mount proc proc -tproc
+if ! grep run proc/mounts
+then
+ mount tmpfs run -t tmpfs -o mode=755,nodev
+fi
+
+mkdir -p $rodir $rwdir
+
+cp -rp init shutdown update whitelist bin sbin usr lib etc var run/initramfs
+
+# To start a interactive shell with job control at this point, run
+# getty 38400 ttyS4
+
+findmtd() {
+ m=$(grep -xl "$1" /sys/class/mtd/*/name)
+ m=${m%/name}
+ m=${m##*/}
+ echo $m
+}
+
+blkid_fs_type() {
+ # Emulate util-linux's `blkid -s TYPE -o value $1`
+ # Example busybox blkid output:
+ # # blkid /dev/mtdblock5
+ # /dev/mtdblock5: TYPE="squashfs"
+ # Process output to extract TYPE value "squashfs".
+ blkid $1 | sed -e 's/^.*TYPE="//' -e 's/".*$//'
+}
+
+probe_fs_type() {
+ fst=$(blkid_fs_type $1)
+ echo ${fst:=jffs2}
+}
+
+# This fw_get_env_var is a possibly broken version of fw_printenv that
+# does not check the crc or flag byte.
+# The u-boot environment starts with a crc32, followed by a flag byte
+# when a redundannt environment is configured, followed by var=value\0 sets.
+# The flag byte for nand is a 1 byte counter; for nor it is a 1 or 0 byte.
+
+get_fw_env_var() {
+ # do we have 1 or 2 copies of the environment?
+ # count non-blank non-comment lines
+ # copies=$(grep -v ^# /etc/fw_env.config | grep -c [::alnum::])
+ # ... we could if we had the fw_env.config in the initramfs
+ copies=2
+
+ # * Change \n to \r and \0 to \n
+ # * Skip to the 5th byte to skip over crc
+ # * then skip to the first or 2nd byte to skip over flag if it exists
+ # * stop parsing at first empty line corresponding to the
+ # double \0 at the end of the environment.
+ # * print the value of the variable name passed as argument
+
+ envdev=$(findmtd u-boot-env)
+ if test -n $envdev
+ then
+ cat /dev/$envdev |
+ tr '\n\000' '\r\n' |
+ tail -c +5 | tail -c +${copies-1} |
+ sed -ne '/^$/,$d' -e "s/^$1=//p"
+ fi
+}
+
+setup_resolv() {
+ runresolv=/run/systemd/resolve/resolv.conf
+ etcresolv=/etc/resolv.conf
+
+ if test ! -e $etcresolv -a ! -L $etcresolv
+ then
+ mkdir -p ${runresolv%/*}
+ ln -s $runresolv $etcresolv
+ fi
+ if test ! -f $runresolv
+ then
+ cat /proc/net/pnp > $runresolv
+ fi
+
+ return 0
+}
+
+try_tftp() {
+ # split into tftp:// host:port/ path/on/remote
+ # then spilt off / and then :port from the end of host:port/
+ # and : from the beginning of port
+
+ rest="${1#tftp://}"
+ path=${rest#*/}
+ host=${rest%$path}
+ host="${host%/}"
+ port="${host#${host%:*}}"
+ host="${host%$port}"
+ port="${port#:}"
+
+ setup_resolv
+
+ if test -z "$host" -o -z "$path"
+ then
+ debug_takeover "Invalid tftp download url '$url'."
+ elif echo "Downloading '$url' from $host ..." &&
+ ! tftp -g -r "$path" -l /run/image-rofs "$host" ${port+"$port"}
+ then
+ debug_takeover "Download of '$url' failed."
+ fi
+}
+
+try_wget() {
+ setup_resolv
+
+ echo "Downloading '$1' ..."
+ if ! wget -O /run/image-rofs "$1"
+ then
+ debug_takeover "Download of '$url' failed."
+ fi
+}
+
+debug_takeover() {
+ echo "$@"
+
+ if ! grep -w enable-initrd-debug-sh "$optfile"
+ then
+ echo "Fatal error, triggering kernel panic!"
+ exit 1
+ fi
+
+ test -n "$@" && echo Try to manually fix.
+ cat << HERE
+After fixing run exit to continue this script, or reboot -f to retry, or
+touch /takeover and exit to become PID 1 allowing editing of this script.
+HERE
+
+ while ! /bin/sh && ! test -f /takeover
+ do
+ echo /bin/sh failed, retrying
+ done
+
+ # Touch /takeover in the above shell to become pid 1
+ if test -e /takeover
+ then
+ cat << HERE
+
+Takeover of init requested. Executing /bin/sh as PID 1.
+When finished exec new init or cleanup and run reboot -f.
+
+Warning: No job control! Shell exit will panic the system!
+HERE
+ export PS1=init#\
+ exec /bin/sh
+ fi
+}
+
+rofs=$(findmtd rofs)
+rwfs=$(findmtd rwfs)
+
+rodev=/dev/mtdblock${rofs#mtd}
+rwdev=/dev/mtdblock${rwfs#mtd}
+
+# Set to y for yes, anything else for no.
+force_rwfst_jffs2=y
+flash_images_before_init=n
+consider_download_files=y
+consider_download_tftp=y
+consider_download_http=y
+consider_download_ftp=y
+
+rofst=squashfs
+rwfst=$(probe_fs_type $rwdev)
+roopts=ro
+rwopts=rw
+
+image=/run/initramfs/image-
+trigger=${image}rwfs
+
+init=/sbin/init
+fsckbase=/sbin/fsck.
+fsck=$fsckbase$rwfst
+fsckopts=-a
+optfile=/run/initramfs/init-options
+optbase=/run/initramfs/init-options-base
+urlfile=/run/initramfs/init-download-url
+update=/run/initramfs/update
+
+if test -e /${optfile##*/}
+then
+ cp /${optfile##*/} $optfile
+fi
+
+if test -e /${optbase##*/}
+then
+ cp /${optbase##*/} $optbase
+else
+ touch $optbase
+fi
+
+if test ! -f $optfile
+then
+ cat /proc/cmdline $optbase > $optfile
+ get_fw_env_var openbmcinit >> $optfile
+ get_fw_env_var openbmconce >> $optfile
+fi
+
+echo rofs = $rofs $rofst rwfs = $rwfs $rwfst
+
+if grep -w debug-init-sh $optfile
+then
+ if grep -w enable-initrd-debug-sh "$optfile"
+ then
+ debug_takeover "Debug initial shell requested by command line."
+ else
+ echo "Need to also add enable-initrd-debug-sh for debug shell."
+ fi
+fi
+
+if test "x$consider_download_files" = xy &&
+ grep -w openbmc-init-download-files $optfile
+then
+ if test -f ${urlfile##*/}
+ then
+ cp ${urlfile##*/} $urlfile
+ fi
+ if test ! -f $urlfile
+ then
+ get_fw_env_var openbmcinitdownloadurl > $urlfile
+ fi
+ url="$(cat $urlfile)"
+ rest="${url#*://}"
+ proto="${url%$rest}"
+
+ if test -z "$url"
+ then
+ echo "Download url empty. Ignoring download request."
+ elif test -z "$proto"
+ then
+ echo "Download failed."
+ elif test "$proto" = tftp://
+ then
+ if test "x$consider_download_tftp" = xy
+ then
+ try_tftp "$url"
+ else
+ echo "Download failed."
+ fi
+ elif test "$proto" = http://
+ then
+ if test "x$consider_download_http" = xy
+ then
+ try_wget "$url"
+ else
+ echo "Download failed."
+ fi
+ elif test "$proto" = ftp://
+ then
+ if test "x$consider_download_ftp" = xy
+ then
+ try_wget "$url"
+ else
+ echo "Download failed."
+ fi
+ else
+ echo "Download failed."
+ fi
+fi
+
+# If there are images in root move them to /run/initramfs/ or /run/ now.
+imagebasename=${image##*/}
+if test -n "${imagebasename}" && ls /${imagebasename}* > /dev/null 2>&1
+then
+ if test "x$flash_images_before_init" = xy
+ then
+ echo "Flash images found, will update before starting init."
+ mv /${imagebasename}* ${image%$imagebasename}
+ else
+ echo "Flash images found, will use but deferring flash update."
+ mv /${imagebasename}* /run/
+ fi
+fi
+
+if grep -w clean-rwfs-filesystem $optfile
+then
+ echo "Cleaning of read-write overlay filesystem requested."
+ touch $trigger
+fi
+
+if grep -w factory-reset $optfile
+then
+ echo "Factory reset requested."
+ touch $trigger
+ do_save=--no-save-files
+else
+ do_save=--save-files
+fi
+
+if test "x$force_rwfst_jffs2" = xy -a $rwfst != jffs2 -a ! -f $trigger
+then
+ echo "Converting read-write overlay filesystem to jffs2 forced."
+ touch $trigger
+fi
+
+if ls $image* > /dev/null 2>&1
+then
+ if ! test -x $update
+ then
+ debug_takeover "Flash update requested but $update missing!"
+ elif test -f $trigger -a ! -s $trigger
+ then
+ if [ $do_save = "--save-files" ]
+ then
+ echo "Saving selected files from read-write overlay filesystem."
+ else
+ echo "No files will be selected for save."
+ fi
+ $update --no-restore-files $do_save
+ echo "Clearing read-write overlay filesystem."
+ flash_eraseall /dev/$rwfs
+ echo "Restoring saved files to read-write overlay filesystem."
+ touch $trigger
+ $update --no-save-files --clean-saved-files
+ else
+ $update --clean-saved-files $do_save
+ fi
+
+ rwfst=$(probe_fs_type $rwdev)
+ fsck=$fsckbase$rwfst
+fi
+
+if grep -w overlay-filesystem-in-ram $optfile
+then
+ rwfst=none
+fi
+
+copyfiles=
+if grep -w copy-files-to-ram $optfile
+then
+ rwfst=none
+ copyfiles=y
+fi
+
+# It would be nice to do this after fsck but that mean rofs is mounted
+# which triggers the mtd is mounted check
+if test "$rwfst$copyfiles" = noney
+then
+ touch $trigger
+ $update --copy-files --clean-saved-files --no-restore-files
+fi
+
+if grep -w copy-base-filesystem-to-ram $optfile &&
+ test ! -e /run/image-rofs && ! cp $rodev /run/image-rofs
+then
+ # Remove any partial copy to avoid attempted usage later
+ if test -e /run/image-rofs
+ then
+ ls -l /run/image-rofs
+ rm -f /run/image-rofs
+ fi
+ debug_takeover "Copying $rodev to /run/image-rofs failed."
+fi
+
+if test -s /run/image-rofs
+then
+ rodev=/run/image-rofs
+ roopts=$roopts,loop
+fi
+
+mount $rodev $rodir -t $rofst -o $roopts
+
+if test -x $rodir$fsck
+then
+ for fs in $fslist
+ do
+ mount --bind $fs $rodir/$fs
+ done
+ chroot $rodir $fsck $fsckopts $rwdev
+ rc=$?
+ for fs in $fslist
+ do
+ umount $rodir/$fs
+ done
+ if test $rc -gt 1
+ then
+ debug_takeover "fsck of read-write fs on $rwdev failed (rc=$rc)"
+ fi
+elif test "$rwfst" != jffs2 -a "$rwfst" != none
+then
+ echo "No '$fsck' in read only fs, skipping fsck."
+fi
+
+if test "$rwfst" = none
+then
+ echo "Running with read-write overlay in RAM for this boot."
+ echo "No state will be preserved unless flash update performed."
+elif ! mount $rwdev $rwdir -t $rwfst -o $rwopts
+then
+ msg="$(cat)" << HERE
+
+Mounting read-write $rwdev filesystem failed. Please fix and run
+ mount $rwdev $rwdir -t $rwfst -o $rwopts
+or perform a factory reset with the clean-rwfs-filesystem option.
+HERE
+ debug_takeover "$msg"
+fi
+
+rm -rf $work
+mkdir -p $upper $work
+
+mount -t overlay -o lowerdir=$rodir,upperdir=$upper,workdir=$work cow /root
+
+while ! chroot /root /bin/sh -c "test -x '$init' -a -s '$init'"
+do
+ msg="$(cat)" << HERE
+
+Unable to confirm /sbin/init is an executable non-empty file
+in merged file system mounted at /root.
+
+Change Root test failed!
+HERE
+ debug_takeover "$msg"
+done
+
+for f in $fslist
+do
+ mount --move $f root/$f
+done
+
+# switch_root /root $init
+exec chroot /root $init
+
diff --git a/recipes-phosphor/initrdscripts/files/obmc-shutdown.sh b/recipes-phosphor/initrdscripts/files/obmc-shutdown.sh
new file mode 100644
index 0000000000000000000000000000000000000000..d3c8835959fdc533ec7a21e4dac344275cb8439b
--- /dev/null
+++ b/recipes-phosphor/initrdscripts/files/obmc-shutdown.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+echo shutdown: "$@"
+
+export PS1=shutdown-sh#\
+# exec bin/sh
+
+cd /
+if [ ! -e /proc/mounts ]
+then
+ mkdir -p /proc
+ mount proc /proc -tproc
+ umount_proc=1
+else
+ umount_proc=
+fi
+
+# Remove an empty oldroot, that means we are not invoked from systemd-shutdown
+rmdir /oldroot 2>/dev/null
+
+# Move /oldroot/run to /mnt in case it has the underlying rofs loop mounted.
+# Ordered before /oldroot the overlay is unmounted before the loop mount
+mkdir -p /mnt
+mount --move /oldroot/run /mnt
+
+set -x
+for f in $( awk '/oldroot|mnt/ { print $2 }' < /proc/mounts | sort -r )
+do
+ umount $f
+done
+set +x
+
+update=/run/initramfs/update
+image=/run/initramfs/image-
+
+wdt="-t 1 -T 5"
+wdrst="-T 15"
+
+if ls $image* > /dev/null 2>&1
+then
+ if test -x $update
+ then
+ if test -c /dev/watchdog
+ then
+ echo Pinging watchdog ${wdt+with args $wdt}
+ watchdog $wdt -F /dev/watchdog &
+ wd=$!
+ else
+ wd=
+ fi
+ $update --clean-saved-files
+ remaining=$(ls $image*)
+ if test -n "$remaining"
+ then
+ echo 1>&2 "Flash update failed to flash these images:"
+ echo 1>&2 "$remaining"
+ else
+ echo "Flash update completed."
+ fi
+
+ if test -n "$wd"
+ then
+ kill -9 $wd
+ if test -n "$wdrst"
+ then
+ echo Resetting watchdog timeouts to $wdrst
+ watchdog $wdrst -F /dev/watchdog &
+ sleep 1
+ # Kill the watchdog daemon, setting a timeout
+ # for the remaining shutdown work
+ kill -9 $!
+ fi
+ fi
+ else
+ echo 1>&2 "Flash update requested but $update program missing!"
+ fi
+fi
+
+echo Remaining mounts:
+cat /proc/mounts
+
+test "$umount_proc" && umount /proc && rmdir /proc
+
+# tcsattr(tty, TIOCDRAIN, mode) to drain tty messages to console
+test -t 1 && stty cooked 0<&1
+
+# Execute the command systemd told us to ...
+if test -d /oldroot && test "$1"
+then
+ if test "$1" = kexec
+ then
+ $1 -f -e
+ else
+ $1 -f
+ fi
+fi
+
+
+echo "Execute ${1-reboot} -f if all unmounted ok, or exec /init"
+
+export PS1=shutdown-sh#\
+exec /bin/sh
diff --git a/recipes-phosphor/initrdscripts/files/obmc-update.sh b/recipes-phosphor/initrdscripts/files/obmc-update.sh
new file mode 100644
index 0000000000000000000000000000000000000000..278cd41d7be2ba28afdca5104bc27abd7cf79672
--- /dev/null
+++ b/recipes-phosphor/initrdscripts/files/obmc-update.sh
@@ -0,0 +1,274 @@
+#!/bin/sh
+
+echo update: "$@"
+
+echoerr() {
+ echo 1>&2 "ERROR: $@"
+}
+
+cd /
+if ! test -r /proc/mounts || ! test -f /proc/mounts
+then
+ mkdir -p /proc
+ mount -t proc proc proc
+fi
+if ! test -d /sys/class
+then
+ mkdir -p /sys
+ mount -t sysfs sys sys
+fi
+if ! test -c /dev/null
+then
+ mkdir -p /dev
+ mount -t devtmpfs dev dev
+fi
+
+# mtd number N with mtd name Name can be mounted via mtdN, or mtd:Name
+# (with a mtd aware fs) or by /dev/mtdblockN (with a mtd or block fs).
+mtdismounted() {
+ m=${1##mtd}
+ if grep -s "mtdblock$m " /proc/mounts || grep -s "mtd$m " /proc/mounts
+ then
+ return 0
+ fi
+ n=$(cat /sys/class/mtd/mtd$m/name)
+ if test -n "$n" && grep -s "mtd:$n " /proc/mounts
+ then
+ return 0
+ fi
+ return 1
+}
+
+# Detect child partitions when the whole flash is to be updated.
+# Ignore mtdNro and mtdblockN names in the class subsystem directory.
+childmtds() {
+ for m in /sys/class/mtd/$1/mtd*
+ do
+ m=${m##*/}
+ if test "${m%ro}" = "${m#mtdblock}"
+ then
+ echo $m
+ fi
+ done
+}
+
+toobig() {
+ if test $(stat -L -c "%s" "$1") -gt $(cat /sys/class/mtd/"$2"/size)
+ then
+ return 0
+ fi
+ return 1
+}
+
+findmtd() {
+ m=$(grep -xl "$1" /sys/class/mtd/*/name)
+ m=${m%/name}
+ m=${m##*/}
+ echo $m
+}
+
+blkid_fs_type() {
+ # Emulate util-linux's `blkid -s TYPE -o value $1`
+ # Example busybox blkid output:
+ # # blkid /dev/mtdblock5
+ # /dev/mtdblock5: TYPE="squashfs"
+ # Process output to extract TYPE value "squashfs".
+ blkid $1 | sed -e 's/^.*TYPE="//' -e 's/".*$//'
+}
+
+probe_fs_type() {
+ fst=$(blkid_fs_type $1)
+ echo ${fst:=jffs2}
+}
+
+rwfs=$(findmtd rwfs)
+
+rwdev=/dev/mtdblock${rwfs#mtd}
+rwopts=rw
+rorwopts=ro${rwopts#rw}
+
+rwdir=/run/initramfs/rw
+upper=$rwdir/cow
+save=/run/save/${upper##*/}
+
+mounted=
+doflash=y
+doclean=
+dosave=y
+dorestore=y
+toram=
+checksize=y
+checkmount=y
+
+whitelist=/run/initramfs/whitelist
+image=/run/initramfs/image-
+imglist=
+
+while test "$1" != "${1#-}"
+do
+ case "$1" in
+ --help)
+ cat <&2 "WARNING: Skipping bad whitelist entry $f."
+ continue
+ fi
+ if ! test -e "$upper/$f"
+ then
+ continue
+ fi
+ d="$save/$f"
+ while test "${d%/}" != "${d%/.}"
+ do
+ d="${d%/.}"
+ d="${d%/}"
+ done
+ mkdir -p "${d%/*}"
+ cp -rp "$upper/$f" "${d%/*}/"
+ done < $whitelist
+
+ if test -n "$mounted"
+ then
+ umount $mounted
+ fi
+fi
+
+imglist=$(echo $image*)
+if test "$imglist" = "$image*" -a ! -e "$imglist"
+then
+ # shell didn't expand the wildcard, so no files exist
+ echo "No images found to update."
+ imglist=
+fi
+
+for f in $imglist
+do
+ m=$(findmtd ${f#$image})
+ if test -z "$m"
+ then
+ echoerr "Unable to find mtd partition for ${f##*/}."
+ exit 1
+ fi
+ if test -n "$checksize" && toobig "$f" "$m"
+ then
+ echoerr "Image ${f##*/} too big for $m."
+ exit 1
+ fi
+ for s in $m $(childmtds $m)
+ do
+ if test -n "$checkmount" && mtdismounted $s
+ then
+ echoerr "Device $s is mounted, ${f##*/} is busy."
+ exit 1
+ fi
+ done
+done
+
+if test -n "$doflash"
+then
+ for f in $imglist
+ do
+ if test ! -s $f
+ then
+ echo "Skipping empty update of ${f#$image}."
+ rm $f
+ continue
+ fi
+ m=$(findmtd ${f#$image})
+ echo "Updating ${f#$image}..."
+ flashcp -v $f /dev/$m && rm $f
+ done
+fi
+
+if test -d $save -a "x$toram" = xy
+then
+ mkdir -p $upper
+ cp -rp $save/. $upper/
+fi
+
+if test -d $save -a "x$dorestore" = xy
+then
+ odir=$rwdir
+ rwdir=/run/rw
+ upper=$rwdir${upper#$odir}
+
+ mkdir -p $rwdir
+ mount $rwdev $rwdir -t $(probe_fs_type $rwdev) -o $rwopts
+ mkdir -p $upper
+ cp -rp $save/. $upper/
+ umount $rwdir
+ rmdir $rwdir
+fi
+
+if test "x$doclean" = xy
+then
+ rm -rf $save
+fi
+
+exit
diff --git a/recipes-phosphor/initrdscripts/files/whitelist b/recipes-phosphor/initrdscripts/files/whitelist
new file mode 100644
index 0000000000000000000000000000000000000000..20f1ec2a6d171cbab084967389205f042445788e
--- /dev/null
+++ b/recipes-phosphor/initrdscripts/files/whitelist
@@ -0,0 +1,13 @@
+/etc/dropbear/dropbear_rsa_host_key
+/etc/group
+/etc/gshadow
+/etc/machine-id
+/etc/passwd
+/etc/resolv.conf
+/etc/shadow
+/etc/systemd/network
+/var/cache/obmc
+/var/lib/obmc
+/var/lib/phosphor-inventory-manager
+/var/lib/phosphor-settings-manager
+/var/lib/phosphor-state-manager
diff --git a/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bb b/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bb
new file mode 100644
index 0000000000000000000000000000000000000000..f816706af92e5f634174130f77c96be059de659b
--- /dev/null
+++ b/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Phosphor OpenBMC pre-init scripts"
+DESCRIPTION = "Phosphor OpenBMC filesystem mount reference implementation."
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+PR = "r1"
+
+inherit allarch
+
+RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}"
+
+S = "${WORKDIR}"
+SRC_URI += "file://obmc-init.sh"
+SRC_URI += "file://obmc-shutdown.sh"
+SRC_URI += "file://obmc-update.sh"
+SRC_URI += "file://whitelist"
+
+do_install() {
+ for f in init-download-url init-options
+ do
+ if test -e $f
+ then
+ install -m 0755 ${WORKDIR}/$f ${D}/$f
+ fi
+ done
+ install -m 0755 ${WORKDIR}/obmc-init.sh ${D}/init
+ install -m 0755 ${WORKDIR}/obmc-shutdown.sh ${D}/shutdown
+ install -m 0755 ${WORKDIR}/obmc-update.sh ${D}/update
+ install -m 0644 ${WORKDIR}/whitelist ${D}/whitelist
+ install -d ${D}/dev
+ mknod -m 622 ${D}/dev/console c 5 1
+}
+
+FILES:${PN} += " /init /shutdown /update /whitelist /dev "
+FILES:${PN} += " /init-options /init-download-url "
diff --git a/recipes-phosphor/initrdscripts/phosphor-mmc-init.bb b/recipes-phosphor/initrdscripts/phosphor-mmc-init.bb
new file mode 100644
index 0000000000000000000000000000000000000000..96c27da12beb6507e215ad615adf9a6ebb90baaa
--- /dev/null
+++ b/recipes-phosphor/initrdscripts/phosphor-mmc-init.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Phosphor OpenBMC pre-init scripts for mmc"
+DESCRIPTION = "Phosphor OpenBMC filesystem mount implementation for mmc."
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+PR = "r1"
+
+inherit allarch
+
+RDEPENDS:${PN} += " \
+ ${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or 'u-boot-fw-utils'} \
+ ${VIRTUAL-RUNTIME_base-utils} \
+ e2fsprogs-e2fsck \
+ e2fsprogs-mke2fs \
+ gptfdisk \
+ libgpiod-tools \
+ parted \
+ udev \
+"
+
+S = "${WORKDIR}"
+SRC_URI += "file://mmc-init.sh"
+
+do_install() {
+ install -m 0755 ${WORKDIR}/mmc-init.sh ${D}/init
+ install -d ${D}/dev
+ mknod -m 622 ${D}/dev/console c 5 1
+}
+
+FILES:${PN} += " /init /dev "
diff --git a/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh b/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
new file mode 100644
index 0000000000000000000000000000000000000000..ad9748e6518611d3be8cfeaaf1136a185d438b19
--- /dev/null
+++ b/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Get the value of the root env variable found in /proc/cmdline
+get_root() {
+ local root="$(cat /proc/cmdline)"
+ root="${root##* root=PARTLABEL=}"
+ root="${root%% *}"
+ [ "${root}" != "" ] && echo "${root}"
+}
+
+fslist="proc sys dev run"
+rodir=/mnt/rofs
+mmcdev="/dev/mmcblk0"
+rwfsdev="/dev/disk/by-partlabel/rwfs"
+
+cd /
+mkdir -p $fslist
+mount dev dev -tdevtmpfs
+mount sys sys -tsysfs
+mount proc proc -tproc
+mount tmpfs run -t tmpfs -o mode=755,nodev
+
+# Wait up to 5s for the mmc device to appear. Continue even if the count is
+# exceeded. A failure will be caught later like in the mount command.
+count=0
+while [ $count -lt 5 ]; do
+ if [ -e "${mmcdev}" ]; then
+ break
+ fi
+ sleep 1
+ count=$((count + 1))
+done
+
+# Move the secondary GPT to the end of the device if needed. Look for the GPT
+# header signature "EFI PART" located 512 bytes from the end of the device.
+if ! tail -c 512 "${mmcdev}" | hexdump -C -n 8 | grep -q "EFI PART"; then
+ sgdisk -e "${mmcdev}"
+ partprobe
+fi
+
+# There eMMC GPT labels for the rootfs are rofs-a and rofs-b, and the label for
+# the read-write partition is rwfs. Run udev to make the partition labels show
+# up. Mounting by label allows for partition numbers to change if needed.
+udevd --daemon
+udevadm trigger --type=devices --action=add
+udevadm settle --timeout=10
+
+mkdir -p $rodir
+if ! mount /dev/disk/by-partlabel/"$(get_root)" $rodir -t ext4 -o ro; then
+ /bin/sh
+fi
+
+# Determine if a factory reset has been requested
+mkdir -p /var/lock
+resetval=$(fw_printenv -n rwreset 2>/dev/null)
+gpiopresent=$(gpiofind factory-reset-toggle)
+if [ $? -eq 0 ]; then
+ gpioval=$(gpioget $gpiopresent)
+else
+ gpioval=""
+fi
+# Prevent unnecessary resets on first boot
+if [ -n "$gpioval" -a -z "$resetval" ]; then
+ fw_setenv rwreset $gpioval
+ resetval=$gpioval
+fi
+if [ "$resetval" = "true" -o -n "$gpioval" -a "$resetval" != "$gpioval" ]; then
+ echo "Factory reset requested."
+ if ! mkfs.ext4 -F "${rwfsdev}"; then
+ echo "Reformat for factory reset failed."
+ /bin/sh
+ else
+ # gpioval will be an empty string if factory-reset-toggle was not found
+ fw_setenv rwreset $gpioval
+ echo "rwfs has been formatted."
+ fi
+fi
+
+fsck.ext4 -p "${rwfsdev}"
+if ! mount "${rwfsdev}" $rodir/var -t ext4 -o rw; then
+ /bin/sh
+fi
+
+rm -rf $rodir/var/persist/etc-work/
+mkdir -p $rodir/var/persist/etc $rodir/var/persist/etc-work $rodir/var/persist/home/root
+mount overlay $rodir/etc -t overlay -o lowerdir=$rodir/etc,upperdir=$rodir/var/persist/etc,workdir=$rodir/var/persist/etc-work
+
+for f in $fslist; do
+ mount --move $f $rodir/$f
+done
+
+exec switch_root $rodir /sbin/init
diff --git a/recipes-phosphor/interfaces/bmcweb/run-ptest b/recipes-phosphor/interfaces/bmcweb/run-ptest
new file mode 100644
index 0000000000000000000000000000000000000000..f2a522a1470f0b38cb3e04b02273124890bff9bb
--- /dev/null
+++ b/recipes-phosphor/interfaces/bmcweb/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+for i in `ls test/*_test`; do
+ $i
+ if [ $? -eq 0 ]; then
+ echo "PASS: $i"
+ else
+ echo "FAIL: $i"
+ fi
+done
diff --git a/recipes-phosphor/interfaces/bmcweb_git.bb b/recipes-phosphor/interfaces/bmcweb_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..b461a2e6bd3ce0ce63a2d3cb2e2f6a6ee71bcf1a
--- /dev/null
+++ b/recipes-phosphor/interfaces/bmcweb_git.bb
@@ -0,0 +1,61 @@
+inherit systemd
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+
+# add a user called httpd for the server to assume
+USERADD_PARAM:${PN} = "-r -s /sbin/nologin bmcweb"
+GROUPADD_PARAM:${PN} = "web; redfish"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
+
+SRC_URI = "git://github.com/openbmc/bmcweb.git;branch=master;protocol=https;nobranch=1"
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "3d768a165183dd8cf7e485ac67ab7270845d5f87"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson ptest
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+DEPENDS = " \
+ openssl \
+ zlib \
+ boost \
+ boost-url \
+ libpam \
+ sdbusplus \
+ gtest \
+ nlohmann-json \
+ libtinyxml2 \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'gtest', '', d)} \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'gmock', '', d)} \
+"
+
+RDEPENDS:${PN} += " \
+ jsnbd \
+ phosphor-mapper \
+"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ cp -rf ${B}/*_test ${D}${PTEST_PATH}/test/
+}
+
+FILES:${PN} += "${datadir}/** "
+
+
+EXTRA_OEMESON = " \
+ --buildtype=minsize \
+ -Dtests=${@bb.utils.contains('PTEST_ENABLED', '1', 'enabled', 'disabled', d)} \
+ -Dyocto-deps=enabled \
+"
+
+SYSTEMD_SERVICE:${PN} += "bmcweb.service bmcweb.socket"
+
+FULL_OPTIMIZATION = "-Os "
diff --git a/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service b/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service
new file mode 100644
index 0000000000000000000000000000000000000000..9afd0c45d5c344b2b1abc2db9dd6387b179afcbe
--- /dev/null
+++ b/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Phosphor DBUS Browser
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env rest-dbus
+SyslogIdentifier=rest-dbus
+Environment="PYTHONUNBUFFERED=1"
diff --git a/recipes-phosphor/interfaces/rest-dbus/rest-dbus.socket b/recipes-phosphor/interfaces/rest-dbus/rest-dbus.socket
new file mode 100644
index 0000000000000000000000000000000000000000..7ab1959256f8e6d74a1e425ac4bcf732387559f3
--- /dev/null
+++ b/recipes-phosphor/interfaces/rest-dbus/rest-dbus.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Phosphor DBUS Browser socket
+
+[Socket]
+ListenStream=3000
+
+[Install]
+WantedBy=sockets.target
diff --git a/recipes-phosphor/interfaces/rest-dbus_git.bb b/recipes-phosphor/interfaces/rest-dbus_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..27d873381a9e52e407628fae4d263772cfa7195e
--- /dev/null
+++ b/recipes-phosphor/interfaces/rest-dbus_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Phosphor OpenBMC REST framework"
+DESCRIPTION = "Phosphor OpenBMC REST to DBUS daemon."
+HOMEPAGE = "http://github.com/openbmc/rest-dbus"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit allarch
+inherit obmc-phosphor-systemd
+inherit setuptools3
+
+RDEPENDS:${PN} += " \
+ python-netserver \
+ python-json \
+ python-dbus \
+ python-xml \
+ pyphosphor-dbus \
+ "
+
+SYSTEMD_SERVICE:${PN} += "rest-dbus.service rest-dbus.socket"
+
+SRC_URI += "git://github.com/openbmc/rest-dbus.git;branch=master;protocol=https"
+
+SRCREV = "99d57f2698568be1bf989057f678ff5c053e7957"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service b/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service
new file mode 100644
index 0000000000000000000000000000000000000000..4cbeb8487cec8cf917e4df27642746109ab72674
--- /dev/null
+++ b/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Lightweight SLP Server
+
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/env slpd
+SyslogIdentifier=slpd
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/interfaces/slpd-lite_git.bb b/recipes-phosphor/interfaces/slpd-lite_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..7f77689d657df7d956fd74ee9cc61e6160fd145e
--- /dev/null
+++ b/recipes-phosphor/interfaces/slpd-lite_git.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Lightweight SLP Server"
+DESCRIPTION = "Lightweight Unicast-only SLP Server"
+HOMEPAGE = "http://github.com/openbmc/slpd-lite"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-systemd
+
+SYSTEMD_SERVICE:${PN} += "slpd-lite.service"
+
+DEPENDS += "systemd"
+DEPENDS += "autoconf-archive-native"
+
+SRC_URI += "git://github.com/openbmc/slpd-lite;branch=master;protocol=https"
+
+SRCREV = "ef078cd0d560b8c49061f0b855f0cb4450e69b3a"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb b/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb
new file mode 100644
index 0000000000000000000000000000000000000000..317269f8297eca8c424abbda4678348c1c557920
--- /dev/null
+++ b/recipes-phosphor/inventory/phosphor-inventory-manager-assettag.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Recipe to create AssetTag property in inventory manager"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-inventory-manager
+
+PROVIDES += "virtual/phosphor-inventory-manager-assettag"
+S = "${WORKDIR}"
+
+SRC_URI = "file://assettag.yaml"
+
+do_install() {
+ install -D assettag.yaml ${D}${base_datadir}/events.d/assettag.yaml
+}
+
+FILES:${PN} += "${base_datadir}/events.d/assettag.yaml"
diff --git a/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml b/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..d3a0104b97a3cb05bdd8b81bae1352f3f490060d
--- /dev/null
+++ b/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml
@@ -0,0 +1,14 @@
+events:
+ - name: Creating AssetTag at startup
+ description: >
+ Create /system at startup and populate the AssetTag property with
+ empty string.
+ type: startup
+ actions:
+ - name: createObjects
+ objs:
+ /system:
+ xyz.openbmc_project.Inventory.Decorator.AssetTag:
+ AssetTag:
+ value: ""
+ type: string
diff --git a/recipes-phosphor/inventory/phosphor-inventory-manager.inc b/recipes-phosphor/inventory/phosphor-inventory-manager.inc
new file mode 100644
index 0000000000000000000000000000000000000000..fd34ee33db20ad25d440ff4689993b3b9e108c98
--- /dev/null
+++ b/recipes-phosphor/inventory/phosphor-inventory-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-inventory-manager"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI = "git://github.com/openbmc/phosphor-inventory-manager;branch=master;protocol=https"
+SRCREV = "69ddaad8dfd1102e9bdd6437149e2a8397a1b558"
diff --git a/recipes-phosphor/inventory/phosphor-inventory-manager/xyz.openbmc_project.Inventory.Manager.service b/recipes-phosphor/inventory/phosphor-inventory-manager/xyz.openbmc_project.Inventory.Manager.service
new file mode 100644
index 0000000000000000000000000000000000000000..43cc97922c30ea34aba6ee244f914a98a3350dcf
--- /dev/null
+++ b/recipes-phosphor/inventory/phosphor-inventory-manager/xyz.openbmc_project.Inventory.Manager.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor Inventory Manager
+Before=mapper-wait@-xyz-openbmc_project-inventory.service
+
+[Service]
+Restart=always
+Type=dbus
+ExecStart=/usr/bin/phosphor-inventory
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb b/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..16790a38175f2fc2874558980b6f2c4dda7f38be
--- /dev/null
+++ b/recipes-phosphor/inventory/phosphor-inventory-manager_git.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Phosphor Inventory Manager"
+DESCRIPTION = "Phosphor Inventory Manager is an inventory object \
+lifecycle management application, suitable for use on a wide variety \
+of OpenBMC platforms."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit autotools \
+ pkgconfig \
+ python3native \
+ phosphor-dbus-yaml \
+ phosphor-inventory-manager \
+ obmc-phosphor-dbus-service
+
+require phosphor-inventory-manager.inc
+
+DEPENDS += " \
+ phosphor-inventory-manager-assettag \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ ${PYTHON_PN}-sdbus++-native \
+ autoconf-archive-native \
+ libcereal \
+ ${PYTHON_PN}-native \
+ ${PYTHON_PN}-pyyaml-native \
+ ${PYTHON_PN}-mako-native \
+ "
+
+OBMC_INVENTORY_PATH="${OBMC_DBUS_PATH_ROOT}/inventory"
+OBMC_INVENTORY_MGR_IFACE="${OBMC_DBUS_IFACE_ROOT}.Inventory.Manager"
+
+DBUS_SERVICE:${PN} = "${OBMC_INVENTORY_MGR_IFACE}.service"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " \
+ YAML_PATH=${STAGING_DIR_HOST}${base_datadir} \
+ BUSNAME=${OBMC_INVENTORY_MGR_IFACE} \
+ INVENTORY_ROOT=${OBMC_INVENTORY_PATH} \
+ IFACE=${OBMC_INVENTORY_MGR_IFACE} \
+ IFACES_PATH=${STAGING_DIR_TARGET}${yaml_dir} \
+ "
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[associations] = "--enable-associations, --disable-associations,nlohmann-json,"
diff --git a/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb b/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..8aff6f24eafa41699691e778c94a3dcd6246d86e
--- /dev/null
+++ b/recipes-phosphor/ipmi/ipmi-blob-tool_git.bb
@@ -0,0 +1,17 @@
+HOMEPAGE = "http://github.com/openbmc/ipmi-blob-tool"
+SUMMARY = "Library and Host-side tool for talking to OpenBMC IPMI BLOB handlers."
+DESCRIPTION = "This package provides a library for the BMC and host for core blob mechanics and host-side binaries for talking to OpenBMC IPMI BLOB handlers."
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit autotools pkgconfig
+
+DEPENDS += "autoconf-archive-native"
+
+EXTRA_OECONF = "--disable-tests"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/ipmi-blob-tool;branch=master;protocol=https"
+SRCREV = "98e59f31573fc9024b3450ac70b9d67f59d3ad0d"
diff --git a/recipes-phosphor/ipmi/ipmitool/enterprise-numbers b/recipes-phosphor/ipmi/ipmitool/enterprise-numbers
new file mode 100644
index 0000000000000000000000000000000000000000..74842b5617c04de499d9fd1dbd96a5961570f6d3
--- /dev/null
+++ b/recipes-phosphor/ipmi/ipmitool/enterprise-numbers
@@ -0,0 +1,113 @@
+PRIVATE ENTERPRISE NUMBERS
+
+(last updated 2020-03-05)
+
+SMI Network Management Private Enterprise Codes:
+
+Prefix: iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
+
+This file is http://www.iana.org/assignments/enterprise-numbers
+This file has been reduced to entities signing CLAs with OpenBMC
+https://drive.google.com/drive/folders/1Ooi0RdTcaOWF1DWFJUAJDdN7tRKde7Nl
+
+Decimal
+| Organization
+| | Contact
+| | | Email
+| | | |
+0
+ Reserved
+ Internet Assigned Numbers Authority
+ iana&iana.org
+2
+ IBM (https://w3.ibm.com/standards )
+ Glenn Daly
+ gdaly&us.ibm.com
+343
+ Intel Corporation
+ Adam Kaminski
+ adam.kaminski&intel.com
+674
+ Dell Inc.
+ David L. Douglas
+ david_l_douglas&dell.com
+1694
+ HCL Technologies Limited
+ Ms. Bindu Dandapani
+ bindud&hcl.in
+2487
+ Phoenix Technologies Ltd.
+ Ian Anderson
+ ian_anderson&phoenix.com
+4128
+ ARM Ltd.
+ Jon Brawn
+ jbrawn&arm.com
+6569
+ INVENTEC CORPORATION
+ JH CHYAN
+ chyan.jh&inventec.com
+7244
+ Quanta Computer Inc.
+ Strong Chen
+ @strong.chen&quantatw.com
+8554
+ Departement Elektrotechnik, ETH Zuerich
+ Simon Moser
+ smoser&ee.ethz.ch
+11129
+ Google, Inc.
+ Ben Laurie
+ benl&google.com
+11183
+ Mitac International Corp.
+ P.C. Wang
+ p.c.wang&mic.com.tw
+19046
+ Lenovo Enterprise Business Group
+ Joe Bolan
+ jbolan&lenovo.com
+20974
+ American Megatrends, Inc
+ Kenny Chiang
+ kennychiang&ami.com.tw
+33049
+ Mellanox Technologies LTD
+ Sagi Rotem
+ sagir&mellanox.co.il
+40092
+ Wiwynn Corporation
+ Zong Bing, Wu
+ bing_wu&wiwynn.com
+40981
+ Facebook, Inc.
+ Tim Tickel
+ twt&fb.com
+45065
+ Insyde
+ Y.C. Lin
+ yc.lin&insyde.com
+48482
+ Linaro Ltd
+ Dave Pigott
+ dave.pigott&linaro.org
+48512
+ Inspur Group Co.,Ltd.
+ Chunpeng Mao
+ Maochp&inspur.com
+49150
+ Vertiv Co
+ John Bogdan
+ john.bogdan&vertivco.com
+49769
+ YADRO
+ Support
+ snmp&yadro.com
+51974
+ Raptor Computing Systems, LLC
+ Support Department
+ support&raptorcs.com
+52538
+ Ampere Computing
+ AJ Shah
+ aj&erecomputing.com
diff --git a/recipes-phosphor/ipmi/ipmitool_%.bbappend b/recipes-phosphor/ipmi/ipmitool_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..7ede35412342d24a04d601b84fd55035a04227fd
--- /dev/null
+++ b/recipes-phosphor/ipmi/ipmitool_%.bbappend
@@ -0,0 +1,35 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+DEPENDS += "systemd"
+
+SRC_URI = "git://github.com/ipmitool/ipmitool.git;protocol=https;branch=master"
+SRCREV = "c3939dac2c060651361fc71516806f9ab8c38901"
+
+# TODO: when a new company joins the OpenBMC project by signing
+# a CLA, if they have an enterprise number on file with the
+# IANA, the versioned file, $PWD/ipmitool/enterprise-numbers
+# needs to be updated to add their entry. The canonical
+# version of the file is locatede here:
+# https://www.iana.org/assignments/enterprise-numbers
+#
+# This file is manually downloaded so it can be versioned
+# instead of having the makefile download it during do_compile
+SRC_URI += " \
+ file://enterprise-numbers \
+ "
+
+# make sure that the enterprise-numbers file gets installed in the root FS
+FILES:${PN} += "/usr/share/misc/enterprise-numbers"
+do_compile:prepend() {
+ # copy the SRC_URI version of enterprise-numbers
+ # to the build dir to prevent a fetch
+ mkdir -p "${WORKDIR}/build"
+ cp "${WORKDIR}/enterprise-numbers" "${WORKDIR}/build/enterprise-numbers"
+}
+
+S = "${WORKDIR}/git"
+LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=9aa91e13d644326bf281924212862184"
+
+EXTRA_OECONF:append = " --disable-ipmishell --enable-intf-dbus DEFAULT_INTF=dbus "
+
+PV = "1.8.18+git${SRCPV}"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..440a36ff7bbcc0d8df9317a843eb7cdceee62cd5
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb
@@ -0,0 +1,30 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-blobs-binarystore"
+SUMMARY = "BMC Generic Binary Blob Store via OEM IPMI Blob Transport"
+DESCRIPTION = "This package provides a read/write/serialize abstraction for storing binary data through IPMI blobs"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson pkgconfig
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "phosphor-ipmi-blobs"
+DEPENDS += "phosphor-logging"
+DEPENDS += "protobuf-native"
+DEPENDS += "protobuf"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[blobtool] = "-Dblobtool=enabled,-Dblobtool=disabled"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs-binarystore;branch=master;protocol=https"
+SRCREV = "f3aa37a7d0ae9f360037292c11b865d85f175d83"
+
+FILES:${PN}:append = " ${libdir}/ipmid-providers"
+FILES:${PN}:append = " ${libdir}/blob-ipmid"
+
+BLOBIPMI_PROVIDER_LIBRARY += "libbinarystore.so"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
+
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e75c185a6cb67e9cc5b6745504baec26614ec5e7
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-blobs_git.bb
@@ -0,0 +1,26 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-blobs"
+SUMMARY = "Phosphor OEM IPMI BLOBS Protocol Implementation"
+DESCRIPTION = "This package handles a series of OEM IPMI commands that implement the BLOB protocol for sending and receiving data over IPMI."
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson pkgconfig
+
+DEPENDS += " \
+ ipmi-blob-tool \
+ phosphor-ipmi-host \
+ phosphor-logging \
+ "
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs;branch=master;protocol=https"
+SRCREV = "35b6c3e63527738a0ab052d4fe2c75c1141c2b18"
+
+FILES:${PN} += "${libdir}/ipmid-providers"
+
+EXTRA_OEMESON:append = " \
+ -Dtests=disabled \
+ -Dexamples=false \
+ "
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-bt/org.openbmc.HostIpmi.service b/recipes-phosphor/ipmi/phosphor-ipmi-bt/org.openbmc.HostIpmi.service
new file mode 100644
index 0000000000000000000000000000000000000000..bf69c7d199379712fd88a01b7b2e3c683076afc4
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-bt/org.openbmc.HostIpmi.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor IPMI BT DBus Bridge
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env btbridged
+SyslogIdentifier=btbridged
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..bc64f4e246c087aa964337602503d56ae87e4d08
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-bt_git.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor OpenBMC BT to DBUS"
+DESCRIPTION = "Phosphor OpenBMC BT to DBUS."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+
+DBUS_SERVICE:${PN} = "org.openbmc.HostIpmi.service"
+
+PROVIDES += "virtual/obmc-host-ipmi-hw"
+RPROVIDES:${PN} += "virtual-obmc-host-ipmi-hw"
+RRECOMMENDS:${PN} += "phosphor-ipmi-host"
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "systemd"
+
+S = "${WORKDIR}/git"
+SRC_URI += "git://github.com/openbmc/btbridge;branch=master;protocol=https"
+SRCREV="713a5470b4a1327abf9857870ba7d9cbcd5a54d4"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config.bb b/recipes-phosphor/ipmi/phosphor-ipmi-config.bb
new file mode 100644
index 0000000000000000000000000000000000000000..24c4941dc6f95878603d3957f17d15ce9568cd33
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Phosphor IPMI daemon configuration"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+
+SRC_URI = " \
+ file://cipher_list.json \
+ file://dcmi_cap.json \
+ file://dcmi_sensors.json \
+ file://dev_id.json \
+ file://power_reading.json \
+ file://channel_access.json \
+ file://channel_config.json \
+ file://entity-map.json \
+ file://cs_privilege_levels.json \
+ "
+
+FILES:${PN} = " \
+ ${datadir}/ipmi-providers/cipher_list.json \
+ ${datadir}/ipmi-providers/dcmi_cap.json \
+ ${datadir}/ipmi-providers/dcmi_sensors.json \
+ ${datadir}/ipmi-providers/dev_id.json \
+ ${datadir}/ipmi-providers/power_reading.json \
+ ${datadir}/ipmi-providers/channel_access.json \
+ ${datadir}/ipmi-providers/channel_config.json \
+ ${datadir}/ipmi-providers/entity-map.json \
+ ${datadir}/ipmi-providers/cs_privilege_levels.json \
+ "
+
+do_fetch[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+ install -d ${D}${datadir}/ipmi-providers
+ install -m 0644 -D ${WORKDIR}/cipher_list.json \
+ ${D}${datadir}/ipmi-providers/cipher_list.json
+ install -m 0644 -D ${WORKDIR}/dcmi_cap.json \
+ ${D}${datadir}/ipmi-providers/dcmi_cap.json
+ install -m 0644 -D ${WORKDIR}/dcmi_sensors.json \
+ ${D}${datadir}/ipmi-providers/dcmi_sensors.json
+ install -m 0644 -D ${WORKDIR}/dev_id.json \
+ ${D}${datadir}/ipmi-providers/dev_id.json
+ install -m 0644 -D ${WORKDIR}/power_reading.json \
+ ${D}${datadir}/ipmi-providers/power_reading.json
+ install -m 0644 -D ${WORKDIR}/channel_access.json \
+ ${D}${datadir}/ipmi-providers/channel_access.json
+ install -m 0644 -D ${WORKDIR}/channel_config.json \
+ ${D}${datadir}/ipmi-providers/channel_config.json
+ install -m 0644 -D ${WORKDIR}/entity-map.json \
+ ${D}${datadir}/ipmi-providers/entity-map.json
+ install -m 0644 -D ${WORKDIR}/cs_privilege_levels.json \
+ ${D}${datadir}/ipmi-providers/cs_privilege_levels.json
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_access.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_access.json
new file mode 100644
index 0000000000000000000000000000000000000000..85746fc7d4b4a15b2e63ddd79ba91e78547fbf45
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_access.json
@@ -0,0 +1,16 @@
+{
+ "1" : {
+ "access_mode" : "always_available",
+ "user_auth_disabled" : false,
+ "per_msg_auth_disabled" : false,
+ "alerting_disabled" : false,
+ "priv_limit" : "priv-admin"
+ },
+ "2" : {
+ "access_mode" : "always_available",
+ "user_auth_disabled" : false,
+ "per_msg_auth_disabled" : false,
+ "alerting_disabled" : false,
+ "priv_limit" : "priv-admin"
+ }
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
new file mode 100644
index 0000000000000000000000000000000000000000..3b54d0c6c44a29ba9945396a8f2c7b9cc43df286
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -0,0 +1,178 @@
+{
+ "0" : {
+ "name" : "IPMB",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "ipmb",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "1" : {
+ "name" : "eth0",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "2" : {
+ "name" : "eth1",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "3" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "4" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "5" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "6" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "7" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "8" : {
+ "name" : "INTRABMC",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "oem",
+ "protocol_type" : "oem",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "9" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "10" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "11" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "12" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "13" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "14" : {
+ "name" : "SELF",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "ipmb",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "15" : {
+ "name" : "ipmi_kcs3",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "system-interface",
+ "protocol_type" : "kcs",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ }
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/cipher_list.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/cipher_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..049ded06287008203678d47d95d53be35df25203
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/cipher_list.json
@@ -0,0 +1,8 @@
+{
+ "b":{
+ "cipher":17,
+ "authentication":3,
+ "integrity":4,
+ "confidentiality":1
+ }
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/cs_privilege_levels.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/cs_privilege_levels.json
new file mode 100644
index 0000000000000000000000000000000000000000..15a3cdddf5053baad79f771a57eaf1da54263301
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/cs_privilege_levels.json
@@ -0,0 +1 @@
+{"Channel0":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel1":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel10":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel11":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel12":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel13":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel14":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel15":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel2":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel3":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel4":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel5":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel6":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel7":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel8":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"},"Channel9":{"CipherID0":"priv-admin","CipherID1":"priv-admin","CipherID10":"priv-admin","CipherID11":"priv-admin","CipherID12":"priv-admin","CipherID13":"priv-admin","CipherID14":"priv-admin","CipherID15":"priv-admin","CipherID2":"priv-admin","CipherID3":"priv-admin","CipherID4":"priv-admin","CipherID5":"priv-admin","CipherID6":"priv-admin","CipherID7":"priv-admin","CipherID8":"priv-admin","CipherID9":"priv-admin"}}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/dcmi_cap.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/dcmi_cap.json
new file mode 100644
index 0000000000000000000000000000000000000000..2d88320819340e2e9b762fcffc7d08462e5894f6
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/dcmi_cap.json
@@ -0,0 +1,17 @@
+{
+ "PowerManagement": 1,
+ "OOBSecondaryLan": 0,
+ "SerialTMODE": 0,
+ "InBandSystemInterfaceChannel": 1,
+ "SELAutoRollOver": 1,
+ "FlushEntireSELUponRollOver": 0,
+ "RecordLevelSELFlushUponRollOver": 0,
+ "NumberOfSELEntries": 200,
+ "TempMonitoringSamplingFreq":0,
+ "PowerMgmtDeviceSlaveAddress": 0,
+ "BMCChannelNumber": 0,
+ "DeviceRivision": 0,
+ "MandatoryPrimaryLanOOBSupport": 1,
+ "OptionalSecondaryLanOOBSupport": 255,
+ "OptionalSerialOOBMTMODECapability": 255
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/dcmi_sensors.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/dcmi_sensors.json
new file mode 100644
index 0000000000000000000000000000000000000000..502f6d162518c6de300fd1d24e6be7d0ac272ca0
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/dcmi_sensors.json
@@ -0,0 +1,8 @@
+{
+ "inlet": [
+ ],
+ "baseboard": [
+ ],
+ "cpu": [
+ ]
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
new file mode 100644
index 0000000000000000000000000000000000000000..3440e0b2fde501cd293b863079c04274abce00b4
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
@@ -0,0 +1,2 @@
+{"id": 0, "revision": 0, "addn_dev_support": 0,
+ "manuf_id": 0, "prod_id": 0, "aux": 0}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/entity-map.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/entity-map.json
new file mode 100644
index 0000000000000000000000000000000000000000..cdb1ea847348113a1e54c5c77f7c60f945a89714
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/entity-map.json
@@ -0,0 +1,15 @@
+[
+ {
+ "id" : 1,
+ "containerEntityId" : 30,
+ "containerEntityInstance" : 1,
+ "isList" : true,
+ "isLinked" : false,
+ "entities" : [
+ {"id" : 3, "instance" : 1},
+ {"id" : 4, "instance" : 1},
+ {"id" : 0, "instance" : 0},
+ {"id" : 0, "instance" : 0}
+ ]
+ }
+]
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-config/power_reading.json b/recipes-phosphor/ipmi/phosphor-ipmi-config/power_reading.json
new file mode 100644
index 0000000000000000000000000000000000000000..f3d051f6eba2abb765a308a06606d0704033d595
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-config/power_reading.json
@@ -0,0 +1,3 @@
+{
+ "path": ""
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-ethstats_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-ethstats_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..99a80bc41c8ac8863d284d1e1a25d5c9808c8526
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-ethstats_git.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Phosphor OEM IPMI Ethernet Stats Implementation"
+DESCRIPTION = "This package handles receiving OEM IPMI commands to provide ethernet device statistics."
+HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-ethstats"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-ipmiprovider-symlink
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "phosphor-ipmi-host"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/phosphor-ipmi-ethstats;branch=master;protocol=https"
+SRCREV = "c8894c55f5d58862f266aebedc43e2652f529a41"
+
+FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
+FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
+FILES:${PN}:append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
+FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
+
+HOSTIPMI_PROVIDER_LIBRARY += "libethstatscmd.so"
+
+EXTRA_OECONF += "--disable-tests"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..33e745ea5e1658e5f12a99d65302cc1f1a792c79
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-flash_git.bb
@@ -0,0 +1,77 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-flash"
+SUMMARY = "Phosphor OEM IPMI In-band Firmware Update over BLOB"
+DESCRIPTION = "This package handles a series of OEM IPMI commands that implement the firmware update handler over the BLOB protocol."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson pkgconfig systemd
+
+DEPENDS += " \
+ phosphor-ipmi-blobs \
+ phosphor-logging \
+ sdbusplus \
+ systemd \
+ ipmi-blob-tool \
+ function2 \
+"
+
+PACKAGECONFIG ?= "cleanup-delete"
+PACKAGECONFIG[cleanup-delete] = "-Dcleanup-delete=enabled,-Dcleanup-delete=disabled"
+# If using static-layout, reboot-update is a good option to handle updating.
+# To be able to track the update status, update-status option can be used.
+# Note that both reboot-update and update-status cannot be enabled at the same time.
+PACKAGECONFIG[reboot-update] = "-Dreboot-update=true,-Dreboot-update=false"
+PACKAGECONFIG[update-status] = "-Dupdate-status=true,-Dupdate-status=false"
+
+# Default options for supporting various flash types:
+PACKAGECONFIG[static-bmc] = "-Dupdate-type=static-layout,-Dupdate-type=none"
+PACKAGECONFIG[ubitar-bmc] = "-Dupdate-type=tarball-ubi,-Dupdate-type=none"
+PACKAGECONFIG[host-bios] = "-Dhost-bios=true,-Dhost-bios=false"
+
+# Hardware options to enable transmitting the data from the host.
+# Only one type of p2a or lpc can be enabled.
+PACKAGECONFIG[aspeed-p2a] = "-Dp2a-type=aspeed-p2a,,,,,aspeed-lpc nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
+PACKAGECONFIG[aspeed-lpc] = "-Dlpc-type=aspeed-lpc,,,,,aspeed-p2a nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
+PACKAGECONFIG[nuvoton-lpc] = "-Dlpc-type=nuvoton-lpc,,,,,aspeed-p2a aspeed-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
+PACKAGECONFIG[nuvoton-p2a-vga] = "-Dp2a-type=nuvoton-p2a-vga,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-mbox"
+PACKAGECONFIG[nuvoton-p2a-mbox] = "-Dp2a-type=nuvoton-p2a-mbox,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-vga"
+PACKAGECONFIG[net-bridge] = "-Dnet-bridge=true,-Dnet-bridge=false"
+
+EXTRA_OEMESON = "-Dtests=disabled -Dhost-tool=disabled"
+
+# Set this variable in your recipe to set it instead of using MAPPED_ADDRESS directly.
+IPMI_FLASH_BMC_ADDRESS ?= "0"
+EXTRA_OEMESON:append = " -Dmapped-address=${IPMI_FLASH_BMC_ADDRESS}"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash;branch=master;protocol=https"
+SRCREV = "28c00d6eda0d22884edb80a11bffab2d1003df51"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} += " \
+ phosphor-ipmi-flash-bmc-prepare.target \
+ phosphor-ipmi-flash-bmc-verify.target \
+ phosphor-ipmi-flash-bmc-update.target \
+"
+
+# If they enabled host-bios, add those three extra targets.
+HOST_BIOS_TARGETS = " \
+ phosphor-ipmi-flash-bios-prepare.target \
+ phosphor-ipmi-flash-bios-verify.target \
+ phosphor-ipmi-flash-bios-update.target \
+"
+
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'host-bios', '${HOST_BIOS_TARGETS}', '', d)}"
+
+FILES:${PN}:append = " ${libdir}/ipmid-providers"
+FILES:${PN}:append = " ${libdir}/blob-ipmid"
+FILES:${PN}:append = " ${libdir}/tmpfiles.d"
+
+BLOBIPMI_PROVIDER_LIBRARY += "libfirmwareblob.so"
+BLOBIPMI_PROVIDER_LIBRARY += "libversionblob.so"
+BLOBIPMI_PROVIDER_LIBRARY += "liblogblob.so"
+BLOBIPMI_PROVIDER_LIBRARY += "${@bb.utils.contains('PACKAGECONFIG', 'cleanup-delete', 'libfirmwarecleanupblob.so', '', d)}"
+
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-hostfw-config-example-native_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-hostfw-config-example-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..afa5435789c20790c4c604f395e985aa0cfced54
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-hostfw-config-example-native_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Sample hostfw inventory map for phosphor-ipmi-fru"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit phosphor-ipmi-fru
+inherit native
+
+require phosphor-ipmi-fru.inc
+
+PROVIDES += "virtual/phosphor-ipmi-fru-hostfw-config"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ DEST=${D}${hostfw_datadir}
+ install -d ${DEST}
+
+ # TODO: copy example hostfw yaml to ${DEST}/config.yaml
+ # install fru-types.yaml ${DEST}/config.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-example-native_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-example-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..08425c13a6e62605f8a7492c2850cbd56a498548
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-example-native_git.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Sample inventory map for phosphor-ipmi-fru"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit phosphor-ipmi-fru
+inherit native
+
+require phosphor-ipmi-fru.inc
+
+PROVIDES += "virtual/phosphor-ipmi-fru-inventory"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ # TODO: install this to inventory_datadir
+ # after ipmi-fru-parser untangles the host
+ # firmware config from the machine inventory.
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+ install scripts/example.yaml ${DEST}/config.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..64bcbe3dd9066c7819be550cce78e045ef2e6106
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native_git.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Generate inventory map for phosphor-ipmi-fru from an MRW."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit phosphor-ipmi-fru
+inherit mrw-xml
+inherit native
+
+require phosphor-ipmi-fru.inc
+
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# TODO: remove this dependency after the MRW script
+# has been updated to not require the hostfw metadata.
+DEPENDS += "virtual/phosphor-ipmi-fru-hostfw-config"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-inventory"
+
+S = "${WORKDIR}/git"
+do_install() {
+
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_ipmi_fru.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -m ${hostfw_datadir}/config.yaml \
+ -o ${DEST}/config.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..b89311501d39697022c06f07236d265b4b8a6e46
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bb
@@ -0,0 +1,24 @@
+SUMMARY = "To merge the Host and BMC config files generated from MRW "
+DESCRIPTION = "Merge host provided FRU info config file, fru info config, \
+which is not sent by host config, and BMC accessible FRU info config \
+files generated by gen-ipmi-fru.pl into a single config file. \
+fru-gen parser parses the merged config file and generates cpp file"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit native
+
+DEPENDS += "virtual/phosphor-ipmi-fru-read-inventory"
+DEPENDS += "virtual/phosphor-ipmi-fru-read-bmc-inventory"
+DEPENDS += "virtual/phosphor-ipmi-fru-read-not-sent-by-host-inventory"
+PROVIDES += "virtual/phosphor-ipmi-fru-merge-config"
+
+do_install:append() {
+ SRC=${config_datadir}
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+ cat ${SRC}/config.yaml ${SRC}/bmc-fru-config.yaml > ${DEST}/fru_config.yaml
+ cat ${SRC}/fru-config-not-sent-by-host.yaml >> ${DEST}/fru_config.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..8de3384ab5c6bb3887215911b11b0bdfe13910fc
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb
@@ -0,0 +1,30 @@
+SUMMARY = "FRU properties config for ipmi-fru-parser"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-fru
+inherit mrw-xml
+inherit native
+
+SRC_URI += "file://config.yaml"
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ "
+
+PROVIDES += "virtual/phosphor-ipmi-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}/extra-properties.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..079ba50a504e1d9d1fcc3dd5295998bf1d127132
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml
@@ -0,0 +1,39 @@
+PROC:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+
+DIMM:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+
+SYS:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+
+NODE:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+
+TPM:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'true'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..2caf218cb9056e38d0202b2f05ac8e693c93da86
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-native.bb
@@ -0,0 +1,23 @@
+SUMMARY = "FRU properties config for ipmi-fru-parser"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-fru
+inherit native
+
+SRC_URI += "file://extra-properties.yaml"
+
+PROVIDES += "virtual/phosphor-ipmi-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 extra-properties.yaml ${DEST}
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties/extra-properties.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties/extra-properties.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..626ef33b880b23a89e6001ed88ed7763c22bfa50
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties/extra-properties.yaml
@@ -0,0 +1,11 @@
+/system/chassis/motherboard/cpu0:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'true'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'true'
+
+/system/chassis/motherboard/dimm0:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'true'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'true'
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-bmc-inventory-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-bmc-inventory-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..bb1addd087b97aeb65cc94986e72948db39b1147
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-bmc-inventory-native.bb
@@ -0,0 +1,20 @@
+SUMMARY = "BMC accesible FRU inventory map for phosphor-ipmi-host"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit native
+
+SRC_URI += "file://bmc-fru-config.yaml"
+
+S = "${WORKDIR}"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-read-bmc-inventory"
+
+do_install:append() {
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+ install bmc-fru-config.yaml ${DEST}/bmc-fru-config.yaml
+}
+
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-bmc-inventory/bmc-fru-config.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-bmc-inventory/bmc-fru-config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..ac13efb44fb77bbdf735952e166990651eb13f16
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-bmc-inventory/bmc-fru-config.yaml
@@ -0,0 +1,43 @@
+# A YAML similar to this sample would have to be generated, for eg with MRW
+# inputs and system configuration, to depict IPMI FRU information.
+#
+# This file maps phosphor dbus inventory properties to IPMI properties
+#
+# This YAML could help generate C++ code.
+# Format of the YAML:
+# Fruid:
+# Associated Fru paths
+# d-bus Interfaces
+# d-bus Properties
+# IPMI Fru mapping
+#5:
+# /system/chassis/motherboard/fan1:
+# xyz.openbmc_project.Inventory.Item:
+# PrettyName:
+# IPMIFruProperty: Product Name
+# IPMIFruSection: Product
+#6:
+# /system/chassis/motherboard/boxelder/bmc:
+# xyz.openbmc_project.Inventory.Item:
+# PrettyName:
+# IPMIFruProperty: Product Name
+# IPMIFruSection: Board
+# xyz.openbmc_project.Inventory.Decorator.Asset:
+# BuildDate:
+# IPMIFruProperty: Mfg Date
+# IPMIFruSection: Board
+# SerialNumber:
+# IPMIFruProperty: Serial Number
+# IPMIFruSection: Board
+# PartNumber:
+# IPMIFruProperty: Part Number
+# IPMIFruSection: Board
+# Manufacturer:
+# IPMIFruProperty: Manufacturer
+# IPMIFruSection: Board
+#7:
+# /system/chassis/motherboard/boxelder/bmc/ethernet:
+# xyz.openbmc_project.Inventory.Item:
+# PrettyName:
+# IPMIFruProperty: Product Name
+# IPMIFruSection: Product
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-example-native_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-example-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e2052000526b898ab230a0a8e18d6ef03e0186e9
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-example-native_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Sample inventory map for phosphor-ipmi-host"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit phosphor-ipmi-host
+inherit native
+
+require phosphor-ipmi-host.inc
+
+PROVIDES += "virtual/phosphor-ipmi-fru-read-inventory"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+ install scripts/fru-read-example.yaml ${DEST}/config.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..7a143a4171c27a4bc28adccf162848399b86ab5a
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native_git.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Generate inventory map for phosphor-ipmi-host from a MRW."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit phosphor-ipmi-host
+inherit mrw-xml
+inherit native
+
+require phosphor-ipmi-host.inc
+
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+DEPENDS += "virtual/phosphor-ipmi-fru-hostfw-config"
+PROVIDES += "virtual/phosphor-ipmi-fru-read-inventory"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_ipmi_fru.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -m ${hostfw_datadir}/config.yaml \
+ -o ${DEST}/config.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e87b8dfd0aaa9d2e61da63328997c78b84ff8659
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory-native.bb
@@ -0,0 +1,20 @@
+SUMMARY = "The inventory map of frus not sent by host for phosphor-ipmi-host"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit native
+
+SRC_URI += "file://fru-config-not-sent-by-host.yaml"
+
+S = "${WORKDIR}"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-read-not-sent-by-host-inventory"
+
+do_install:append() {
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+ install fru-config-not-sent-by-host.yaml ${DEST}/fru-config-not-sent-by-host.yaml
+}
+
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory/fru-config-not-sent-by-host.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory/fru-config-not-sent-by-host.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..9fa1fed43f34e777385bed64fe042cd605f40439
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory/fru-config-not-sent-by-host.yaml
@@ -0,0 +1,21 @@
+# A YAML similar to this sample would have to be generated, for eg with MRW
+# inputs and system configuration, to depict IPMI FRU information.
+#
+# This file maps phosphor dbus inventory properties to IPMI properties
+#
+# This YAML could help generate C++ code.
+# Format of the YAML:
+# Fruid:
+# Associated Fru paths
+# d-bus Interfaces
+# d-bus Properties
+# IPMI Fru mapping
+#20:
+# /system/chassis/motherboard/gv100card0:
+# entityID: 3
+# entityInstance: 1
+# interfaces:
+# xyz.openbmc_project.Inventory.Item:
+# PrettyName:
+# IPMIFruProperty: Board Name
+# IPMIFruSection: Board
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-whitelist-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru-whitelist-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..17c685e61651fce554022ada274156148a3227f3
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-whitelist-native.bb
@@ -0,0 +1,7 @@
+SUMMARY = "Whitelisted IPMI FRU Parser commands"
+DESCRIPTION = "Whitelisted IPMI FRU Parser commands for OpenBMC"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host-whitelist
+inherit native
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru-whitelist/phosphor-ipmi-fru-whitelist-native.conf b/recipes-phosphor/ipmi/phosphor-ipmi-fru-whitelist/phosphor-ipmi-fru-whitelist-native.conf
new file mode 100644
index 0000000000000000000000000000000000000000..365c3d95262eb1f042fb4fa3792d5b838fca11f5
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru-whitelist/phosphor-ipmi-fru-whitelist-native.conf
@@ -0,0 +1,2 @@
+#:
+0x0A:0x12 //:
\ No newline at end of file
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru.inc b/recipes-phosphor/ipmi/phosphor-ipmi-fru.inc
new file mode 100644
index 0000000000000000000000000000000000000000..e6ba676809a896824db9e0fb380d71b17a4e923e
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/ipmi-fru-parser"
+LICENSE = "GPL-3.0-or-later"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7702f203b58979ebbc31bfaeb44f219c"
+SRC_URI += "git://github.com/openbmc/ipmi-fru-parser;branch=master;protocol=https"
+SRCREV = "cf2dee3476a7e26ab99b50efe87155cc50432a9c"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc-read-eeprom@.service b/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc-read-eeprom@.service
new file mode 100644
index 0000000000000000000000000000000000000000..2fc30838aca48453d0d0b55ccdbc22090d529e0d
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc-read-eeprom@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Read %I EEPROM
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+StartLimitBurst=10
+
+[Service]
+Restart=on-failure
+Type=oneshot
+EnvironmentFile={envfiledir}/obmc/eeproms/%I
+ExecStartPre={bindir}/of-name-to-eeprom.sh {envfiledir}/obmc/eeproms/%I
+ExecStart=/usr/bin/env phosphor-read-eeprom --eeprom $SYSFS_PATH --fruid $FRUID
+SyslogIdentifier=phosphor-read-eeprom
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru/of-name-to-eeprom.sh b/recipes-phosphor/ipmi/phosphor-ipmi-fru/of-name-to-eeprom.sh
new file mode 100644
index 0000000000000000000000000000000000000000..40c489613dbb6732968ab1ddf6c70265c9c463e1
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru/of-name-to-eeprom.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -eu
+[ -n "${OF_NAME+1}" ] || exit 0
+path="$(grep -xl "$OF_NAME" /sys/bus/i2c/devices/*/of_node/name)"
+eeprom="${path%/of_node/name}/eeprom"
+sed -i "s,^SYSFS_PATH=.*$,SYSFS_PATH=$eeprom," "$1"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..c91fb7bd824b1cff955badb58b81ae7da8e99733
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru_git.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Phosphor IPMI Inventory Plugin"
+DESCRIPTION = "A Phosphor IPMI plugin that updates inventory."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-ipmiprovider-symlink
+inherit phosphor-ipmi-fru
+inherit python3native
+
+require ${BPN}.inc
+
+DEPENDS += " \
+ virtual/phosphor-ipmi-fru-inventory \
+ virtual/phosphor-ipmi-fru-properties \
+ systemd \
+ sdbusplus \
+ ${PYTHON_PN}-mako-native \
+ ${PYTHON_PN}-pyyaml-native \
+ phosphor-ipmi-host \
+ phosphor-mapper \
+ autoconf-archive-native \
+ phosphor-logging \
+ cli11 \
+ "
+
+RDEPENDS:${PN} += "bash"
+
+SRC_URI += "file://of-name-to-eeprom.sh"
+
+SYSTEMD_SERVICE:${PN} += "obmc-read-eeprom@.service"
+
+S = "${WORKDIR}/git"
+
+HOSTIPMI_PROVIDER_LIBRARY += "libstrgfnhandler.so"
+
+FILES:${PN} += "${bindir}/of-name-to-eeprom.sh"
+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"
+
+EXTRA_OECONF = " \
+ YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/config.yaml \
+ PROP_YAML=${STAGING_DIR_NATIVE}${properties_datadir}/extra-properties.yaml \
+ "
+
+do_install:append() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/of-name-to-eeprom.sh ${D}${bindir}
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-host.inc b/recipes-phosphor/ipmi/phosphor-ipmi-host.inc
new file mode 100644
index 0000000000000000000000000000000000000000..ef5aea8ddbdce6a1533987f58d81a84db0dda8ed
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-host.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-host-ipmid"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid;branch=master;protocol=https"
+SRCREV = "f53696edb8c9560b5d6a0f681429cf67f168a083"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py b/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py
new file mode 100644
index 0000000000000000000000000000000000000000..928e8bdef22312e78906c8bbf2efdc2b169b41f0
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python3
+"""Copied from phosphor-settings-manager
+Loads a "target" YAML file and overwrites its values with values from
+"override" YAML files.
+
+Override files are processed in the order given.
+
+Usage:
+ merge_settings.py [override yamls]
+"""
+import sys
+import yaml
+import copy
+
+# Custom representer for None types. This is to handle empty dictionaries.
+# By default Pyyaml outputs these as "null", whereas we want an empty character.
+def represent_none(self, _):
+ return self.represent_scalar('tag:yaml.org,2002:null', '')
+
+def dict_merge(target, source):
+ """Deep merge for dicts.
+
+ Works like dict.update() that recursively updates any dict values present in
+ both parameters.
+
+ Args:
+ target (dict): Values to be overwritten by corresponding values from
+ `source`.
+ source (dict): Overriding values. Not changed by call.
+
+ Returns:
+ `target` with values overwritten from those in `source` at any and all
+ levels of nested dicts.
+ """
+ if not isinstance(source, dict):
+ return source
+ for k, v in source.items():
+ if k in target and isinstance(target[k], dict):
+ dict_merge(target[k], v)
+ else:
+ target[k] = copy.deepcopy(v)
+ return target
+
+if len(sys.argv) < 2:
+ sys.exit('Argument required: target yaml')
+
+if len(sys.argv) == 2:
+ # No overrides to handle
+ sys.exit(0)
+
+yaml.add_representer(type(None), represent_none)
+
+target_filename = sys.argv[1]
+with open(target_filename) as target_file:
+ data = yaml.safe_load(target_file)
+ print('Loaded target YAML file ' + target_filename)
+
+for override_filename in sys.argv[2:]:
+ with open(override_filename) as override_file:
+ override = yaml.safe_load(override_file)
+ dict_merge(data, override)
+ print('Merged override YAML file ' + override_filename)
+
+with open(target_filename, 'w') as target_file:
+ yaml.dump(data, target_file, default_flow_style=False)
+ print('Wrote merged target YAML file ' + target_filename)
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service b/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
new file mode 100644
index 0000000000000000000000000000000000000000..aede5c9495143e296357da9c2bba8909fe6e008d
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Phosphor Inband IPMI
+Wants=clear-once.service
+After=clear-once.service
+After=org.openbmc.HostIpmi.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env ipmid
+SyslogIdentifier=ipmid
+RuntimeDirectory = ipmi
+RuntimeDirectoryPreserve = yes
+StateDirectory = ipmi
+Type=dbus
+BusName=xyz.openbmc_project.Control.Host
+
+[Install]
+WantedBy=multi-user.target
+Alias=xyz.openbmc_project.Control.Host.service
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service b/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
new file mode 100644
index 0000000000000000000000000000000000000000..a3222a950b1ee5722b33401e4438ed6f2909429c
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Soft power off of the host
+Wants=mapper-wait@-org-openbmc-HostIpmi-1.service
+After=mapper-wait@-org-openbmc-HostIpmi-1.service
+Wants=obmc-host-stop-pre@0.target
+Before=obmc-host-stop-pre@0.target
+Conflicts=obmc-host-start@0.target
+ConditionPathExists=!/run/openbmc/host@0-request
+ConditionPathExists=!/lib/systemd/system/pldmSoftPowerOff.service
+
+[Service]
+Restart=no
+ExecStart=/usr/bin/env phosphor-softpoweroff
+SyslogIdentifier=phosphor-softpoweroff
+Type=oneshot
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..819435f3ecf02d4a958ceb2342a299876538aee2
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb
@@ -0,0 +1,168 @@
+SUMMARY = "Phosphor OpenBMC IPMI daemon"
+DESCRIPTION = "Phosphor OpenBMC IPMI router and plugin libraries"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+RRECOMMENDS:${PN} += "packagegroup-obmc-ipmid-providers-libs"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-ipmiprovider-symlink
+inherit obmc-phosphor-sdbus-service
+inherit obmc-phosphor-systemd
+inherit phosphor-ipmi-host
+inherit python3native
+
+def ipmi_whitelists(d):
+ whitelists = d.getVar(
+ 'VIRTUAL-RUNTIME_phosphor-ipmi-providers', True) or ''
+ whitelists = whitelists.split()
+ whitelists = [ '{}-whitelist-native'.format(x) for x in whitelists ]
+ return ' '.join(whitelists)
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[dynamic-sensors] = "--enable-dynamic-sensors,--disable-dynamic-sensors"
+PACKAGECONFIG[hybrid-sensors] = "--enable-hybrid-sensors,--disable-hybrid-sensors"
+PACKAGECONFIG[sel-logger-clears-sel] = "--enable-sel-logger-clears-sel,--disable-sel-logger-clears-sel"
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "nlohmann-json"
+DEPENDS += "phosphor-state-manager"
+DEPENDS += "${@ipmi_whitelists(d)}"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "phosphor-logging"
+DEPENDS += "phosphor-mapper"
+DEPENDS += "sdbusplus"
+DEPENDS += "${PYTHON_PN}-sdbus++-native"
+DEPENDS += "virtual/phosphor-ipmi-inventory-sel"
+DEPENDS += "virtual/phosphor-ipmi-fru-merge-config"
+DEPENDS += "virtual/phosphor-ipmi-sensor-inventory"
+DEPENDS += "boost"
+DEPENDS += "sdeventplus"
+DEPENDS += "${PYTHON_PN}-native"
+DEPENDS += "${PYTHON_PN}-pyyaml-native"
+DEPENDS += "${PYTHON_PN}-mako-native"
+
+VIRTUAL-RUNTIME_ipmi-config ?= "phosphor-ipmi-config"
+
+RDEPENDS:${PN}-dev += "phosphor-logging"
+RDEPENDS:${PN}-dev += "phosphor-mapper-dev"
+RDEPENDS:${PN} += "clear-once"
+RDEPENDS:${PN} += "phosphor-network"
+RDEPENDS:${PN} += "phosphor-time-manager"
+RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_ipmi-config}"
+RDEPENDS:${PN} += "virtual/obmc-watchdog"
+RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_obmc-bmc-state-manager}"
+RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_obmc-bmc-version}"
+RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_obmc-bmc-updater}"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+# add ipmi group
+GROUPADD_PARAM:${PN} = "ipmi"
+
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service phosphor-ipmi-host.service"
+
+RRECOMMENDS:${PN} += "phosphor-settings-manager"
+
+
+require ${BPN}.inc
+
+# Setup IPMI Whitelist Conf files
+WHITELIST_CONF = " \
+ ${STAGING_DATADIR_NATIVE}/phosphor-ipmi-host/*.conf \
+ ${S}/host-ipmid-whitelist.conf \
+ "
+EXTRA_OECONF = " \
+ SENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/sensor.yaml \
+ INVSENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/invsensor.yaml \
+ FRU_YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/fru_config.yaml \
+ "
+EXTRA_OECONF:append = " \
+ WHITELIST_CONF="${WHITELIST_CONF}" \
+ "
+
+S = "${WORKDIR}/git"
+
+SRC_URI += "file://merge_yamls.py "
+
+HOSTIPMI_PROVIDER_LIBRARY += "libipmi20.so"
+HOSTIPMI_PROVIDER_LIBRARY += "libsysintfcmds.so"
+HOSTIPMI_PROVIDER_LIBRARY += "libusercmds.so"
+
+NETIPMI_PROVIDER_LIBRARY += "libipmi20.so"
+NETIPMI_PROVIDER_LIBRARY += "libusercmds.so"
+
+FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
+FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
+FILES:${PN}:append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
+FILES:${PN}:append = " ${systemd_system_unitdir}/phosphor-ipmi-host.service.d/*.conf"
+FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
+
+# Soft Power Off
+# install the soft power off service in the host shutdown target
+SOFT_SVC = "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
+SOFT_TGTFMT = "obmc-host-shutdown@{0}.target"
+SOFT_FMT = "../${SOFT_SVC}:${SOFT_TGTFMT}.requires/${SOFT_SVC}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'SOFT_FMT', 'OBMC_HOST_INSTANCES')}"
+
+#Collect all hardcoded sensor yamls from different recipes and
+#merge all of them with sensor.yaml.
+python do_merge_sensors () {
+ import subprocess
+
+ # TODO: Perform the merge in a temporary directory?
+ workdir = d.getVar('WORKDIR', True)
+ nativedir = d.getVar('STAGING_DIR_NATIVE', True)
+ sensorsdir = d.getVar('sensor_datadir', True)
+ sensorsdir = sensorsdir[1:]
+ sensorsdir = os.path.join(nativedir, sensorsdir)
+ cmd = []
+ cmd.append(os.path.join(workdir, 'merge_yamls.py'))
+ cmd.append(os.path.join(sensorsdir, 'sensor.yaml'))
+
+ if os.stat(os.path.join(sensorsdir, 'sensor.yaml')).st_size == 0:
+ return
+ fetch = bb.fetch2.Fetch([], d)
+ override_urls = [url for url in fetch.urls if url.endswith('.hardcoded.yaml')]
+ for url in override_urls:
+ bb.debug(2, 'Overriding with source: ' + url)
+ local_base = os.path.basename(fetch.localpath(url))
+ filename = os.path.join(workdir, local_base)
+ cmd.append(filename)
+
+ # Invoke the script and don't catch any resulting exception.
+ subprocess.check_call(cmd)
+}
+
+# python-pyyaml-native is installed by do_configure, so put this task after
+addtask merge_sensors after do_configure before do_compile
+
+IPMI_HOST_NEEDED_SERVICES = "\
+ mapper-wait@-xyz-openbmc_project-control-host{}-boot.service \
+ mapper-wait@-xyz-openbmc_project-control-host{}-boot-one_time.service \
+ mapper-wait@-xyz-openbmc_project-control-host{}-power_restore_policy.service \
+ mapper-wait@-xyz-openbmc_project-control-host{}-restriction_mode.service \
+ "
+
+do_install:append() {
+
+ # Create service override file.
+ override_dir=${D}${systemd_system_unitdir}/phosphor-ipmi-host.service.d
+ override_file=${override_dir}/10-override.conf
+ mkdir -p ${override_dir}
+ echo "[Unit]" > ${override_file}
+
+ # Insert host-instance based service dependencies.
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ for s in ${IPMI_HOST_NEEDED_SERVICES};
+ do
+ service=$(echo ${s} | sed "s/{}/${i}/g")
+ echo "Wants=${service}" >> ${override_file}
+ echo "After=${service}" >> ${override_file}
+ done
+ done
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..8199cbf341f709d701c3c99f558f113ef12f840c
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Inventory to Sensor config for phosphor-host-ipmi"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit mrw-xml
+inherit native
+
+SRC_URI += "file://config.yaml"
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ "
+
+PROVIDES += "virtual/phosphor-ipmi-inventory-sel"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${sensor_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_ipmi_sel.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -m config.yaml \
+ -o ${DEST}/invsensor.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw/config.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..a6e5550d3487581686d10095e7afc093b45047e8
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw/config.yaml
@@ -0,0 +1,24 @@
+# Maps the Entity ID to the interested Sensor Type & Offset
+0x01:
+ SensorType: 0x12
+ Offset: 0x02
+
+0x03:
+ SensorType: 0x07
+ Offset: 0x08
+
+0x07:
+ SensorType: 0xC7
+ Offset: 0x00
+
+0x20:
+ SensorType: 0x0C
+ Offset: 0x04
+
+0xD0:
+ SensorType: 0x07
+ Offset: 0x08
+
+0xD8:
+ SensorType: 0x17
+ Offset: 0x08
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..4deaf0de17679df0fc22b7156fef22a999d98e45
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Inventory to Sensor config for non-mrw machines"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit native
+
+PROVIDES += "virtual/phosphor-ipmi-inventory-sel"
+
+SRC_URI += "file://config.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe would provide the sample inventory to sensor config
+ # mapping, for non-mrw machines.
+
+ DEST=${D}${sensor_datadir}
+ install -d ${DEST}
+ install config.yaml ${DEST}/invsensor.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel/config.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..c3b4ba186fcc26b55e98d455e7afbd5c2053cea7
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel/config.yaml
@@ -0,0 +1,340 @@
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0:
+ sensorID: 0xa6
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1:
+ sensorID: 0xa8
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm10:
+ sensorID: 0xba
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm11:
+ sensorID: 0xbc
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm12:
+ sensorID: 0xbe
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm13:
+ sensorID: 0xc0
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm14:
+ sensorID: 0xc2
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm15:
+ sensorID: 0xc4
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm2:
+ sensorID: 0xaa
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm3:
+ sensorID: 0xac
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm4:
+ sensorID: 0xae
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm5:
+ sensorID: 0xb0
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm6:
+ sensorID: 0xb2
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm7:
+ sensorID: 0xb4
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm8:
+ sensorID: 0xb6
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm9:
+ sensorID: 0xb8
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0:
+ sensorID: 0x5a
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core0:
+ sensorID: 0x12
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core1:
+ sensorID: 0x15
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core2:
+ sensorID: 0x18
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core3:
+ sensorID: 0x1b
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core4:
+ sensorID: 0x1e
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core5:
+ sensorID: 0x21
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core6:
+ sensorID: 0x24
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core7:
+ sensorID: 0x27
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core8:
+ sensorID: 0x2a
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core9:
+ sensorID: 0x2d
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core10:
+ sensorID: 0x30
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core11:
+ sensorID: 0x33
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core12:
+ sensorID: 0x36
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core13:
+ sensorID: 0x39
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core14:
+ sensorID: 0x3c
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core15:
+ sensorID: 0x3f
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core16:
+ sensorID: 0x42
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core17:
+ sensorID: 0x45
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core18:
+ sensorID: 0x48
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core19:
+ sensorID: 0x4b
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core20:
+ sensorID: 0x4e
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core21:
+ sensorID: 0x51
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core22:
+ sensorID: 0x54
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core23:
+ sensorID: 0x57
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1:
+ sensorID: 0xa4
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core0:
+ sensorID: 0x5c
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core1:
+ sensorID: 0x5f
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core2:
+ sensorID: 0x62
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core3:
+ sensorID: 0x65
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core4:
+ sensorID: 0x68
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core5:
+ sensorID: 0x6b
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core6:
+ sensorID: 0x6e
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core7:
+ sensorID: 0x71
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core8:
+ sensorID: 0x74
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core9:
+ sensorID: 0x77
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core10:
+ sensorID: 0x7a
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core11:
+ sensorID: 0x7d
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core12:
+ sensorID: 0x80
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core13:
+ sensorID: 0x83
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core14:
+ sensorID: 0x86
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core15:
+ sensorID: 0x89
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core16:
+ sensorID: 0x8c
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core17:
+ sensorID: 0x8f
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core18:
+ sensorID: 0x92
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core19:
+ sensorID: 0x95
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core20:
+ sensorID: 0x98
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core21:
+ sensorID: 0x9b
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core22:
+ sensorID: 0x9e
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core23:
+ sensorID: 0xa1
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard:
+ sensorID: 0x0c
+ sensorType: 0xC7
+ eventReadingType: 0x03
+ offset: 0x00
+/xyz/openbmc_project/inventory/system:
+ sensorID: 0x01
+ sensorType: 0x12
+ eventReadingType: 0x6F
+ offset: 0x02
\ No newline at end of file
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..17d27c5072d6f1e6e9dccdf3a3b9b0121f1b2d58
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb
@@ -0,0 +1,22 @@
+SUMMARY = "IPMB bridge"
+DESCRIPTION = "The IPMB bridge implements a Dbus compliant interface for \
+implementing IPMB interfaces"
+
+SRC_URI = "git://github.com/openbmc/ipmbbridge.git;branch=master;protocol=https"
+SRCREV = "8227626764edf13350c5f5a5857298a905fb43f7"
+PV = "0.1+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SYSTEMD_SERVICE:${PN} = "ipmb.service"
+
+DEPENDS = "sdbusplus \
+ phosphor-logging \
+ i2c-tools \
+ boost \
+ nlohmann-json"
+
+S = "${WORKDIR}/git"
+inherit cmake pkgconfig systemd
+FILES:${PN} += "/usr/share/ipmbbridge/ipmb-channels.json"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..5b54d2c3bd82f5ce672f4ea41e02a3f08a40fa6a
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-kcs_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Phosphor OpenBMC KCS to DBUS"
+DESCRIPTION = "Phosphor OpenBMC KCS to DBUS."
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1beb00e508e89da1ed2a541934f28c0"
+
+inherit meson pkgconfig
+inherit systemd
+
+PV = "1.0+git${SRCPV}"
+
+KCS_DEVICE ?= "ipmi-kcs3"
+
+SYSTEMD_SERVICE:${PN} = "${PN}@${KCS_DEVICE}.service"
+FILES:${PN} += "${systemd_system_unitdir}/${PN}@.service"
+
+PROVIDES += "virtual/obmc-host-ipmi-hw"
+RPROVIDES:${PN} += "virtual-obmc-host-ipmi-hw"
+RRECOMMENDS:${PN} += "phosphor-ipmi-host"
+
+DEPENDS += " \
+ fmt \
+ sdbusplus \
+ sdeventplus \
+ stdplus \
+ systemd \
+ "
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/kcsbridge.git;branch=master;protocol=https"
+SRCREV = "7580a8e60d868b5bcb1a8f8d276374afe7c0983a"
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..85366f94c6d860247ed971bbd3f97e0318d5f125
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Phosphor Network IPMI Daemon"
+DESCRIPTION = "Daemon to support IPMI protocol over network"
+HOMEPAGE = "https://github.com/openbmc/phosphor-net-ipmid"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit systemd
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "cli11"
+DEPENDS += "phosphor-mapper"
+DEPENDS += "systemd"
+DEPENDS += "phosphor-ipmi-host"
+
+RRECOMMENDS:${PN} = "pam-ipmi"
+
+SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid;branch=master;protocol=https"
+SRCREV = "aa8b541d6b4aba53a3a0b39d9123f433cb5cc5e7"
+
+S = "${WORKDIR}/git"
+
+FILES:${PN} += " \
+ ${systemd_system_unitdir}/${PN}@.service \
+ ${systemd_system_unitdir}/${PN}@.socket \
+ "
+
+# If RMCPP_IFACE is not set by bbappend, set it to default
+DEFAULT_RMCPP_IFACE = "eth0"
+RMCPP_IFACE ?= "${DEFAULT_RMCPP_IFACE}"
+
+# install parameterized service and socket files
+SYSTEMD_SERVICE:${PN} = " \
+ ${PN}@${RMCPP_IFACE}.service \
+ ${PN}@${RMCPP_IFACE}.socket \
+ "
+
+# To add another RMCPP interface, add similar lines to the
+# following lines in a bbappend:
+#
+# ALT_RMCPP_IFACE = "eth1"
+# SYSTEMD_SERVICE:${PN} += " \
+# ${PN}@${ALT_RMCPP_IFACE}.service \
+# ${PN}@${ALT_RMCPP_IFACE}.socket \
+# "
+
+# Also, be sure to enable a corresponding entry in the channel
+# config file with the same 'name' as the interfaces above
+# Override the default phosphor-ipmi-config.bb with a bbappend
+
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-sensor-config-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-config-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..19c03fb7940f04ab628f3eddcd7ef23660c6e97c
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-config-native.bb
@@ -0,0 +1,10 @@
+SUMMARY = "OpenBMC - IPMI sensors"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit native
+
+OBMC_IPMI_SENSORS_PROVIDERS = "phosphor-ipmi-sensor-inventory-mrw-config-native"
+
+DEPENDS:append = " ${OBMC_IPMI_SENSORS_PROVIDERS} "
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..45604ced4ff0568f233cff6cd2e576884560e6e1
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config-native.bb
@@ -0,0 +1,18 @@
+SUMMARY = "sensor config for phosphor-host-ipmid"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit native
+
+SRC_URI += "file://config.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${sensor_yamldir}
+ install -d ${DEST}
+ install config.yaml ${DEST}/config.yaml
+}
+
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..44caf9e4b44e87341d73f340452ec521342e27cf
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml
@@ -0,0 +1,357 @@
+boot_count_sensor:
+ path: /xyz/openbmc_project/state/host0
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingAssertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.Control.Boot.RebootAttempts:
+ AttemptsLeft:
+ Offsets:
+ 0xFF:
+ type: uint32_t
+
+ps_redundancy_state_sensor:
+ path: /xyz/openbmc_project/control/power_supply_redundancy
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.Control.PowerSupplyRedundancy:
+ PowerSupplyRedundancyEnabled:
+ Offsets:
+ 0x00:
+ type: "bool"
+ assert: false
+ 0x01:
+ type: "bool"
+ assert: true
+
+os_boot_sensor:
+ path: /xyz/openbmc_project/state/host0
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.State.OperatingSystem.Status:
+ OperatingSystemState:
+ Offsets:
+ 0x01:
+ assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CBoot"
+ type: string
+ 0x02:
+ assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot"
+ type: string
+ 0x03:
+ assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.DiagBoot"
+ type: string
+ 0x04:
+ assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CDROMBoot"
+ type: string
+ 0x05:
+ assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.ROMBoot"
+ type: string
+ 0x06:
+ assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete"
+ type: string
+
+fw_boot_sensor:
+ path: /xyz/openbmc_project/state/host0
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: eventdata2
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.State.Boot.Progress:
+ BootProgress:
+ Offsets:
+ 0x00:
+ type: string
+ set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified"
+ 0x01:
+ type: string
+ set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit"
+ 0x03:
+ type: string
+ set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit"
+ 0x07:
+ type: string
+ set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit"
+ 0x13:
+ type: string
+ set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSStart"
+ 0x14:
+ type: string
+ set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.MotherboardInit"
+
+dimm_func_sensor:
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Offsets:
+ 0x04:
+ type: "bool"
+ assert: false
+ deassert: true
+ Prereqs:
+ 0x06:
+ type: "bool"
+ assert: true
+ deassert: false
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ type: "bool"
+ assert: true
+ deassert: false
+
+cpu_func_sensor:
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Offsets:
+ 0x08:
+ type: "bool"
+ assert: false
+ deassert: true
+ Prereqs:
+ 0x07:
+ type: "bool"
+ assert: true
+ deassert: false
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ type: "bool"
+ assert: true
+ deassert: false
+
+cpucore_func_sensor:
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Offsets:
+ 0x08:
+ type: "bool"
+ assert: false
+ deassert: true
+ Prereqs:
+ 0x07:
+ type: "bool"
+ assert: true
+ deassert: false
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ type: "bool"
+ assert: true
+ deassert: false
+ skipOn: "deassert"
+
+tpm_required_sensor:
+ path: /xyz/openbmc_project/control/host0/TPMEnable
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Control.TPM.Policy:
+ TPMEnable:
+ Offsets:
+ 0x00:
+ type: "bool"
+ assert: false
+ 0x01:
+ type: "bool"
+ assert: true
+
+gpu_func_sensor:
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Offsets:
+ 0x08:
+ type: "bool"
+ assert: false
+ deassert: true
+ Prereqs:
+ 0x07:
+ type: "bool"
+ assert: true
+ deassert: false
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ type: "bool"
+ assert: true
+ deassert: false
+ xyz.openbmc_project.Inventory.Item.Accelerator:
+# Field replaceable doesn't come as a sensor data
+# but we know that GPU is Field replaceable so setting
+# true in both cases.
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable:
+ Offsets:
+ 0x07:
+ type: "bool"
+ assert: true
+ deassert: true
+
+host_auto_reboot_control_sensor:
+ path: /xyz/openbmc_project/control/host0/auto_reboot
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Control.Boot.RebootPolicy:
+ AutoReboot:
+ Offsets:
+ 0x00:
+ type: "bool"
+ assert: false
+ 0x01:
+ type: "bool"
+ assert: true
+
+turbo_allowed_sensor:
+ path: /xyz/openbmc_project/control/host0/turbo_allowed
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Control.Host.TurboAllowed:
+ TurboAllowed:
+ Offsets:
+ 0x00:
+ assert: false
+ deassert: true
+ type: bool
+ 0x01:
+ assert: true
+ deassert: false
+ type: bool
+
+cpucore_temp_sensor:
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ multiplierM: 1
+ offsetB: -127
+ bExp: 0
+ rExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+ scale: -3
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+
+dimm_temp_sensor:
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ multiplierM: 1
+ offsetB: -127
+ bExp: 0
+ rExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+ scale: -3
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+
+vrm_vdd_temp_sensor:
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ multiplierM: 1
+ offsetB: -127
+ bExp: 0
+ rExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+ scale: -3
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+
+gpu_temp_sensor:
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ multiplierM: 1
+ offsetB: -127
+ bExp: 0
+ rExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+ scale: -3
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+
+memory_temp_sensor:
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ multiplierM: 1
+ offsetB: -127
+ bExp: 0
+ rExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+ scale: -3
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+ps_derating_sensor:
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.Control.PowerSupplyAttributes:
+ DeratingFactor:
+ Offsets:
+ 0xFF:
+ type: uint32_t
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..fffadc1c31dc02b1a24280dc8cdc61af75165e2b
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb
@@ -0,0 +1,57 @@
+SUMMARY = "sensor config for phosphor-host-ipmid"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit python3native
+inherit mrw-xml
+inherit native
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ phosphor-ipmi-sensor-config-native \
+ phosphor-ipmi-sensor-inventory-mrw-config-native \
+ ${PYTHON_PN}-pyyaml-native \
+ "
+
+PROVIDES += "virtual/phosphor-ipmi-sensor-inventory"
+
+S = "${WORKDIR}"
+SRC_URI += "file://merge_sensor_config.py"
+
+do_install() {
+ DEST=${D}${sensor_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_ipmi_sensor.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -m ${sensor_yamldir}/config.yaml \
+ -o ${DEST}/sensor.yaml
+}
+
+python do_merge_sensor_config () {
+ import subprocess
+
+ # TODO: Perform the merge in a temporary directory?
+ workdir = d.getVar('WORKDIR', True)
+ nativedir = d.getVar('STAGING_DIR_NATIVE', True)
+ sensoryamldir = d.getVar('sensor_yamldir', True)
+ cmd = []
+ cmd.append(os.path.join(workdir, 'merge_sensor_config.py'))
+ cmd.append(os.path.join(sensoryamldir, 'config.yaml'))
+
+ fetch = os.listdir(sensoryamldir)
+ override_urls = [url for url in fetch if url.endswith('-config.yaml')]
+ for url in override_urls:
+ bb.debug(2, 'Merging extra configurations: ' + url)
+ filename = os.path.join(sensoryamldir, url)
+ cmd.append(filename)
+
+ # Invoke the script and don't catch any resulting exception.
+ subprocess.check_call(cmd)
+}
+# python-pyyaml-native is installed by do_configure, so put this task after
+addtask merge_sensor_config after do_configure before do_compile
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw/merge_sensor_config.py b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw/merge_sensor_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..928e8bdef22312e78906c8bbf2efdc2b169b41f0
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw/merge_sensor_config.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python3
+"""Copied from phosphor-settings-manager
+Loads a "target" YAML file and overwrites its values with values from
+"override" YAML files.
+
+Override files are processed in the order given.
+
+Usage:
+ merge_settings.py [override yamls]
+"""
+import sys
+import yaml
+import copy
+
+# Custom representer for None types. This is to handle empty dictionaries.
+# By default Pyyaml outputs these as "null", whereas we want an empty character.
+def represent_none(self, _):
+ return self.represent_scalar('tag:yaml.org,2002:null', '')
+
+def dict_merge(target, source):
+ """Deep merge for dicts.
+
+ Works like dict.update() that recursively updates any dict values present in
+ both parameters.
+
+ Args:
+ target (dict): Values to be overwritten by corresponding values from
+ `source`.
+ source (dict): Overriding values. Not changed by call.
+
+ Returns:
+ `target` with values overwritten from those in `source` at any and all
+ levels of nested dicts.
+ """
+ if not isinstance(source, dict):
+ return source
+ for k, v in source.items():
+ if k in target and isinstance(target[k], dict):
+ dict_merge(target[k], v)
+ else:
+ target[k] = copy.deepcopy(v)
+ return target
+
+if len(sys.argv) < 2:
+ sys.exit('Argument required: target yaml')
+
+if len(sys.argv) == 2:
+ # No overrides to handle
+ sys.exit(0)
+
+yaml.add_representer(type(None), represent_none)
+
+target_filename = sys.argv[1]
+with open(target_filename) as target_file:
+ data = yaml.safe_load(target_file)
+ print('Loaded target YAML file ' + target_filename)
+
+for override_filename in sys.argv[2:]:
+ with open(override_filename) as override_file:
+ override = yaml.safe_load(override_file)
+ dict_merge(data, override)
+ print('Merged override YAML file ' + override_filename)
+
+with open(target_filename, 'w') as target_file:
+ yaml.dump(data, target_file, default_flow_style=False)
+ print('Wrote merged target YAML file ' + target_filename)
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-native.bb b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..923227971d502e48052853305d757bdf218c2e24
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-native.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Sensor config for phosphor-host-ipmi"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-ipmi-host
+inherit native
+
+PROVIDES += "virtual/phosphor-ipmi-sensor-inventory"
+
+SRC_URI += "file://config.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe is supposed to create an output yaml file with
+ # sensor data extracted from the mrw.
+ # provides a sample output file.
+
+ DEST=${D}${sensor_datadir}
+ install -d ${DEST}
+ install config.yaml ${DEST}/sensor.yaml
+}
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory/config.yaml b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..73104b70cf2141ad865292e3e940ed939340c343
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory/config.yaml
@@ -0,0 +1,2144 @@
+0x03:
+ entityID: 0x22
+ entityInstance: 1
+ sensorType: 0x0F
+ path: /xyz/openbmc_project/state/host0
+ sensorReadingType: 0x6F
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: eventdata2
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.State.Boot.Progress:
+ BootProgress:
+ Offsets:
+ 0x13:
+ type: string
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSStart
+ 0x00:
+ type: string
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
+ 0x01:
+ type: string
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit
+ 0x03:
+ type: string
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit
+ 0x07:
+ type: string
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit
+ 0x14:
+ type: string
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MotherboardInit
+0x05:
+ entityID: 0x23
+ entityInstance: 1
+ sensorType: 0x1F
+ path: /xyz/openbmc_project/state/host0
+ sensorReadingType: 0x6F
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.State.OperatingSystem.Status:
+ OperatingSystemState:
+ Offsets:
+ 0x02:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot
+ type: string
+ 0x06:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete
+ type: string
+ 0x04:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CDROMBoot
+ type: string
+ 0x01:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CBoot
+ type: string
+ 0x03:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.DiagBoot
+ type: string
+ 0x05:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.ROMBoot
+ type: string
+0x07:
+ entityID: 0x22
+ entityInstance: 2
+ sensorType: 0xC3
+ path: /xyz/openbmc_project/state/host0
+ sensorReadingType: 0x6F
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.Control.Boot.RebootAttempts:
+ AttemptsLeft:
+ Offsets:
+ 0xFF:
+ type: uint32_t
+0x0b:
+ entityID: 0x22
+ entityInstance: 3
+ sensorType: 0xCA
+ path: /xyz/openbmc_project/control/power_supply_redundancy
+ sensorReadingType: 0x03
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.Control.PowerSupplyRedundancy:
+ PowerSupplyRedundancyEnabled:
+ Offsets:
+ 0x00:
+ type: "bool"
+ assert: false
+ 0x01:
+ type: "bool"
+ assert: true
+0x12:
+ entityID: 0xD0
+ entityInstance: 1
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core0
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x15:
+ entityID: 0xD0
+ entityInstance: 2
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core1
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x18:
+ entityID: 0xD0
+ entityInstance: 3
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core2
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x1b:
+ entityID: 0xD0
+ entityInstance: 4
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core3
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x1e:
+ entityID: 0xD0
+ entityInstance: 5
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core4
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x21:
+ entityID: 0xD0
+ entityInstance: 6
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core5
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x24:
+ entityID: 0xD0
+ entityInstance: 7
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core6
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x27:
+ entityID: 0xD0
+ entityInstance: 8
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core7
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x2a:
+ entityID: 0xD0
+ entityInstance: 9
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core8
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x2d:
+ entityID: 0xD0
+ entityInstance: 10
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core9
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x30:
+ entityID: 0xD0
+ entityInstance: 11
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core10
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x33:
+ entityID: 0xD0
+ entityInstance: 12
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core11
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x36:
+ entityID: 0xD0
+ entityInstance: 13
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core12
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x39:
+ entityID: 0xD0
+ entityInstance: 14
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core13
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x3c:
+ entityID: 0xD0
+ entityInstance: 15
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core14
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x3f:
+ entityID: 0xD0
+ entityInstance: 16
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core15
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x42:
+ entityID: 0xD0
+ entityInstance: 17
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core16
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x45:
+ entityID: 0xD0
+ entityInstance: 18
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core17
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x48:
+ entityID: 0xD0
+ entityInstance: 19
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core18
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x4b:
+ entityID: 0xD0
+ entityInstance: 20
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core19
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x4e:
+ entityID: 0xD0
+ entityInstance: 21
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core20
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x51:
+ entityID: 0xD0
+ entityInstance: 22
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core21
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x54:
+ entityID: 0xD0
+ entityInstance: 23
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core22
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x57:
+ entityID: 0xD0
+ entityInstance: 24
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0/core23
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x5a:
+ entityID: 0x03
+ entityInstance: 1
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu0
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+0x5c:
+ entityID: 0xD0
+ entityInstance: 25
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core0
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x5f:
+ entityID: 0xD0
+ entityInstance: 26
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core1
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x62:
+ entityID: 0xD0
+ entityInstance: 27
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core2
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x65:
+ entityID: 0xD0
+ entityInstance: 28
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core3
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x68:
+ entityID: 0xD0
+ entityInstance: 29
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core4
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x6b:
+ entityID: 0xD0
+ entityInstance: 30
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core5
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x6e:
+ entityID: 0xD0
+ entityInstance: 31
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core6
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x71:
+ entityID: 0xD0
+ entityInstance: 32
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core7
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x74:
+ entityID: 0xD0
+ entityInstance: 33
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core8
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x77:
+ entityID: 0xD0
+ entityInstance: 34
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core9
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x7a:
+ entityID: 0xD0
+ entityInstance: 35
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core10
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x7d:
+ entityID: 0xD0
+ entityInstance: 36
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core11
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x80:
+ entityID: 0xD0
+ entityInstance: 37
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core12
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x83:
+ entityID: 0xD0
+ entityInstance: 38
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core13
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x86:
+ entityID: 0xD0
+ entityInstance: 39
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core14
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x89:
+ entityID: 0xD0
+ entityInstance: 40
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core15
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x8c:
+ entityID: 0xD0
+ entityInstance: 41
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core16
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x8f:
+ entityID: 0xD0
+ entityInstance: 42
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core17
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x92:
+ entityID: 0xD0
+ entityInstance: 43
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core18
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x95:
+ entityID: 0xD0
+ entityInstance: 44
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core19
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x98:
+ entityID: 0xD0
+ entityInstance: 45
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core20
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x9b:
+ entityID: 0xD0
+ entityInstance: 46
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core21
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0x9e:
+ entityID: 0xD0
+ entityInstance: 47
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core22
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0xa1:
+ entityID: 0xD0
+ entityInstance: 48
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1/core23
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameParentLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ skipOn: deassert
+0xa4:
+ entityID: 0x03
+ entityInstance: 2
+ sensorType: 0x07
+ path: /system/chassis/motherboard/cpu1
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x08:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x07:
+ assert: true
+ deassert: false
+ type: bool
+0xa6:
+ entityID: 0x20
+ entityInstance: 1
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm0
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xa8:
+ entityID: 0x20
+ entityInstance: 2
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm1
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xaa:
+ entityID: 0x20
+ entityInstance: 3
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm2
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xac:
+ entityID: 0x20
+ entityInstance: 4
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm3
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xae:
+ entityID: 0x20
+ entityInstance: 5
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm4
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xb0:
+ entityID: 0x20
+ entityInstance: 6
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm5
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xb2:
+ entityID: 0x20
+ entityInstance: 7
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm6
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xb4:
+ entityID: 0x20
+ entityInstance: 8
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm7
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xb6:
+ entityID: 0x20
+ entityInstance: 9
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm8
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xb8:
+ entityID: 0x20
+ entityInstance: 10
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm9
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xba:
+ entityID: 0x20
+ entityInstance: 11
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm10
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xbc:
+ entityID: 0x20
+ entityInstance: 12
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm11
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xbe:
+ entityID: 0x20
+ entityInstance: 13
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm12
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xc0:
+ entityID: 0x20
+ entityInstance: 14
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm13
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xc2:
+ entityID: 0x20
+ entityInstance: 15
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm14
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xc4:
+ entityID: 0x20
+ entityInstance: 16
+ sensorType: 0x0C
+ path: /system/chassis/motherboard/dimm15
+ sensorReadingType: 0x6F
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ mutability: Mutability::Write|Mutability::Read
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Prereqs:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+ Offsets:
+ 0x04:
+ assert: false
+ deassert: true
+ type: bool
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x06:
+ assert: true
+ deassert: false
+ type: bool
+0xd8:
+ entityID: 0x15
+ entityInstance: 1
+ sensorType: 0xC8
+ path: /xyz/openbmc_project/control/power_supply_attributes
+ sensorReadingType: 0x6F
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: assertion
+ mutability: Mutability::Read
+ sensorNamePattern: nameProperty
+ interfaces:
+ xyz.openbmc_project.Control.PowerSupplyAttributes:
+ DeratingFactor:
+ Offsets:
+ 0xFF:
+ type: uint32_t
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-ssif_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-ssif_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..a5459c88f49c32c23bb611b13032af51123dd51a
--- /dev/null
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-ssif_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Phosphor OpenBMC SSIF to DBUS"
+DESCRIPTION = "Phosphor OpenBMC SSIF to DBUS."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit meson pkgconfig
+inherit systemd
+
+SYSTEMD_SERVICE:${PN} = "ssifbridge.service"
+
+PROVIDES += "virtual/obmc-host-ipmi-hw"
+RPROVIDES:${PN} += "virtual-obmc-host-ipmi-hw"
+RRECOMMENDS:${PN} += "phosphor-ipmi-host"
+
+DEPENDS += "systemd"
+DEPENDS += "phosphor-logging"
+DEPENDS += "sdbusplus"
+DEPENDS += "cli11"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/ssifbridge.git;protocol=https;branch=master"
+SRCREV= "2c2b8280584d05d16a4d0c180be8c3a6ee37aec2"
+
diff --git a/recipes-phosphor/leds/phosphor-led-manager-config-example-native_git.bb b/recipes-phosphor/leds/phosphor-led-manager-config-example-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..343a6e089b5e764687888af765eb7bd179ca2c5d
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager-config-example-native_git.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Phosphor LED Group Management with example data"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit native
+require phosphor-led-manager.inc
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+
+S = "${WORKDIR}/git"
+
+# Copies example led layout yaml file
+do_install() {
+ SRC=${S}
+ DEST=${D}${datadir}/phosphor-led-manager
+ install -D ${SRC}/led.yaml ${DEST}/led.yaml
+}
diff --git a/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb b/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..c4724f2e7de5b7835b8e5fe52d6a7d09f59f1eca
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Phosphor LED Group Management with MRW generated data"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit mrw-xml
+inherit native
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# Generate a YAML files based on MRW input
+do_install:append() {
+ USE_MRW="${@bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'yes', 'no', d)}"
+ DEST=${D}${datadir}/phosphor-led-manager
+
+ if [ "${USE_MRW}" = "yes" ]; then
+ install -d ${DEST}/
+ ${STAGING_BINDIR_NATIVE}/perl-native/perl \
+ ${STAGING_BINDIR_NATIVE}/gen_led_groups.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -o ${DEST}/led.yaml
+ fi
+}
diff --git a/recipes-phosphor/leds/phosphor-led-manager-error-native_git.bb b/recipes-phosphor/leds/phosphor-led-manager-error-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..0e1baadefbd38f67b62b1fd9062fdd21285d4201
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager-error-native_git.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Copy error yaml files to known path for elog parsing"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-dbus-yaml
+inherit native
+
+require phosphor-led-manager.inc
+
+S = "${WORKDIR}/git"
+
+do_install:append() {
+ SRC=${S}/xyz/openbmc_project/Led/
+ DEST=${D}${yaml_dir}/xyz/openbmc_project/Led/
+ install -d ${DEST}/Fru
+ install ${SRC}/*.errors.yaml ${DEST}
+ install ${SRC}/*.metadata.yaml ${DEST}
+ install ${SRC}/Fru/*.errors.yaml ${DEST}/Fru
+ install ${SRC}/Fru/*.metadata.yaml ${DEST}/Fru
+}
diff --git a/recipes-phosphor/leds/phosphor-led-manager-yaml-provider_git.bb b/recipes-phosphor/leds/phosphor-led-manager-yaml-provider_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..8c009fce38920a0627dd24537b2a6d1914d4d3d4
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager-yaml-provider_git.bb
@@ -0,0 +1,10 @@
+SUMMARY = "phosphor-led-manager: install phosphor-logging yaml"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-logging-yaml-provider
+require phosphor-led-manager.inc
+
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/leds/phosphor-led-manager.inc b/recipes-phosphor/leds/phosphor-led-manager.inc
new file mode 100644
index 0000000000000000000000000000000000000000..8f179801ac6a8b2ad801175cd5eb6b8bcfcaccad
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-led-manager"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/phosphor-led-manager;branch=master;protocol=https"
+SRCREV = "6d08ccecd9d98bbe207f9307ad45578cd7d5b995"
diff --git a/recipes-phosphor/leds/phosphor-led-manager/bmc_booted.conf b/recipes-phosphor/leds/phosphor-led-manager/bmc_booted.conf
new file mode 100644
index 0000000000000000000000000000000000000000..d382d377dc68b0af74588fbf9f0bbc220848084f
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager/bmc_booted.conf
@@ -0,0 +1,3 @@
+[Unit]
+Wants=multi-user.target
+After=multi-user.target
diff --git a/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service b/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
new file mode 100644
index 0000000000000000000000000000000000000000..6b5c7b9485bd14959f54e8b49d19bd137df443fd
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=FRU Fault monitor service
+Wants=mapper-wait@-xyz-openbmc_project-led-groups.service
+After=mapper-wait@-xyz-openbmc_project-led-groups.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env phosphor-fru-fault-monitor
+SyslogIdentifier=phosphor-fru-fault-monitor
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service b/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
new file mode 100644
index 0000000000000000000000000000000000000000..e0e1fc93566b315c8fac8df3dcf62f62343eba7d
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Assert %i LED
+Wants=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+After=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+Conflicts=obmc-led-group-stop@%i.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/led/groups/%i` /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b true"
+SyslogIdentifier=obmc-led-group-start
diff --git a/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service b/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
new file mode 100644
index 0000000000000000000000000000000000000000..7b3966943a239e2d99fd32e96724154eb1738d51
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Assert %i LED
+Wants=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+After=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+Conflicts=obmc-led-group-start@%i.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/led/groups/%i` /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b false"
+SyslogIdentifier=obmc-led-group-stop
diff --git a/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service b/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service
new file mode 100644
index 0000000000000000000000000000000000000000..5e361a38c6fb0deb8704edfcaf76ae5e18a9f64d
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Phosphor LED Group Management Daemon
+Before=mapper-wait@-xyz-openbmc_project-led-groups.service
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env phosphor-ledmanager
+SyslogIdentifier=phosphor-ledmanager
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/leds/phosphor-led-manager_git.bb b/recipes-phosphor/leds/phosphor-led-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..c481aa5db179a0e0971155458d4e8b00ab55b034
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-manager_git.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Phosphor LED Group Management Daemon"
+DESCRIPTION = "Daemon to cater to triggering actions on LED groups"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+require ${PN}.inc
+
+inherit meson pkgconfig python3native
+inherit obmc-phosphor-dbus-service obmc-phosphor-systemd
+
+PACKAGECONFIG ??= "\
+ ${@oe.utils.conditional( \
+ 'PREFERRED_PROVIDER_virtual/${PN}-config-native', \
+ 'phosphor-led-manager-config-example-native', \
+ 'use-json', 'use-yaml', d)} \
+"
+
+PACKAGECONFIG[use-json] = "-Duse-json=enabled,,,,,use-yaml"
+PACKAGECONFIG[use-yaml] = "-Duse-json=disabled,,virtual/${PN}-config-native,,,use-json"
+PACKAGECONFIG[use-lamp-test] = "-Duse-lamp-test=enabled, -Duse-lamp-test=disabled"
+PACKAGECONFIG[monitor-operational-status] = "-Dmonitor-operational-status=enabled, \
+ -Dmonitor-operational-status=disabled"
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-faultmonitor"
+PACKAGE_BEFORE_PN += "${PN}-faultmonitor"
+
+DEPENDS += "${PYTHON_PN}-native"
+DEPENDS += "${PYTHON_PN}-pyyaml-native"
+DEPENDS += "${PYTHON_PN}-inflection-native"
+DEPENDS += "cli11"
+DEPENDS += "nlohmann-json"
+DEPENDS += "phosphor-logging"
+DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native"
+DEPENDS += "systemd"
+
+RDEPENDS:${PN} += "bash"
+
+S = "${WORKDIR}/git"
+
+FILES:${PN}-faultmonitor += "${bindir}/phosphor-fru-fault-monitor"
+
+DBUS_SERVICE:${PN} += "xyz.openbmc_project.LED.GroupManager.service"
+
+SYSTEMD_SERVICE:${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service"
+SYSTEMD_SERVICE:${PN}-faultmonitor += "obmc-fru-fault-monitor.service"
+
+SYSTEMD_LINK:${PN} += "../obmc-led-group-start@.service:multi-user.target.wants/obmc-led-group-start@bmc_booted.service"
+
+CHASSIS_TARGETS = "poweron poweroff"
+STATES = "start stop"
+TMPLFMT = "obmc-led-group-{1}@.service"
+TGTFMT = "obmc-chassis-{0}@0.target"
+INSTFMT = "obmc-led-group-{1}@power_on.service"
+FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'FMT', 'CHASSIS_TARGETS', 'STATES')}"
+
+# Install the override to set up a Conflicts relation
+SYSTEMD_OVERRIDE:${PN} += "bmc_booted.conf:obmc-led-group-start@bmc_booted.service.d/bmc_booted.conf"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
+
+do_compile:prepend() {
+ if [ -f "${LED_YAML_PATH}/led.yaml" ]; then
+ cp "${LED_YAML_PATH}/led.yaml" "${S}/led.yaml"
+ elif [ -f "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" ]; then
+ cp "${STAGING_DATADIR_NATIVE}/${PN}/led.yaml" "${S}/led.yaml"
+ elif [ -f "${WORKDIR}/led.yaml" ]; then
+ cp "${WORKDIR}/led.yaml" "${S}/led.yaml"
+ fi
+}
diff --git a/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules b/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules
new file mode 100644
index 0000000000000000000000000000000000000000..372d81293f4dd5cfc27bb77ae587364beddd2722
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="leds", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.led.controller@sys-class-leds-$name"
diff --git a/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service b/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
new file mode 100644
index 0000000000000000000000000000000000000000..c673cda66f9eb2753172ad9f0af8d8dae201350e
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Phosphor sysfs LED controller
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env phosphor-ledcontroller -p %f
+SyslogIdentifier=phosphor-ledcontroller
diff --git a/recipes-phosphor/leds/phosphor-led-sysfs_git.bb b/recipes-phosphor/leds/phosphor-led-sysfs_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..1ac594e257811b51e665a57b186233a10557fbc4
--- /dev/null
+++ b/recipes-phosphor/leds/phosphor-led-sysfs_git.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Phosphor Physical LED Controller daemon"
+DESCRIPTION = "Daemon to trigger actions on a physical LED"
+HOMEPAGE = "http://github.com/openbmc/phosphor-led-sysfs"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit meson pkgconfig
+inherit obmc-phosphor-dbus-service
+
+DEPENDS += "sdbusplus"
+DEPENDS += "systemd"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "boost"
+
+DBUS_SERVICE:${PN} += "xyz.openbmc_project.led.controller@.service"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
+
+SRC_URI += "git://github.com/openbmc/phosphor-led-sysfs;branch=master;protocol=https"
+SRC_URI += "file://70-leds.rules"
+SRCREV = "97db22fd8fc5abad784aa662407e05d1f11893ae"
+S = "${WORKDIR}/git"
+
+do_install:append() {
+ install -d ${D}/${nonarch_base_libdir}/udev/rules.d/
+ install -m 0644 ${WORKDIR}/70-leds.rules ${D}/${nonarch_base_libdir}/udev/rules.d/
+}
diff --git a/recipes-phosphor/libmctp/files/default b/recipes-phosphor/libmctp/files/default
new file mode 100644
index 0000000000000000000000000000000000000000..cb33e8b6147375ba913b2bf7074f7d8958ac568c
--- /dev/null
+++ b/recipes-phosphor/libmctp/files/default
@@ -0,0 +1 @@
+DEMUX_BINDING_OPTS=null
diff --git a/recipes-phosphor/libmctp/libmctp_git.bb b/recipes-phosphor/libmctp/libmctp_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e556d890ec74ec7e6183ce61202b9bb272296232
--- /dev/null
+++ b/recipes-phosphor/libmctp/libmctp_git.bb
@@ -0,0 +1,38 @@
+SUMMARY = "MCTP stack"
+DESCRIPTION = "MCTP library implementing the MCTP base specification"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit systemd
+inherit autotools pkgconfig
+
+HOMEPAGE = "https://github.com/openbmc/libmctp"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0d30807bb7a4f16d36e96b78f9ed8fae"
+SRC_URI = "git://github.com/openbmc/libmctp;branch=master;protocol=https \
+ file://default"
+SRCREV = "f39c38575828a53d59883ae999f03e6b48ee7c24"
+
+DEPENDS += "autoconf-archive-native \
+ systemd \
+ "
+
+SYSTEMD_SERVICE:${PN} = "mctp-demux.service \
+ mctp-demux.socket \
+ "
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} pcap"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, \
+ --without-systemdsystemunitdir,systemd"
+
+PACKAGECONFIG[astlpc-raw-kcs] = "--enable-astlpc-raw-kcs,--disable-astlpc-raw-kcs,udev,udev"
+PACKAGECONFIG[pcap] = "--enable-capture,--disable-capture,libpcap,"
+
+CONFFILES:${PN} = "${sysconfdir}/default/mctp"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/mctp
+}
+
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/logging/ffdc_git.bb b/recipes-phosphor/logging/ffdc_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..3b05b9e022e824679c25285d0ba7a24f88a1d5d7
--- /dev/null
+++ b/recipes-phosphor/logging/ffdc_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "FFDC collector script"
+DESCRIPTION = "Command line tool to collect and tar up debug data"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+require recipes-phosphor/dump/phosphor-debug-collector.inc
+
+DEPENDS += "systemd"
+
+RDEPENDS:${PN} += " \
+ ${VIRTUAL-RUNTIME_base-utils} \
+ "
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ffdc \
+ ${D}${bindir}/ffdc
+}
diff --git a/recipes-phosphor/logging/phosphor-hostlogger_git.bb b/recipes-phosphor/logging/phosphor-hostlogger_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e536cbb41c0b6933624abe7b7ac70b592af1c02a
--- /dev/null
+++ b/recipes-phosphor/logging/phosphor-hostlogger_git.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Phosphor Host logger"
+DESCRIPTION = "Save log messages from host's console to the persistent storage."
+HOMEPAGE = "https://github.com/openbmc/phosphor-hostlogger"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit pkgconfig meson
+inherit systemd
+
+# License info
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+# Dependencies
+DEPENDS += " \
+ phosphor-logging \
+ zlib \
+ "
+RDEPENDS:${PN} += "obmc-console"
+RRECOMMENDS:${PN} += "phosphor-debug-collector"
+
+# Source code repository
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/phosphor-hostlogger;branch=master;protocol=https"
+SRCREV = "1ecbb996d9c88871db20c455db02ee055bff10f2"
+
+# Disable unit tests
+EXTRA_OEMESON:append = " -Dtests=disabled"
+
+# Systemd service template
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "hostlogger@.service"
+
+# Default service instance to install (single-host mode)
+DEFAULT_INSTANCE = "ttyVUART0"
+DEFAULT_SERVICE = "hostlogger@${DEFAULT_INSTANCE}.service"
+
+# Multi-host mode setup - list of configuration files to install, can be added
+# via SRC_URI in a bbappend. The file name is the name of the service instance,
+# which should match the corresponding instance of the obmc-console service.
+CUSTOM_CONFIGS = "${@custom_configs('${WORKDIR}')}"
+CUSTOM_SERVICES = "${@custom_services('${CUSTOM_CONFIGS}')}"
+
+# Preset systemd units
+SYSTEMD_SERVICE:${PN} += "${@'${CUSTOM_SERVICES}' if len('${CUSTOM_SERVICES}') \
+ else '${DEFAULT_SERVICE}'}"
+
+# Gets list of custom config files in a directory
+def custom_configs(workdir):
+ if os.path.exists(workdir):
+ return ' '.join([f for f in os.listdir(workdir) if f.endswith('.conf')])
+
+# Get list of custom service instances
+def custom_services(configs):
+ return ' '.join(['hostlogger@' + i.replace('.conf', '.service') \
+ for i in configs.split()])
+
+do_install:append() {
+ # Install config files
+ if [ -n "${CUSTOM_CONFIGS}" ]; then
+ for CONFIG_FILE in ${CUSTOM_CONFIGS}; do
+ install -Dm 0644 ${WORKDIR}/${CONFIG_FILE} \
+ ${D}${sysconfdir}/hostlogger/${CONFIG_FILE}
+ done
+ else
+ install -Dm 0644 ${S}/default.conf \
+ ${D}${sysconfdir}/hostlogger/${DEFAULT_INSTANCE}.conf
+ fi
+}
diff --git a/recipes-phosphor/logging/phosphor-logging-callouts-example-native.bb b/recipes-phosphor/logging/phosphor-logging-callouts-example-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..88baca5b036c6b04659cf26d4a878c9af6d1d40a
--- /dev/null
+++ b/recipes-phosphor/logging/phosphor-logging-callouts-example-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Generated callout information for phosphor-logging"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-logging
+inherit native
+
+SRC_URI += "file://callouts.yaml"
+
+PROVIDES += "virtual/phosphor-logging-callouts"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${callouts_datadir}
+ install -d ${DEST}
+ install callouts.yaml ${DEST}
+}
diff --git a/recipes-phosphor/logging/phosphor-logging-callouts-example/callouts.yaml b/recipes-phosphor/logging/phosphor-logging-callouts-example/callouts.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..5b92a04c4f7aa4d0c6887b49e30f7ffd16b8a642
--- /dev/null
+++ b/recipes-phosphor/logging/phosphor-logging-callouts-example/callouts.yaml
@@ -0,0 +1 @@
+/sys/devices/device: /system/chassis/motherboard/device
diff --git a/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb b/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..6bb86915ebcd36ffa43937617c5f2791edff0308
--- /dev/null
+++ b/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Generated callout information for phosphor-logging"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-logging
+inherit mrw-xml
+inherit native
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ "
+
+PROVIDES += "virtual/phosphor-logging-callouts"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${callouts_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_callouts.pl \
+ -m ${mrw_datadir}/${MRW_XML} \
+ -o ${DEST}/callouts.yaml
+}
diff --git a/recipes-phosphor/logging/phosphor-logging_git.bb b/recipes-phosphor/logging/phosphor-logging_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ba20a9944bbf6bc3fa16d6468ed94593b5d620c6
--- /dev/null
+++ b/recipes-phosphor/logging/phosphor-logging_git.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Phosphor OpenBMC event and error logging"
+DESCRIPTION = "An error and event log daemon application, and \
+ supporting tools for OpenBMC."
+HOMEPAGE = "https://github.com/openbmc/phosphor-logging"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit pkgconfig meson
+inherit python3native
+inherit obmc-phosphor-dbus-service
+inherit phosphor-logging
+inherit phosphor-dbus-yaml
+
+DEPENDS += "systemd"
+DEPENDS += "${PYTHON_PN}-mako-native"
+DEPENDS += "${PYTHON_PN}-pyyaml-native"
+DEPENDS += "${PYTHON_PN}-native"
+DEPENDS += "${PYTHON_PN}-sdbus++-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "virtual/phosphor-logging-callouts"
+DEPENDS += "libcereal"
+DEPENDS += "sdeventplus"
+DEPENDS += "packagegroup-obmc-yaml-providers"
+
+PACKAGE_BEFORE_PN = "${PN}-test"
+FILES:${PN}-test = "${bindir}/*-test"
+
+# Package configuration
+LOGGING_PACKAGES = " \
+ ${PN}-base \
+ phosphor-rsyslog-config \
+"
+
+ALLOW_EMPTY:${PN} = "1"
+PACKAGE_BEFORE_PN += "${LOGGING_PACKAGES}"
+SYSTEMD_PACKAGES = "${LOGGING_PACKAGES}"
+DBUS_PACKAGES = "${LOGGING_PACKAGES}"
+USERADD_PACKAGES = "${PN}-base"
+GROUPADD_PARAM:${PN}-base = "-r phosphor-logging"
+
+FILES:${PN}-base += " \
+ ${datadir}/dbus-1 \
+ ${bindir}/phosphor-log-manager \
+ ${libdir}/libphosphor_logging.so.* \
+"
+DBUS_SERVICE:${PN}-base += "xyz.openbmc_project.Logging.service"
+
+DBUS_SERVICE:phosphor-rsyslog-config += "xyz.openbmc_project.Syslog.Config.service"
+FILES:phosphor-rsyslog-config += " \
+ ${bindir}/phosphor-rsyslog-conf \
+"
+
+SRC_URI += "git://github.com/openbmc/phosphor-logging;branch=master;protocol=https"
+SRCREV = "c0cc7ec707ac95dcd784a103f4e3face6395e3ea"
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[openpower-pels] = " \
+ -Dopenpower-pel-extension=enabled, \
+ -Dopenpower-pel-extension=disabled, \
+ nlohmann-json cli11 pldm python3, \
+ python3, \
+ "
+
+EXTRA_OEMESON = " \
+ -Dtests=disabled \
+ -Dyamldir=${STAGING_DIR_TARGET}${yaml_dir} \
+ -Dcallout_yaml=${STAGING_DIR_NATIVE}${callouts_datadir}/callouts.yaml \
+ "
diff --git a/recipes-phosphor/mboxd/files/99-aspeed-lpc-ctrl.rules b/recipes-phosphor/mboxd/files/99-aspeed-lpc-ctrl.rules
new file mode 100644
index 0000000000000000000000000000000000000000..9cf2fbad131abf96e736d21a49d09e7ef560c3d3
--- /dev/null
+++ b/recipes-phosphor/mboxd/files/99-aspeed-lpc-ctrl.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="misc", KERNEL=="aspeed-lpc-ctrl", TAG+="systemd"
diff --git a/recipes-phosphor/mboxd/mboxd/mboxd-reload@.service b/recipes-phosphor/mboxd/mboxd/mboxd-reload@.service
new file mode 100644
index 0000000000000000000000000000000000000000..8dcaafda8d5f9224bbbbb19de5df194e2dae3f73
--- /dev/null
+++ b/recipes-phosphor/mboxd/mboxd/mboxd-reload@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Reload mboxd during power on
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Wants=mapper-wait@-org-openbmc-mboxd.service
+After=mapper-wait@-org-openbmc-mboxd.service
+Conflicts=obmc-host-stop@%i.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/env mboxctl --reset
+SyslogIdentifier=mboxctl
+
+[Install]
+WantedBy=obmc-host-startmin@%i.target
diff --git a/recipes-phosphor/mboxd/mboxd/mboxd.service b/recipes-phosphor/mboxd/mboxd/mboxd.service
new file mode 100644
index 0000000000000000000000000000000000000000..c491b18125d33fe5906a669413cd3c62d0e86c66
--- /dev/null
+++ b/recipes-phosphor/mboxd/mboxd/mboxd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Phosphor MBOX Daemon
+BindsTo=dev-aspeed\x2dlpc\x2dctrl.device
+After=dev-aspeed\x2dlpc\x2dctrl.device
+Requires=xyz.openbmc_project.Control.Host.service
+After=xyz.openbmc_project.Control.Host.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env mboxd --flash {FLASH_SIZE} --window-size 1M
+SyslogIdentifier=mboxd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/mboxd/mboxd_git.bb b/recipes-phosphor/mboxd/mboxd_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..207026673329109c1cff634be42e952bd31824af
--- /dev/null
+++ b/recipes-phosphor/mboxd/mboxd_git.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Phosphor OpenBMC MBOX Daemon"
+DESCRIPTION = "Phosphor OpenBMC MBOX Daemon"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-systemd
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "systemd"
+DEPENDS += "phosphor-logging"
+
+S = "${WORKDIR}/git"
+
+SRC_URI += "git://github.com/openbmc/mboxbridge.git;branch=master;protocol=https"
+
+SRC_URI += "file://99-aspeed-lpc-ctrl.rules"
+
+SRCREV="5c9264daedf1aff690e1957c4578d8395b549cff"
+
+PROVIDES += "mboxctl"
+
+MBOXD_FLASH_SIZE ??= "32M"
+SYSTEMD_SUBSTITUTIONS += "FLASH_SIZE:${MBOXD_FLASH_SIZE}:${PN}.service"
+
+do_install:append() {
+ install -d ${D}/${nonarch_base_libdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/99-aspeed-lpc-ctrl.rules ${D}/${nonarch_base_libdir}/udev/rules.d
+}
+
+TMPL = "mboxd-reload@.service"
+TGTFMT = "obmc-host-startmin@{0}.target"
+INSTFMT = "mboxd-reload@{0}.service"
+FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
+
+SYSTEMD_SERVICE:${PN} += "mboxd.service"
+SYSTEMD_SERVICE:${PN} += "mboxd-reload@.service"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_INSTANCES')}"
+
+# Enable virtual-pnor by DISTRO_FEATURE openpower-virtual-pnor.
+PACKAGECONFIG:append:df-openpower-virtual-pnor = " virtual-pnor"
+PACKAGECONFIG[virtual-pnor] = "--enable-virtual-pnor,--disable-virtual-pnor"
diff --git a/recipes-phosphor/misc/phosphor-misc_git.bb b/recipes-phosphor/misc/phosphor-misc_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..835405eaf17e760ee41d255e25af2a447c3e1f93
--- /dev/null
+++ b/recipes-phosphor/misc/phosphor-misc_git.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Miscellaneous OpenBMC functions"
+HOMEPAGE = "https://github.com/openbmc/phosphor-misc"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/openbmc/phosphor-misc;branch=master;protocol=https"
+SRCREV = "669bb350cd2722f0d2bfd6cb4a22142e7e6c1488"
+
+S = "${WORKDIR}/git"
+
+inherit meson
+inherit pkgconfig
+inherit systemd
+
+DEPENDS = "systemd"
+
+PHOSPHOR_MISC_PACKAGES = " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'first-boot-set-hostname', '${PN}-first-boot-set-hostname', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'first-boot-set-mac', '${PN}-first-boot-set-mac', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'http-redirect-awk', '${PN}-http-redirect-awk', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'usb-ctrl', '${PN}-usb-ctrl', '', d)} \
+ "
+
+PACKAGES:remove = "${PN}"
+RDEPENDS:${PN}-dev = ""
+
+PACKAGE_BEFORE_PN += "${PHOSPHOR_MISC_PACKAGES}"
+SYSTEMD_PACKAGES = "${PHOSPHOR_MISC_PACKAGES}"
+
+PACKAGECONFIG ??= " \
+ first-boot-set-hostname \
+ first-boot-set-mac \
+ http-redirect-awk \
+ usb-ctrl \
+ "
+
+PACKAGECONFIG[first-boot-set-hostname] = "-Dfirst-boot-set-hostname=enabled, -Dfirst-boot-set-hostname=disabled"
+PACKAGECONFIG[first-boot-set-mac] = "-Dfirst-boot-set-mac=enabled, -Dfirst-boot-set-mac=disabled"
+PACKAGECONFIG[http-redirect-awk] = "-Dhttp-redirect=enabled, -Dhttp-redirect=disabled"
+PACKAGECONFIG[usb-ctrl] = "-Dusb-ctrl=enabled, -Dusb-ctrl=disabled"
+
+# first-boot-set-hostname
+FILES:${PN}-first-boot-set-hostname = "${bindir}/first-boot-set-hostname.sh"
+SYSTEMD_SERVICE:${PN}-first-boot-set-hostname = "first-boot-set-hostname.service"
+
+# first-boot-set-mac
+FILES:${PN}-first-boot-set-mac = "${bindir}/first-boot-set-mac.sh"
+SYSTEMD_SERVICE:${PN}-first-boot-set-mac = "first-boot-set-mac@.service"
+
+# http-redirect-awk
+FILES:${PN}-http-redirect-awk = "${bindir}/http-redirect.awk"
+SYSTEMD_SERVICE:${PN}-http-redirect-awk = " \
+ http-redirect@.service \
+ http-redirect.socket \
+ "
+RDEPENDS:${PN}-http-redirect-awk = "${VIRTUAL-RUNTIME_base-utils}"
+
+# usb-ctrl
+FILES:${PN}-usb-ctrl = "${bindir}/usb-ctrl"
diff --git a/recipes-phosphor/mrw/mrw-api-native.bb b/recipes-phosphor/mrw/mrw-api-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ef73bfa77d37a8870faa43f91052e56cb93a2f88
--- /dev/null
+++ b/recipes-phosphor/mrw/mrw-api-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor OpenBMC machine readable workbook API modules"
+DESCRIPTION = "The API for the MRW XML generated by the Serverwiz tool"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+S = "${WORKDIR}/git"
+
+inherit native
+inherit perlnative
+inherit cpan-base
+inherit mrw-rev
+
+DEPENDS += "libxml-simple-perl-native json-perl-native"
+
+SRC_URI += "${MRW_API_SRC_URI}"
+SRCREV = "${MRW_API_SRCREV}"
+
+do_install() {
+ install -d ${D}${PERLLIBDIRS:class-native}/site_perl/${PERLVERSION}/mrw
+ install -m 0755 scripts/Targets.pm ${D}${PERLLIBDIRS:class-native}/site_perl/${PERLVERSION}/mrw/Targets.pm
+}
diff --git a/recipes-phosphor/mrw/mrw-native_git.bb b/recipes-phosphor/mrw/mrw-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d9776021e3f6555e8e13984194a1691ec48abf4b
--- /dev/null
+++ b/recipes-phosphor/mrw/mrw-native_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Phosphor OpenBMC machine readable workbook"
+DESCRIPTION = "Pulls down system specific data"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit obmc-xmlpatch
+inherit mrw-xml
+inherit native
+
+PHOSPHOR_MRW_LICENSE ?= "Apache-2.0"
+PHOSPHOR_MRW_LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+PHOSPHOR_MRW_URI ?= "http://missing-mrw-uri"
+
+LICENSE = "${PHOSPHOR_MRW_LICENSE}"
+LIC_FILES_CHKSUM = "${PHOSPHOR_MRW_LIC_FILES_CHKSUM}"
+SRC_URI += "${PHOSPHOR_MRW_URI}"
+SRCREV = "${PHOSPHOR_MRW_REV}"
+
+do_install() {
+ install -d ${D}/${mrw_datadir}
+ install -m 0644 ${MRW_XML} ${D}/${mrw_datadir}
+}
+
diff --git a/recipes-phosphor/mrw/mrw-patch-native_git.bb b/recipes-phosphor/mrw/mrw-patch-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..c507894c85b8fe1ff9f798c98f3bd4ae262ae48e
--- /dev/null
+++ b/recipes-phosphor/mrw/mrw-patch-native_git.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Phosphor machine readable workbook patching script"
+DESCRIPTION = "Retrieve the script that can patch the MRW XML"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+S = "${WORKDIR}/git"
+
+inherit mrw-rev
+inherit native
+
+DEPENDS += "python3-native python3-lxml-native"
+
+SRC_URI += "${MRW_TOOLS_SRC_URI}"
+SRCREV = "${MRW_TOOLS_SRCREV}"
+
+do_install() {
+ install -d ${D}${bindir}/obmc-mrw
+ install -m 0755 patchxml.py ${D}${bindir}/obmc-mrw
+}
diff --git a/recipes-phosphor/mrw/mrw-perl-tools-native_git.bb b/recipes-phosphor/mrw/mrw-perl-tools-native_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..95ce05ca3aa056083dc85a9a09a4cedffdfebf69
--- /dev/null
+++ b/recipes-phosphor/mrw/mrw-perl-tools-native_git.bb
@@ -0,0 +1,16 @@
+SUMMARY = "OpenBMC MRW Perl Tools"
+DESCRIPTION = "OpenBMC Perl tools for the machine readable workbook"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+S = "${WORKDIR}/git"
+
+inherit cpan_build
+inherit mrw-rev
+inherit native
+
+DEPENDS += "libmodule-build-perl-native mrw-api-native yaml-tiny-native"
+
+SRC_URI += "${MRW_TOOLS_SRC_URI}"
+SRCREV = "${MRW_TOOLS_SRCREV}"
diff --git a/recipes-phosphor/network/phosphor-network_git.bb b/recipes-phosphor/network/phosphor-network_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..607df2a7535d4cbb98aaa1233f07c76b79dc2fa0
--- /dev/null
+++ b/recipes-phosphor/network/phosphor-network_git.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Network DBUS object"
+DESCRIPTION = "Network DBUS object"
+HOMEPAGE = "http://github.com/openbmc/phosphor-networkd"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit meson pkgconfig
+inherit python3native
+inherit systemd
+
+SRC_URI += "git://github.com/openbmc/phosphor-networkd;branch=master;protocol=https"
+SRCREV = "dd1e592f692ed4dbd073ddc23566f837546bdce6"
+
+DEPENDS += "systemd"
+DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "phosphor-logging"
+DEPENDS += "libnl"
+DEPENDS += "stdplus"
+
+PACKAGECONFIG ??= "uboot-env default-link-local-autoconf default-ipv6-accept-ra"
+
+UBOOT_ENV_RDEPENDS = "${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or 'u-boot-fw-utils'}"
+PACKAGECONFIG[uboot-env] = "-Duboot-env=true,-Duboot-env=false,,${UBOOT_ENV_RDEPENDS}"
+PACKAGECONFIG[default-link-local-autoconf] = "-Ddefault-link-local-autoconf=true,-Ddefault-link-local-autoconf=false,,"
+PACKAGECONFIG[default-ipv6-accept-ra] = "-Ddefault-ipv6-accept-ra=true,-Ddefault-ipv6-accept-ra=false,,"
+PACKAGECONFIG[nic-ethtool] = "-Dnic-ethtool=true,-Dnic-ethtool=false,,"
+PACKAGECONFIG[sync-mac] = "-Dsync-mac=true,-Dsync-mac=false,nlohmann-json,"
+PACKAGECONFIG[hyp-nw-config] = "-Dhyp-nw-config=true, -Dhyp-nw-config=false,,"
+
+S = "${WORKDIR}/git"
+
+FILES:${PN} += "${datadir}/dbus-1/system.d"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.Network.service"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'hyp-nw-config', 'xyz.openbmc_project.Network.Hypervisor.service', '', d)}"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
diff --git a/recipes-phosphor/network/phosphor-snmp/xyz.openbmc_project.Network.SNMP.service b/recipes-phosphor/network/phosphor-snmp/xyz.openbmc_project.Network.SNMP.service
new file mode 100644
index 0000000000000000000000000000000000000000..6b7ffcd1da08b4f4616e95978253e6ad07073648
--- /dev/null
+++ b/recipes-phosphor/network/phosphor-snmp/xyz.openbmc_project.Network.SNMP.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor SNMP conf Manager
+After=obmc-mapper.target
+
+[Service]
+ExecStart=/usr/bin/env phosphor-network-snmpconf
+SyslogIdentifier=phosphor-network-snmpconf
+Restart=always
+Type=dbus
+BusName=xyz.openbmc_project.Network.SNMP
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/network/phosphor-snmp_git.bb b/recipes-phosphor/network/phosphor-snmp_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..9b8c826a38d81f16ccd9bb650c2b6886a92b6d69
--- /dev/null
+++ b/recipes-phosphor/network/phosphor-snmp_git.bb
@@ -0,0 +1,26 @@
+SUMMARY = "SNMP Manager Configuration"
+DESCRIPTION = "SNMP Manager Configuration."
+HOMEPAGE = "http://github.com/openbmc/phosphor-snmp"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+
+inherit autotools pkgconfig
+inherit python3native
+inherit obmc-phosphor-dbus-service
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+SRC_URI += "git://github.com/openbmc/phosphor-snmp;branch=master;protocol=https"
+SRCREV = "0357dffb8da86240c7fb1a45a391dbf39dcc3938"
+
+DBUS_SERVICE:${PN} += "xyz.openbmc_project.Network.SNMP.service"
+
+DEPENDS += "systemd"
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "phosphor-logging"
+DEPENDS += "net-snmp"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb b/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
new file mode 100644
index 0000000000000000000000000000000000000000..648cab34e7979fddc8f7c0a29c1cf62c335e214c
--- /dev/null
+++ b/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
@@ -0,0 +1,199 @@
+SUMMARY = "OpenBMC - Applications"
+PR = "r1"
+
+inherit packagegroup
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = " \
+ ${PN}-bmc-state-mgmt \
+ ${PN}-bmcweb \
+ ${PN}-chassis-state-mgmt \
+ ${PN}-console \
+ ${PN}-dbus-monitor \
+ ${PN}-extras \
+ ${PN}-devtools \
+ ${PN}-fan-control \
+ ${PN}-fru-ipmi \
+ ${PN}-health-monitor \
+ ${PN}-host-state-mgmt \
+ ${PN}-ikvm \
+ ${PN}-inventory \
+ ${PN}-leds \
+ ${PN}-logging \
+ ${PN}-remote-logging \
+ ${PN}-rng \
+ ${PN}-sensors \
+ ${PN}-software \
+ ${PN}-host-check-mgmt \
+ ${PN}-debug-collector \
+ ${PN}-settings \
+ ${PN}-network \
+ ${PN}-telemetry \
+ ${PN}-user-mgmt \
+ ${PN}-user-mgmt-ldap \
+ "
+
+SUMMARY:${PN}-bmc-state-mgmt = "BMC state management"
+RDEPENDS:${PN}-bmc-state-mgmt = " \
+ ${VIRTUAL-RUNTIME_obmc-bmc-state-manager} \
+ phosphor-state-manager-systemd-target-monitor \
+ obmc-targets \
+ "
+
+SUMMARY:${PN}-bmcweb = "bmcweb support"
+RDEPENDS:${PN}-bmcweb = " \
+ bmcweb \
+ phosphor-certificate-manager \
+ "
+
+SUMMARY:${PN}-chassis-state-mgmt = "Chassis state management"
+RDEPENDS:${PN}-chassis-state-mgmt = " \
+ ${VIRTUAL-RUNTIME_obmc-chassis-state-manager} \
+ obmc-phosphor-power \
+ "
+
+SUMMARY:${PN}-console = "Serial over LAN support"
+RDEPENDS:${PN}-console = " \
+ obmc-console \
+ "
+
+# Deprecated - add new packages to an existing packagegroup or create a new one.
+SUMMARY:${PN}-extras = "Extra features"
+RDEPENDS:${PN}-extras = ""
+
+SUMMARY:${PN}-devtools = "Development tools"
+RDEPENDS:${PN}-devtools = " \
+ bash \
+ ffdc \
+ i2c-tools \
+ libgpiod-tools \
+ lrzsz \
+ rsync \
+ trace-enable \
+ "
+
+SUMMARY:${PN}-dbus-monitor = "Support for dbus monitoring"
+RDEPENDS:${PN}-dbus-monitor = " \
+ phosphor-dbus-monitor \
+ "
+
+# Use the fan control package group for applications
+# implementing fan control or system fan policy only.
+# Applications that create inventory or sensors should
+# be added those respective package groups instead.
+SUMMARY:${PN}-fan-control = "Fan control"
+RDEPENDS:${PN}-fan-control = " \
+ ${VIRTUAL-RUNTIME_obmc-fan-control} \
+ phosphor-fan-monitor \
+ "
+
+SUMMARY:${PN}-fru-ipmi = "Support for EEPROMS with IPMI FRU"
+RDEPENDS:${PN}-fru-ipmi = " \
+ fru-device \
+ "
+
+SUMMARY:${PN}-health-monitor = "Support for health monitoring"
+RDEPENDS:${PN}-health-monitor = " \
+ phosphor-health-monitor \
+ "
+
+SUMMARY:${PN}-host-state-mgmt = "Host state management"
+RDEPENDS:${PN}-host-state-mgmt = " \
+ ${VIRTUAL-RUNTIME_obmc-host-state-manager} \
+ ${VIRTUAL-RUNTIME_obmc-discover-system-state} \
+ "
+
+SUMMARY:${PN}-ikvm = "KVM over IP support"
+RDEPENDS:${PN}-ikvm = " \
+ obmc-ikvm \
+ "
+
+SUMMARY:${PN}-inventory = "Inventory applications"
+RDEPENDS:${PN}-inventory = " \
+ ${VIRTUAL-RUNTIME_obmc-inventory-manager} \
+ ${VIRTUAL-RUNTIME_obmc-fan-presence} \
+ "
+
+SUMMARY:${PN}-leds = "LED applications"
+RDEPENDS:${PN}-leds = " \
+ ${VIRTUAL-RUNTIME_obmc-leds-manager} \
+ ${VIRTUAL-RUNTIME_obmc-leds-sysfs} \
+ ${VIRTUAL-RUNTIME_obmc-led-monitor} \
+ "
+
+SUMMARY:${PN}-logging = "Logging applications"
+RDEPENDS:${PN}-logging = " \
+ phosphor-logging \
+ "
+
+SUMMARY:${PN}-remote-logging = "Remote logging applications"
+RDEPENDS:${PN}-remote-logging = " \
+ rsyslog \
+ phosphor-rsyslog-config \
+ "
+
+SUMMARY:${PN}-rng = "Random Number Generator support"
+RDEPENDS:${PN}-rng = " \
+ rng-tools \
+ "
+
+SUMMARY:${PN}-sensors = "Sensor applications"
+RDEPENDS:${PN}-sensors = " \
+ ${VIRTUAL-RUNTIME_obmc-sensors-hwmon} \
+ "
+
+${PN}-software-extras = ""
+
+${PN}-software-extras:df-obmc-ubi-fs = " \
+ phosphor-software-manager-updater-ubi \
+ "
+
+${PN}-software-extras:df-phosphor-mmc = " \
+ phosphor-software-manager-updater-mmc \
+ "
+
+SUMMARY:${PN}-software = "Software applications"
+RDEPENDS:${PN}-software = " \
+ ${VIRTUAL-RUNTIME_obmc-bmc-download-mgr} \
+ ${VIRTUAL-RUNTIME_obmc-bmc-updater} \
+ ${VIRTUAL-RUNTIME_obmc-bmc-version} \
+ ${${PN}-software-extras} \
+ "
+
+SUMMARY:${PN}-debug-collector = "BMC debug collector"
+RDEPENDS:${PN}-debug-collector = " \
+ ${VIRTUAL-RUNTIME_obmc-dump-manager} \
+ ${VIRTUAL-RUNTIME_obmc-dump-monitor} \
+ phosphor-debug-collector-dreport \
+ phosphor-debug-collector-scripts \
+ "
+
+SUMMARY:${PN}-settings = "Settings applications"
+RDEPENDS:${PN}-settings = " \
+ phosphor-settings-manager \
+ "
+
+SUMMARY:${PN}-network = "BMC Network Manager"
+RDEPENDS:${PN}-network = " \
+ ${VIRTUAL-RUNTIME_obmc-network-manager} \
+ "
+
+SUMMARY:${PN}-telemetry = "Telemetry solution"
+RDEPENDS:${PN}-telemetry = " \
+ telemetry \
+ "
+
+SUMMARY:${PN}-user-mgmt = "User management applications"
+RDEPENDS:${PN}-user-mgmt = " \
+ ${VIRTUAL-RUNTIME_obmc-user-mgmt} \
+ "
+RRECOMMENDS:${PN}-user-mgmt = " \
+ pam-plugin-access \
+ "
+
+SUMMARY:${PN}-user-mgmt-ldap = "LDAP users and groups support"
+RDEPENDS:${PN}-user-mgmt-ldap = " \
+ ${PN}-user-mgmt \
+ nss-pam-ldapd \
+ phosphor-ldap \
+ "
diff --git a/recipes-phosphor/packagegroups/packagegroup-obmc-ipmid-providers.bb b/recipes-phosphor/packagegroups/packagegroup-obmc-ipmid-providers.bb
new file mode 100644
index 0000000000000000000000000000000000000000..f7f4fda1685d96f50b0bd7c8c40940e0eba2de0d
--- /dev/null
+++ b/recipes-phosphor/packagegroups/packagegroup-obmc-ipmid-providers.bb
@@ -0,0 +1,14 @@
+SUMMARY = "OpenBMC - IPMI providers"
+PR = "r1"
+
+inherit packagegroup
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = "${PN}-libs"
+
+SUMMARY:${PN}-libs = "Extra providers for ipmid."
+RDEPENDS:${PN}-libs = "${VIRTUAL-RUNTIME_phosphor-ipmi-providers}"
+
+# Warning. Add additional providers with whitelists to distro or machine
+# configuration and not in recipe context (bbappend) otherwise ipmid will not
+# know about your whitelist.
diff --git a/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-debugtools.bb b/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-debugtools.bb
new file mode 100644
index 0000000000000000000000000000000000000000..546404fa57506609b5508323976571f2f9e9681e
--- /dev/null
+++ b/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-debugtools.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor OpenBMC - Debug Tools"
+PR = "r1"
+
+inherit packagegroup
+
+RDEPENDS:${PN} = " \
+ strace \
+ ldd \
+ ethtool \
+ net-tools \
+ phosphor-logging-test \
+ lmsensors-sensors \
+ tcpdump \
+ screen \
+ valgrind \
+ iperf3 \
+ "
+
+# Some older arm architectures don't support valgrind, so explicitly remove
+# it as a dependency from them, but keep it by default in anything newer.
+RDEPENDS:${PN}:remove:armv5 = "valgrind"
+RDEPENDS:${PN}:remove:armv6 = "valgrind"
diff --git a/recipes-phosphor/packagegroups/packagegroup-obmc-yaml-providers.bb b/recipes-phosphor/packagegroups/packagegroup-obmc-yaml-providers.bb
new file mode 100644
index 0000000000000000000000000000000000000000..919c6b1abf343f6a465de44294fd81c999aafc7d
--- /dev/null
+++ b/recipes-phosphor/packagegroups/packagegroup-obmc-yaml-providers.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Phosphor OpenBMC - YAML Providers"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+# This is a packagegroup in name and principle but we do not want to inherit
+# from packagegroup.bbclass. The point of this packagegroup is to get the
+# sysroot populated with YAML files from the DEPENDS packages and if we inherit
+# the packagegroup bbclass this doesn't happen, because that bbclass `deltask`
+# a number that are required.
+# inherit packagegroup
+
+OBMC_YAML_PROVIDER_RECIPES += " \
+ phosphor-led-manager-yaml-provider \
+ phosphor-software-manager-yaml-provider \
+ "
+
+DEPENDS = "${OBMC_YAML_PROVIDER_RECIPES}"
+RDEPENDS:${PN} = "${OBMC_YAML_PROVIDER_RECIPES}"
diff --git a/recipes-phosphor/pldm/pldm.inc b/recipes-phosphor/pldm/pldm.inc
new file mode 100644
index 0000000000000000000000000000000000000000..a8eb93ebb1199bee02b3c7d76094c43c28f24602
--- /dev/null
+++ b/recipes-phosphor/pldm/pldm.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/pldm"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+SRC_URI = "git://github.com/openbmc/pldm;branch=master;protocol=https"
+SRCREV = "d2ab1c226109195cc606ae32d94fa40b6244e741"
diff --git a/recipes-phosphor/pldm/pldm_git.bb b/recipes-phosphor/pldm/pldm_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..4c9cbc983a2d5a6ccfbdf622ba57d19960f8af43
--- /dev/null
+++ b/recipes-phosphor/pldm/pldm_git.bb
@@ -0,0 +1,49 @@
+SUMMARY = "PLDM Stack"
+DESCRIPTION = "Implementation of the PLDM specifications"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit meson pkgconfig
+inherit systemd
+
+require pldm.inc
+
+DEPENDS += "function2"
+DEPENDS += "systemd"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "nlohmann-json"
+DEPENDS += "cli11"
+
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE:${PN} += "pldmd.service"
+SYSTEMD_SERVICE:${PN} += "pldmSoftPowerOff.service"
+
+EXTRA_OEMESON = " \
+ -Dtests=disabled \
+ -Doem-ibm=disabled \
+ "
+
+# Install pldmSoftPowerOff.service in correct targets
+pkg_postinst:${PN} () {
+
+ mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants
+ LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants/pldmSoftPowerOff.service"
+ TARGET="../pldmSoftPowerOff.service"
+ ln -s $TARGET $LINK
+
+ mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants
+ LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants/pldmSoftPowerOff.service"
+ TARGET="../pldmSoftPowerOff.service"
+ ln -s $TARGET $LINK
+}
+
+pkg_prerm:${PN} () {
+
+ LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants/pldmSoftPowerOff.service"
+ rm $LINK
+
+ LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants/pldmSoftPowerOff.service"
+ rm $LINK
+}
diff --git a/recipes-phosphor/power/phosphor-power-systemd-links-monitor.bb b/recipes-phosphor/power/phosphor-power-systemd-links-monitor.bb
new file mode 100644
index 0000000000000000000000000000000000000000..01ddecbe0bc488c8081d1f578ecfff6e5b59f622
--- /dev/null
+++ b/recipes-phosphor/power/phosphor-power-systemd-links-monitor.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Phosphor Power Monitor services installation"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+
+RDEPENDS:${PN}-monitor += "phosphor-power-monitor"
+
+ALLOW_EMPTY:${PN} = "1"
+
+
+pkg_postinst:${PN}() {
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+
+ [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1
+
+ for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service"
+ TARGET="../power-supply-monitor@.service"
+ ln -s $TARGET $LINK
+ done
+}
+
+pkg_prerm:${PN}() {
+ [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1
+
+ for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service"
+ rm $LINK
+ done
+}
diff --git a/recipes-phosphor/power/phosphor-power-systemd-links-sequencer.bb b/recipes-phosphor/power/phosphor-power-systemd-links-sequencer.bb
new file mode 100644
index 0000000000000000000000000000000000000000..84ca499debc8be6944b862fdeb3a81634883dba5
--- /dev/null
+++ b/recipes-phosphor/power/phosphor-power-systemd-links-sequencer.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Phosphor Power Sequencer services installation"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+
+RDEPENDS:${PN} += "phosphor-power-sequencer"
+
+ALLOW_EMPTY:${PN} = "1"
+
+pkg_postinst:${PN}() {
+ mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
+ TARGET="../pseq-monitor.service"
+ ln -s $TARGET $LINK
+
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
+ TARGET="../pseq-monitor-pgood.service"
+ ln -s $TARGET $LINK
+}
+
+pkg_prerm:${PN}() {
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
+ rm $LINK
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
+ rm $LINK
+}
diff --git a/recipes-phosphor/power/phosphor-power-systemd-links.bb b/recipes-phosphor/power/phosphor-power-systemd-links.bb
new file mode 100644
index 0000000000000000000000000000000000000000..4a5cdad3054b16bf6ecbff06ce905d13f168c7df
--- /dev/null
+++ b/recipes-phosphor/power/phosphor-power-systemd-links.bb
@@ -0,0 +1,15 @@
+# TODO: This is splitted into two recipes;
+# To avoid build error, this is kept for now.
+# Remove me when the refactor of phosphor-power recipe is finished
+
+SUMMARY = "Phosphor Power services installation"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+
+RDEPENDS:${PN} += "phosphor-power"
+
+ALLOW_EMPTY:${PN} = "1"
diff --git a/recipes-phosphor/power/phosphor-power.inc b/recipes-phosphor/power/phosphor-power.inc
new file mode 100644
index 0000000000000000000000000000000000000000..1168c5bcb086233887880fb57c2190b9b33eeeaf
--- /dev/null
+++ b/recipes-phosphor/power/phosphor-power.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/phosphor-power"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/phosphor-power;branch=master;protocol=https"
+SRCREV = "c3324424b278e761497ea0e639ecc7bae5e1bcb6"
diff --git a/recipes-phosphor/power/phosphor-power_git.bb b/recipes-phosphor/power/phosphor-power_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..a9bc1678338c945a12e5f2c9b41c27c553894157
--- /dev/null
+++ b/recipes-phosphor/power/phosphor-power_git.bb
@@ -0,0 +1,76 @@
+SUMMARY = "Phosphor Power services and utilities"
+DESCRIPTION = "Configure and monitor power supplies, power sequencers, and \
+voltage regulators, and analyzes power devices for faults"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit meson
+inherit pkgconfig
+inherit systemd
+inherit python3native
+
+require ${BPN}.inc
+
+S = "${WORKDIR}/git"
+
+POWER_SERVICE_PACKAGES = " \
+ ${PN}-cold-redundancy \
+ ${PN}-monitor \
+ ${PN}-psu-monitor \
+ ${PN}-regulators \
+ ${PN}-sequencer \
+ ${PN}-control \
+"
+POWER_UTIL_PACKAGES = "${PN}-utils"
+
+PACKAGE_BEFORE_PN = "${POWER_SERVICE_PACKAGES} ${POWER_UTIL_PACKAGES}"
+ALLOW_EMPTY:${PN} = "1"
+
+SYSTEMD_PACKAGES = "${POWER_SERVICE_PACKAGES}"
+
+DEPENDS += " \
+ phosphor-logging \
+ ${PYTHON_PN}-sdbus++-native \
+ sdeventplus \
+ nlohmann-json \
+ cli11 \
+ i2c-tools \
+ ${PYTHON_PN}-native \
+ ${PYTHON_PN}-pyyaml-native \
+ ${PYTHON_PN}-setuptools-native \
+ ${PYTHON_PN}-mako-native \
+ boost \
+ libgpiod \
+ "
+
+# The monitor package uses an org.open_power D-Bus interface and so
+# should only build when told to.
+PACKAGECONFIG[monitor] = "-Dsupply-monitor=true, -Dsupply-monitor=false"
+
+SEQ_MONITOR_SVC = "pseq-monitor.service"
+SEQ_PGOOD_SVC = "pseq-monitor-pgood.service"
+PSU_MONITOR_TMPL = "power-supply-monitor@.service"
+PSU_MONITOR_SVC = "phosphor-psu-monitor.service"
+REGS_SVC = "phosphor-regulators.service"
+REGS_CONF_SVC = "phosphor-regulators-config.service"
+REGS_MON_ENA_SVC = "phosphor-regulators-monitor-enable.service"
+REGS_MON_DIS_SVC = "phosphor-regulators-monitor-disable.service"
+POWER_CONTROL_SVC = "phosphor-power-control.service"
+
+SYSTEMD_SERVICE:${PN}-sequencer = "${SEQ_MONITOR_SVC} ${SEQ_PGOOD_SVC}"
+SYSTEMD_SERVICE:${PN}-monitor = "${@bb.utils.contains('PACKAGECONFIG', 'monitor', '${PSU_MONITOR_TMPL}', '', d)}"
+SYSTEMD_SERVICE:${PN}-psu-monitor = "${PSU_MONITOR_SVC}"
+SYSTEMD_SERVICE:${PN}-regulators = "${REGS_SVC} ${REGS_CONF_SVC} ${REGS_MON_ENA_SVC} ${REGS_MON_DIS_SVC}"
+SYSTEMD_SERVICE:${PN}-control = "${POWER_CONTROL_SVC}"
+
+
+# TODO: cold-redundancy is not installed in the repo yet
+# FILES:${PN}-cold-redundancy = "${bindir}/cold-redundancy"
+
+FILES:${PN}-monitor = "${bindir}/psu-monitor"
+FILES:${PN}-psu-monitor = "${bindir}/phosphor-psu-monitor ${datadir}/phosphor-psu-monitor"
+FILES:${PN}-regulators = "${bindir}/phosphor-regulators ${datadir}/phosphor-regulators"
+FILES:${PN}-regulators += "${bindir}/regsctl"
+FILES:${PN}-sequencer = "${bindir}/pseq-monitor"
+FILES:${PN}-control = "${bindir}/phosphor-power-control ${datadir}/phosphor-power-sequencer"
+FILES:${PN}-utils = "${bindir}/psutils"
diff --git a/recipes-phosphor/power/phosphor-psu-software-manager_git.bb b/recipes-phosphor/power/phosphor-psu-software-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..adfdd58eeef984aec476f40facd2876f0e45c110
--- /dev/null
+++ b/recipes-phosphor/power/phosphor-psu-software-manager_git.bb
@@ -0,0 +1,52 @@
+HOMEPAGE = "https://github.com/openbmc/phosphor-psu-code-mgmt"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+SRC_URI += "git://github.com/openbmc/phosphor-psu-code-mgmt;branch=master;protocol=https"
+SRCREV = "434ae48312f46c4b1a37bce84d91bb014bf19839"
+SUMMARY = "Phosphor PSU software manager"
+DESCRIPTION = "Providing PSU firmware version and upgrade"
+
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit meson
+inherit pkgconfig
+inherit obmc-phosphor-systemd
+
+S = "${WORKDIR}/git"
+
+DEPENDS = " \
+ phosphor-logging \
+ phosphor-dbus-interfaces \
+ sdbusplus \
+ openssl \
+ "
+
+# The default config of this repo depends on utils from phosphor-power.
+# If your system does not depend on phosphor-power, please use
+# RDEPENDS:${PN}:remove to remove the dependency.
+RDEPENDS:${PN} += "phosphor-power"
+
+# The below configs are expected to be overriden by machine layer
+
+## The psutils here comes from phosphor-power repo where
+## * PSU_VERSION_UTIL accepts a PSU inventory path and returns the PSU
+## firmware version string
+## * PSU_VERSION_COMPARE_UTIL accepts several PSU inventory paths and return
+## the newest version string
+PSU_VERSION_UTIL ?= "-DPSU_VERSION_UTIL='/usr/bin/psutils --raw --get-version'"
+PSU_VERSION_COMPARE_UTIL ?= "-DPSU_VERSION_COMPARE_UTIL='/usr/bin/psutils --raw --compare'"
+
+## The psu-update@.service from repo is an example service that only prints a log and fails
+## Override it in a machine layer to invoke the psu update util
+PSU_UPDATE_SERVICE ?= "-DPSU_UPDATE_SERVICE=psu-update@.service"
+
+EXTRA_OEMESON = " \
+ -Dtests=disabled \
+ ${PSU_VERSION_UTIL} \
+ ${PSU_VERSION_COMPARE_UTIL} \
+ ${PSU_UPDATE_SERVICE} \
+ "
+
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Software.Psu.Updater.service"
+SYSTEMD_SERVICE:${PN} += "psu-update@.service"
diff --git a/recipes-phosphor/preinit-mounts/preinit-mounts.bb b/recipes-phosphor/preinit-mounts/preinit-mounts.bb
new file mode 100644
index 0000000000000000000000000000000000000000..eb8e39cd06a95f799c736c0dc572436de271bd76
--- /dev/null
+++ b/recipes-phosphor/preinit-mounts/preinit-mounts.bb
@@ -0,0 +1,24 @@
+inherit allarch
+inherit update-alternatives
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}"
+
+SRC_URI += "file://init"
+
+FILES:${PN} += "${base_sbindir}/init"
+
+do_install() {
+ install -d ${D}/${base_sbindir}
+ install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts
+}
+
+ALTERNATIVE:${PN} = "init"
+ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+
+# Use a number higher than the systemd init alternative so that
+# ours is enabled instead.
+ALTERNATIVE_PRIORITY[init] ?= "400"
diff --git a/recipes-phosphor/preinit-mounts/preinit-mounts/init b/recipes-phosphor/preinit-mounts/preinit-mounts/init
new file mode 100644
index 0000000000000000000000000000000000000000..ad813279822dcab87f7dea29169b13748edde66c
--- /dev/null
+++ b/recipes-phosphor/preinit-mounts/preinit-mounts/init
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+mount_overlay() {
+ if ! mount overlay /etc -t overlay -o defaults,lowerdir=/etc,upperdir=/var/persist/etc,workdir=/var/persist/etc-work; then
+ mount overlay /etc -t overlay -o defaults,lowerdir=/etc:/var/persist/etc
+ fi
+}
+
+recreate_overlay() {
+ # Attempt to re-create the overlay by moving out the overlay contents and
+ # copying them back to /etc, which would create them back in the overlay
+ cd
+ if ! umount /etc; then
+ return
+ fi
+ rm -rf /var/persist/etc-save
+ mv /var/persist/etc /var/persist/etc-save
+ mkdir -p /var/persist/etc
+ mount_overlay
+ cp -rp /var/persist/etc-save/* /etc/
+ rm -rf /var/persist/etc-save
+}
+
+if ! mount ubi0:rwfs /var -t ubifs -o defaults; then
+ if ! mount ubi0:rwfs /var -t ubifs -o defaults,ro; then
+ mount tmpfs /var -t tmpfs -o defaults
+ fi
+fi
+
+mkdir -p /var/persist/etc /var/persist/etc-work /var/persist/home/root
+
+rm -rf /var/persist/etc-work/*
+# rm -rf specifically skips . and .. directories; pipe all output to null to avoid the error message
+rm -rf /var/persist/etc-work/.* > /dev/null 2>&1
+
+mount_overlay
+
+# Check if there are any issues accessing the files in /etc after mounting the
+# overlay by doing an 'ls' command
+error="/var/overlay-error"
+recreate_overlay_done=
+cd /var/persist/etc/
+files=$(find . -type f)
+for i in $files; do
+ ls -i /etc/$i >/dev/null 2>${error};
+ if [[ -s ${error} ]]; then
+ # We don't have a way to print this error to the journal, delete it
+ rm -f ${error}
+ if test -n "$recreate_overlay_done"; then
+ recreate_overlay
+ recreate_overlay_done="true"
+ fi
+ # Check file once more
+ ls -i /etc/$i >/dev/null 2>${error};
+ if [[ -s ${error} ]]; then
+ # File still corrupted, delete it from the overlay
+ echo "Removing corrupted file from overlay: $i"
+ rm -f ${error}
+ rm -f /var/persist/etc/$i
+ fi
+ fi
+done
+
+exec /lib/systemd/systemd
diff --git a/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb b/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..f295e7e02155f6f78cdf457c80d831be08443356
--- /dev/null
+++ b/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Journal IPMI SEL Logger"
+DESCRIPTION = "Utility to write IPMI SEL records to the journal"
+
+# SEL Logger has the ability to monitor and automatically log SEL records for
+# various types of events, but this is disabled by default. The following
+# flags can be set in a .bbappend to enable specific types of event
+# monitoring:
+#
+# SEL_LOGGER_MONITOR_THRESHOLD_EVENTS:
+# Monitors and logs SEL records for threshold sensor events
+
+inherit pkgconfig meson systemd
+S = "${WORKDIR}/git"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+DEPENDS += " \
+ boost \
+ sdbusplus \
+ systemd \
+ "
+
+SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git;protocol=https;branch=master"
+SRCREV = "38d32a3d5fb434cf08603e4e7bf5ba5372cfd02d"
+
+PV = "0.1+git${SRCPV}"
+
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.Logging.IPMI.service"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[log-threshold] = "-Dlog-threshold=true,-Dlog-threshold=false,"
+PACKAGECONFIG[log-pulse] = "-Dlog-pulse=true,-Dlog-pulse=false,"
+PACKAGECONFIG[log-watchdog] = "-Dlog-watchdog=true,-Dlog-watchdog=false,"
+PACKAGECONFIG[log-alarm] = "-Dlog-alarm=true,-Dlog-alarm=false,"
+PACKAGECONFIG[send-to-logger] = "-Dsend-to-logger=true,-Dsend-to-logger=false,phosphor-logging"
+PACKAGECONFIG[clears-sel] = "-Dclears-sel=true,-Dclears-sel=false"
diff --git a/recipes-phosphor/sensors/dbus-sensors_git.bb b/recipes-phosphor/sensors/dbus-sensors_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..0f792af753a1cf670b71bbdbaf772dbf53eb9a56
--- /dev/null
+++ b/recipes-phosphor/sensors/dbus-sensors_git.bb
@@ -0,0 +1,80 @@
+SUMMARY = "dbus-sensors"
+DESCRIPTION = "Dbus Sensor Services Configured from D-Bus"
+
+SRC_URI = "git://github.com/openbmc/dbus-sensors.git;branch=master;protocol=https"
+SRCREV = "7dd6443b88a52cb17d925bbe0f316d6a0374a703"
+
+PV = "0.1+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+PACKAGECONFIG ??= " \
+ adcsensor \
+ cpusensor \
+ exitairtempsensor \
+ fansensor \
+ hwmontempsensor \
+ intrusionsensor \
+ ipmbsensor \
+ mcutempsensor \
+ psusensor \
+ external \
+ "
+
+PACKAGECONFIG[adcsensor] = "-Dadc=enabled, -Dadc=disabled"
+PACKAGECONFIG[cpusensor] = "-Dcpu=enabled, -Dcpu=disabled"
+PACKAGECONFIG[exitairtempsensor] = "-Dexit-air=enabled, -Dexit-air=disabled"
+PACKAGECONFIG[fansensor] = "-Dfan=enabled, -Dfan=disabled"
+PACKAGECONFIG[hwmontempsensor] = "-Dhwmon-temp=enabled, -Dhwmon-temp=disabled"
+PACKAGECONFIG[intrusionsensor] = "-Dintrusion=enabled, -Dintrusion=disabled"
+PACKAGECONFIG[ipmbsensor] = "-Dipmb=enabled, -Dipmb=disabled"
+PACKAGECONFIG[mcutempsensor] = "-Dmcu=enabled, -Dmcu=disabled"
+PACKAGECONFIG[psusensor] = "-Dpsu=enabled, -Dpsu=disabled"
+PACKAGECONFIG[nvmesensor] = "-Dnvme=enabled, -Dnvme=disabled"
+PACKAGECONFIG[external] = "-Dexternal=enabled, -Dexternal=disabled"
+
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'adcsensor', \
+ 'xyz.openbmc_project.adcsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'cpusensor', \
+ 'xyz.openbmc_project.cpusensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'exitairtempsensor', \
+ 'xyz.openbmc_project.exitairsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'fansensor', \
+ 'xyz.openbmc_project.fansensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'hwmontempsensor', \
+ 'xyz.openbmc_project.hwmontempsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'intrusionsensor', \
+ 'xyz.openbmc_project.intrusionsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'ipmbsensor', \
+ 'xyz.openbmc_project.ipmbsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'mcutempsensor', \
+ 'xyz.openbmc_project.mcutempsensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'psusensor', \
+ 'xyz.openbmc_project.psusensor.service', \
+ '', d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'external', \
+ 'xyz.openbmc_project.externalsensor.service', \
+ '', d)}"
+
+DEPENDS = " \
+ boost \
+ i2c-tools \
+ libgpiod \
+ nlohmann-json \
+ phosphor-logging \
+ sdbusplus \
+ "
+inherit pkgconfig meson systemd
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
diff --git a/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb b/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
new file mode 100644
index 0000000000000000000000000000000000000000..d1e97c4e0d12538f9433172334d986c25212c45f
--- /dev/null
+++ b/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
@@ -0,0 +1,54 @@
+SUMMARY = "Phosphor hwmon configuration generator"
+DESCRIPTION = "Generate phosphor-hwmon configuration from an MRW."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit mrw-xml
+
+DEPENDS += "mrw-perl-tools-native mrw-native"
+
+do_compile:append() {
+ ${STAGING_BINDIR_NATIVE}/perl-native/perl \
+ ${STAGING_BINDIR_NATIVE}/hwmon.pl \
+ -x ${mrw_datadir}/${MRW_XML} \
+ -d ${WORKDIR}/mrw-config-files
+}
+
+def find_conf_files(dir):
+ from fnmatch import fnmatch
+ myfiles = []
+
+ #These conf files generated by hwmon.pl are in
+ #subdirectories which we need to preserve the path to.
+ for root, dirs, files in os.walk(dir):
+ for name in files:
+ if fnmatch(name, "*.conf"):
+ myfiles.append(os.path.join(root, name))
+
+ return myfiles
+
+python install_conf_files() {
+ from shutil import copy
+
+ conf_file_dir = os.path.join(
+ d.getVar("WORKDIR", True),
+ 'mrw-config-files')
+ files = find_conf_files(conf_file_dir)
+
+ install_dir = os.path.join(d.getVar("D", True),
+ "etc", "default", "obmc", "hwmon")
+
+ dir_len = len(conf_file_dir)
+
+ for f in files:
+ dest = os.path.join(install_dir, f[dir_len + 1:])
+ parent = os.path.dirname(dest)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+
+ copy(f, dest)
+}
+
+do_install[postfuncs] += "install_conf_files"
diff --git a/recipes-phosphor/sensors/phosphor-hwmon_git.bb b/recipes-phosphor/sensors/phosphor-hwmon_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..35e9e7361bda67386d9d7b5fc027a2426a1e66a6
--- /dev/null
+++ b/recipes-phosphor/sensors/phosphor-hwmon_git.bb
@@ -0,0 +1,97 @@
+SUMMARY = "OpenBMC hwmon poller"
+DESCRIPTION = "OpenBMC hwmon poller."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit pkgconfig meson
+inherit obmc-phosphor-systemd
+
+PACKAGECONFIG ??= ""
+# Meson configure option to enable/disable max31785-msl
+PACKAGECONFIG[max31785-msl] = "-Denable-max31785-msl=true, -Denable-max31785-msl=false"
+
+PACKAGE_BEFORE_PN = "max31785-msl"
+SYSTEMD_PACKAGES = "${PN} max31785-msl"
+
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Hwmon@.service"
+SYSTEMD_SERVICE:max31785-msl = "${@bb.utils.contains('PACKAGECONFIG', 'max31785-msl', 'phosphor-max31785-msl@.service', '', d)}"
+
+DEPENDS += " \
+ sdbusplus \
+ sdeventplus \
+ stdplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ gpioplus \
+ cli11 \
+ "
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
+
+FILES:${PN} += "${base_libdir}/systemd/system/xyz.openbmc_project.Hwmon@.service"
+RDEPENDS:${PN} += "\
+ bash \
+ "
+
+RRECOMMENDS:${PN} += "${VIRTUAL-RUNTIME_phosphor-hwmon-config}"
+
+FILES:max31785-msl = "\
+ ${base_libdir}/systemd/system/phosphor-max31785-msl@.service \
+ ${bindir}/max31785-msl \
+ "
+RDEPENDS:max31785-msl = "${VIRTUAL-RUNTIME_base-utils} i2c-tools bash"
+
+SRC_URI += "git://github.com/openbmc/phosphor-hwmon;branch=master;protocol=https"
+
+SRCREV = "0bbd07c008404ed701b336d8a2b398407b908fe6"
+
+S = "${WORKDIR}/git"
+
+# The following postinstall script iterate over hwmon env files:
+# 1. It adds HW_SENSOR_ID value if not set. The value being calculated
+# as sha256sum.
+# 2. For each hwmon the script generates busconfig ACLs.
+pkg_postinst:${PN}() {
+ hwmon_dir="$D/etc/default/obmc/hwmon"
+ dbus_dir="$D/${datadir}/dbus-1/system.d"
+
+ if [ -n "$D" -a -d "${hwmon_dir}" ]; then
+ # Remove existing links and replace with actual copy of the file to prevent
+ # HW_SENSOR_ID variable override for different sensors' instances.
+ find "${hwmon_dir}" -type l -name \*.conf | while read f; do
+ path="$(readlink -f $f)"
+ rm -f "${f}"
+ cp "${path}" "${f}"
+ done
+
+ find "${hwmon_dir}" -type f -name \*.conf | while read f; do
+ path="/${f##${hwmon_dir}/}"
+ path="${path%.conf}"
+ sensor_id="$(printf "%s" "${path}" | sha256sum | cut -d\ -f1)"
+ acl_file="${dbus_dir}/xyz.openbmc_project.Hwmon-${sensor_id}.conf"
+
+ egrep -q '^HW_SENSOR_ID\s*=' "${f}" ||
+ printf "\n# Sensor id for %s\nHW_SENSOR_ID = \"%s\"\n" "${path}" "${sensor_id}" >> "${f}"
+
+ # Extract HW_SENSOR_ID that could be either quoted or unquoted string.
+ sensor_id="$(sed -n 's,^HW_SENSOR_ID\s*=\s*"\?\(.[^" ]\+\)\s*"\?,\1,p' "${f}")"
+
+ [ ! -f "${acl_file}" ] || continue
+ path_s="$(echo "${path}" | sed 's,\-\-,\\-\\-,g')"
+
+ cat <"${acl_file}"
+
+
+
+
+
+
+
+
+EOF
+ done
+ fi
+}
diff --git a/recipes-phosphor/sensors/phosphor-nvme_git.bb b/recipes-phosphor/sensors/phosphor-nvme_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..4ae4fb39bf6fd9fcf1bebf55214fcc9785983cf8
--- /dev/null
+++ b/recipes-phosphor/sensors/phosphor-nvme_git.bb
@@ -0,0 +1,21 @@
+SUMMARY = "NVMe Drive Manager"
+DESCRIPTION = "Daemon to monitor and report the status of NVMe drives"
+HOMEPAGE = "https://github.com/openbmc/phosphor-nvme"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson pkgconfig
+inherit systemd
+
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "nlohmann-json"
+
+SRC_URI = "git://github.com/openbmc/phosphor-nvme.git;protocol=https;branch=master"
+SRCREV = "5c4de839b88fc69387a49bbf1d8b09f304c16582"
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.nvme.manager.service"
diff --git a/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb b/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..2283a4f12b5a370860667a681db65750b434c640
--- /dev/null
+++ b/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Virtual Sensors"
+DESCRIPTION = "virtual sensors created from existing sensors and config data"
+HOMEPAGE = "https://github.com/openbmc/phosphor-virtual-sensor"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9e69ba356fa59848ffd865152a3ccc13"
+
+inherit meson pkgconfig
+inherit systemd
+
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "nlohmann-json"
+DEPENDS += "exprtk"
+
+SRC_URI = "git://github.com/openbmc/phosphor-virtual-sensor.git;protocol=https;branch=master"
+SRCREV = "a959678ca810529e886adc40bcc4c8c59c0ee0e4"
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE:${PN} = "phosphor-virtual-sensor.service"
diff --git a/recipes-phosphor/settings/phosphor-settings-defaults-native.bb b/recipes-phosphor/settings/phosphor-settings-defaults-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..98ee6964950a8d76fd85055cd7ed3deefe2c5f34
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-defaults-native.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Default settings"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-settings-manager
+inherit native
+
+SRC_URI += "file://defaults.yaml"
+SRC_URI += "file://host-template.yaml"
+
+PROVIDES += "virtual/phosphor-settings-defaults"
+
+SETTINGS_HOST_TEMPLATES:append = " host-template.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${settings_datadir}
+ install -d ${DEST}
+ install defaults.yaml ${DEST}
+
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ for f in ${SETTINGS_HOST_TEMPLATES};
+ do
+ cat ${f} | sed "s/{}/${i}/g" >> ${DEST}/defaults.yaml
+ done
+ done
+}
diff --git a/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml b/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..768d080f88ae3fe7fb208c08817c93320519c055
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml
@@ -0,0 +1,42 @@
+/xyz/openbmc_project/control/minimum_ship_level_required:
+ - Interface: xyz.openbmc_project.Control.MinimumShipLevel
+ Properties:
+ MinimumShipLevelRequired:
+ Default: 'true'
+
+/xyz/openbmc_project/time/sync_method:
+ - Interface: xyz.openbmc_project.Time.Synchronization
+ Properties:
+ TimeSyncMethod:
+ Default: Synchronization::Method::NTP
+
+/xyz/openbmc_project/control/power_supply_attributes:
+ - Interface: xyz.openbmc_project.Control.PowerSupplyAttributes
+ Properties:
+ DeratingFactor:
+ Default: 90
+
+/xyz/openbmc_project/control/power_supply_redundancy:
+ - Interface: xyz.openbmc_project.Control.PowerSupplyRedundancy
+ Properties:
+ PowerSupplyRedundancyEnabled:
+ Default: 'true'
+
+
+/xyz/openbmc_project/logging/rest_api_logs:
+ - Interface: xyz.openbmc_project.Object.Enable
+ Properties:
+ Enabled:
+ Default: 'false'
+
+/xyz/openbmc_project/logging/settings:
+ - Interface: xyz.openbmc_project.Logging.Settings
+ Properties:
+ QuiesceOnHwError:
+ Default: 'false'
+
+/xyz/openbmc_project/software/apply_time:
+ - Interface: xyz.openbmc_project.Software.ApplyTime
+ Properties:
+ RequestedApplyTime:
+ Default: ApplyTime::RequestedApplyTimes::OnReset
diff --git a/recipes-phosphor/settings/phosphor-settings-defaults/host-template.yaml b/recipes-phosphor/settings/phosphor-settings-defaults/host-template.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..3993518c25d403f78539456cb89b835c617887a4
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-defaults/host-template.yaml
@@ -0,0 +1,109 @@
+/xyz/openbmc_project/control/host{}/auto_reboot:
+ - Interface: xyz.openbmc_project.Control.Boot.RebootPolicy
+ Properties:
+ AutoReboot:
+ Default: 'true'
+
+/xyz/openbmc_project/control/host{}/auto_reboot/one_time:
+ - Interface: xyz.openbmc_project.Control.Boot.RebootPolicy
+ Properties:
+ AutoReboot:
+ Default: 'true'
+
+/xyz/openbmc_project/control/host{}/boot:
+ - Interface: xyz.openbmc_project.Control.Boot.Source
+ Properties:
+ BootSource:
+ Default: Source::Sources::Default
+ - Interface: xyz.openbmc_project.Control.Boot.Mode
+ Properties:
+ BootMode:
+ Default: Mode::Modes::Regular
+ - Interface: xyz.openbmc_project.Control.Boot.Type
+ Properties:
+ BootType:
+ Default: Type::Types::EFI
+ - Interface: xyz.openbmc_project.Object.Enable
+ Properties:
+ Enabled:
+ Default: 'false'
+
+/xyz/openbmc_project/control/host{}/boot/one_time:
+ - Interface: xyz.openbmc_project.Object.Enable
+ Properties:
+ Enabled:
+ Default: 'false'
+
+/xyz/openbmc_project/control/host{}/power_cap:
+ - Interface: xyz.openbmc_project.Control.Power.Cap
+ Properties:
+ PowerCap:
+ Default: 0
+ Validation:
+ Type: "range"
+ Validator: "0..1000"
+ Unit: "Watts"
+ PowerCapEnable:
+ Default: 'false'
+
+/xyz/openbmc_project/control/host{}/power_restore_policy:
+ - Interface: xyz.openbmc_project.Control.Power.RestorePolicy
+ Properties:
+ PowerRestorePolicy:
+ Default: RestorePolicy::Policy::AlwaysOff
+ PowerRestoreDelay:
+ Default: 0
+
+/xyz/openbmc_project/control/host{}/power_restore_policy/one_time:
+ - Interface: xyz.openbmc_project.Control.Power.RestorePolicy
+ Properties:
+ PowerRestorePolicy:
+ Default: RestorePolicy::Policy::None
+ PowerRestoreDelay:
+ Default: 0
+
+/xyz/openbmc_project/control/host{}/restriction_mode:
+ - Interface: xyz.openbmc_project.Control.Security.RestrictionMode
+ Properties:
+ RestrictionMode:
+ Default: RestrictionMode::Modes::None
+
+/xyz/openbmc_project/control/host{}/TPMEnable:
+ - Interface: xyz.openbmc_project.Control.TPM.Policy
+ Properties:
+ TPMEnable:
+ Default: 'false'
+
+/xyz/openbmc_project/control/host{}/turbo_allowed:
+ - Interface: xyz.openbmc_project.Control.Host.TurboAllowed
+ Properties:
+ TurboAllowed:
+ Default: 'true'
+
+/xyz/openbmc_project/network/host{}/intf:
+ - Interface: xyz.openbmc_project.Network.MACAddress
+ Properties:
+ MACAddress:
+ Default: '"00:00:00:00:00:00"'
+ Validation:
+ Type: "regex"
+ Validator: '^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'
+
+#needs to implement address validation TODO openbmc/issues/2046
+/xyz/openbmc_project/network/host{}/intf/addr:
+ - Interface: xyz.openbmc_project.Network.IP
+ Properties:
+ Address:
+ Default: '"0.0.0.0"'
+ PrefixLength:
+ Default: 0
+ Validation:
+ Type: "range"
+ Validator: 0..128
+ Unit: "bits"
+ Origin:
+ Default: IP::AddressOrigin::Static
+ Gateway:
+ Default: '"0.0.0.0"'
+ Type:
+ Default: IP::Protocol::IPv4
diff --git a/recipes-phosphor/settings/phosphor-settings-manager.inc b/recipes-phosphor/settings/phosphor-settings-manager.inc
new file mode 100644
index 0000000000000000000000000000000000000000..eb79ef499a149314fca6fb77e73533998eebc3c4
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-settingsd"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+SRC_URI += "git://github.com/openbmc/phosphor-settingsd;branch=master;protocol=https"
+SRCREV = "75a710ca87f6033419d856d965f6100aa4348196"
diff --git a/recipes-phosphor/settings/phosphor-settings-manager/boot_type.override.yml b/recipes-phosphor/settings/phosphor-settings-manager/boot_type.override.yml
new file mode 100644
index 0000000000000000000000000000000000000000..45896117730a3e9553a400e0f262d16d2267ca0e
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-manager/boot_type.override.yml
@@ -0,0 +1,24 @@
+/xyz/openbmc_project/control/host0/boot:
+ - Interface: xyz.openbmc_project.Control.Boot.Source
+ Properties:
+ BootSource:
+ Default: Source::Sources::Default
+ - Interface: xyz.openbmc_project.Control.Boot.Mode
+ Properties:
+ BootMode:
+ Default: Mode::Modes::Regular
+ - Interface: xyz.openbmc_project.Control.Boot.Type
+ Properties:
+ BootType:
+ Default: Type::Types::EFI
+ - Interface: xyz.openbmc_project.Object.Enable
+ Properties:
+ Enabled:
+ Default: 'false'
+
+/xyz/openbmc_project/control/host0/boot/one_time:
+ - Interface: xyz.openbmc_project.Object.Enable
+ Properties:
+ Enabled:
+ Default: 'false'
+
diff --git a/recipes-phosphor/settings/phosphor-settings-manager/merge_settings.py b/recipes-phosphor/settings/phosphor-settings-manager/merge_settings.py
new file mode 100644
index 0000000000000000000000000000000000000000..62a8f4a94e8369f2fdf8c0fa3cb8946a2e8201bc
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-manager/merge_settings.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python3
+"""Loads a "target" YAML file and overwrites its values with values from
+"override" YAML files.
+
+Override files are processed in the order given.
+
+Usage:
+ merge_settings.py [override/remove yamls]
+"""
+import sys
+import yaml
+import copy
+
+def dict_merge(target, source, remove):
+ """Deep merge for dicts.
+
+ Works like dict.update() that recursively updates/removes any dict values
+ present in both parameters.
+
+ Args:
+ target (dict): Values to be overwritten by corresponding values from
+ `source`.
+ source (dict): Overriding values. Not changed by call.
+ remove (bool): If this is true then it removes the entry provided in
+ 'source' along with all entries under it from 'target'. Otherwise
+ it overrides the values from 'source'
+
+ Returns:
+ `target` with values overwritten/removed from those in `source` at any
+ and all levels of nested dicts.
+ """
+ if not isinstance(source, dict):
+ return source
+ for k, v in source.items():
+ if k in target and isinstance(target[k], dict):
+ dict_merge(target[k], v, remove)
+ else:
+ if remove is True and k in target:
+ target.pop(k)
+ else:
+ target[k] = copy.deepcopy(v)
+ return target
+
+if len(sys.argv) < 2:
+ sys.exit('Argument required: target yaml')
+
+if len(sys.argv) == 2:
+ # No overrides to handle
+ sys.exit()
+
+target_filename = sys.argv[1]
+with open(target_filename) as target_file:
+ data = yaml.safe_load(target_file)
+ print('Loaded target YAML file ' + target_filename)
+
+for override_filename in sys.argv[2:]:
+ if override_filename.endswith('.override.yml'):
+ with open(override_filename) as override_file:
+ override = yaml.safe_load(override_file)
+ dict_merge(data, override, False)
+ print('Merged override YAML file ' + override_filename)
+ elif override_filename.endswith('.remove.yml'):
+ with open(override_filename) as override_file:
+ override = yaml.safe_load(override_file)
+ dict_merge(data, override, True)
+ print('Removed data from source YAML file' + override_filename)
+
+with open(target_filename, 'w') as target_file:
+ yaml.dump(data, target_file)
+ print('Wrote merged target YAML file ' + target_filename)
diff --git a/recipes-phosphor/settings/phosphor-settings-manager/xyz.openbmc_project.Settings.service b/recipes-phosphor/settings/phosphor-settings-manager/xyz.openbmc_project.Settings.service
new file mode 100644
index 0000000000000000000000000000000000000000..168d2c72320ba47b772e529333b8f9ba3e1eba47
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-manager/xyz.openbmc_project.Settings.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor Settings Daemon
+
+[Service]
+ExecStart=/usr/bin/env phosphor-settings-manager
+SyslogIdentifier=phosphor-settings-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/settings/phosphor-settings-manager_git.bb b/recipes-phosphor/settings/phosphor-settings-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..e3e7245ababe36b79fe39c035bfe7f76eedd07d9
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-manager_git.bb
@@ -0,0 +1,72 @@
+SUMMARY = "Phosphor Settings Manager"
+DESCRIPTION = "Phosphor Settings Manager is an application that creates \
+d-bus objects to represent various user settings."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+inherit python3native
+inherit phosphor-settings-manager
+
+require phosphor-settings-manager.inc
+
+DBUS_SERVICE:${PN} = "xyz.openbmc_project.Settings.service"
+
+DEPENDS += "${PYTHON_PN}-pyyaml-native"
+DEPENDS += "${PYTHON_PN}-mako-native"
+DEPENDS += "${PYTHON_PN}-sdbus++-native"
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "virtual/phosphor-settings-defaults"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'phosphor-settings-read-settings-mrw-native', '', d)}"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "phosphor-logging"
+DEPENDS += "libcereal"
+
+S = "${WORKDIR}/git"
+SRC_URI += "file://merge_settings.py"
+
+# 'boot_type' configuration parameter is used to add support for
+# the Legacy/EFI boot override selector for systems with x86 host
+PACKAGECONFIG[boot_type] = ""
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'boot_type', 'file://boot_type.override.yml', '', d)}"
+
+EXTRA_OECONF = " \
+ SETTINGS_YAML=${STAGING_DIR_NATIVE}${settings_datadir}/defaults.yaml \
+ "
+
+# Collect files in SRC_URI that end in ".override.yml" or ".remove.yml" and call a script that
+# writes/removes their contents from that of settings.yaml, which is then updated to
+# the merged data values.
+# This doesn't correctly handle globs in ".override.yml" entries in SRC_URI.
+python do_merge_settings () {
+ import subprocess
+
+ # TODO: Perform the merge in a temporary directory?
+ workdir = d.getVar('WORKDIR', True)
+ nativedir = d.getVar('STAGING_DIR_NATIVE', True)
+ settingsdir = d.getVar('settings_datadir', True)
+ settingsdir = settingsdir[1:]
+ settingsdir = os.path.join(nativedir, settingsdir)
+ cmd = []
+ cmd.append(os.path.join(workdir, 'merge_settings.py'))
+ cmd.append(os.path.join(settingsdir, 'defaults.yaml'))
+ # Used for any settings from the MRW
+ use_mrw = bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'true', '', d)
+ if (use_mrw == 'true'):
+ cmd.append(os.path.join(settingsdir, 'mrw-settings.override.yaml'))
+
+ fetch = bb.fetch2.Fetch([], d)
+ override_urls = [url for url in fetch.urls if url.endswith(('.override.yml', '.remove.yml'))]
+ for url in override_urls:
+ bb.debug(2, 'Overriding with source: ' + url)
+ local_base = os.path.basename(fetch.localpath(url))
+ filename = os.path.join(workdir, local_base)
+ cmd.append(filename)
+
+ # Invoke the script and don't catch any resulting exception.
+ subprocess.check_call(cmd)
+}
+# python-pyyaml-native is installed by do_configure, so put this task after
+addtask merge_settings after do_configure before do_compile
diff --git a/recipes-phosphor/settings/phosphor-settings-read-settings-mrw-native.bb b/recipes-phosphor/settings/phosphor-settings-read-settings-mrw-native.bb
new file mode 100644
index 0000000000000000000000000000000000000000..a67d6819dca7cb82fe2975420062c2eba9de39e0
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-read-settings-mrw-native.bb
@@ -0,0 +1,37 @@
+# Generates MRW settings override yaml for phosphor-settings-manager
+# The default YAML file, mrw-override-settings.yaml, is empty, therefore no
+# settings will be overwritten. To override, modify mrw-override-settings.yaml.
+
+SUMMARY = "Generates MRW settings override YAML for phosphor-settings-manager."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit phosphor-settings-manager
+inherit mrw-xml
+inherit native
+
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+SRC_URI += "file://mrw-override-settings.yaml"
+
+S = "${WORKDIR}"
+
+MRW_EXPRESSION_VARS ?= ""
+
+do_install() {
+ DEST=${D}${config_datadir}
+ install -D mrw-override-settings.yaml ${DEST}/mrw-override-settings.yaml
+
+ SETTINGS=${D}${settings_datadir}
+ install -d ${SETTINGS}
+
+ # gen_settings.pl replaces any MRW variables with their value
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_settings.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -s ${DEST}/mrw-override-settings.yaml \
+ -o ${SETTINGS}/mrw-settings.override.yaml \
+ ${MRW_EXPRESSION_VARS} \
+ -f
+}
diff --git a/recipes-phosphor/settings/phosphor-settings-read-settings-mrw/mrw-override-settings.yaml b/recipes-phosphor/settings/phosphor-settings-read-settings-mrw/mrw-override-settings.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..c0fbedeccbd53b6e3f32b1a3fc6a915e705f2784
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings-read-settings-mrw/mrw-override-settings.yaml
@@ -0,0 +1,3 @@
+# Default MRW settings override definition YAML - empty.
+# Any MRW variables, marked by MRW_, are replaced with their
+# MRW value.
diff --git a/recipes-phosphor/settings/phosphor-settings/merge_settings.py b/recipes-phosphor/settings/phosphor-settings/merge_settings.py
new file mode 100644
index 0000000000000000000000000000000000000000..62a8f4a94e8369f2fdf8c0fa3cb8946a2e8201bc
--- /dev/null
+++ b/recipes-phosphor/settings/phosphor-settings/merge_settings.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python3
+"""Loads a "target" YAML file and overwrites its values with values from
+"override" YAML files.
+
+Override files are processed in the order given.
+
+Usage:
+ merge_settings.py [override/remove yamls]
+"""
+import sys
+import yaml
+import copy
+
+def dict_merge(target, source, remove):
+ """Deep merge for dicts.
+
+ Works like dict.update() that recursively updates/removes any dict values
+ present in both parameters.
+
+ Args:
+ target (dict): Values to be overwritten by corresponding values from
+ `source`.
+ source (dict): Overriding values. Not changed by call.
+ remove (bool): If this is true then it removes the entry provided in
+ 'source' along with all entries under it from 'target'. Otherwise
+ it overrides the values from 'source'
+
+ Returns:
+ `target` with values overwritten/removed from those in `source` at any
+ and all levels of nested dicts.
+ """
+ if not isinstance(source, dict):
+ return source
+ for k, v in source.items():
+ if k in target and isinstance(target[k], dict):
+ dict_merge(target[k], v, remove)
+ else:
+ if remove is True and k in target:
+ target.pop(k)
+ else:
+ target[k] = copy.deepcopy(v)
+ return target
+
+if len(sys.argv) < 2:
+ sys.exit('Argument required: target yaml')
+
+if len(sys.argv) == 2:
+ # No overrides to handle
+ sys.exit()
+
+target_filename = sys.argv[1]
+with open(target_filename) as target_file:
+ data = yaml.safe_load(target_file)
+ print('Loaded target YAML file ' + target_filename)
+
+for override_filename in sys.argv[2:]:
+ if override_filename.endswith('.override.yml'):
+ with open(override_filename) as override_file:
+ override = yaml.safe_load(override_file)
+ dict_merge(data, override, False)
+ print('Merged override YAML file ' + override_filename)
+ elif override_filename.endswith('.remove.yml'):
+ with open(override_filename) as override_file:
+ override = yaml.safe_load(override_file)
+ dict_merge(data, override, True)
+ print('Removed data from source YAML file' + override_filename)
+
+with open(target_filename, 'w') as target_file:
+ yaml.dump(data, target_file)
+ print('Wrote merged target YAML file ' + target_filename)
diff --git a/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
new file mode 100644
index 0000000000000000000000000000000000000000..6e4ef9ff969837594abfee7ab16b3e71afbbce78
--- /dev/null
+++ b/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
@@ -0,0 +1,3 @@
+{
+ "_comments": "This file should be overridden with one from the machine layer."
+}
diff --git a/recipes-phosphor/skeleton/obmc-libobmc-intf_git.bb b/recipes-phosphor/skeleton/obmc-libobmc-intf_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..77a2537698f56d2d53a8bfced8dd96b00f510842
--- /dev/null
+++ b/recipes-phosphor/skeleton/obmc-libobmc-intf_git.bb
@@ -0,0 +1,36 @@
+SUMMARY = "OpenBMC gdbus library"
+DESCRIPTION = "libopenbmc_intf provides a set of gpio access \
+methods and the GDBUS skeleton code for the org.openbmc DBUS API."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton
+inherit pkgconfig
+
+DEPENDS += "glib-2.0"
+DEPENDS += "cjson"
+
+SKELETON_DIR = "libopenbmc_intf"
+
+SRC_URI += "file://gpio_defs.json"
+
+# Users of libopenbmc_intf use custom makefiles that do not
+# support the proper library version detection and linking.
+# Because of that, a link must be created within the
+# rootfs for applicaitons to use this library.
+# This next line tells bitbake to skip the check which
+# ensures no links are put in the rootfs
+INSANE_SKIP:${PN} += "dev-so"
+
+# Ensure the library is not in the dev package
+FILES_SOLIBSDEV = ""
+
+# Now add the link to the production package
+FILES:${PN} += "${libdir}/libopenbmc_intf.so"
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+
+ install -d ${D}${sysconfdir}/default/obmc/gpio/
+ install -m 0644 ${WORKDIR}/gpio_defs.json ${D}/${sysconfdir}/default/obmc/gpio/
+}
diff --git a/recipes-phosphor/smbios/smbios-mdr_git.bb b/recipes-phosphor/smbios/smbios-mdr_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..701774fef22c33992aae37f9cc8db689b84beecc
--- /dev/null
+++ b/recipes-phosphor/smbios/smbios-mdr_git.bb
@@ -0,0 +1,39 @@
+HOMEPAGE = "http://github.com/openbmc/smbios-mdr"
+SUMMARY = "Extract CPU and Memory Inventory from SMSMBIOS Table and PECI"
+DESCRIPTION = "This package parses SMBIOS tables, reads Intel CPU PIROM and PECI and provides a dedicated IPMI blob to receive SMBIOS tables sent from LinuxBoot"
+
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit cmake pkgconfig systemd
+inherit obmc-phosphor-ipmiprovider-symlink
+
+DEPENDS += " \
+ boost \
+ systemd \
+ sdbusplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ "
+
+PACKAGECONFIG ?= "cpuinfo"
+PACKAGECONFIG[smbios-no-dimm] = "-DDIMM_DBUS=OFF,-DDIMM_DBUS=ON"
+PACKAGECONFIG[cpuinfo] = "-DCPU_INFO=ON,-DCPU_INFO=OFF,libpeci i2c-tools"
+PACKAGECONFIG[smbios-ipmi-blob] = "-DIPMI_BLOB=ON,-DIPMI_BLOB=OFF,phosphor-ipmi-blobs"
+
+EXTRA_OECMAKE = "-DYOCTO=ON"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/smbios-mdr.git;branch=master;protocol=https"
+SRCREV = "e4ea37716d0d282ef664d5a70979274fe40e7c8b"
+
+SYSTEMD_SERVICE:${PN} += "smbios-mdrv2.service"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'cpuinfo', 'xyz.openbmc_project.cpuinfo.service', '', d)}"
+
+FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
+FILES:${PN}:append = " ${libdir}/blob-ipmid/lib*${SOLIBS}"
+FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV}"
+BLOBIPMI_PROVIDER_LIBRARY += "${@bb.utils.contains('PACKAGECONFIG', 'smbios-ipmi-blob', 'libsmbiosstore.so', '', d)}"
diff --git a/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb b/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..b8c0a1c8e75bde533fa38c07c4ca204b1a7a8269
--- /dev/null
+++ b/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Service configuration manager daemon to control the service"
+DESCRIPTION = "Applications must use service manager daemon to configure \
+ phosphor-ipmi-net, bmcweb, obmc-console etc in the system, \
+ instead of directly controlling the same using 'systemd' or \
+ 'iptables'."
+HOMEPAGE = "https://github.com/openbmc/service-config-manager"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7becf906c8f8d03c237bad13bc3dac53"
+
+SRC_URI = "git://github.com/openbmc/service-config-manager;branch=master;protocol=https"
+SRCREV = "f27f431faa0c40c0253e50cddd92ffcb99081604"
+
+inherit meson pkgconfig systemd
+
+S = "${WORKDIR}/git"
+SYSTEMD_SERVICE:${PN} = "srvcfg-manager.service"
+
+DEPENDS = " \
+ boost \
+ phosphor-logging \
+ sdbusplus \
+ systemd \
+ "
\ No newline at end of file
diff --git a/recipes-phosphor/state/phosphor-post-code-manager_git.bb b/recipes-phosphor/state/phosphor-post-code-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..6e06fc760765626a4a521cf8d09929a0861a1a6a
--- /dev/null
+++ b/recipes-phosphor/state/phosphor-post-code-manager_git.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Phosphor post code manager"
+DESCRIPTION = "Phosphor post Code Manager monitors post code posted on dbus \
+interface /xyz/openbmc_project/state/boot/raw by snoopd daemon and save them \
+in a file under /var/lib for history."
+
+SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git;branch=master;protocol=https"
+SRCREV = "e709874a634cfe19350d31b06bbfec3c8f61a826"
+
+S = "${WORKDIR}/git"
+
+PV = "1.0+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson pkgconfig systemd
+
+
+def get_service(d):
+ service_list = "xyz.openbmc_project.State.Boot.PostCode.service xyz.openbmc_project.State.Boot.PostCode@.service "
+ if(d.getVar('OBMC_HOST_INSTANCES') == '0'):
+ return service_list
+ else:
+ return service_list+" ".join(["xyz.openbmc_project.State.Boot.PostCode@{}.service".format(x) for x in d.getVar('OBMC_HOST_INSTANCES').split()])
+
+SYSTEMD_SERVICE:${PN} = "${@get_service(d)}"
+
+DEPENDS += " \
+ sdbusplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ libcereal \
+ "
+
diff --git a/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc b/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
new file mode 100644
index 0000000000000000000000000000000000000000..718d06d1393ec6ef49d5617ad04e73277fb9f70b
--- /dev/null
+++ b/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
@@ -0,0 +1,106 @@
+DEFAULT_TARGETS = " \
+ multi-user.target.requires/obmc-host-reset@{}.target \
+ multi-user.target.requires/phosphor-discover-system-state@{}.service \
+ obmc-chassis-poweron@{}.target.wants/phosphor-reset-host-recovery@{}.service \
+ obmc-host-start@{}.target.requires/obmc-host-startmin@{}.target \
+ obmc-host-start@{}.target.requires/phosphor-reset-host-reboot-attempts@{}.service \
+ obmc-host-startmin@{}.target.wants/phosphor-set-host-transition-to-running@{}.service \
+ obmc-host-stop@{}.target.wants/phosphor-set-host-transition-to-off@{}.service \
+ obmc-host-reset@{}.target.requires/phosphor-reset-host-running@{}.service \
+ obmc-host-stop@{}.target.wants/phosphor-reset-sensor-states@{}.service \
+ obmc-host-graceful-quiesce@{}.target.wants/obmc-host-quiesce@{}.target \
+ obmc-host-graceful-quiesce@{}.target.wants/pldmSoftPowerOff.service \
+ obmc-host-quiesce@{}.target.wants/phosphor-reset-sensor-states@{}.service \
+ obmc-host-shutdown@{}.target.requires/obmc-chassis-poweroff@{}.target \
+ obmc-host-reboot@{}.target.requires/obmc-host-shutdown@{}.target \
+ obmc-host-reboot@{}.target.requires/phosphor-reboot-host@{}.service \
+ obmc-host-warm-reboot@{}.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
+ obmc-host-force-warm-reboot@{}.target.requires/obmc-host-stop@{}.target \
+ obmc-host-force-warm-reboot@{}.target.requires/phosphor-reboot-host@{}.service \
+ obmc-host-warm-reboot@{}.target.requires/obmc-host-force-warm-reboot@{}.target \
+ obmc-chassis-poweroff@{}.target.wants/phosphor-clear-one-time@{}.service \
+"
+
+# TODO: There are some targets that are chassis oriented, but there is no
+# obvious way to map HOST<->CHASSIS relationships. Making an assumption
+# currently that there is a 1-to-1 relationship between the two.
+
+pkg_postinst:${PN}-obmc-targets:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ for j in ${DEFAULT_TARGETS};
+ do
+ LINK="$D$systemd_system_unitdir/${j}"
+ LINK="$(echo ${LINK} | sed s/{}/${i}/g )"
+ TARGET="../$(basename ${j} | sed s/{}//g )"
+ mkdir -p "$(dirname ${LINK})"
+ ln -s "${TARGET}" "${LINK}"
+ done
+ done
+}
+
+pkg_prerm:${PN}-obmc-targets:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ for j in ${DEFAULT_TARGETS};
+ do
+ LINK="$D$systemd_system_unitdir/${j}"
+ LINK="$(echo ${LINK} | sed s/{}/${i}/g )"
+ rm "${LINK}"
+ done
+ done
+}
+
+pkg_postinst:${PN}-chassis:append() {
+ for i in ${OBMC_CHASSIS_INSTANCES};
+ do
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Chassis@${i}.service"
+ TARGET="../xyz.openbmc_project.State.Chassis@.service"
+ ln -s $TARGET $LINK
+ done
+}
+
+pkg_prerm:${PN}-chassis:append() {
+ for i in ${OBMC_CHASSIS_INSTANCES};
+ do
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Chassis@${i}.service"
+ rm $LINK
+ done
+}
+
+pkg_postinst:${PN}-chassis-check-power-status:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires/phosphor-chassis-check-power-status@${i}.service"
+ TARGET="../phosphor-chassis-check-power-status@.service"
+ ln -s $TARGET $LINK
+ done
+}
+
+pkg_prerm:${PN}-chassis-check-power-status:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@${i}.target.requires/phosphor-chassis-check-power-status@${i}.service"
+ rm $LINK
+ done
+}
+
+pkg_postinst:${PN}-host:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Host@${i}.service"
+ TARGET="../xyz.openbmc_project.State.Host@.service"
+ ln -s $TARGET $LINK
+ done
+}
+
+pkg_prerm:${PN}-host:append() {
+ for i in ${OBMC_HOST_INSTANCES};
+ do
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Host@${i}.service"
+ rm $LINK
+ done
+}
diff --git a/recipes-phosphor/state/phosphor-state-manager_git.bb b/recipes-phosphor/state/phosphor-state-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..7301b54cc9771a61ec5cc41610a239a5cd53c9e4
--- /dev/null
+++ b/recipes-phosphor/state/phosphor-state-manager_git.bb
@@ -0,0 +1,199 @@
+SUMMARY = "Phosphor State Management"
+DESCRIPTION = "Phosphor State Manager provides a set of system state \
+management daemons. It is suitable for use on a wide variety of OpenBMC \
+platforms."
+HOMEPAGE = "https://github.com/openbmc/phosphor-state-manager"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+include phosphor-state-manager-systemd-links.inc
+
+STATE_MGR_PACKAGES = " \
+ ${PN}-host \
+ ${PN}-chassis \
+ ${PN}-bmc \
+ ${PN}-hypervisor \
+ ${PN}-discover \
+ ${PN}-host-check \
+ ${PN}-reset-sensor-states \
+ ${PN}-systemd-target-monitor \
+ ${PN}-obmc-targets \
+ ${PN}-scheduled-host-transition \
+ ${PN}-chassis-check-power-status \
+"
+PACKAGE_BEFORE_PN += "${STATE_MGR_PACKAGES}"
+ALLOW_EMPTY:${PN} = "1"
+
+DBUS_PACKAGES = "${STATE_MGR_PACKAGES}"
+
+SYSTEMD_PACKAGES = "${PN}-discover \
+ ${PN}-reset-sensor-states \
+ ${PN}-systemd-target-monitor \
+"
+
+# The host-check function will check if the host is running
+# after a BMC reset.
+# The reset-sensor-states function will reset the host
+# sensors on a BMC reset or system power loss.
+# Neither is required for host state function but are
+# recommended to deal properly with these reset scenarios.
+RRECOMMENDS:${PN}-host = "${PN}-host-check ${PN}-reset-sensor-states"
+
+# The obmc-targets are the base targets required to boot a computer system
+RRECOMMENDS:${PN}-host += "${PN}-obmc-targets"
+
+inherit meson pkgconfig
+inherit obmc-phosphor-dbus-service
+inherit obmc-phosphor-systemd
+
+DEPENDS += "sdbusplus"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "libcereal"
+DEPENDS += "nlohmann-json"
+DEPENDS += "cli11"
+DEPENDS += "libgpiod"
+
+RDEPENDS:${PN}-chassis += "bash"
+
+EXTRA_OEMESON:append = " -Dtests=disabled"
+
+FILES:${PN}-host = "${bindir}/phosphor-host-state-manager"
+DBUS_SERVICE:${PN}-host += "xyz.openbmc_project.State.Host@.service"
+DBUS_SERVICE:${PN}-host += "phosphor-reboot-host@.service"
+SYSTEMD_SERVICE:${PN}-host += "phosphor-reset-host-reboot-attempts@.service"
+SYSTEMD_SERVICE:${PN}-host += "phosphor-clear-one-time@.service"
+SYSTEMD_SERVICE:${PN}-host += "phosphor-set-host-transition-to-running@.service"
+SYSTEMD_SERVICE:${PN}-host += "phosphor-set-host-transition-to-off@.service"
+
+FILES:${PN}-chassis = "${bindir}/phosphor-chassis-state-manager"
+DBUS_SERVICE:${PN}-chassis += "xyz.openbmc_project.State.Chassis@.service"
+
+FILES:${PN}-chassis += "${bindir}/obmcutil"
+
+FILES:${PN}-bmc = "${bindir}/phosphor-bmc-state-manager"
+FILES:${PN}-bmc += "${sysconfdir}/phosphor-systemd-target-monitor/phosphor-service-monitor-default.json"
+DBUS_SERVICE:${PN}-bmc += "xyz.openbmc_project.State.BMC.service"
+DBUS_SERVICE:${PN}-bmc += "obmc-bmc-service-quiesce@.target"
+
+FILES:${PN}-hypervisor = "${bindir}/phosphor-hypervisor-state-manager"
+DBUS_SERVICE:${PN}-hypervisor += "xyz.openbmc_project.State.Hypervisor.service"
+
+FILES:${PN}-discover = "${bindir}/phosphor-discover-system-state"
+SYSTEMD_SERVICE:${PN}-discover += "phosphor-discover-system-state@.service"
+
+FILES:${PN}-host-check = "${bindir}/phosphor-host-check"
+SYSTEMD_SERVICE:${PN}-host-check += "phosphor-reset-host-running@.service"
+FILES:${PN}-host-check = "${bindir}/phosphor-host-reset-recovery"
+SYSTEMD_SERVICE:${PN}-host-check += "phosphor-reset-host-recovery@.service"
+
+
+SYSTEMD_SERVICE:${PN}-reset-sensor-states += "phosphor-reset-sensor-states@.service"
+
+FILES:${PN}-systemd-target-monitor = " \
+ ${bindir}/phosphor-systemd-target-monitor \
+ ${sysconfdir}/phosphor-systemd-target-monitor/phosphor-target-monitor-default.json \
+ "
+SYSTEMD_SERVICE:${PN}-systemd-target-monitor += "phosphor-systemd-target-monitor.service"
+
+FILES:${PN}-scheduled-host-transition = "${bindir}/phosphor-scheduled-host-transition"
+DBUS_SERVICE:${PN}-scheduled-host-transition += "xyz.openbmc_project.State.ScheduledHostTransition@.service"
+
+FILES:${PN}-chassis-check-power-status = "${bindir}/phosphor-chassis-check-power-status"
+SYSTEMD_SERVICE:${PN}-chassis-check-power-status += "phosphor-chassis-check-power-status@.service"
+
+# Chassis power synchronization targets
+# - start-pre: Services to run before we start power on process
+# - start: Services to run to do the chassis power on
+# - on: Services to run once power is on
+# - stop-pre,stop,off: Same as above but applied to powering off
+# - reset-on: Services to check if chassis power is on after bmc reset
+CHASSIS_SYNCH_TARGETS = "start-pre start on stop-pre stop off reset-on"
+
+# Chassis action power targets
+# - on: Services to run to power on the chassis
+# - off: Services to run to power off the chassis
+# - powered-off: Services to run once chassis power is off
+# - reset: Services to check chassis power state and update chassis "on" target
+# - hard-off: Services to force an immediate power off of the chassis
+CHASSIS_ACTION_TARGETS = "poweron poweroff powered-off powerreset hard-poweroff"
+
+# Track all host synchronization point targets
+# - start-pre: Services to run before we start host boot
+# - starting: Services to run to do the host boot
+# - started: Services to run once the host is booted
+# - stop-pre,stopping,stopped: Same as above but applied to shutting down the host
+# - reset-running: Services to check if host is running after bmc reset
+HOST_SYNCH_TARGETS = "start-pre starting started stop-pre stopping stopped reset-running"
+
+# Track all host action targets
+# - start: Will run startmin target, this target used for any additional
+# services that user needs for an initial power on of host.
+# For example, resetting the host reboot count could be put in
+# this target so on any fresh power on, this count is reset.
+# - startmin: Minimum services required to start the host. This target will
+# be called by reboot and start target.
+# - stop: Services to run to shutdown the host
+# - quiesce: Target to enter on host boot failure
+# - graceful-quiesce: Target to enter on host boot failure (allow host graceful shutdown)
+# - shutdown: Tell host to shutdown, then stop system
+# - reset: Services to check if host is running and update host "start" target
+# - crash: Target to run when host crashes. it is very much similar to
+# quiesce target but the only delta is that this target contains
+# multiple services and one of them is the quiesce target.
+# - timeout: Target to run when host watchdog times out
+# - reboot: Reboot the host with a chassis power cycle included
+# - warm-reboot: Reboot the host without a chassis power cycle.
+# - force-warm-reboot: Reboot the host without a chassis power cycle and without
+# notifying the host.
+# - diagnostic-mode: This will be entered when the host is collecting diagnostic
+# data for itself.
+HOST_ACTION_TARGETS = "start startmin stop quiesce graceful-quiesce reset shutdown crash timeout "
+HOST_ACTION_TARGETS += "reboot warm-reboot force-warm-reboot diagnostic-mode"
+
+CHASSIS_SYNCH_FMT = "obmc-power-{0}@.target"
+CHASSIS_ACTION_FMT = "obmc-chassis-{0}@.target"
+HOST_SYNCH_FMT = "obmc-host-{0}@.target"
+HOST_ACTION_FMT = "obmc-host-{0}@.target"
+
+CHASSIS_LINK_SYNCH_FMT = "${CHASSIS_SYNCH_FMT}:obmc-power-{0}@{1}.target"
+CHASSIS_LINK_ACTION_FMT = "${CHASSIS_ACTION_FMT}:obmc-chassis-{0}@{1}.target"
+HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target"
+HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-host-{0}@{1}.target"
+FAN_LINK_FMT = "obmc-fan-control-ready@.target:obmc-fan-control-ready@{0}.target"
+
+# Targets to be executed on checkstop and watchdog timeout
+HOST_ERROR_TARGETS = "timeout"
+
+QUIESCE_TMPL = "obmc-host-quiesce@.target"
+CRASH_TIMEOUT_TGTFMT = "obmc-host-{0}@{1}.target"
+QUIESCE_INSTFMT = "obmc-host-quiesce@{1}.target"
+QUIESCE_FMT = "../${QUIESCE_TMPL}:${CRASH_TIMEOUT_TGTFMT}.wants/${QUIESCE_INSTFMT}"
+
+SYSTEMD_SERVICE:${PN}-obmc-targets += " \
+ obmc-fans-ready.target \
+ obmc-fan-control.target \
+ obmc-fan-control-ready@.target \
+ obmc-fan-watchdog-takeover.target \
+ "
+
+SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS')}"
+SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_ACTION_FMT', 'CHASSIS_ACTION_TARGETS')}"
+SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}"
+SYSTEMD_SERVICE:${PN}-obmc-targets += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}"
+
+SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_SYNCH_FMT', 'CHASSIS_SYNCH_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'CHASSIS_LINK_ACTION_FMT', 'CHASSIS_ACTION_TARGETS', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'FAN_LINK_FMT', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERROR_TARGETS', 'OBMC_HOST_INSTANCES')}"
+
+
+SRC_URI += "git://github.com/openbmc/phosphor-state-manager;branch=master;protocol=https"
+SRCREV = "aaa8d3466b931b9cf5a64e3a972cd23c2b5b90c6"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/storage/estoraged.bb b/recipes-phosphor/storage/estoraged.bb
new file mode 100644
index 0000000000000000000000000000000000000000..5b41d14c9f2a97cf4541f856b55f993b298defdc
--- /dev/null
+++ b/recipes-phosphor/storage/estoraged.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Encrypted storage management daemon"
+DESCRIPTION = "Provides a D-Bus interface to manage an encrypted storage device"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+inherit meson pkgconfig systemd
+
+DEPENDS += "systemd"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "cryptsetup"
+DEPENDS += "openssl"
+DEPENDS += "phosphor-logging"
+DEPENDS += "sdbusplus"
+DEPENDS += "stdplus"
+
+RDEPENDS:${PN} += "e2fsprogs"
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/openbmc/estoraged.git;branch=master;protocol=https"
+SRCREV = "4906f4ef7e04ddbbf18a401a5b9963748270cce2"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.eStoraged.service"
diff --git a/recipes-phosphor/system/obmc-control-bmc/org.openbmc.control.Bmc@.service b/recipes-phosphor/system/obmc-control-bmc/org.openbmc.control.Bmc@.service
new file mode 100644
index 0000000000000000000000000000000000000000..937c3bb99d901ba8bd694fe8625c91769050ea50
--- /dev/null
+++ b/recipes-phosphor/system/obmc-control-bmc/org.openbmc.control.Bmc@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor BMC%i Control
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env control_bmc.exe
+SyslogIdentifier=control_bmc.exe
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/system/obmc-control-bmc_git.bb b/recipes-phosphor/system/obmc-control-bmc_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..70dac0ad7f88c25a237ecc03335bca16c8dcecf5
--- /dev/null
+++ b/recipes-phosphor/system/obmc-control-bmc_git.bb
@@ -0,0 +1,14 @@
+SUMMARY = "OpenBMC org.openbmc.control.Bmc example implementation"
+DESCRIPTION = "A sample implementation for the org.openbmc.control.Bmc DBUS API. \
+org.openbmc.control.Bmc provides APIs for functions like resetting the BMC."
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit skeleton-gdbus
+inherit obmc-phosphor-dbus-service
+inherit pkgconfig
+
+SKELETON_DIR = "bmcctl"
+
+FMT = "org.openbmc.control.Bmc@{0}.service"
+DBUS_SERVICE:${PN} += "${@compose_list(d, 'FMT', 'OBMC_BMC_INSTANCES')}"
diff --git a/recipes-phosphor/telemetry/telemetry_git.bb b/recipes-phosphor/telemetry/telemetry_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..602f7155ba5f335072b08a619c43b20f4430ae79
--- /dev/null
+++ b/recipes-phosphor/telemetry/telemetry_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Telemetry service"
+DESCRIPTION = "Middleware between Redfish Telemetry Service and dbus-sensors"
+HOMEPAGE = "https://github.com/openbmc/telemetry"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "git://github.com/openbmc/telemetry;branch=master;protocol=https"
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "620c65ad386ea542bcc18122577a3aab6dbac96d"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson
+inherit systemd
+
+DEPENDS = "boost \
+ gtest \
+ nlohmann-json \
+ phosphor-logging \
+ sdbusplus \
+ systemd"
+
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Telemetry.service"
+EXTRA_OEMESON = "-Dbuildtest=false"
+
diff --git a/recipes-phosphor/trace-enable/trace-enable.bb b/recipes-phosphor/trace-enable/trace-enable.bb
new file mode 100644
index 0000000000000000000000000000000000000000..37d5a035cf19ee52e70cfebfc3c567f6b2cb2567
--- /dev/null
+++ b/recipes-phosphor/trace-enable/trace-enable.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Enable Linux trace events"
+DESCRIPTION = "Enable Linux trace events based on a configuration file"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+RDEPENDS:${PN} = " \
+ ${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or 'u-boot-fw-utils'} \
+ bash \
+"
+
+S = "${WORKDIR}"
+
+SRC_URI += " file://trace-enable"
+
+TRACE_EVENTS = ""
+
+FILES:${PN} += "${sysconfdir}/trace-events.conf"
+FILES:${PN} += "${libexecdir}/trace-enable"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}
+ for event in ${TRACE_EVENTS}
+ do
+ echo ${event} >> ${D}${sysconfdir}/trace-events.conf
+ done
+ echo >> ${D}${sysconfdir}/trace-events.conf
+ chmod 0644 ${D}${sysconfdir}/trace-events.conf
+
+ install -d ${D}${libexecdir}
+ install -m 0755 ${WORKDIR}/trace-enable ${D}${libexecdir}
+}
+
+SYSTEMD_SERVICE:${PN} = "trace-enable.service"
+
+inherit obmc-phosphor-systemd
diff --git a/recipes-phosphor/trace-enable/trace-enable/trace-enable b/recipes-phosphor/trace-enable/trace-enable/trace-enable
new file mode 100644
index 0000000000000000000000000000000000000000..2c02b67d418eb88def550068470a8da2a1d32ab1
--- /dev/null
+++ b/recipes-phosphor/trace-enable/trace-enable/trace-enable
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -eu
+
+events=""
+
+while read -r line
+do
+ if echo "${line}" >> /sys/kernel/debug/tracing/set_event;
+ then
+ if [ -n "${events}" ]
+ then
+ events="${events},${line}"
+ else
+ events="${line}"
+ fi
+ fi
+done < "${1}"
+
+if [ -n "${events}" ]
+then
+ events="trace_events=${events}"
+ fw_setenv trace_args "${events}"
+else
+ fw_setenv trace_args
+fi
diff --git a/recipes-phosphor/trace-enable/trace-enable/trace-enable.service b/recipes-phosphor/trace-enable/trace-enable/trace-enable.service
new file mode 100644
index 0000000000000000000000000000000000000000..fb630c9b26f757cf16fc794377105379e487e876
--- /dev/null
+++ b/recipes-phosphor/trace-enable/trace-enable/trace-enable.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Enable Linux trace events in the boot loader
+RequiresMountsFor=/etc
+
+[Service]
+Type=oneshot
+ExecStart=/usr/libexec/trace-enable /etc/trace-events.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.Ldap.Config.service b/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.Ldap.Config.service
new file mode 100644
index 0000000000000000000000000000000000000000..20e518d8c625bf3e2475d600b8cccb3b11fc7bc5
--- /dev/null
+++ b/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.Ldap.Config.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Phosphor Ldap config updater
+Wants=nslcd.service nscd.service
+After=nslcd.service nscd.service
+Before=xyz.openbmc_project.Software.Sync.service
+
+[Service]
+ExecStart=/usr/bin/env phosphor-ldap-conf
+SyslogIdentifier=phosphor-ldap-conf
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.User.Manager.service b/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.User.Manager.service
new file mode 100644
index 0000000000000000000000000000000000000000..67d8b8bbc75ea526583da38f13a0c83e2d2bcb18
--- /dev/null
+++ b/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.User.Manager.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor User Manager
+
+[Service]
+ExecStart=/usr/bin/env phosphor-user-manager
+SyslogIdentifier=phosphor-user-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/users/phosphor-user-manager_git.bb b/recipes-phosphor/users/phosphor-user-manager_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..4195053b1eac39410f9835143c2fad21314124aa
--- /dev/null
+++ b/recipes-phosphor/users/phosphor-user-manager_git.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Phosphor User Manager Daemon"
+DESCRIPTION = "Daemon that does user management"
+HOMEPAGE = "http://github.com/openbmc/phosphor-user-manager"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "boost"
+DEPENDS += "nss-pam-ldapd"
+DEPENDS += "systemd"
+PACKAGE_BEFORE_PN = "phosphor-ldap"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN} phosphor-ldap"
+DBUS_PACKAGES = "${USERADD_PACKAGES}"
+# add groups needed for privilege maintenance
+GROUPADD_PARAM:${PN} = "priv-admin; priv-operator; priv-user "
+GROUPADD_PARAM:phosphor-ldap = "priv-admin; priv-operator; priv-user "
+
+DBUS_SERVICE:${PN} += "xyz.openbmc_project.User.Manager.service"
+FILES:phosphor-ldap += " \
+ ${bindir}/phosphor-ldap-conf \
+"
+FILES:${PN} += " \
+ ${base_libdir}/systemd \
+ ${datadir}/dbus-1 \
+ ${datadir}/phosphor-certificate-manager \
+"
+DBUS_SERVICE:phosphor-ldap = " \
+ xyz.openbmc_project.Ldap.Config.service \
+"
+SRC_URI += "git://github.com/openbmc/phosphor-user-manager;branch=master;protocol=https"
+SRCREV = "6dc7ed95c5bf07e8273d6fad79018f5f19a9b77e"
+S = "${WORKDIR}/git"
diff --git a/recipes-phosphor/video/fbterm/fb.modes b/recipes-phosphor/video/fbterm/fb.modes
new file mode 100644
index 0000000000000000000000000000000000000000..dfc51fe97324fe44c2a2b66b222e83151a67ddb6
--- /dev/null
+++ b/recipes-phosphor/video/fbterm/fb.modes
@@ -0,0 +1,7 @@
+mode "800x600-60"
+ # D: 40.00 MHz, H: 37.879 kHz, V: 60.32 Hz
+ geometry 800 600 800 600 32
+ timings 0 88 40 23 1 128 4
+ hsync high
+ vsync high
+endmode
diff --git a/recipes-phosphor/video/fbterm/fbterm b/recipes-phosphor/video/fbterm/fbterm
new file mode 100644
index 0000000000000000000000000000000000000000..0cf29d433ce36af60c72e28ff7bd289f1a86e4a7
--- /dev/null
+++ b/recipes-phosphor/video/fbterm/fbterm
@@ -0,0 +1 @@
+FB_MODE=800x600-60
diff --git a/recipes-phosphor/video/fbterm/fbterm.service b/recipes-phosphor/video/fbterm/fbterm.service
new file mode 100644
index 0000000000000000000000000000000000000000..2b18c91ef14fbbbe2389c41fbc57c46e6faa5916
--- /dev/null
+++ b/recipes-phosphor/video/fbterm/fbterm.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=UART renderer
+Requires=obmc-console@ttyVUART0.service
+
+[Service]
+EnvironmentFile={envfiledir}/fbterm
+ExecStartPre=/usr/sbin/fbset $FB_MODE
+ExecStart=/usr/bin/fbterm --write-only obmc-console-client
diff --git a/recipes-phosphor/video/fbterm_git.bb b/recipes-phosphor/video/fbterm_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..568bbc640b3dfb42dd7548a4dfd7937c862126fb
--- /dev/null
+++ b/recipes-phosphor/video/fbterm_git.bb
@@ -0,0 +1,29 @@
+HOMEPAGE = "https://github.com/jk-ozlabs/fbterm"
+LICENSE = "GPL-2.0-or-later"
+
+SRC_URI += "git://github.com/jk-ozlabs/fbterm.git;nobranch=1;protocol=https"
+SRC_URI += "file://fb.modes"
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d8e20eece214df8ef953ed5857862150"
+
+DEPENDS += "freetype"
+DEPENDS += "fontconfig"
+
+inherit autotools
+inherit pkgconfig
+inherit obmc-phosphor-systemd
+
+SRCREV = "c15430560aeb82a27358cc320af4a29e1296e6c1"
+PV = "1.7+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install-exec
+ install -d ${D}${sysconfdir}/
+ install -m 0644 ${WORKDIR}/fb.modes ${D}${sysconfdir}/
+}
+
+SYSTEMD_SERVICE:${PN} += "fbterm.service"
+SYSTEMD_ENVIRONMENT_FILE:${PN} += "fbterm"
diff --git a/recipes-phosphor/video/uart-render-controller/uart-render-controller.service b/recipes-phosphor/video/uart-render-controller/uart-render-controller.service
new file mode 100644
index 0000000000000000000000000000000000000000..0749f128a4fad150e42796145ed3a6caef7e771e
--- /dev/null
+++ b/recipes-phosphor/video/uart-render-controller/uart-render-controller.service
@@ -0,0 +1,14 @@
+
+[Unit]
+Description=UART render controller
+Requires=xyz.openbmc_project.State.Host@0.service
+After=xyz.openbmc_project.State.Host@0.service
+
+[Service]
+ExecStart=/usr/sbin/obmc-uart-render-controller \
+ /sys/devices/platform/ahb/ahb:apb/1e6e6000.display/vga_pw \
+ /sys/devices/platform/ahb/ahb:apb/1e6e6000.display/dac_mux \
+ fbterm.service
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-phosphor/video/uart-render-controller_git.bb b/recipes-phosphor/video/uart-render-controller_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..387be0f4434397a5cc18944990922ecaf4473674
--- /dev/null
+++ b/recipes-phosphor/video/uart-render-controller_git.bb
@@ -0,0 +1,29 @@
+HOMEPAGE = "https://github.com/jk-ozlabs/uart-render-controller"
+LICENSE = "GPL-2.0-or-later"
+
+SRC_URI += "git://github.com/jk-ozlabs/uart-render-controller;branch=master;protocol=https"
+SRC_URI += "file://uart-render-controller.service"
+
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit autotools
+inherit pkgconfig
+inherit systemd
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "systemd"
+RDEPENDS:${PN} += "fbterm"
+
+SRCREV = "08e854a6c425011d029e4e02241afee5060f15eb"
+PV = "0.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE:${PN} += "uart-render-controller.service"
+
+do_install:append() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/uart-render-controller.service ${D}${systemd_system_unitdir}/
+}
diff --git a/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service b/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service
new file mode 100644
index 0000000000000000000000000000000000000000..0cf5e7cd37fb1be02e6139f80211ed2040d9531c
--- /dev/null
+++ b/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Start Watchdog%i
+Wants=obmc-host-started@%i.target
+After=obmc-host-started@%i.target
+Wants=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service
+After=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service
+Conflicts=obmc-host-stop@%i.target
+ConditionPathExists=!/run/openbmc/host@%i-on
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/watchdog/host%i` /xyz/openbmc_project/watchdog/host%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.State.Watchdog Enabled b true"
+RemainAfterExit=yes
+SyslogIdentifier=obmc-enable-host-watchdog
diff --git a/recipes-phosphor/watchdog/phosphor-watchdog/obmc/watchdog/poweron b/recipes-phosphor/watchdog/phosphor-watchdog/obmc/watchdog/poweron
new file mode 100644
index 0000000000000000000000000000000000000000..a972a470f0620649abfd1d071923de7f3549bbc8
--- /dev/null
+++ b/recipes-phosphor/watchdog/phosphor-watchdog/obmc/watchdog/poweron
@@ -0,0 +1,4 @@
+DEVPATH=/xyz/openbmc_project/watchdog/host0
+SERVICE=xyz.openbmc_project.Watchdog
+TARGET=obmc-host-timeout@0.target
+TIMEOUT_IN_MSEC=30000
diff --git a/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog@.service b/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog@.service
new file mode 100644
index 0000000000000000000000000000000000000000..e559d9fab99ed9fcf15acdd42e5671d6e8507fc6
--- /dev/null
+++ b/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Phosphor %I watchdog
+
+[Service]
+Restart=no
+EnvironmentFile={envfiledir}/obmc/watchdog/%I
+ExecStart=/usr/bin/phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}} --default_interval=${{TIMEOUT_IN_MSEC}}
diff --git a/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf b/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf
new file mode 100644
index 0000000000000000000000000000000000000000..b253249829986b3642833e26fcc944c7acd6c0f4
--- /dev/null
+++ b/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf
@@ -0,0 +1,4 @@
+[Unit]
+Conflicts=obmc-host-stop@0.target
+Conflicts=obmc-chassis-poweroff@0.target
+Conflicts=obmc-host-quiesce@0.target
diff --git a/recipes-phosphor/watchdog/phosphor-watchdog_git.bb b/recipes-phosphor/watchdog/phosphor-watchdog_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..21b597410d94d8b18842fd278a10d66d095b7975
--- /dev/null
+++ b/recipes-phosphor/watchdog/phosphor-watchdog_git.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Phosphor Watchdog application"
+DESCRIPTION = "Application that implements software watchdog"
+HOMEPAGE = "http://github.com/openbmc/phosphor-watchdog"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit meson pkgconfig
+inherit obmc-phosphor-dbus-service
+
+RPROVIDES:${PN} += "virtual/obmc-watchdog"
+PROVIDES += "virtual/obmc-watchdog"
+
+DEPENDS += "cli11"
+DEPENDS += "sdbusplus"
+DEPENDS += "sdeventplus"
+DEPENDS += "phosphor-dbus-interfaces"
+DEPENDS += "phosphor-logging"
+DEPENDS += "systemd"
+
+SRC_URI += "git://github.com/openbmc/phosphor-watchdog;branch=master;protocol=https"
+SRCREV = "90b400938fbed35040d9adf17c2af897b1046e12"
+S = "${WORKDIR}/git"
+
+EXTRA_OEMESON = " \
+ -Dtests=disabled \
+ "
+
+# Copies config file having arguments for host watchdog
+SYSTEMD_ENVIRONMENT_FILE:${PN} +="obmc/watchdog/poweron"
+
+# Install the override to set up a Conflicts relation
+SYSTEMD_OVERRIDE:${PN} += "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
+
+# For now, watching PowerOn is the only usecase
+OBMC_HOST_WATCHDOG_INSTANCES = "poweron"
+
+# This is really a DBUS service but the service name is
+# an argument, so making it this way.
+WATCHDOG_TMPL = "phosphor-watchdog@.service"
+ENABLE_WATCHDOG_TMPL = "obmc-enable-host-watchdog@.service"
+SYSTEMD_SERVICE:${PN} += "${WATCHDOG_TMPL}"
+
+# To Enable Host Watchdog early during poweron
+SYSTEMD_SERVICE:${PN} += "${ENABLE_WATCHDOG_TMPL}"
+
+WATCHDOG_TGTFMT = "phosphor-watchdog@{0}.service"
+ENABLE_WATCHDOG_TGTFMT = "obmc-enable-host-watchdog@{0}.service"
+
+WATCHDOG_FMT = "../${WATCHDOG_TMPL}:obmc-host-startmin@{1}.target.wants/${WATCHDOG_TGTFMT}"
+ENABLE_WATCHDOG_FMT = "../${ENABLE_WATCHDOG_TMPL}:obmc-host-startmin@{0}.target.wants/${ENABLE_WATCHDOG_TGTFMT}"
+
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'WATCHDOG_FMT', 'OBMC_HOST_WATCHDOG_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'ENABLE_WATCHDOG_FMT', 'OBMC_HOST_INSTANCES')}"
diff --git a/recipes-phosphor/webui/phosphor-webui_git.bb b/recipes-phosphor/webui/phosphor-webui_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..f32cc1dcfcba9f46b3dd2fe025667df11993c951
--- /dev/null
+++ b/recipes-phosphor/webui/phosphor-webui_git.bb
@@ -0,0 +1,32 @@
+# This recipe requires online access to build, as it uses NPM for dependency
+# management and resolution.
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "git://github.com/openbmc/phosphor-webui.git;branch=master;protocol=https"
+SRCREV = "f59274e8ec337e7f4b135726d6b846fb813d60cb"
+S = "${WORKDIR}/git"
+
+DEPENDS:prepend = "nodejs-native "
+
+inherit allarch
+
+FILES:${PN} += "${datadir}/www/*"
+
+do_compile () {
+ cd ${S}
+ rm -rf node_modules
+ npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install
+ npm run-script build
+}
+
+do_install () {
+ # create directory structure
+ install -d ${D}${datadir}/www
+ cp -r ${S}/dist/** ${D}${datadir}/www
+ find ${D}${datadir}/www -type f -exec chmod a=r,u+w '{}' +
+ find ${D}${datadir}/www -type d -exec chmod a=rx,u+w '{}' +
+}
+
diff --git a/recipes-phosphor/webui/webui-vue_git.bb b/recipes-phosphor/webui/webui-vue_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..2b32f8e5405ab0ebfbf544b7071a419b43f34727
--- /dev/null
+++ b/recipes-phosphor/webui/webui-vue_git.bb
@@ -0,0 +1,54 @@
+# This recipe requires online access to build, as it uses NPM for dependency
+# management and resolution.
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "git://github.com/openbmc/webui-vue.git;branch=master;protocol=https"
+SRCREV = "78372d6345cf5f1e04d6a8d56c416a7aec70b998"
+S = "${WORKDIR}/git"
+
+DEPENDS:prepend = "nodejs-native "
+
+# allarch is required because the files this recipe produces (html and
+# javascript) are valid for any target, regardless of architecture. The allarch
+# class removes your compiler definitions, as it assumes that anything that
+# requires a compiler is platform specific. Unfortunately, one of the build
+# tools uses libsass for compiling the css templates, and it needs a compiler to
+# build the library that it then uses to compress the scss into normal css.
+# Enabling allarch, then re-adding the compiler flags was the best of the bad
+# options
+
+inherit allarch
+
+export CXX = "${BUILD_CXX}"
+export CC = "${BUILD_CC}"
+export CFLAGS = "${BUILD_CFLAGS}"
+export CPPFLAGS = "${BUILD_CPPFLAGS}"
+export CXXFLAGS = "${BUILD_CXXFLAGS}"
+
+FILES:${PN} += "${datadir}/www/*"
+
+EXTRA_OENPM ?= ""
+
+# Workaround
+# Network access from task are disabled by default on Yocto 3.5
+# https://git.yoctoproject.org/poky/tree/documentation/migration-guides/migration-3.5.rst#n25
+do_compile[network] = "1"
+
+do_compile () {
+ cd ${S}
+ rm -rf node_modules
+ npm --loglevel info --proxy=${http_proxy} --https-proxy=${https_proxy} install
+ npm run build ${EXTRA_OENPM}
+}
+
+do_install () {
+ # create directory structure
+ install -d ${D}${datadir}/www
+ cp -r ${S}/dist/** ${D}${datadir}/www
+ find ${D}${datadir}/www -type f -exec chmod a=r,u+w '{}' +
+ find ${D}${datadir}/www -type d -exec chmod a=rx,u+w '{}' +
+}
+
diff --git a/recipes-protocols/net-snmp/net-snmp_%.bbappend b/recipes-protocols/net-snmp/net-snmp_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..c035fa78e4b815b70db342023411e9c34da62e6c
--- /dev/null
+++ b/recipes-protocols/net-snmp/net-snmp_%.bbappend
@@ -0,0 +1,4 @@
+EXTRA_OECONF += "--disable-mib-loading \
+ --disable-debugging \
+ --disable-md5 \
+ "
diff --git a/recipes-support/boost-url/boost-url_%.bbappend b/recipes-support/boost-url/boost-url_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..618170e93b7e9a56b4916fc61dbcd31a82c13ad0
--- /dev/null
+++ b/recipes-support/boost-url/boost-url_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECMAKE:append:openbmc-phosphor = "-DBOOST_URL_STANDALONE=ON"
diff --git a/recipes-support/boost/boost_%.bbappend b/recipes-support/boost/boost_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..7aaa35c6956c0c0c4009022f07749cc364362081
--- /dev/null
+++ b/recipes-support/boost/boost_%.bbappend
@@ -0,0 +1,12 @@
+#This is largely to improve our build times by not building or installing
+#modules that OpenBMC does not use by our coding standard. Another thing to
+#note is that for most targets, coroutine and context libraries are also added
+#with a BOOST_LIBS:append: for most targets. Chrono/Thread should not
+#be relied directly, but are required dependencies of context and coroutine.
+#See the relevant portion of the openbmc coding standard with regards to boost
+#libraries
+#
+#https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#boost
+#
+BOOST_LIBS:openbmc-phosphor = "chrono thread context coroutine"
+
diff --git a/recipes-support/gnupg/gnupg_%.bbappend b/recipes-support/gnupg/gnupg_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..3f2f4f94f11d0c27a23e2be13f9dd98c87b51327
--- /dev/null
+++ b/recipes-support/gnupg/gnupg_%.bbappend
@@ -0,0 +1,2 @@
+# Remove unneeded gnupg help files to save space
+EXTRA_OECONF:append:gbmc = " --disable-doc"
diff --git a/recipes-support/libgpiod/libgpiod_%.bbappend b/recipes-support/libgpiod/libgpiod_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..0ee1845d2673266673cbfeeae0d508e5d437b191
--- /dev/null
+++ b/recipes-support/libgpiod/libgpiod_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG += " cxx"
diff --git a/recipes-support/lm_sensors/lmsensors-config_1.0.bbappend b/recipes-support/lm_sensors/lmsensors-config_1.0.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..f33b0ad80cb95f99f76496ef1d1195df971aab93
--- /dev/null
+++ b/recipes-support/lm_sensors/lmsensors-config_1.0.bbappend
@@ -0,0 +1,4 @@
+# Prevent lmsensors from pulling in lighttpd as lighttpd
+# uses md4 and we disable openssl md4 support.
+
+RRECOMMENDS:${PN}-cgi:remove = "lighttpd lighttpd-module-cgi"
diff --git a/recipes-support/nss-pam-ldapd/files/nslcd.init b/recipes-support/nss-pam-ldapd/files/nslcd.init
new file mode 100644
index 0000000000000000000000000000000000000000..a27b6e0026b5394b6cf39dc8890e4574aa916f65
--- /dev/null
+++ b/recipes-support/nss-pam-ldapd/files/nslcd.init
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+set -x
+
+NAME="nslcd"
+CONFIG="/etc/nslcd.conf"
+DAEMON="/usr/sbin/nslcd"
+DESC="LDAP connection daemon"
+STATEDIR="/var/run/$NAME"
+PIDFILE="$STATEDIR/$NAME.pid"
+
+start()
+{
+ if [ -e $PIDFILE ]; then
+ PIDDIR=/proc/$(cat $PIDFILE)
+ if [ -d ${PIDDIR} ]; then
+ echo "$DESC already running."
+ exit 1
+ else
+ echo "Removing stale PID file $PIDFILE"
+ rm -f $PIDFILE
+ fi
+ fi
+
+ echo -n "Starting $DESC..."
+
+ start-stop-daemon --start --oknodo \
+ --pidfile $PIDFILE --startas $DAEMON
+
+ if [ $? -eq 0 ]; then
+ echo "done."
+ else
+ echo "failed."
+ fi
+}
+
+stop()
+{
+ echo -n "Stopping $DESC..."
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --name $NAME
+ if [ $? -eq 0 ]; then
+ echo "done."
+ else
+ echo "failed."
+ fi
+ rm -f $PIDFILE
+}
+
+status()
+{
+ if [ -f $PIDFILE ]; then
+ if $DAEMON --check
+ then
+ echo "$DESC is running (pid `cat $PIDFILE`"
+ else
+ echo "$DESC stopped"
+ fi
+ else
+ echo "$DESC stopped"
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|force-reload|reload)
+ stop
+ start
+ ;;
+ status)
+ status
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|force-reload|restart|reload|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes-support/nss-pam-ldapd/files/nslcd.service b/recipes-support/nss-pam-ldapd/files/nslcd.service
new file mode 100644
index 0000000000000000000000000000000000000000..bc6724297dff94840fb2ee1b6bd5d403e374546f
--- /dev/null
+++ b/recipes-support/nss-pam-ldapd/files/nslcd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=LDAP daemon
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/nslcd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.8.bb b/recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.8.bb
new file mode 100644
index 0000000000000000000000000000000000000000..04e6a7e096910cb2fb607ac4a2c59e32016abfea
--- /dev/null
+++ b/recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.8.bb
@@ -0,0 +1,61 @@
+SUMMARY = "NSS and PAM module for using LDAP as a naming service"
+DESCRIPTION = "\
+ daemon for NSS and PAM lookups using LDAP \
+ This package provides a daemon for retrieving user accounts and similar \
+ system information from LDAP. It is used by the libnss-ldapd and \
+ libpam-ldapd packages but is not very useful by itself. \
+ "
+
+HOMEPAGE = "http://arthurdejong.org/nss-pam-ldapd/"
+
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+SECTION = "base"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI = "\
+ http://arthurdejong.org/nss-pam-ldapd/${BPN}-${PV}.tar.gz \
+ file://nslcd.init \
+ file://nslcd.service \
+ "
+
+inherit autotools
+
+SRC_URI[md5sum] = "8c99fdc54f4bf9aca8c5f53fdb1403ff"
+SRC_URI[sha256sum] = "ef7362e7f2003da8c7beb7bcc03c30494acf712625aaac8badc6e7eb16f3453f"
+
+DEPENDS += "libpam openldap krb5"
+
+RDEPENDS:${PN} += "nscd"
+
+EXTRA_OECONF = "\
+ --disable-pynslcd \
+ --libdir=${base_libdir} \
+ --with-pam-seclib-dir=${base_libdir}/security \
+ "
+
+CONFFILES:${PN} += "${sysconfdir}/nslcd.conf"
+
+FILES:${PN} += "${base_libdir}/security ${datadir}"
+FILES:${PN}-dbg += "${base_libdir}/security/.debug"
+
+LDAP_DN ?= "dc=my-domain,dc=com"
+
+do_install:append() {
+ install -D -m 0755 ${WORKDIR}/nslcd.init ${D}${sysconfdir}/init.d/nslcd
+
+ sed -i -e 's/^uid nslcd/# uid nslcd/;' ${D}${sysconfdir}/nslcd.conf
+ sed -i -e 's/^gid nslcd/# gid nslcd/;' ${D}${sysconfdir}/nslcd.conf
+ sed -i -e 's/^base dc=example,dc=com/base ${LDAP_DN}/;' ${D}${sysconfdir}/nslcd.conf
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/nslcd.service ${D}${systemd_system_unitdir}
+}
+
+inherit update-rc.d systemd
+
+INITSCRIPT_NAME = "nslcd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE:${PN} = "nslcd.service"
diff --git a/recipes-support/nss-pam-ldapd_fix/nss-pam-ldapd_%.bbappend b/recipes-support/nss-pam-ldapd_fix/nss-pam-ldapd_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..58ab64aae7c1e175c7c2c6053e9632bedf3ecc06
--- /dev/null
+++ b/recipes-support/nss-pam-ldapd_fix/nss-pam-ldapd_%.bbappend
@@ -0,0 +1,5 @@
+do_install:append() {
+ sed -i -e '$anss_initgroups_ignoreusers ALLLOCAL' ${D}${sysconfdir}/nslcd.conf
+
+ install -m 0644 ${D}${sysconfdir}/nslcd.conf ${D}${sysconfdir}/nslcd.conf.default
+}
diff --git a/recipes-support/openldap/openldap_%.bbappend b/recipes-support/openldap/openldap_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..640c340e441ee208eaa163d8e89cee0bc4a85558
--- /dev/null
+++ b/recipes-support/openldap/openldap_%.bbappend
@@ -0,0 +1,2 @@
+PACKAGECONFIG = "openssl modules \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
diff --git a/recipes-support/rng-tools/rng-tools/10-nice.conf b/recipes-support/rng-tools/rng-tools/10-nice.conf
new file mode 100644
index 0000000000000000000000000000000000000000..de71db451f8c080cf74acee5cdb8a4dfe1da4de1
--- /dev/null
+++ b/recipes-support/rng-tools/rng-tools/10-nice.conf
@@ -0,0 +1,6 @@
+[Service]
+# Make the priority of the random number generator seeding
+# process nearly the lowest on the system but allow
+# daemons to have lower priority if desired. This makes our
+# system much more responsive during boot.
+Nice=18
diff --git a/recipes-support/rng-tools/rng-tools_%.bbappend b/recipes-support/rng-tools/rng-tools_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..98e8130a4571daa6eba964385714c47476c83e67
--- /dev/null
+++ b/recipes-support/rng-tools/rng-tools_%.bbappend
@@ -0,0 +1,26 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://10-nice.conf"
+
+PACKAGECONFIG:remove = "\
+ ${@bb.utils.contains('MACHINE_FEATURES', 'hw-rng', \
+ 'libjitterentropy', '', d)}\
+ "
+
+inherit systemd
+
+FILES:${PN} += "${systemd_system_unitdir}/rngd.service.d"
+
+do_install:append() {
+
+ # When using systemd and using libjitterentropy, install a config
+ # which runs rngd at a 'nice' priority. libjitterentropy uses a
+ # lot of CPU early on in the boot process and makes the whole boot
+ # go slower.
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ if ${@bb.utils.contains('PACKAGECONFIG', 'libjitterentropy', 'true', 'false', d)}; then
+ install -d ${D}${systemd_system_unitdir}/rngd.service.d
+ install -m 644 ${WORKDIR}/10-nice.conf \
+ ${D}${systemd_system_unitdir}/rngd.service.d
+ fi
+ fi
+}
diff --git a/recipes-textproc/json-perl/json-perl_2.97001.bb b/recipes-textproc/json-perl/json-perl_2.97001.bb
new file mode 100644
index 0000000000000000000000000000000000000000..bfa09ded6ebb3df51ec937cafcfe827f8431201f
--- /dev/null
+++ b/recipes-textproc/json-perl/json-perl_2.97001.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "This module is a thin wrapper for JSON::XS-compatible modules with a few \
+additional features. All the backend modules convert a Perl data structure \
+to a JSON text as of RFC4627 (which we know is obsolete but we still stick \
+to; see below for an option to support part of RFC7159) and vice versa. \
+This module uses JSON::XS by default, and when JSON::XS is not available, \
+this module falls back on JSON::PP, which is in the Perl core since 5.14. \
+If JSON::PP is not available either, this module then falls back on \
+JSON::backportPP (which is actually JSON::PP in a different .pm file) \
+bundled in the same distribution as this module. You can also explicitly \
+specify to use Cpanel::JSON::XS, a fork of JSON::XS by Reini Urban."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+PR = "r0"
+
+MAINTAINER= "Poky "
+HOMEPAGE= "https://metacpan.org/release/JSON"
+
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
+file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61"
+
+SRC_URI = "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-2.97001.tar.gz"
+
+SRC_URI[md5sum] = "693d6ff167496362f8ec6c3c5b8ba5ee"
+SRC_URI[sha256sum] = "e277d9385633574923f48c297e1b8acad3170c69fa590e31fa466040fc6f8f5a"
+
+S = "${WORKDIR}/JSON-${PV}"
+
+inherit cpan allarch
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-x86/chassis/x86-power-control_git.bb b/recipes-x86/chassis/x86-power-control_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..45100dd5a9e76603cd1cde0ca0c3e6eccd4e0d05
--- /dev/null
+++ b/recipes-x86/chassis/x86-power-control_git.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Chassis Power Control service for Intel based platforms"
+DESCRIPTION = "Chassis Power Control service for Intel based platforms"
+
+SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=https;branch=master"
+SRCREV = "99e8f9dfe6ed99e201f5920c512587fe3af3cdb9"
+
+PV = "1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson systemd pkgconfig
+inherit obmc-phosphor-dbus-service
+
+def get_service(d):
+ if(d.getVar('OBMC_HOST_INSTANCES') == '0'):
+ return "xyz.openbmc_project.Chassis.Control.Power@0.service"
+ else:
+ return " ".join(["xyz.openbmc_project.Chassis.Control.Power@{}.service".format(x) for x in d.getVar('OBMC_HOST_INSTANCES').split()])
+
+SYSTEMD_SERVICE:${PN} = "${@get_service(d)}"
+
+SYSTEMD_SERVICE:${PN} += "chassis-system-reset.service \
+ chassis-system-reset.target"
+
+DEPENDS += " \
+ boost \
+ i2c-tools \
+ libgpiod \
+ nlohmann-json \
+ sdbusplus \
+ phosphor-logging \
+ "
+FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.Chassis.Control.Power@.service"
diff --git a/recipes-x86/libpeci/libpeci_git.bb b/recipes-x86/libpeci/libpeci_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..ccd894aabf4f8ac2c9c12b9499c9ef54f82e35d5
--- /dev/null
+++ b/recipes-x86/libpeci/libpeci_git.bb
@@ -0,0 +1,17 @@
+SUMMARY = "PECI Library"
+DESCRIPTION = "PECI Library"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7becf906c8f8d03c237bad13bc3dac53"
+inherit cmake pkgconfig systemd
+
+SRC_URI = "git://github.com/openbmc/libpeci;branch=master;protocol=https"
+
+PV = "0.1+git${SRCPV}"
+SRCREV = "7b11280d8e3113aecc4b9ce6e5d818268eb2122c"
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[dbus-raw-peci] = "-DDBUS_RAW_PECI=ON,-DDBUS_RAW_PECI=OFF,boost sdbusplus"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'dbus-raw-peci', 'com.intel.peci.service', '', d)}"
diff --git a/recipes-x86/peci-pcie/peci-pcie_git.bb b/recipes-x86/peci-pcie/peci-pcie_git.bb
new file mode 100644
index 0000000000000000000000000000000000000000..11e2519f3adac4c235ea9f9f444be80951853ab8
--- /dev/null
+++ b/recipes-x86/peci-pcie/peci-pcie_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "PECI PCIe"
+DESCRIPTION = "Gathers PCIe information using PECI \
+and provides it on D-Bus"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7becf906c8f8d03c237bad13bc3dac53"
+inherit cmake pkgconfig systemd
+
+SRC_URI = "git://github.com/openbmc/peci-pcie;branch=master;protocol=https"
+
+DEPENDS = "boost sdbusplus libpeci"
+
+PV = "0.1+git${SRCPV}"
+SRCREV = "328685e5962fb4e563f603fb662633fed00aff0e"
+
+S = "${WORKDIR}/git"
+
+SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.PCIe.service"
+
+EXTRA_OECMAKE = "-DYOCTO=1"
diff --git a/recipes.txt b/recipes.txt
new file mode 100644
index 0000000000000000000000000000000000000000..834b3bfa0d3f618a473e3795510a8b31a9d66e49
--- /dev/null
+++ b/recipes.txt
@@ -0,0 +1,8 @@
+recipes-connectivity - Libraries and applications related to communication with other devices
+recipes-core - What's needed to build a basic working Linux image including commonly used dependencies
+recipes-devtools - Tools primarily used by the build system (but can also be used on targets)
+recipes-extended - Applications which whilst not essential add features compared to the alternatives in
+ core. May be needed for full tool functionality or LSB compliance.
+recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies
+recipes-phosphor - Phosphor OpenBMC applications and configuration
+recipes-protocols - bbappends from recipes-protocols in the meta-networking layer
diff --git a/scripts/run-repotest b/scripts/run-repotest
new file mode 100644
index 0000000000000000000000000000000000000000..9a3f0aa1d684f727df5d57461263cffecbf510e5
--- /dev/null
+++ b/scripts/run-repotest
@@ -0,0 +1,248 @@
+#!/bin/bash -e
+#
+
+script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+obmc_dir=${script_dir}/../../
+
+cd "$obmc_dir"
+
+# openbmc doesn't control what upstream poky, or any of the other layers do,
+# which do use patches as part of their upstreaming process.
+# meta-phosphor is also included such that patches that the community agrees to
+# hold onto will be allowed in that layer.
+
+patch_files_tmp=$(mktemp)
+allowed_patches_tmp=$(mktemp)
+trap 'rm $patch_files_tmp $allowed_patches_tmp' exit
+
+git ls-files -- \
+ '*.patch' \
+ ':!:poky/**' \
+ ':!:meta-security/**' \
+ ':!:meta-raspberrypi/**' \
+ ':!:meta-openembedded/**' \
+ ':!:meta-phosphor/**' \
+ | sort > "$patch_files_tmp"
+
+
+# The following patches were present on master at the time this test was
+# written. Their presence in this list should not be acknowlegement that they
+# are now allowed, but ignoring them is required in the intermediate time
+# between when this test was created, and when the maintainers of these repos
+# clean them up.
+#
+# https://github.com/openbmc/docs/blob/master/meta-layer-guidelines.md
+echo "\
+meta-amd/meta-ethanolx/recipes-x86/chassis/x86-power-control/0001-Amd-power-control-modifications-for-EthanolX.patch
+meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils/0001-flashcp-support-offset-option.patch
+meta-aspeed/recipes-bsp/u-boot/files/default-gcc.patch
+meta-bytedance/meta-g220a/recipes-kernel/linux/linux-aspeed/0005-ARM-dts-aspeed-Enable-g220a-uart-route.patch
+meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-node-manager-proxy/0001-Remove-Total_Power-sensor.patch
+meta-facebook/meta-bletchley/recipes-bsp/u-boot/u-boot-aspeed-sdk/0001-u-boot-ast2600-57600-baudrate-for-bletchley.patch
+meta-facebook/meta-tiogapass/recipes-bsp/u-boot/u-boot-aspeed/0001-configs-ast-common-use-57600-baud-rate-to-match-Tiog.patch
+meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0001-board-aspeed-Add-Mux-for-yosemitev2.patch
+meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0002-spl-host-console-handle.patch
+meta-google/dynamic-layers/nuvoton-layer/recipes-bsp/images/npcm7xx-igps/0001-Set-FIU0_DRD_CFG-and-FIU_Clk_divider-for-gbmc-hoth.patch
+meta-google/recipes-extended/libconfig/files/0001-conf2struct-Use-the-right-perl.patch
+meta-google/recipes-extended/libconfig/files/0001-makefile-Add-missing-LDFLAGS.patch
+meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch
+meta-ingrasys/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-reset_phy-for-Zaius.patch
+meta-nuvoton/recipes-bsp/images/npcm7xx-igps/0001-Adjust-paths-for-use-with-Bitbake.patch
+meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0001-Add-system-reset-status-support.patch
+meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0002-config-ast-common-set-fieldmode-to-true.patch
+meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0003-aspeed-add-gpio-support.patch
+meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0004-aspeed-add-bmc-position-support.patch
+meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/0001-Add-NCSI-channel-selector.patch
+meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control/0001-Stop-and-send-SRESET-for-one-thread-only.patch
+meta-yadro/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Add-boot-initiator-mailbox-interface.patch
+meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-support-for-persistent-only-settings.patch
+meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Add-support-for-boot-initiator-mailbox.patch
+meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-version-parsing-update-AUX-revision-info.patch
+" | sort > "$allowed_patches_tmp"
+
+files_diff=$(comm -23 "$patch_files_tmp" "$allowed_patches_tmp")
+
+files_count=$(echo -n "$files_diff" | grep -c '^' || true)
+if [[ $files_count -ne 0 ]]; then
+ echo "Patch files found not in allow list"
+ echo "$files_diff"
+ echo "Patches are not allowed on OpenBMC in these layers. Please upstream your changes and see \
+ https://github.com/openbmc/docs/blob/master/meta-layer-guidelines.md"
+ exit 1
+fi
+
+# Now verify there are no kernel dts files being added in a patch
+# All dts files should be sent upstream and can be carried in the openbmc/linux
+# tree until they are accepted upstream
+dts_files_tmp=$(mktemp)
+allowed_dts_tmp=$(mktemp)
+trap 'rm $dts_files_tmp $allowed_dts_tmp' exit
+
+git ls-files -- \
+ '*.dts' \
+ ':!:poky/**' \
+ ':!:meta-security/**' \
+ ':!:meta-raspberrypi/**' \
+ ':!:meta-openembedded/**' \
+ | sort > "$dts_files_tmp"
+
+# There is a single dts currently in the tree that we will exempt for now
+echo "\
+meta-hpe/meta-dl360poc/recipes-kernel/linux/linux-obmc/gxp.dts
+" | sort > "$allowed_dts_tmp"
+
+files_diff=$(comm -23 "$dts_files_tmp" "$allowed_dts_tmp")
+
+files_count=$(echo -n "$files_diff" | grep -c '^' || true)
+if [[ $files_count -ne 0 ]]; then
+echo "Dts files found not in allow list"
+echo "$files_diff"
+echo "Dts files are not allowed on OpenBMC in these layers. Please upstream your changes and see \
+ https://github.com/openbmc/docs/blob/master/kernel-development.md"
+exit 1
+fi
+
+lint_exempt="\
+meta-amd/recipes-amd/amd-fpga/files/ethanolx/fpgardu.sh
+meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr/mac-check
+meta-bytedance/meta-g220a/recipes-phosphor/datetime/me-time-sync/me-time-sync.sh
+meta-google/recipes-google/gpio/gpio-ctrl/lib.sh
+meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_isoff.sh
+meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_powercycle.sh
+meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweroff.sh
+meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweron.sh
+meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_reset.sh
+meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/lib.sh
+meta-google/recipes-google/ipmi/ipmi-fru-sh/lib.sh
+meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in
+meta-google/recipes-google/networking/files/gbmc-ip-monitor-test.sh
+meta-google/recipes-google/networking/files/gbmc-ip-monitor.sh
+meta-google/recipes-google/networking/files/gbmc-mac-config.sh.in
+meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh
+meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-gw-src.sh
+meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh
+meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh
+meta-google/recipes-google/networking/google-usb-network/usb_network.sh
+meta-google/recipes-google/networking/google-usb-network/usb_network_test.sh
+meta-google/recipes-google/networking/network-sh/lib.sh
+meta-google/recipes-google/networking/network-sh/test.sh
+meta-google/recipes-google/nftables/files/nft-configure.sh
+meta-google/recipes-google/ssh/authorized-keys-comp/authorized-keys-comp.sh
+meta-google/recipes-google/test/test-sh/test.sh
+meta-google/recipes-phosphor/flash/google-key/verify-bmc-image.sh
+meta-google/recipes-phosphor/flash/inplace-gbmc-update/inplace-gbmc-verify.sh
+meta-hpe/meta-common/recipes-hpe/host/host-boot-enable/host-boot-enable.sh
+meta-hpe/meta-common/recipes-phosphor/initrdscripts/files/gxp-obmc-init.sh
+meta-hpe/meta-dl360poc/recipes-hpe/host/host-boot-enable/host-boot-enable.sh
+meta-ibm/meta-romulus/recipes-phosphor/chassis/vrm-control/vrm-control.sh
+meta-ibm/meta-romulus/recipes-phosphor/gpio/id-button/toggle_identify_led.sh
+meta-ibm/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds.sh
+meta-ibm/recipes-phosphor/chassis/vrm-control/ibm-ac-server/ir35221-unbind-bind.sh
+meta-ibm/recipes-phosphor/chassis/vrm-control/mihawk/ir35221-unbind-bind.sh
+meta-ibm/recipes-phosphor/chassis/vrm-control/vrm-control.sh
+meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall
+meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/pels
+meta-ibm/recipes-phosphor/gpio/id-button/toggle_identify_led.sh
+meta-ibm/recipes-phosphor/mboxd/mboxd/check_pnor_format.sh
+meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh
+meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/zaius_vcs.sh
+meta-inventec/meta-transformers/recipes-phosphor/init/transformers-init/transformers-init.sh
+meta-openpower/recipes-bsp/pdata/files/power-target.sh
+meta-openpower/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/guard
+meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh
+meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
+meta-openpower/recipes-phosphor/occ/openpower-occ-control/occ-active.sh
+meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh
+meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-shutdown.sh
+meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-update.sh
+meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
+meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest
+meta-phosphor/recipes-phosphor/preinit-mounts/preinit-mounts/init
+meta-phosphor/recipes-support/nss-pam-ldapd/files/nslcd.init
+meta-quanta/meta-common/recipes-quanta/network/usb-network/usb-network.sh
+meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh
+meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-verify.sh
+meta-quanta/meta-gbs/recipes-gbs/gbs-bmc-update/files/bmc-verify.sh
+meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh
+meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh
+meta-quanta/meta-gbs/recipes-gbs/hotswap-power-cycle/files/tray_powercycle.sh
+meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-check-host-state.sh
+meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-set-failsafe.sh
+meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/fan-table-init.sh
+meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_json_rewrite.sh
+meta-quanta/meta-gsj/recipes-gsj/detect-fan-fail/files/detect-fan-fail.sh
+meta-quanta/meta-gsj/recipes-gsj/gsj-hotswap-change-setting/files/gsj-hotswap-change-setting.sh
+meta-quanta/meta-gsj/recipes-gsj/quanta-nvme-powerctrl/files/init_once.sh
+meta-quanta/meta-gsj/recipes-gsj/quanta-nvme-powerctrl/files/nvme_powerctrl_library.sh
+meta-quanta/meta-gsj/recipes-gsj/quanta-nvme-powerctrl/files/nvme_powermanager.sh
+meta-quanta/meta-gsj/recipes-gsj/usb-network/files/usb_network.sh
+meta-quanta/meta-gsj/recipes-phosphor/fans/phosphor-pid-control/fan-control.sh
+meta-quanta/meta-gsj/recipes-phosphor/fans/phosphor-pid-control/fan-default-speed.sh
+meta-quanta/meta-olympus-nuvoton/recipes-olympus-nuvoton/power/first-boot-set-psu/first-boot-set-psu.sh
+meta-quanta/meta-olympus-nuvoton/recipes-phosphor/fans/phosphor-pid-control/fan-full-speed.sh
+meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh
+meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh
+meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
+meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control.sh
+"
+
+types=(json shell)
+# shellcheck disable=SC2034
+check_json="eslint --resolve-plugins-relative-to /usr/local/lib/node_modules"
+# shellcheck disable=SC2034
+check_shell="shellcheck -x"
+
+for t in "${types[@]}"; do
+ check_cmd="check_${t}"
+ if ! which "${!check_cmd%% *}" > /dev/null 2>&1; then
+ eval "${check_cmd}=\"echo WARNING: Skipping $t due to missing command:\""
+ echo "${!check_cmd}"
+ fi
+done
+
+non_bbfiles=$(git ls-files -- \
+ ':!:poky/**' \
+ ':!:meta-security/**' \
+ ':!:meta-raspberrypi/**' \
+ ':!:meta-openembedded/**' \
+ | grep -v -e "\.patch$" -e "\.bb$" -e "\.bbappend$")
+
+for f in $non_bbfiles; do
+ unset file_type
+ file_info=$(file "$f")
+ case $file_info in
+ *shell\ script*)
+ file_type="shell"
+ ;;
+
+ *JSON\ data*)
+ file_type="json"
+ ;;
+
+ *)
+ case $f in
+ *.sh)
+ file_type="shell"
+ ;;
+
+ *.json)
+ file_type="json"
+ ;;
+ esac
+ esac
+
+ if [ -n "$file_type" ]; then
+ check_cmd="check_${file_type}"
+ if ! eval "${!check_cmd} $f"; then
+ if [[ $lint_exempt == *$f* ]]; then
+ echo "EXEMPT: $f"
+ else
+ echo "FAILED: $f"
+ false
+ fi
+ fi
+ fi
+
+done
+
+echo "Repo test passed"