meta-ufispace: Add meta-ufispace layer and meta-ncplite machine
Iniitial submission of meta-layer and meta-machine layer.
Tested: Build and run on our machine successfully.
Change-Id: I4920d8ce6aff119ba5cbc4772d84a6377784f85d
Signed-off-by: Jordan Chang <jordan.chang@ufispace.com>
diff --git a/meta-ufispace/COPYING.MIT b/meta-ufispace/COPYING.MIT
new file mode 100644
index 0000000..89de354
--- /dev/null
+++ b/meta-ufispace/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/meta-ufispace/COPYING.apache-2.0 b/meta-ufispace/COPYING.apache-2.0
new file mode 100644
index 0000000..67db858
--- /dev/null
+++ b/meta-ufispace/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/meta-ufispace/LICENSE b/meta-ufispace/LICENSE
new file mode 100644
index 0000000..2b0591e
--- /dev/null
+++ b/meta-ufispace/LICENSE
@@ -0,0 +1,12 @@
+Different components of meta-ufispace 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/meta-ufispace/OWNERS b/meta-ufispace/OWNERS
new file mode 100644
index 0000000..5d81371
--- /dev/null
+++ b/meta-ufispace/OWNERS
@@ -0,0 +1,7 @@
+owners:
+- jay.tc.lin@ufispace.com
+- jordan.chang@ufispace.com
+- hawk.cy.lee@ufispace.com
+- jim.hj.tsan@ufispace.com
+- kyle.xie@ufispace.com
+
diff --git a/meta-ufispace/conf/layer.conf b/meta-ufispace/conf/layer.conf
new file mode 100644
index 0000000..823a2b0
--- /dev/null
+++ b/meta-ufispace/conf/layer.conf
@@ -0,0 +1,10 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/meta-common/recipes-*/*/*.bb \
+ ${LAYERDIR}/meta-common/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "ufispace-layer"
+BBFILE_PATTERN_ufispace-layer := "^${LAYERDIR}/"
+LAYERSERIES_COMPAT_ufispace-layer = "langdale mickledore"
diff --git a/meta-ufispace/conf/machine/include/ufispace.inc b/meta-ufispace/conf/machine/include/ufispace.inc
new file mode 100644
index 0000000..d0753f4
--- /dev/null
+++ b/meta-ufispace/conf/machine/include/ufispace.inc
@@ -0,0 +1,19 @@
+MACHINE_FEATURES += "\
+ obmc-bmc-state-mgmt \
+ obmc-host-state-mgmt \
+ obmc-chassis-state-mgmt \
+ obmc-host-ipmi \
+ obmc-phosphor-chassis-mgmt \
+ obmc-phosphor-fan-mgmt \
+ obmc-phosphor-flash-mgmt \
+ "
+
+PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-ufispace-apps"
+PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "packagegroup-ufispace-apps"
+PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-ufispace-apps"
+PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-ufispace-apps"
+PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "phosphor-ipmi-kcs"
+
+OVERRIDES .= ":ufispace"
+
+IMAGE_FEATURES:remove = "obmc-ikvm"
diff --git a/meta-ufispace/meta-common/recipes-phosphor/network/usb-network.bb b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network.bb
new file mode 100644
index 0000000..14d8486
--- /dev/null
+++ b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network.bb
@@ -0,0 +1,27 @@
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+FILESEXTRAPATHS:append := "${THISDIR}/${PN}"
+SRC_URI += "file://usb-network.sh \
+ file://usb-network.service \
+ file://00-bmc-usb0.network"
+
+inherit allarch systemd
+
+DEPENDS += "systemd"
+RDEPENDS:${PN} += "libsystemd bash"
+
+FILES:${PN} += "${sysconfdir_native}/systemd/network/00-bmc-usb0.network"
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install -m 0755 ${WORKDIR}/usb-network.sh ${D}/${sbindir}
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/usb-network.service ${D}${systemd_unitdir}/system
+
+ install -d ${D}${sysconfdir_native}/systemd/network/
+ install -m 0644 ${WORKDIR}/00-bmc-usb0.network ${D}${sysconfdir_native}/systemd/network
+}
+
+SYSTEMD_SERVICE:${PN} = "usb-network.service"
diff --git a/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/00-bmc-usb0.network b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/00-bmc-usb0.network
new file mode 100644
index 0000000..28d1e9a
--- /dev/null
+++ b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/00-bmc-usb0.network
@@ -0,0 +1,8 @@
+[Match]
+Name=usb0
+[Address]
+Address=169.254.1.2/24
+[Network]
+DHCP=false
+LinkLocalAddressing=no
+IPv6AcceptRA=no
diff --git a/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/usb-network.service b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/usb-network.service
new file mode 100644
index 0000000..6264153
--- /dev/null
+++ b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/usb-network.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Enable USB Network
+After=phosphor-ipmi-host.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/usb-network.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/usb-network.sh b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/usb-network.sh
new file mode 100644
index 0000000..0ea9bd2
--- /dev/null
+++ b/meta-ufispace/meta-common/recipes-phosphor/network/usb-network/usb-network.sh
@@ -0,0 +1,28 @@
+#!/bin/bash -e
+
+cd /sys/kernel/config/usb_gadget
+
+if [ ! -f "g1" ]; then
+ mkdir g1
+ cd g1
+
+ echo 0x1d6b > idVendor # Linux foundation
+ echo 0x0104 > idProduct # Multifunction composite gadget
+ mkdir -p strings/0x409
+ echo "Linux" > strings/0x409/manufacturer
+ echo "Ethernet/ECM gadget" > strings/0x409/product
+
+ mkdir -p configs/c.1
+ echo 100 > configs/c.1/MaxPower
+ mkdir -p configs/c.1/strings/0x409
+ echo "ECM" > configs/c.1/strings/0x409/configuration
+
+ mkdir -p functions/ecm.usb0
+
+ ln -s functions/ecm.usb0 configs/c.1
+
+ # Write the device info in /sys/class/udc to UDC
+ echo 1e6a2000.usb > UDC
+
+fi
+exit 0
diff --git a/meta-ufispace/meta-common/recipes-phosphor/packagegroups/packagegroup-ufispace-apps.bb b/meta-ufispace/meta-common/recipes-phosphor/packagegroups/packagegroup-ufispace-apps.bb
new file mode 100644
index 0000000..52902d5
--- /dev/null
+++ b/meta-ufispace/meta-common/recipes-phosphor/packagegroups/packagegroup-ufispace-apps.bb
@@ -0,0 +1,47 @@
+SUMMARY = "OpenBMC for Ufispace - Applications"
+PR = "r1"
+
+inherit packagegroup
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = " \
+ ${PN}-chassis \
+ ${PN}-fans \
+ ${PN}-flash \
+ ${PN}-system \
+ "
+
+PROVIDES += "virtual/obmc-chassis-mgmt"
+PROVIDES += "virtual/obmc-fan-mgmt"
+PROVIDES += "virtual/obmc-flash-mgmt"
+PROVIDES += "virtual/obmc-system-mgmt"
+
+RPROVIDES:${PN}-chassis += "virtual-obmc-chassis-mgmt"
+RPROVIDES:${PN}-fans += "virtual-obmc-fan-mgmt"
+RPROVIDES:${PN}-flash += "virtual-obmc-flash-mgmt"
+RPROVIDES:${PN}-system += "virtual-obmc-system-mgmt"
+
+SUMMARY:${PN}-chassis = "Ufispace Chassis"
+RDEPENDS:${PN}-chassis = " \
+ phosphor-skeleton-control-power \
+ "
+
+SUMMARY:${PN}-fans = "Ufispace Fans"
+RDEPENDS:${PN}-fans = " \
+ phosphor-pid-control \
+ "
+
+SUMMARY:${PN}-flash = "Ufispace Flash"
+RDEPENDS:${PN}-flash = " \
+ phosphor-software-manager \
+ phosphor-ipmi-blobs \
+ "
+
+SUMMARY:${PN}-system = "Ufispace System"
+RDEPENDS:${PN}-system = " \
+ webui-vue \
+ phosphor-sel-logger \
+ phosphor-state-manager \
+ usb-network \
+ smbios-mdr \
+ "
diff --git a/meta-ufispace/meta-ncplite/conf/layer.conf b/meta-ufispace/meta-ncplite/conf/layer.conf
new file mode 100644
index 0000000..8b95cbb
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/conf/layer.conf
@@ -0,0 +1,10 @@
+# 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 += "ncplite-layer"
+BBFILE_PATTERN_ncplite-layer := "^${LAYERDIR}/"
+LAYERSERIES_COMPAT_ncplite-layer = "langdale mickledore"
diff --git a/meta-ufispace/meta-ncplite/conf/machine/ncplite.conf b/meta-ufispace/meta-ncplite/conf/machine/ncplite.conf
new file mode 100644
index 0000000..00738fb
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/conf/machine/ncplite.conf
@@ -0,0 +1,22 @@
+KMACHINE = "aspeed"
+KERNEL_DEVICETREE = "${KMACHINE}-bmc-ufispace-${MACHINE}.dtb"
+#KERNEL_DEVICETREE = "aspeed-ast2600-evb.dtb"
+
+require conf/machine/include/ast2600.inc
+require conf/machine/include/obmc-bsp-common.inc
+require conf/machine/include/ufispace.inc
+
+UBOOT_MACHINE = "ast2600_openbmc_spl_defconfig"
+#UBOOT_DEVICETREE = "ast2600-${MACHINE}"
+UBOOT_DEVICETREE = "ast2600-evb"
+SPL_BINARY = "spl/u-boot-spl.bin"
+
+SERIAL_CONSOLES = "115200;ttyS4"
+SOCSEC_SIGN_ENABLE = "0"
+FLASH_SIZE = "65536"
+
+VIRTUAL-RUNTIME_obmc-sensors-hwmon = "dbus-sensors"
+
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "ncplite-led-manager-config-native"
+
+IMAGE_FEATURES:remove = "obmc-fan-control"
diff --git a/meta-ufispace/meta-ncplite/conf/templates/default/bblayers.conf.sample b/meta-ufispace/meta-ncplite/conf/templates/default/bblayers.conf.sample
new file mode 100644
index 0000000..8010e1e
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/conf/templates/default/bblayers.conf.sample
@@ -0,0 +1,18 @@
+# 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 \
+ ##OEROOT##/meta-aspeed \
+ ##OEROOT##/meta-ufi \
+ ##OEROOT##/meta-ufi/meta-ncplite \
+ "
diff --git a/meta-ufispace/meta-ncplite/conf/templates/default/conf-notes.txt b/meta-ufispace/meta-ncplite/conf/templates/default/conf-notes.txt
new file mode 100644
index 0000000..9b3c01a
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/conf/templates/default/conf-notes.txt
@@ -0,0 +1,2 @@
+Common targets are:
+ obmc-phosphor-image
diff --git a/meta-ufispace/meta-ncplite/conf/templates/default/local.conf.sample b/meta-ufispace/meta-ncplite/conf/templates/default/local.conf.sample
new file mode 100644
index 0000000..d3c45f7
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/conf/templates/default/local.conf.sample
@@ -0,0 +1,275 @@
+#
+# This file is your local configuration file and is where all local user settings
+# are placed. The comments in this file give some guide to the options a new user
+# to the system might want to change but pretty much any configuration option can
+# be set in this file. More adventurous users can look at local.conf.extended
+# which contains other examples of configuration which can be placed in this file
+# but new users likely won't need any of them initially.
+#
+# Lines starting with the '#' character are commented out and in some cases the
+# default values are provided as comments to show people example syntax. Enabling
+# the option is a question of removing the # character and making any change to the
+# variable as required.
+
+#
+# Machine Selection
+#
+# You need to select a specific machine to target the build with. There are a selection
+# of emulated machines available which can boot and run in the QEMU emulator:
+#
+#MACHINE ?= "qemuarm"
+#MACHINE ?= "qemuarm64"
+#MACHINE ?= "qemumips"
+#MACHINE ?= "qemumips64"
+#MACHINE ?= "qemuppc"
+#MACHINE ?= "qemux86"
+#MACHINE ?= "qemux86-64"
+#
+# There are also the following hardware board target machines included for
+# demonstration purposes:
+#
+#MACHINE ?= "beaglebone-yocto"
+#MACHINE ?= "genericx86"
+#MACHINE ?= "genericx86-64"
+#MACHINE ?= "edgerouter"
+#
+# This sets the default machine to be qemux86 if no other machine is selected:
+MACHINE ??= "ncplite"
+
+#
+# Where to place downloads
+#
+# During a first build the system will download many different source code tarballs
+# from various upstream projects. This can take a while, particularly if your network
+# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
+# can preserve this directory to speed up this part of subsequent builds. This directory
+# is safe to share between multiple builds on the same machine too.
+#
+# The default is a downloads directory under TOPDIR which is the build directory.
+#
+#DL_DIR ?= "${TOPDIR}/downloads"
+
+#
+# Where to place shared-state files
+#
+# BitBake has the capability to accelerate builds based on previously built output.
+# This is done using "shared state" files which can be thought of as cache objects
+# and this option determines where those files are placed.
+#
+# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
+# from these files if no changes were made to the configuration. If changes were made
+# to the configuration, only shared state files where the state was still valid would
+# be used (done using checksums).
+#
+# The default is a sstate-cache directory under TOPDIR.
+#
+#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
+
+#
+# Where to place the build output
+#
+# This option specifies where the bulk of the building work should be done and
+# where BitBake should place its temporary files and output. Keep in mind that
+# this includes the extraction and compilation of many applications and the toolchain
+# which can use Gigabytes of hard disk space.
+#
+# The default is a tmp directory under TOPDIR.
+#
+#TMPDIR = "${TOPDIR}/tmp"
+
+#
+# Default policy config
+#
+# The distribution setting controls which policy settings are used as defaults.
+# The default value is fine for general Yocto project use, at least initially.
+# Ultimately when creating custom policy, people will likely end up subclassing
+# these defaults.
+#
+DISTRO ?= "openbmc-phosphor"
+# As an example of a subclass there is a "bleeding" edge policy configuration
+# where many versions are set to the absolute latest code from the upstream
+# source control systems. This is just mentioned here as an example, its not
+# useful to most new users.
+# DISTRO ?= "poky-bleeding"
+
+#
+# Package Management configuration
+#
+# This variable lists which packaging formats to enable. Multiple package backends
+# can be enabled at once and the first item listed in the variable will be used
+# to generate the root filesystems.
+# Options are:
+# - 'package_deb' for debian style deb files
+# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
+# - 'package_rpm' for rpm style packages
+# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
+# We default to ipk:
+PACKAGE_CLASSES ?= "package_ipk"
+
+#
+# SDK target architecture
+#
+# This variable specifies the architecture to build SDK items for and means
+# you can build the SDK packages for architectures other than the machine you are
+# running the build on (i.e. building i686 packages on an x86_64 host).
+# Supported values are i686, x86_64, aarch64
+#SDKMACHINE ?= "i686"
+
+SANITY_TESTED_DISTROS:append ?= " *"
+
+#
+# Extra image configuration defaults
+#
+# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
+# images. Some of these options are added to certain image types automatically. The
+# variable can contain the following options:
+# "dbg-pkgs" - add -dbg packages for all installed packages
+# (adds symbol information for debugging/profiling)
+# "src-pkgs" - add -src packages for all installed packages
+# (adds source code for debugging)
+# "dev-pkgs" - add -dev packages for all installed packages
+# (useful if you want to develop against libs in the image)
+# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
+# (useful if you want to run the package test suites)
+# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
+# "tools-debug" - add debugging tools (gdb, strace)
+# "eclipse-debug" - add Eclipse remote debugging support
+# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
+# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
+# "debug-tweaks" - make an image suitable for development
+# e.g. ssh root access has a blank password
+# There are other application targets that can be used here too, see
+# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
+# We default to enabling the debugging tweaks.
+EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
+
+#
+# Additional image features
+#
+# The following is a list of additional classes to use when building images which
+# enable extra features. Some available options which can be included in this variable
+# are:
+# - 'buildstats' collect build statistics
+USER_CLASSES ?= "buildstats"
+
+#
+# Runtime testing of images
+#
+# The build system can test booting virtual machine images under qemu (an emulator)
+# after any root filesystems are created and run tests against those images. It can also
+# run tests against any SDK that are built. To enable this uncomment these lines.
+# See classes/test{image,sdk}.bbclass for further details.
+#IMAGE_CLASSES += "testimage testsdk"
+#TESTIMAGE_AUTO_qemuall = "1"
+
+#
+# Interactive shell configuration
+#
+# Under certain circumstances the system may need input from you and to do this it
+# can launch an interactive shell. It needs to do this since the build is
+# multithreaded and needs to be able to handle the case where more than one parallel
+# process may require the user's attention. The default is iterate over the available
+# terminal types to find one that works.
+#
+# Examples of the occasions this may happen are when resolving patches which cannot
+# be applied, to use the devshell or the kernel menuconfig
+#
+# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
+# Note: currently, Konsole support only works for KDE 3.x due to the way
+# newer Konsole versions behave
+#OE_TERMINAL = "auto"
+# By default disable interactive patch resolution (tasks will just fail instead):
+PATCHRESOLVE = "noop"
+
+#
+# Disk Space Monitoring during the build
+#
+# Monitor the disk space during the build. If there is less that 1GB of space or less
+# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
+# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard abort
+# of the build. The reason for this is that running completely out of space can corrupt
+# files and damages the build in ways which may not be easily recoverable.
+# It's necessary to monitor /tmp, if there is no space left the build will fail
+# with very exotic errors.
+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"
+
+#
+# Shared-state files from other locations
+#
+# As mentioned above, shared state files are prebuilt cache data objects which can be
+# used to accelerate build time. This variable can be used to configure the system
+# to search other mirror locations for these objects before it builds the data itself.
+#
+# This can be a filesystem directory, or a remote url such as http or ftp. These
+# would contain the sstate-cache results from previous builds (possibly from other
+# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
+# cache locations to check for the shared objects.
+# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
+# at the end as shown in the examples below. This will be substituted with the
+# correct path within the directory structure.
+#SSTATE_MIRRORS ?= "\
+#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
+#file://.* file:///some/local/dir/sstate/PATH"
+
+#
+# Yocto Project SState Mirror
+#
+# The Yocto Project has prebuilt artefacts available for its releases, you can enable
+# use of these by uncommenting the following line. This will mean the build uses
+# the network to check for artefacts at the start of builds, which does slow it down
+# equally, it will also speed up the builds by not having to build things if they are
+# present in the cache. It assumes you can download something faster than you can build it
+# which will depend on your network.
+#
+#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH"
+
+#
+# Qemu configuration
+#
+# By default native qemu will build with a builtin VNC server where graphical output can be
+# seen. The line below enables the SDL UI frontend too.
+PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
+# By default libsdl2-native will be built, if you want to use your host's libSDL instead of
+# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
+#ASSUME_PROVIDED += "libsdl2-native"
+
+# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds
+# a handy set of menus for controlling the emulator.
+#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
+
+#
+# Hash Equivalence
+#
+# Enable support for automatically running a local hash equivalence server and
+# instruct bitbake to use a hash equivalence aware signature generator. Hash
+# equivalence improves reuse of sstate by detecting when a given sstate
+# artifact can be reused as equivalent, even if the current task hash doesn't
+# match the one that generated the artifact.
+#
+# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
+#
+#BB_HASHSERVE = "auto"
+#BB_SIGNATURE_HANDLER = "OEEquivHash"
+
+#
+# Memory Resident Bitbake
+#
+# Bitbake's server component can stay in memory after the UI for the current command
+# has completed. This means subsequent commands can run faster since there is no need
+# for bitbake to reload cache files and so on. Number is in seconds, after which the
+# server will shut down.
+#
+#BB_SERVER_TIMEOUT = "60"
+
+# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
+# track the version of this file when it was generated. This can safely be ignored if
+# this doesn't mean anything to you.
+CONF_VERSION = "2"
diff --git a/meta-ufispace/meta-ncplite/recipes-kernel/linux/linux-aspeed/ncplite.cfg b/meta-ufispace/meta-ncplite/recipes-kernel/linux/linux-aspeed/ncplite.cfg
new file mode 100644
index 0000000..3f4295b
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-kernel/linux/linux-aspeed/ncplite.cfg
@@ -0,0 +1,41 @@
+#devmem
+CONFIG_DEVMEM=y
+
+#EEPROM driver
+CONFIG_EEPROM_AT24=y
+
+#Sensors driver
+CONFIG_SENSORS_LM75=y
+CONFIG_SENSORS_LM90=y
+
+#Watchdog driver
+CONFIG_WATCHDOG_CORE=y
+
+#NCSI driver
+CONFIG_NET_NCSI=y
+
+#I2C driver
+CONFIG_I2C_MUX_PINCTRL=y
+CONFIG_I2C_MUX_REG=y
+CONFIG_I2C_SLAVE=y
+
+#USB over Ethernet config
+CONFIG_CONFIGFS_FS=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_LIBCOMPOSITE=y
+CONFIG_USB_F_FS=y
+CONFIG_USB_CONFIGFS=y
+CONFIG_USB_CONFIGFS_F_FS=y
+CONFIG_USB_CONFIGFS_ECM=y
+CONFIG_USB_FUNCTIONFS=y
+CONFIG_USB_FUNCTIONFS_GENERIC=y
+
+#AST2600 TACH & PWM driver config
+CONFIG_SENSORS_TACH_ASPEED_AST2600=y
+CONFIG_SENSORS_PWM_FAN=y
+CONFIG_PWM=y
+CONFIG_PWM_SYSFS=y
+CONFIG_PWM_ASPEED_AST2600=y
+
+#AST2600 UDC driver
+CONFIG_USB_ASPEED_UDC=y
diff --git a/meta-ufispace/meta-ncplite/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-ufispace/meta-ncplite/recipes-kernel/linux/linux-aspeed_%.bbappend
new file mode 100644
index 0000000..89118cc
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS:prepend:ncplite := "${THISDIR}/${PN}:"
+SRC_URI += "file://ncplite.cfg"
diff --git a/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led.bb b/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led.bb
new file mode 100644
index 0000000..82f421e
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led.bb
@@ -0,0 +1,27 @@
+SUMMARY = "OpenBMC NCPLite Front Panel LED Monitor"
+DESCRIPTION = "OpenBMC NCPLite Front Panel Monitor"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+inherit systemd
+
+DEPENDS += "systemd"
+RDEPENDS:${PN} += "bash"
+
+SRC_URI += " file://ncplite-led.sh \
+ file://ncplite-led.service \
+ "
+
+do_install() {
+ install -d ${D}${libexecdir}/{BPN}
+ install -m 0755 ${WORKDIR}/ncplite-led.sh ${D}${libexecdir}/{BPN}
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/ncplite-led.service ${D}${systemd_system_unitdir}
+}
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "ncplite-led.service"
diff --git a/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led/ncplite-led.service b/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led/ncplite-led.service
new file mode 100644
index 0000000..6e42fa2
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led/ncplite-led.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=NCPLite Front Panel LED Monitor
+After=xyz.openbmc_project.Inventory.Manager.service
+
+[Service]
+Restart=on-failure
+RestartSec=1s
+ExecStart=@LIBEXECDIR@/ncplite-led/ncplite-led.sh
+SyslogIdentifier=ncplite-led
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led/ncplite-led.sh b/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led/ncplite-led.sh
new file mode 100644
index 0000000..35484d3
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-ncplite/leds/ncplite-led/ncplite-led.sh
@@ -0,0 +1,93 @@
+#!/bin/bash -e
+
+HOST_SERVICE="xyz.openbmc_project.State.HostCondition.Gpio"
+HOST_OBJPATH="/xyz/openbmc_project/Gpios/host0"
+HOST_INTERFACE="xyz.openbmc_project.Condition.HostFirmware"
+HOST_PROPERTY="CurrentFirmwareCondition"
+
+FAN_SERVICE="xyz.openbmc_project.State.FanCtrl"
+FAN_OBJPATH="/xyz/openbmc_project/settings/fanctrl/zone1"
+FAN_INTERFACE="xyz.openbmc_project.Control.Mode"
+FAN_PROPERTY="FailSafe"
+
+PSU_SERVICE="xyz.openbmc_project.Inventory.Manager"
+PSU0_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_PRSNT_L"
+PSU1_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_PRSNT_L"
+PSU0_POWER_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_POWER_OK"
+PSU1_POWER_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_POWER_OK"
+PSU_INTERFACE="xyz.openbmc_project.Inventory.Item"
+PSU_PROPERTY="Present"
+
+CPLD_LED_offset1=0x80
+CPLD_LED_offset2=0x81
+CPLD_SYS_FAN_reg=0
+CPLD_PSU0_PSU1_reg=0
+
+while true; do
+ #System status LED
+ system_status=$(busctl get-property ${HOST_SERVICE} ${HOST_OBJPATH} ${HOST_INTERFACE} ${HOST_PROPERTY} | awk '{print $2}' | tr -d "\"" | awk -F . '{print $NF}')
+
+ if [ "${system_status}" == "Running" ]; then
+ #Solid Green
+ CPLD_SYS_reg=0x90
+ else
+ #Solid Yellow
+ CPLD_SYS_reg=0x80
+ fi
+
+ #Fan status LED
+ fan_status=$(busctl get-property ${FAN_SERVICE} ${FAN_OBJPATH} ${FAN_INTERFACE} ${FAN_PROPERTY} | awk '{print $2}')
+
+ if [ "${fan_status}" == "true" ]; then
+ #Blink Yellow
+ CPLD_FAN_reg=0xc
+ else
+ #Solid Green
+ CPLD_FAN_reg=0x9
+ fi
+
+ CPLD_SYS_FAN_reg=$((CPLD_SYS_reg | CPLD_FAN_reg))
+
+ #PSU0 status LED
+ psu0_prsnt_status=$(busctl get-property ${PSU_SERVICE} ${PSU0_PRESENT_OBJPATH} ${PSU_INTERFACE} ${PSU_PROPERTY} | awk '{print $2}')
+
+ psu0_power_status=$(busctl get-property ${PSU_SERVICE} ${PSU0_POWER_OBJPATH} ${PSU_INTERFACE} ${PSU_PROPERTY} | awk '{print $2}')
+
+ if [ "${psu0_prsnt_status}" == "true" ]; then
+ if [ "${psu0_power_status}" == "true" ]; then
+ #Solid Green
+ CPLD_PSU0_reg=0x9
+ else
+ #Blink Yellow
+ CPLD_PSU0_reg=0xc
+ fi
+ else
+ CPLD_PSU0_reg=0x0
+ fi
+
+ #PSU1 status LED
+ psu1_prsnt_status=$(busctl get-property ${PSU_SERVICE} ${PSU1_PRESENT_OBJPATH} ${PSU_INTERFACE} ${PSU_PROPERTY} | awk '{print $2}')
+
+ psu1_power_status=$(busctl get-property ${PSU_SERVICE} ${PSU1_POWER_OBJPATH} ${PSU_INTERFACE} ${PSU_PROPERTY} | awk '{print $2}')
+
+ if [ "${psu1_prsnt_status}" == "true" ]; then
+ if [ "${psu1_power_status}" == "true" ]; then
+ #Solid Green
+ CPLD_PSU1_reg=0x90
+ else
+ #Blink Yellow
+ CPLD_PSU1_reg=0xc0
+ fi
+ else
+ CPLD_PSU1_reg=0x0
+ fi
+
+ CPLD_PSU0_PSU1_reg=$((CPLD_PSU0_reg | CPLD_PSU1_reg))
+
+ i2cset -f -y 2 0x40 "${CPLD_LED_offset1}" "${CPLD_SYS_FAN_reg}" > /dev/null 2>&1
+ i2cset -f -y 2 0x40 "${CPLD_LED_offset2}" "${CPLD_PSU0_PSU1_reg}" > /dev/null 2>&1
+
+ sleep 2
+done
+
+exit 0
diff --git a/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/files/inventory-log.service b/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/files/inventory-log.service
new file mode 100644
index 0000000..f02821f
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/files/inventory-log.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Check GPIO State Manager
+After=phosphor-gpio-presence@.service
+Wants=phosphor-gpio-presence@.service
+
+[Service]
+ExecStart=@LIBEXECDIR@/ncplite-inventory-log/inventory-log.sh
+SyslogIdentifier=inventory-log
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/files/inventory-log.sh b/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/files/inventory-log.sh
new file mode 100644
index 0000000..ee30b0e
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/files/inventory-log.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+SERVICE_NAME="xyz.openbmc_project.Inventory.Manager"
+INVENTORY_OBJPATH=( \
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/ALL_PWR_GOOD_H"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/FAN_STATUS_INT_L"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/THERMAL_ALERT_L"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/CPU_CATERR_L"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/CPU_THERMTEIP_L"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_INT_L"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_INT_L"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_POWER_OK"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_POWER_OK"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_PRSNT_L"
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_PRSNT_L"
+)
+INTERFACE_NAME="xyz.openbmc_project.Inventory.Item"
+
+IPMI_LOG_SERVICE="xyz.openbmc_project.Logging.IPMI"
+IPMI_LOG_OBJPATH="/xyz/openbmc_project/Logging/IPMI"
+IPMI_LOG_INTERFACE="xyz.openbmc_project.Logging.IPMI"
+IPMI_LOG_FUNCT="IpmiSelAdd"
+IPMI_LOG_PARA_FORMAT="ssaybq" #5 parameters, s : string, s : string, ay : byte array, b : boolean, q : UINT16
+
+LOG_ERR="Configuration Error(Incorrect_interconnection)"
+LOG_EVENT_DATA="3 0x01 0xff 0xff"
+LOG_ASSERT_FLAG="true"
+LOG_DEASSERT_FLAG="false"
+LOG_GENID_FLAG="0x0020"
+
+initial_state=("false" "false" "false" "false" "false" "false" "false" "false" "false" "false" "false" "false")
+
+for i in "${!INVENTORY_OBJPATH[@]}"
+do
+ mapper wait "${INVENTORY_OBJPATH[$i]}"
+done
+
+while true; do
+ for i in "${!INVENTORY_OBJPATH[@]}"
+ do
+ current_status="$(busctl get-property $SERVICE_NAME "${INVENTORY_OBJPATH[$i]}" $INTERFACE_NAME Present | awk '{print $2}')"
+
+ if [ "$current_status" == "true" ] && [ "${initial_state[$i]}" == "false" ];then
+ initial_state[$i]="true"
+ busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT "$LOG_ERR" "${INVENTORY_OBJPATH[$i]}" "$LOG_EVENT_DATA" $LOG_ASSERT_FLAG $LOG_GENID_FLAG
+ elif [ "$current_status" == "false" ] && [ "${initial_state[$i]}" == "true" ]; then
+ initial_state[$i]="false"
+ busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT "$LOG_ERR" "${INVENTORY_OBJPATH[$i]}" "$LOG_EVENT_DATA" $LOG_DEASSERT_FLAG $LOG_GENID_FLAG
+ fi
+ done
+ usleep 100000
+done
+
+exit 0
diff --git a/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/ncplite-inventory-log.bb b/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/ncplite-inventory-log.bb
new file mode 100644
index 0000000..43d2c05
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-ncplite/ncplite-inventory-log/ncplite-inventory-log.bb
@@ -0,0 +1,25 @@
+SUMMARY = "OpenBMC NCPLite Check Inventory State Service"
+DESCRIPTION = "OpenBMC NCPLite Check Inventory State Daemon."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit systemd
+
+DEPENDS += "systemd"
+RDEPENDS:${PN} += "bash"
+
+SRC_URI = " file://inventory-log.sh \
+ file://inventory-log.service \
+ "
+
+do_install() {
+ install -d ${D}${libexecdir}/${BPN}
+ install -m 0755 ${WORKDIR}/inventory-log.sh ${D}${libexecdir}/${BPN}
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/inventory-log.service ${D}${systemd_system_unitdir}
+}
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "inventory-log.service"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/entity-manager/blacklist.json b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/entity-manager/blacklist.json
new file mode 100644
index 0000000..e573a17
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/entity-manager/blacklist.json
@@ -0,0 +1,3 @@
+{
+ "buses": [0, 1, 2, 8, 10]
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/entity-manager_%.bbappend
new file mode 100644
index 0000000..62e1499
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " file://blacklist.json"
+
+do_install:append () {
+ install -m 0644 -D ${WORKDIR}/blacklist.json ${D}${datadir}/${PN}/blacklist.json
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config.bb b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config.bb
new file mode 100644
index 0000000..d304eed
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config.bb
@@ -0,0 +1,33 @@
+SUMMARY = "YAML configuration for NCPLite"
+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://ncplite-ipmi-fru.yaml \
+ file://ncplite-ipmi-fru-properties.yaml \
+ file://ncplite-ipmi-sensors.yaml \
+ file://ncplite-ipmi-inventory-sensors.yaml \
+ "
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -m 0644 -D ncplite-ipmi-fru.yaml \
+ ${D}${datadir}/${BPN}/ipmi-fru-read.yaml
+ install -m 0644 -D ncplite-ipmi-fru-properties.yaml \
+ ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
+ install -m 0644 -D ncplite-ipmi-sensors.yaml \
+ ${D}${datadir}/${BPN}/ipmi-sensors.yaml
+ install -m 0644 -D ncplite-ipmi-inventory-sensors.yaml \
+ ${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml
+}
+
+FILES:${PN}-dev = " \
+ ${datadir}/${BPN}/ipmi-fru-read.yaml \
+ ${datadir}/${BPN}/ipmi-extra-properties.yaml \
+ ${datadir}/${BPN}/ipmi-sensors.yaml \
+ ${datadir}/${BPN}/ipmi-inventory-sensors.yaml \
+ "
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-fru-properties.yaml b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-fru-properties.yaml
new file mode 100644
index 0000000..082976b
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-fru-properties.yaml
@@ -0,0 +1,35 @@
+/system/chassis/motherboard:
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: "true"
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: "true"
+ xyz.openbmc_project.Inventory.Item:
+ Present: "true"
+/system:
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: "true"
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: "true"
+ xyz.openbmc_project.Inventory.Item:
+ Present: "true"
+/system/chassis:
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: "false"
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: "false"
+ xyz.openbmc_project.Inventory.Item:
+ Present: "true"
+/system/chassis/psu0:
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: "false"
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: "true"
+ xyz.openbmc_project.Inventory.Item:
+ Present: "true"
+/system/chassis/psu1:
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: "false"
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: "true"
+ xyz.openbmc_project.Inventory.Item:
+ Present: "true"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-fru.yaml b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-fru.yaml
new file mode 100644
index 0000000..01d4ff0
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-fru.yaml
@@ -0,0 +1,118 @@
+0:
+ /system/chassis:
+ entityID: 23
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ Model:
+ IPMIFruProperty: Type
+ IPMIFruSection: Chassis
+ /system/chassis/motherboard:
+ entityID: 7
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruProperty: Mfg Date
+ IPMIFruSection: Board
+ Manufacturer:
+ IPMIFruProperty: Manufacturer
+ IPMIFruSection: Board
+ PartNumber:
+ IPMIFruProperty: Part Number
+ IPMIFruSection: Board
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Board
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Board
+ /system:
+ entityID: 7
+ entityInstance: 2
+ interfaces:
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ Manufacturer:
+ IPMIFruProperty: Manufacturer
+ IPMIFruSection: Product
+ PartNumber:
+ IPMIFruProperty: Model Number
+ IPMIFruSection: Product
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruProperty: Version
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.AssetTag:
+ AssetTag:
+ IPMIFruProperty: Asset Tag
+ IPMIFruSection: Product
+1:
+ /system/chassis/psu0:
+ entityID: 0x13
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ Manufacturer:
+ IPMIFruProperty: Manufacturer
+ IPMIFruSection: Product
+ PartNumber:
+ IPMIFruProperty: Model Number
+ IPMIFruSection: Product
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruProperty: Version
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.AssetTag:
+ AssetTag:
+ IPMIFruProperty: Asset Tag
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.VendorInformation:
+ CustomField1:
+ IPMIFruProperty: FRU File ID
+ IPMIFruSection: Product
+2:
+ /system/chassis/psu1:
+ entityID: 0x13
+ entityInstance: 2
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ Manufacturer:
+ IPMIFruProperty: Manufacturer
+ IPMIFruSection: Product
+ PartNumber:
+ IPMIFruProperty: Model Number
+ IPMIFruSection: Product
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruProperty: Version
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.AssetTag:
+ AssetTag:
+ IPMIFruProperty: Asset Tag
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.VendorInformation:
+ CustomField1:
+ IPMIFruProperty: FRU File ID
+ IPMIFruSection: Product
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-inventory-sensors.yaml b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-inventory-sensors.yaml
new file mode 100644
index 0000000..191a7d1
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-inventory-sensors.yaml
@@ -0,0 +1,245 @@
+/xyz/openbmc_project/sensors/temperature/TEMP_ENV_FRONT:
+ sensorID: 0xf
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/TEMP_ENV_REAR:
+ sensorID: 0x10
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/TEMP_MAC_ENV:
+ sensorID: 0x11
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/TEMP_MAC_DIE:
+ sensorID: 0x12
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/TEMP_CPU_ENV_2:
+ sensorID: 0x13
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/TEMP_ENV_BMC:
+ sensorID: 0x14
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P3V3_ADC0:
+ sensorID: 0x20
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P1V8_ADC1:
+ sensorID: 0x21
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P1V2_ADC2:
+ sensorID: 0x22
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P1V2_ADC3:
+ sensorID: 0x23
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P0V8_ADC4:
+ sensorID: 0x24
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P0V8_ADC5:
+ sensorID: 0x25
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P1V2_ADC6:
+ sensorID: 0x26
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P0V88_ADC8:
+ sensorID: 0x27
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/P2V5_ADC9:
+ sensorID: 0x28
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/FAN0_RPM:
+ sensorID: 0x30
+ sensorType: 4
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/FAN1_RPM:
+ sensorID: 0x31
+ sensorType: 4
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/FAN2_RPM:
+ sensorID: 0x32
+ sensorType: 4
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/FAN3_RPM:
+ sensorID: 0x33
+ sensorType: 4
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/inventory/system/chassis/motherboard/ALL_PWR_GOOD_H:
+ sensorID: 0x40
+ sensorType: 0x15
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/FAN_STATUS_INT_L:
+ sensorID: 0x41
+ sensorType: 0x15
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/THERMAL_ALERT_L:
+ sensorID: 0x42
+ sensorType: 0x15
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/CPU_CATERR_L:
+ sensorID: 0x43
+ sensorType: 0x7
+ eventReadingType: 0x6f
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/CPU_THERMTEIP_L:
+ sensorID: 0x44
+ sensorType: 0x7
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_INT_L:
+ sensorID: 0x45
+ sensorType: 0x9
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_INT_L:
+ sensorID: 0x46
+ sensorType: 0x9
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_POWER_OK:
+ sensorID: 0x47
+ sensorType: 0x9
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_POWER_OK:
+ sensorID: 0x48
+ sensorType: 0x9
+ eventReadingType: 0x03
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU0_PRSNT_L:
+ sensorID: 0x49
+ sensorType: 0x9
+ eventReadingType: 0x08
+ offset: 0x03
+/xyz/openbmc_project/inventory/system/chassis/motherboard/PSU1_PRSNT_L:
+ sensorID: 0x4a
+ sensorType: 0x9
+ eventReadingType: 0x8
+ offset: 0x03
+/xyz/openbmc_project/sensors/voltage/PSU0_VIN:
+ sensorID: 0x60
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/PSU0_VOUT:
+ sensorID: 0x61
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/PSU0_IIN:
+ sensorID: 0x62
+ sensorType: 3
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/PSU0_IOUT:
+ sensorID: 0x63
+ sensorType: 3
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/PSU0_FAN1:
+ sensorID: 0x64
+ sensorType: 4
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/PSU0_TEMP1:
+ sensorID: 0x65
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/PSU0_TEMP2:
+ sensorID: 0x66
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/PSU0_TEMP3:
+ sensorID: 0x67
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/PSU1_VIN:
+ sensorID: 0x70
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/voltage/PSU1_VOUT:
+ sensorID: 0x71
+ sensorType: 2
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/PSU1_IIN:
+ sensorID: 0x72
+ sensorType: 3
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/current/PSU1_IOUT:
+ sensorID: 0x73
+ sensorType: 3
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/fan_tach/PSU1_FAN1:
+ sensorID: 0x74
+ sensorType: 4
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/PSU1_TEMP1:
+ sensorID: 0x75
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/PSU1_TEMP2:
+ sensorID: 0x76
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/sensors/temperature/PSU1_TEMP3:
+ sensorID: 0x77
+ sensorType: 1
+ eventReadingType: 1
+ offset: 0xff
+/xyz/openbmc_project/watchdog/host0:
+ sensorID: 0xff
+ sensorType: 0x23
+ eventReadingType: 0x6f
+ offset: 0xff
+/xyz/openbmc_project/state/host0:
+ sensorID: 0xff
+ sensorType: 0x09
+ eventReadingType: 0x6f
+ offset: 0xff
+/xyz/openbmc_project/state/chassis0:
+ sensorID: 0xff
+ sensorType: 0x14
+ eventReadingType: 0x6f
+ offset: 0xff
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-sensors.yaml b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-sensors.yaml
new file mode 100644
index 0000000..7f4a92c
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/configuration/ncplite-yaml-config/ncplite-ipmi-sensors.yaml
@@ -0,0 +1,399 @@
+0xf: &temperature
+ entityID: 0x07
+ entityInstance: 0
+ sensorType: 0x01
+ path: /xyz/openbmc_project/sensors/temperature/TEMP_ENV_FRONT
+ sensorReadingType: 0x01
+ multiplierM: 1
+ offsetB: 0
+ bExp: 0
+ rExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+
+0x10:
+ <<: *temperature
+ entityInstance: 1
+ path: /xyz/openbmc_project/sensors/temperature/TEMP_ENV_REAR
+
+0x11:
+ <<: *temperature
+ entityInstance: 2
+ path: /xyz/openbmc_project/sensors/temperature/TEMP_MAC_ENV
+
+0x12:
+ <<: *temperature
+ entityInstance: 3
+ path: /xyz/openbmc_project/sensors/temperature/TEMP_MAC_DIE
+
+0x13:
+ <<: *temperature
+ entityInstance: 4
+ path: /xyz/openbmc_project/sensors/temperature/TEMP_CPU_ENV_2
+
+0x14:
+ <<: *temperature
+ entityInstance: 5
+ path: /xyz/openbmc_project/sensors/temperature/TEMP_ENV_BMC
+
+0x20: &voltage
+ entityID: 0x07
+ entityInstance: 5
+ sensorType: 0x02
+ path: /xyz/openbmc_project/sensors/voltage/P3V3_ADC0
+ sensorReadingType: 0x01
+ multiplierM: 235
+ offsetB: 0
+ bExp: 0
+ rExp: -4
+ unit: xyz.openbmc_project.Sensor.Value.Unit.Volts
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+
+0x21:
+ <<: *voltage
+ entityInstance: 6
+ path: /xyz/openbmc_project/sensors/voltage/P1V8_ADC1
+ multiplierM: 71
+
+0x22:
+ <<: *voltage
+ entityInstance: 7
+ path: /xyz/openbmc_project/sensors/voltage/P1V2_ADC2
+ multiplierM: 71
+
+0x23:
+ <<: *voltage
+ entityInstance: 8
+ path: /xyz/openbmc_project/sensors/voltage/P1V2_ADC3
+ multiplierM: 71
+
+0x24:
+ <<: *voltage
+ entityInstance: 9
+ path: /xyz/openbmc_project/sensors/voltage/P0V8_ADC4
+ multiplierM: 71
+
+0x25:
+ <<: *voltage
+ entityInstance: 10
+ path: /xyz/openbmc_project/sensors/voltage/P0V8_ADC5
+ multiplierM: 71
+
+0x26:
+ <<: *voltage
+ entityInstance: 11
+ path: /xyz/openbmc_project/sensors/voltage/P1V2_ADC6
+ multiplierM: 71
+
+0x27:
+ <<: *voltage
+ entityInstance: 12
+ path: /xyz/openbmc_project/sensors/voltage/P0V88_ADC8
+ multiplierM: 71
+
+0x28:
+ <<: *voltage
+ entityInstance: 13
+ path: /xyz/openbmc_project/sensors/voltage/P2V5_ADC9
+ multiplierM: 173
+
+0x30: &fan_tach
+ entityID: 0x0A
+ entityInstance: 0
+ sensorType: 0x04
+ path: /xyz/openbmc_project/sensors/fan_tach/FAN0_RPM
+ sensorReadingType: 0x01
+ multiplierM: 100
+ offsetB: 0
+ bExp: 0
+ rExp: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 255:
+ type: double
+
+0x31:
+ <<: *fan_tach
+ entityInstance: 1
+ path: /xyz/openbmc_project/sensors/fan_tach/FAN1_RPM
+
+0x32:
+ <<: *fan_tach
+ entityInstance: 2
+ path: /xyz/openbmc_project/sensors/fan_tach/FAN2_RPM
+
+0x33:
+ <<: *fan_tach
+ entityInstance: 3
+ path: /xyz/openbmc_project/sensors/fan_tach/FAN3_RPM
+
+0x40: &discrete
+ entityID: 0x07
+ entityInstance: 16
+ sensorType: 0x15
+ path: /system/chassis/motherboard/ALL_PWR_GOOD_H
+ sensorReadingType: 0x03
+ mutability: Mutability::Read
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+ readingType: assertion
+ interfaces:
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 0x01:
+ assert: true
+ type: bool
+ 0x00:
+ assert: false
+ type: bool
+
+0x41:
+ <<: *discrete
+ entityID: 0x07
+ entityInstance: 17
+ sensorType: 0x15
+ path: /system/chassis/motherboard/FAN_STATUS_INT_L
+
+0x42:
+ <<: *discrete
+ entityID: 0x07
+ entityInstance: 18
+ sensorType: 0x15
+ path: /system/chassis/motherboard/THERMAL_ALERT_L
+
+0x43:
+ <<: *discrete
+ entityID: 0x03
+ entityInstance: 0
+ sensorType: 0x7
+ path: /system/chassis/motherboard/CPU_CATERR_L
+
+0x44:
+ <<: *discrete
+ entityID: 0x03
+ entityInstance: 1
+ sensorType: 0x7
+ path: /system/chassis/motherboard/CPU_THERMTEIP_L
+
+0x45:
+ <<: *discrete
+ entityID: 0x13
+ entityInstance: 3
+ sensorType: 0x9
+ path: /system/chassis/motherboard/PSU0_INT_L
+
+0x46:
+ <<: *discrete
+ entityID: 0x13
+ entityInstance: 4
+ sensorType: 0x9
+ path: /system/chassis/motherboard/PSU1_INT_L
+
+0x47:
+ <<: *discrete
+ entityID: 0x13
+ entityInstance: 5
+ sensorType: 0x09
+ path: /system/chassis/motherboard/PSU0_POWER_OK
+
+0x48:
+ <<: *discrete
+ entityID: 0x13
+ entityInstance: 6
+ sensorType: 0x09
+ path: /system/chassis/motherboard/PSU1_POWER_OK
+
+0x49:
+ <<: *discrete
+ entityID: 0x13
+ entityInstance: 7
+ sensorType: 0x09
+ sensorReadingType: 0x08
+ path: /system/chassis/motherboard/PSU0_PRSNT_L
+
+0x4a:
+ <<: *discrete
+ entityID: 0x13
+ entityInstance: 8
+ sensorType: 0x09
+ sensorReadingType: 0x08
+ path: /system/chassis/motherboard/PSU1_PRSNT_L
+
+0x4b:
+ <<: *discrete
+ entityID: 0x7
+ entityInstance: 19
+ sensorType: 0x15
+ path: /system/chassis/motherboard/FAN0_PRSNT_L
+
+0x4c:
+ <<: *discrete
+ entityID: 0x7
+ entityInstance: 20
+ sensorType: 0x15
+ path: /system/chassis/motherboard/FAN1_PRSNT_L
+
+0x4d:
+ <<: *discrete
+ entityID: 0x7
+ entityInstance: 21
+ sensorType: 0x15
+ path: /system/chassis/motherboard/FAN2_PRSNT_L
+
+0x4e:
+ <<: *discrete
+ entityID: 0x7
+ entityInstance: 22
+ sensorType: 0x15
+ path: /system/chassis/motherboard/FAN3_PRSNT_L
+
+#PSU0 temperature, voltage, fan sensors
+0x60:
+ <<: *voltage
+ entityID: 0x13
+ entityInstance: 10
+ path: /xyz/openbmc_project/sensors/voltage/PSU0_VIN
+ rExp: 0
+ multiplierM: 1
+
+0x61:
+ <<: *voltage
+ entityID: 0x13
+ entityInstance: 11
+ path: /xyz/openbmc_project/sensors/voltage/PSU0_VOUT
+ rExp: -2
+ multiplierM: 5
+
+0x62: ¤t
+ entityID: 0x13
+ entityInstance: 12
+ sensorType: 0x03
+ path: /xyz/openbmc_project/sensors/current/PSU0_IIN
+ sensorReadingType: 0x01
+ multiplierM: 16
+ offsetB: 0
+ bExp: 0
+ rExp: -3
+ unit: xyz.openbmc_project.Sensor.Value.Unit.Amperes
+ mutability: Mutability::Read
+ serviceInterface: org.freedesktop.DBus.Properties
+ readingType: readingData
+ sensorNamePattern: nameLeaf
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 0xFF:
+ type: double
+
+0x63:
+ <<: *current
+ entityID: 0x13
+ entityInstance: 13
+ path: /xyz/openbmc_project/sensors/current/PSU0_IOUT
+ multiplierM: 70
+ rExp: -2
+
+0x64:
+ <<: *fan_tach
+ entityID: 0x13
+ entityInstance: 14
+ path: /xyz/openbmc_project/sensors/fan_tach/PSU0_FAN1
+
+0x65:
+ <<: *temperature
+ entityID: 0x13
+ entityInstance: 15
+ path: /xyz/openbmc_project/sensors/temperature/PSU0_TEMP1
+
+0x66:
+ <<: *temperature
+ entityID: 0x13
+ entityInstance: 16
+ path: /xyz/openbmc_project/sensors/temperature/PSU0_TEMP2
+
+0x67:
+ <<: *temperature
+ entityID: 0x13
+ entityInstance: 17
+ path: /xyz/openbmc_project/sensors/temperature/PSU0_TEMP3
+
+#PSU1 temperature, voltage, fan sensors
+0x70:
+ <<: *voltage
+ entityID: 0x13
+ entityInstance: 18
+ path: /xyz/openbmc_project/sensors/voltage/PSU1_VIN
+ rExp: 0
+ multiplierM: 1
+
+0x71:
+ <<: *voltage
+ entityID: 0x13
+ entityInstance: 19
+ path: /xyz/openbmc_project/sensors/voltage/PSU1_VOUT
+ rExp: -2
+ multiplierM: 5
+
+0x72:
+ <<: *current
+ entityID: 0x13
+ entityInstance: 20
+ path: /xyz/openbmc_project/sensors/current/PSU1_IIN
+
+0x73:
+ <<: *current
+ entityID: 0x13
+ entityInstance: 21
+ path: /xyz/openbmc_project/sensors/current/PSU1_IOUT
+ multiplierM: 70
+ rExp: -2
+
+0x74:
+ <<: *fan_tach
+ entityID: 0x13
+ entityInstance: 22
+ path: /xyz/openbmc_project/sensors/fan_tach/PSU1_FAN1
+
+0x75:
+ <<: *temperature
+ entityID: 0x13
+ entityInstance: 23
+ path: /xyz/openbmc_project/sensors/temperature/PSU1_TEMP1
+
+0x76:
+ <<: *temperature
+ entityID: 0x13
+ entityInstance: 24
+ path: /xyz/openbmc_project/sensors/temperature/PSU1_TEMP2
+
+0x77:
+ <<: *temperature
+ entityID: 0x13
+ entityInstance: 25
+ path: /xyz/openbmc_project/sensors/temperature/PSU1_TEMP3
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/obmc-console.conf
new file mode 100644
index 0000000..666e66a
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/obmc-console.conf
@@ -0,0 +1 @@
+baud = 115200
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/uart-routing.sh b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/uart-routing.sh
new file mode 100644
index 0000000..2cf8e27
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/uart-routing.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+function usage()
+{
+ echo "Usage: $(basename "$0") init|reset"
+}
+
+if [ "$#" -ne "1" ] ; then
+ usage
+ exit 1;
+fi
+
+UART_ROUTING_SYSFS="/sys/bus/platform/drivers/aspeed-uart-routing/1e789098.uart-routing"
+
+case "$1" in
+ init)
+ echo -n "uart1" > ${UART_ROUTING_SYSFS}/uart4
+ echo -n "uart4" > ${UART_ROUTING_SYSFS}/uart1
+ ;;
+ reset)
+ echo -n "io1" > ${UART_ROUTING_SYSFS}/uart1
+ echo -n "io4" > ${UART_ROUTING_SYSFS}/uart4
+ ;;
+ *)
+ usage
+ exit 1;
+ ;;
+esac
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/use-socket.conf.in b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/use-socket.conf.in
new file mode 100644
index 0000000..ba0b201
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console/use-socket.conf.in
@@ -0,0 +1,5 @@
+[Service]
+ExecStartPre=/usr/sbin/uart-routing.sh init
+ExecStart=-/usr/sbin/dropbear -r ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client" -i $DROPBEAR_EXTRA_ARGS
+ExecStopPost=/usr/sbin/uart-routing.sh reset
+StandardInput=socket
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console_%.bbappend
new file mode 100644
index 0000000..b8ba5b0
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/console/obmc-console_%.bbappend
@@ -0,0 +1,17 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " file://uart-routing.sh \
+ file://use-socket.conf.in \
+ "
+
+RDEPENDS:${PN}:append = " bash"
+
+OBMC_CONSOLE_HOST_TTY:ncplite = "ttyS3"
+
+do_install:append() {
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/uart-routing.sh -D ${D}${sbindir}/uart-routing.sh
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0755 ${WORKDIR}/use-socket.conf.in -D ${D}${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/fans/phosphor-pid-control/config.json b/meta-ufispace/meta-ncplite/recipes-phosphor/fans/phosphor-pid-control/config.json
new file mode 100644
index 0000000..f67292e
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/fans/phosphor-pid-control/config.json
@@ -0,0 +1,177 @@
+{
+ "sensors": [
+ {
+ "name": "FAN0_RPM",
+ "type": "fan",
+ "readPath": "/xyz/openbmc_project/sensors/fan_tach/FAN0_RPM",
+ "writePath": "/sys/devices/platform/pwm-fan0/hwmon/**/pwm1",
+ "ignoreDbusMinMax": true,
+ "min": 0,
+ "max": 255
+ },
+ {
+ "name": "FAN1_RPM",
+ "type": "fan",
+ "readPath": "/xyz/openbmc_project/sensors/fan_tach/FAN1_RPM",
+ "writePath": "/sys/devices/platform/pwm-fan0/hwmon/**/pwm1",
+ "ignoreDbusMinMax": true,
+ "min": 0,
+ "max": 255
+ },
+ {
+ "name": "FAN2_RPM",
+ "type": "fan",
+ "readPath": "/xyz/openbmc_project/sensors/fan_tach/FAN2_RPM",
+ "writePath": "/sys/devices/platform/pwm-fan1/hwmon/**/pwm1",
+ "ignoreDbusMinMax": true,
+ "min": 0,
+ "max": 255
+ },
+ {
+ "name": "FAN3_RPM",
+ "type": "fan",
+ "readPath": "/xyz/openbmc_project/sensors/fan_tach/FAN3_RPM",
+ "writePath": "/sys/devices/platform/pwm-fan1/hwmon/**/pwm1",
+ "ignoreDbusMinMax": true,
+ "min": 0,
+ "max": 255
+ },
+ {
+ "name": "TEMP_MAC_ENV",
+ "type": "temp",
+ "readPath": "/xyz/openbmc_project/sensors/temperature/TEMP_MAC_ENV",
+ "writePath": "",
+ "min": 0,
+ "max": 0,
+ "ignoreDbusMinMax": true,
+ "timeout": 0
+ },
+ {
+ "name": "TEMP_MAC_DIE",
+ "type": "temp",
+ "readPath": "/xyz/openbmc_project/sensors/temperature/TEMP_MAC_DIE",
+ "writePath": "",
+ "min": 0,
+ "max": 0,
+ "ignoreDbusMinMax": true,
+ "timeout": 0
+ }
+ ],
+ "zones": [
+ {
+ "id": 1,
+ "minThermalOutput": 0.0,
+ "failsafePercent": 100.0,
+ "pids": [
+ {
+ "name": "FAN0_RPM",
+ "type": "fan",
+ "inputs": ["FAN0_RPM"],
+ "setpoint": 30.0,
+ "pid": {
+ "samplePeriod": 1.0,
+ "proportionalCoeff": 0.0,
+ "integralCoeff": 0.0,
+ "derivativeCoeff": 0.0,
+ "feedFwdOffsetCoeff": 0.0,
+ "feedFwdGainCoeff": 1.0,
+ "integralLimit_min": 0.0,
+ "integralLimit_max": 0.0,
+ "outLim_min": 0.0,
+ "outLim_max": 100.0,
+ "slewNeg": 0.0,
+ "slewPos": 0.0
+ }
+ },
+ {
+ "name": "FAN1_RPM",
+ "type": "fan",
+ "inputs": ["FAN1_RPM"],
+ "setpoint": 30.0,
+ "pid": {
+ "samplePeriod": 1.0,
+ "proportionalCoeff": 0.0,
+ "integralCoeff": 0.0,
+ "derivativeCoeff": 0.0,
+ "feedFwdOffsetCoeff": 0.0,
+ "feedFwdGainCoeff": 1.0,
+ "integralLimit_min": 0.0,
+ "integralLimit_max": 0.0,
+ "outLim_min": 0.0,
+ "outLim_max": 100.0,
+ "slewNeg": 0.0,
+ "slewPos": 0.0
+ }
+ },
+ {
+ "name": "FAN2_RPM",
+ "type": "fan",
+ "inputs": ["FAN2_RPM"],
+ "setpoint": 30.0,
+ "pid": {
+ "samplePeriod": 1.0,
+ "proportionalCoeff": 0.0,
+ "integralCoeff": 0.0,
+ "derivativeCoeff": 0.0,
+ "feedFwdOffsetCoeff": 0.0,
+ "feedFwdGainCoeff": 1.0,
+ "integralLimit_min": 0.0,
+ "integralLimit_max": 0.0,
+ "outLim_min": 0.0,
+ "outLim_max": 100.0,
+ "slewNeg": 0.0,
+ "slewPos": 0.0
+ }
+ },
+ {
+ "name": "FAN3_RPM",
+ "type": "fan",
+ "inputs": ["FAN3_RPM"],
+ "setpoint": 30.0,
+ "pid": {
+ "samplePeriod": 1.0,
+ "proportionalCoeff": 0.0,
+ "integralCoeff": 0.0,
+ "derivativeCoeff": 0.0,
+ "feedFwdOffsetCoeff": 0.0,
+ "feedFwdGainCoeff": 1.0,
+ "integralLimit_min": 0.0,
+ "integralLimit_max": 0.0,
+ "outLim_min": 0.0,
+ "outLim_max": 100.0,
+ "slewNeg": 0.0,
+ "slewPos": 0.0
+ }
+ },
+ {
+ "name": "TEMP_MAC_DIE",
+ "type": "stepwise",
+ "inputs": ["TEMP_MAC_DIE"],
+ "setpoint": 30.0,
+ "pid": {
+ "samplePeriod": 1.0,
+ "positiveHysteresis": 1.0,
+ "negativeHysteresis": 1.0,
+ "isCeiling": false,
+ "reading": {
+ "0": 25,
+ "1": 40,
+ "2": 50,
+ "3": 60,
+ "4": 70,
+ "5": 80
+ },
+ "output": {
+ "0": 45,
+ "1": 60,
+ "2": 75,
+ "3": 85,
+ "4": 90,
+ "5": 100
+ }
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
new file mode 100644
index 0000000..6d16797
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " file://config.json"
+
+FILES:${PN}:append = " ${datadir}/swampd/config.json"
+
+do_install:append:ncplite() {
+ install -d ${D}${datadir}/swampd
+ install -m 0644 -D ${WORKDIR}/config.json ${D}${datadir}/swampd/config.json
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-0.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-0.conf
new file mode 100644
index 0000000..5210aec
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-0.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/ALL_PWR_GOOD_H
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=172
+NAME=ALL_PWR_GOOD_H
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-1.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-1.conf
new file mode 100644
index 0000000..b326cc9
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-1.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/FAN_STATUS_INT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=98
+NAME=FAN_STATUS_INT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-10.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-10.conf
new file mode 100644
index 0000000..669e117
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-10.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/PSU1_PRSNT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=47
+NAME=PSU1_PRSNT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-11.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-11.conf
new file mode 100644
index 0000000..bd5d799
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-11.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/FAN0_PRSNT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-polled-event
+KEY=2
+NAME=FAN0_PRSNT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-12.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-12.conf
new file mode 100644
index 0000000..b7e2f66
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-12.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/FAN1_PRSNT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-polled-event
+KEY=6
+NAME=FAN1_PRSNT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-13.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-13.conf
new file mode 100644
index 0000000..3dba177
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-13.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/FAN2_PRSNT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-polled-event
+KEY=10
+NAME=FAN2_PRSNT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-14.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-14.conf
new file mode 100644
index 0000000..56d002d
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-14.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/FAN3_PRSNT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-polled-event
+KEY=14
+NAME=FAN3_PRSNT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-2.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-2.conf
new file mode 100644
index 0000000..10ebb62
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-2.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/THERMAL_ALERT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=122
+NAME=THERMAL_ALERT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-3.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-3.conf
new file mode 100644
index 0000000..01d169e
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-3.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/CPU_CATERR_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=107
+NAME=CPU_CATERR_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-4.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-4.conf
new file mode 100644
index 0000000..fe5815c
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-4.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/CPU_THERMTEIP_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=173
+NAME=CPU_THERMTEIP_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-5.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-5.conf
new file mode 100644
index 0000000..6a33da8
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-5.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/PSU0_INT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=169
+NAME=PSU0_INT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-6.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-6.conf
new file mode 100644
index 0000000..1105833
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-6.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/PSU1_INT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=170
+NAME=PSU1_INT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-7.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-7.conf
new file mode 100644
index 0000000..5bb2365
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-7.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/PSU0_POWER_OK
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=100
+NAME=PSU0_POWER_OK
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-8.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-8.conf
new file mode 100644
index 0000000..926bd2d
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-8.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/PSU1_POWER_OK
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=101
+NAME=PSU1_POWER_OK
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-9.conf b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-9.conf
new file mode 100644
index 0000000..e603104
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpio-9.conf
@@ -0,0 +1,4 @@
+INVENTORY=/system/chassis/motherboard/PSU0_PRSNT_L
+DEVPATH=/dev/input/by-path/platform-gpio-keys-event
+KEY=46
+NAME=PSU0_PRSNT_L
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service
new file mode 100644
index 0000000..161107c
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor GPIO %I Presence
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+ConditionPathExists={envfiledir}/obmc/gpio/gpio-%i.conf
+
+[Service]
+EnvironmentFile={envfiledir}/obmc/gpio/gpio-%i.conf
+ExecStart=/usr/bin/phosphor-gpio-presence --path=${{DEVPATH}} --inventory=${{INVENTORY}} --key=${{KEY}} --name=${{NAME}}
+SyslogIdentifier=phosphor-gpio-presence
+
+[Install]
+RequiredBy=multi-user.target
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
new file mode 100644
index 0000000..da906f8
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS:append:ncplite := "${THISDIR}/${PN}:"
+
+NCPLITE_OBMC_GPIO_INSTANCES = "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14"
+NCPLITE_OBMC_GPIO_ENV_FMT = "obmc/gpio/gpio-{0}.conf"
+
+TMPL = "phosphor-gpio-presence@.service"
+INSTFMT = "phosphor-gpio-presence@{0}.service"
+TGT = "multi-user.target"
+FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
+
+SYSTEMD_LINK:${PN}-presence:append:ncplite = " ${@compose_list(d, 'FMT', 'NCPLITE_OBMC_GPIO_INSTANCES')}"
+SYSTEMD_ENVIRONMENT_FILE:${PN}-presence:append:ncplite = " ${@compose_list(d, 'NCPLITE_OBMC_GPIO_ENV_FMT', 'NCPLITE_OBMC_GPIO_INSTANCES')}"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/images/obmc-phosphor-image.bbappend
new file mode 100644
index 0000000..7820de2
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/images/obmc-phosphor-image.bbappend
@@ -0,0 +1,5 @@
+OBMC_IMAGE_EXTRA_INSTALL:append = " \
+ ipmitool \
+ usbutils \
+ ethtool \
+ "
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/interfaces/bmcweb_%.bbappend
new file mode 100644
index 0000000..0ee7929
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -0,0 +1,4 @@
+EXTRA_OEMESON:append = " \
+ -Dredfish-dbus-log=enabled \
+ -Dkvm=disabled \
+ "
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/inventory/inventory-cleanup.bb b/meta-ufispace/meta-ncplite/recipes-phosphor/inventory/inventory-cleanup.bb
new file mode 100644
index 0000000..f81c63e
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/inventory/inventory-cleanup.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Copy the inventory cleanup yaml for 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
+
+S = "${WORKDIR}"
+
+SRC_URI = "file://inventory-cleanup.yaml"
+
+do_install() {
+ install -D inventory-cleanup.yaml ${D}${base_datadir}/events.d/inventory-cleanup.yaml
+}
+
+FILES:${PN} += "${base_datadir}/events.d/inventory-cleanup.yaml"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml b/meta-ufispace/meta-ncplite/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml
new file mode 100644
index 0000000..ad8cc29
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml
@@ -0,0 +1,16 @@
+description: >
+ NCPLITE inventory fixups
+
+events:
+ - name: Add Chassis interface
+ description: >
+ Add the chassis interface on the chassis inventory path
+ type: startup
+ actions:
+ - name: createObjects
+ objs:
+ /system/chassis:
+ xyz.openbmc_project.Inventory.Item.Chassis:
+ Type:
+ value: "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.RackMount"
+ type: string
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 0000000..4fc41d0
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
new file mode 100644
index 0000000..e2b78e3
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
@@ -0,0 +1,8 @@
+{
+ "id": 32,
+ "revision": 1,
+ "addn_dev_support": 143,
+ "manuf_id": 51242,
+ "prod_id": 9600,
+ "aux": 0
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/ncplite-obmc-read-eeprom@.service b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/ncplite-obmc-read-eeprom@.service
new file mode 100644
index 0000000..19448ad
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/ncplite-obmc-read-eeprom@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Read %I EEPROM
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+StartLimitInterval=120
+StartLimitBurst=10
+
+[Service]
+Restart=on-failure
+RestartSec=10
+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/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard
new file mode 100644
index 0000000..f049834
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard
@@ -0,0 +1,2 @@
+SYSFS_PATH=/sys/bus/i2c/devices/3-0050/eeprom
+FRUID=0
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/psu0 b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/psu0
new file mode 100644
index 0000000..b0f2bd8
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/psu0
@@ -0,0 +1,2 @@
+SYSFS_PATH=/sys/bus/i2c/devices/4-0050/eeprom
+FRUID=1
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/psu1 b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/psu1
new file mode 100644
index 0000000..966e75a
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/psu1
@@ -0,0 +1,2 @@
+SYSFS_PATH=/sys/bus/i2c/devices/5-0050/eeprom
+FRUID=2
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
new file mode 100644
index 0000000..e858511
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
@@ -0,0 +1,35 @@
+inherit obmc-phosphor-systemd
+
+DEPENDS:append:ncplite = " ncplite-yaml-config"
+
+FILESEXTRAPATHS:prepend:ncplite := "${THISDIR}/${PN}:"
+
+SRC_URI:append:ncplite = " file://ncplite-obmc-read-eeprom@.service \
+ "
+
+EXTRA_OECONF:ncplite = " \
+ YAML_GEN=${STAGING_DIR_HOST}${datadir}/ncplite-yaml-config/ipmi-fru-read.yaml \
+ PROP_YAML=${STAGING_DIR_HOST}${datadir}/ncplite-yaml-config/ipmi-extra-properties.yaml \
+ "
+
+EEPROM_NAMES = "motherboard psu1 psu0"
+
+EEPROMFMT = "system/chassis/{0}"
+EEPROM_ESCAPEDFMT = "system-chassis-{0}"
+EEPROMS = "${@compose_list(d, 'EEPROMFMT', 'EEPROM_NAMES')}"
+EEPROMS_ESCAPED = "${@compose_list(d, 'EEPROM_ESCAPEDFMT', 'EEPROM_NAMES')}"
+
+ENVFMT = "obmc/eeproms/{0}"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:ncplite := " ${@compose_list(d, 'ENVFMT', 'EEPROMS')}"
+
+TMPL = "obmc-read-eeprom@.service"
+TGT = "multi-user.target"
+INSTFMT = "obmc-read-eeprom@{0}.service"
+FMT = "../${TMPL}:${TGT}.wants/${INSTFMT}"
+
+SYSTEMD_LINK:${PN}:append:ncplite := " ${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}"
+
+do_install:append:ncplite() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/ncplite-obmc-read-eeprom@.service ${D}${systemd_system_unitdir}/obmc-read-eeprom@.service
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-softpoweroff b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-softpoweroff
new file mode 100644
index 0000000..ea24bdd
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-softpoweroff
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+echo "Ufi_Bmc: Trigger soft off the host"
+exit 0
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
new file mode 100644
index 0000000..8600738
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Soft power off of the host
+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/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 0000000..748852e
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1,20 @@
+FILESEXTRAPATHS:append:ncplite := "${THISDIR}/${PN}:"
+
+DEPENDS:append:ncplite = " ncplite-yaml-config"
+
+EXTRA_OEMESON:ncplite = " \
+ -Dsensor-yaml-gen=${STAGING_DIR_HOST}${datadir}/ncplite-yaml-config/ipmi-sensors.yaml \
+ -Dfru-yaml-gen=${STAGING_DIR_HOST}${datadir}/ncplite-yaml-config/ipmi-fru-read.yaml \
+ -Dinvsensor-yaml-gen=${STAGING_DIR_HOST}${datadir}/ncplite-yaml-config/ipmi-inventory-sensors.yaml \
+ "
+
+RDEPENDS:${PN} += "bash"
+
+SRC_URI += "file://phosphor-softpoweroff \
+ file://xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
+ "
+
+do_install:append:ncplite (){
+ install -m 0755 ${WORKDIR}/phosphor-softpoweroff ${D}/${bindir}/phosphor-softpoweroff
+ install -m 0644 ${WORKDIR}/${SOFT_SVC} ${D}${systemd_unitdir}/system/${SOFT_SVC}
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/leds/ncplite-led-manager-config-native.bb b/meta-ufispace/meta-ncplite/recipes-phosphor/leds/ncplite-led-manager-config-native.bb
new file mode 100644
index 0000000..863ecd1
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/leds/ncplite-led-manager-config-native.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Phosphor LED Group Management for NCPLite"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit native
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+
+SRC_URI += "file://led.yaml"
+S = "${WORKDIR}"
+
+# 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/meta-ufispace/meta-ncplite/recipes-phosphor/leds/ncplite-led-manager-config/led.yaml b/meta-ufispace/meta-ncplite/recipes-phosphor/leds/ncplite-led-manager-config/led.yaml
new file mode 100644
index 0000000..972dcdf
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/leds/ncplite-led-manager-config/led.yaml
@@ -0,0 +1,19 @@
+bmc_booted:
+
+power_on:
+
+fan0_good:
+
+fan0_fault:
+
+fan1_good:
+
+fan1_fault:
+
+fan2_good:
+
+fan2_fault:
+
+fan3_good:
+
+fan3_fault:
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/logging/phosphor-logging_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/logging/phosphor-logging_%.bbappend
new file mode 100644
index 0000000..142e01a
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/logging/phosphor-logging_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OEMESON:append = " -Derror_info_cap=256"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
new file mode 100644
index 0000000..d08b4c5
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
@@ -0,0 +1,7 @@
+RDEPENDS:${PN}-inventory:append:ncplite = " phosphor-gpio-monitor-presence"
+RDEPENDS:${PN}-chassis-state-mgmt:append:ncplite = " phosphor-state-manager-ncplite"
+RDEPENDS:${PN}-extras:append:ncplite = " entity-manager \
+ dbus-sensors \
+ ncplite-inventory-log \
+ ncplite-led \
+ "
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
new file mode 100644
index 0000000..4c0fbd2
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG:append:ncplite = " log-threshold log-watchdog log-alarm send-to-logger"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/sensors/dbus-sensors_%.bbappend
new file mode 100644
index 0000000..d17edec
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/sensors/dbus-sensors_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG:remove = " intrusionsensor ipmbsensor external nvmesensor"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/settings/phosphor-settings-manager/ncplite_settings.override.yml b/meta-ufispace/meta-ncplite/recipes-phosphor/settings/phosphor-settings-manager/ncplite_settings.override.yml
new file mode 100644
index 0000000..b63cfe5
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/settings/phosphor-settings-manager/ncplite_settings.override.yml
@@ -0,0 +1,21 @@
+/xyz/openbmc_project/ipmi/sol/eth0:
+ - Interface: xyz.openbmc_project.Ipmi.SOL
+ Properties:
+ Enable:
+ Default: 'true'
+ Privilege:
+ Default: 4
+ Progress:
+ Default: 0
+ RetryCount:
+ Default: 7
+ RetryIntervalMS:
+ Default: 100
+ Threshold:
+ Default: 1
+
+/xyz/openbmc_project/control/host0/power_restore_policy:
+ - Interface: xyz.openbmc_project.Control.Power.RestorePolicy
+ Properties:
+ PowerRestorePolicy:
+ Default: RestorePolicy::Policy::AlwaysOn
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/settings/phosphor-settings-manager_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/settings/phosphor-settings-manager_%.bbappend
new file mode 100644
index 0000000..9f118ae
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/settings/phosphor-settings-manager_%.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI:append:ncplite = " file://ncplite_settings.override.yml"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/meta-ufispace/meta-ncplite/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
new file mode 100644
index 0000000..dc2120a
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
@@ -0,0 +1,17 @@
+{
+ "gpio_configs": {
+ "power_config": {
+ "power_good_in": "CPU_PWRGD",
+ "power_up_outs": [],
+ "reset_outs": []
+ }
+ },
+
+ "gpio_definitions": [
+ {
+ "name": "CPU_PWRGD",
+ "pin": "F0",
+ "direction": "in"
+ }
+ ]
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend
new file mode 100644
index 0000000..fce1daf
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS:prepend:ncplite := "${THISDIR}/${PN}:"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/smbios/smbios-mdr_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/smbios/smbios-mdr_%.bbappend
new file mode 100644
index 0000000..3a35629
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/smbios/smbios-mdr_%.bbappend
@@ -0,0 +1,3 @@
+PACKAGECONFIG:append = " smbios-ipmi-blob"
+
+PACKAGECONFIG:remove = " cpuinfo"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/chassis-control b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/chassis-control
new file mode 100644
index 0000000..865b263
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/chassis-control
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Usage of this utility
+usage() {
+ echo "Usage: $(basename "$0") [on|off|forceoff]";
+}
+
+#Check CPU boot done pin drop in 30s
+timeout=30
+wait_graceful_off(){
+ echo "Wait for host shutdown in ${timeout}s"
+ while [ "${timeout}" -gt 0 ]; do
+ host_state=$(gpioget --numeric host0-ready)
+ timeout=$((timeout-1))
+ if [ "${host_state}" -eq 0 ]; then
+ echo "Host is graceful off"
+ return 0
+ fi
+ sleep 1
+ done
+ echo "Host still on, but reach timeout"
+}
+
+set_gpio_power_off() {
+ echo "Set GPIO to power off chassis"
+ gpioset --hold-period 50ms -t0 power-chassis-control0=1
+ gpioset --hold-period 50ms -t0 power-chassis-control1=1
+}
+
+set_gpio_power_on() {
+ echo "Set GPIO to power on chassis"
+ val=$(gpioget --numeric host0-ready)
+ if [ "$val" == 1 ]; then
+ exit 0
+ fi
+
+ gpioset --hold-period 50ms -t0 power-chassis-control0=0
+ gpioset --hold-period 50ms -t0 power-chassis-control1=0
+
+ #Record IPMI power cycle SEL
+ busctl call xyz.openbmc_project.Logging.IPMI \
+ /xyz/openbmc_project/Logging/IPMI \
+ xyz.openbmc_project.Logging.IPMI IpmiSelAdd ssaybq \
+ "Power Cycle" "/xyz/openbmc_project/state/host0" \
+ 3 0x01 0xff 0xff true 0x0020
+}
+
+if [ "$1" == "on" ]; then
+ set_gpio_power_on
+elif [ "$1" == "off" ]; then
+ wait_graceful_off
+ set_gpio_power_off
+elif [ "$1" == "forceoff" ]; then
+ set_gpio_power_off
+else
+ echo "Invalid parameter"
+ usage
+fi
+exit 0
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/host-control b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/host-control
new file mode 100644
index 0000000..bec4a17
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/host-control
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Usage of this utility
+usage() {
+ echo "Usage: $(basename "$0") [reset|gracefuloff]"
+}
+
+graceful_off() {
+ echo "Set GPIO to graceful shutdown Host"
+ gpioset --hold-period 50ms -t0 power-button=1
+ sleep 0.1
+ gpioset --hold-period 50ms -t0 power-button=0
+ gpioget power-button >/dev/null 2>&1
+}
+
+force_reset() {
+ echo "Set GPIO to reset Host"
+ gpioset --hold-period 50ms -t0 reset-button=0
+ sleep 0.1
+ gpioset --hold-period 50ms -t0 reset-button=1
+ gpioget reset-button >/dev/null 2>&1
+}
+
+if [ "$1" == "reset" ]; then
+ force_reset
+elif [ "$1" == "gracefuloff" ]; then
+ graceful_off
+else
+ echo "Invalid parameter"
+ usage
+fi
+exit 0
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-chassis-poweroff@.service b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-chassis-poweroff@.service
new file mode 100644
index 0000000..92ad570
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-chassis-poweroff@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=NCPLite Chassis Power Off
+Before=phosphor-wait-power-off@%i.service
+Conflicts=ncplite-chassis-poweron@%i.target
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/chassis-control off
+ExecStartPost=/bin/sh -c "busctl call xyz.openbmc_project.Logging.IPMI \
+ /xyz/openbmc_project/Logging/IPMI \
+ xyz.openbmc_project.Logging.IPMI IpmiSelAdd ssaybq \
+ 'Power Off' '/xyz/openbmc_project/state/host0' \
+ 3 0x00 0xff 0xff true 0x0020"
+ExecStartPost=/bin/sleep 10
+SyslogIdentifier=chassis-control
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-chassis-poweron@.service b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-chassis-poweron@.service
new file mode 100644
index 0000000..da2acd0
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-chassis-poweron@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=NCPLite Chassis Power on
+Before=phosphor-wait-power-on@%i.service
+After=obmc-power-start-pre@%i.target
+Conflicts=ncplite-chassis-poweroff@%i.target
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/chassis-control on
+SyslogIdentifier=chassis-control
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-host-force-reset@.service b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-host-force-reset@.service
new file mode 100644
index 0000000..7b002d2
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-host-force-reset@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=NCPLite Force Reset Host%i
+Wants=phosphor-reboot-host@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+OnFailure=obmc-chassis-powerreset@%i.target
+
+[Service]
+RemainAfterExit=no
+Type=oneshot
+ExecStart=@SBINDIR@/host-control reset
+ExecStartPost=/bin/sh -c "busctl call xyz.openbmc_project.Logging.IPMI /xyz/openbmc_project/Logging/IPMI xyz.openbmc_project.Logging.IPMI IpmiSelAdd ssaybq 'Reset Button Pressed' '/xyz/openbmc_project/state/chassis0' 3 0x02 0xff 0xff true 0x0020"
+SyslogIdentifier=host-control
+
+[Install]
+WantedBy=obmc-host-force-warm-reboot@%i.target
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-host-off@.service b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-host-off@.service
new file mode 100644
index 0000000..c10c20c
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ncplite-host-off@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=NCPLite Host%i Off
+Before=obmc-chassis-hard-poweroff@%i.target
+Before=obmc-chassis-poweroff@%i.target
+Conflicts=obmc-host-startmin@%i.target
+OnFailure=obmc-chassis-poweroff@%i.target
+OnFailureJobMode=flush
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/host-control gracefuloff
+ExecStartPost=/bin/sh -c "busctl call xyz.openbmc_project.Logging.IPMI \
+ /xyz/openbmc_project/Logging/IPMI \
+ xyz.openbmc_project.Logging.IPMI IpmiSelAdd ssaybq \
+ 'Power Button Pressed' '/xyz/openbmc_project/state/chassis0' \
+ 3 0x00 0xff 0xff true 0x0020"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager_%.bbappend
new file mode 100644
index 0000000..5d304e3
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager_%.bbappend
@@ -0,0 +1,81 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+DEPENDS += "gpioplus"
+DEPENDS += "systemd"
+
+EXTRA_OEMESON:append = " -Dhost-gpios=enabled"
+
+SRC_URI += " \
+ file://host-control \
+ file://chassis-control \
+ file://ncplite-chassis-poweroff@.service \
+ file://ncplite-chassis-poweron@.service \
+ file://ncplite-host-off@.service \
+ file://ncplite-host-force-reset@.service \
+ "
+
+RDEPENDS:${PN}:append = " bash"
+
+DBUS_PACKAGES:append = "${PN}-ncplite"
+PACKAGE_BEFORE_PN += "${PN}-ncplite"
+SYSTEMD_PACKAGES += "${PN}-ncplite"
+
+SYSTEMD_SERVICE:${PN}-ncplite += "ncplite-chassis-poweron@.service"
+SYSTEMD_SERVICE:${PN}-ncplite += "ncplite-chassis-poweroff@.service"
+SYSTEMD_SERVICE:${PN}-ncplite += "ncplite-host-off@.service"
+SYSTEMD_SERVICE:${PN}-ncplite += "ncplite-host-force-reset@.service"
+
+# Chassis power on
+CHASSIS_POWERON_SVC = "ncplite-chassis-poweron@.service"
+CHASSIS_POWERON_INSTMPL = "ncplite-chassis-poweron@{0}.service"
+CHASSIS_POWERON_TGTFMT = "obmc-chassis-poweron@{0}.target"
+CHASSIS_POWERON_FMT = "../${CHASSIS_POWERON_SVC}:${CHASSIS_POWERON_TGTFMT}.requires/${CHASSIS_POWERON_INSTMPL}"
+SYSTEMD_LINK:${PN}-ncplite += "${@compose_list_zip(d, 'CHASSIS_POWERON_FMT', 'OBMC_CHASSIS_INSTANCES')}"
+
+# Chassis power off
+CHASSIS_POWEROFF_SVC = "ncplite-chassis-poweroff@.service"
+CHASSIS_POWEROFF_INSTMPL = "ncplite-chassis-poweroff@{0}.service"
+CHASSIS_POWEROFF_TGTFMT = "obmc-chassis-poweroff@{0}.target"
+CHASSIS_POWEROFF_FMT = "../${CHASSIS_POWEROFF_SVC}:${CHASSIS_POWEROFF_TGTFMT}.requires/${CHASSIS_POWEROFF_INSTMPL}"
+SYSTEMD_LINK:${PN}-ncplite += "${@compose_list_zip(d, 'CHASSIS_POWEROFF_FMT', 'OBMC_CHASSIS_INSTANCES')}"
+
+# Host off
+HOST_OFF_SVC = "ncplite-host-off@.service"
+HOST_OFF_INSTMPL = "ncplite-host-off@{0}.service"
+HOST_OFF_TGTFMT = "obmc-host-shutdown@{0}.target"
+HOST_OFF_FMT = "../${HOST_OFF_SVC}:${HOST_OFF_TGTFMT}.requires/${HOST_OFF_INSTMPL}"
+SYSTEMD_LINK:${PN}-ncplite += "${@compose_list_zip(d, 'HOST_OFF_FMT', 'OBMC_HOST_INSTANCES')}"
+
+# Host force reboot
+HOST_FORCE_RESET_SVC = "ncplite-host-force-reset@.service"
+HOST_FORCE_RESET_INSTMPL = "ncplite-host-force-reset@{0}.service"
+HOST_FORCE_RESET_TGTFMT = "obmc-host-force-warm-reboot@{0}.target"
+HOST_FORCE_RESET_TARGET_FMT = "../${HOST_FORCE_RESET_SVC}:${HOST_FORCE_RESET_TGTFMT}.requires/${HOST_FORCE_RESET_INSTMPL}"
+SYSTEMD_LINK:${PN}-ncplite += "${@compose_list_zip(d, 'HOST_FORCE_RESET_TARGET_FMT', 'OBMC_HOST_INSTANCES')}"
+
+# Chassis hard power off require host off in our machine
+CHASSIS_HARD_POWEROFF_TGTFMT = "obmc-chassis-hard-poweroff@{0}.target"
+CHASSIS_HOST_OFF_FMT = "../${HOST_OFF_SVC}:${CHASSIS_HARD_POWEROFF_TGTFMT}.requires/${HOST_OFF_INSTMPL}"
+SYSTEMD_LINK:${PN}-ncplite += "${@compose_list_zip(d, 'CHASSIS_HOST_OFF_FMT', 'OBMC_CHASSIS_INSTANCES')}"
+
+do_install:append() {
+ install -d ${D}${sbindir}
+ install -m 0744 ${WORKDIR}/host-control ${D}${sbindir}/
+ install -m 0744 ${WORKDIR}/chassis-control ${D}${sbindir}/
+}
+
+FILES:${PN} += "${systemd_system_unitdir}/*"
+FILES:${PN}-host += "${bindir}/phosphor-host-condition-gpio"
+SYSTEMD_SERVICE:${PN}-host += "phosphor-host-condition-gpio@.service"
+
+pkg_postinst:${PN}-obmc-targets:prepend() {
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-host-condition-gpio@0.service"
+ TARGET="../phosphor-host-condition-gpio@.service"
+ ln -s $TARGET $LINK
+}
+
+pkg_prerm:${PN}-obmc-targets:prepend() {
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-host-condition-gpio@0.service"
+ rm $LINK
+}
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
new file mode 100644
index 0000000..5b7fcf6
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Watchdog Power Cycle
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c "busctl set-property xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s 'xyz.openbmc_project.State.Host.Transition.Reboot'"
+SyslogIdentifier=phosphor-watchdog"
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
new file mode 100644
index 0000000..9b68b67
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Watchdog Power Off
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c "busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off"
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
new file mode 100644
index 0000000..c1dc0f5
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Watchdog Reset Host
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c "busctl set-property xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s xyz.openbmc_project.State.Host.Transition.ForceWarmReboot"
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
new file mode 100644
index 0000000..12f1074
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Phosphor Watchdog
+
+[Service]
+ExecStart=/usr/bin/phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \
+ --path=/xyz/openbmc_project/watchdog/host0 \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=phosphor-watchdog-host-reset.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=phosphor-watchdog-host-poweroff.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-cycle.service \
+
+SyslogIdentifier=phosphor-watchdog
+BusName=xyz.openbmc_project.Watchdog
+Type=dbus
+
+[Install]
+WantedBy=basic.target
diff --git a/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
new file mode 100644
index 0000000..236ac29
--- /dev/null
+++ b/meta-ufispace/meta-ncplite/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS:prepend:ncplite := "${THISDIR}/${PN}:"
+
+# Remove the override to keep service running after DC cycle
+SYSTEMD_OVERRIDE:${PN}:remove:ncplite = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
+SYSTEMD_SERVICE:${PN}:ncplite = " phosphor-watchdog.service \
+ phosphor-watchdog-host-poweroff.service \
+ phosphor-watchdog-host-cycle.service\
+ phosphor-watchdog-host-reset.service\
+ "