Add meta-inventec and meta-lanyang

Initial a new platfom for Power 9 system

Change-Id: Ia20d44037b46baffad78b7b7eb164064b564a982
Tested: Verified lanyang image build
Signed-off-by: Brian Yang <yang.brianc.w@inventec.com>
diff --git a/meta-openbmc-machines/meta-openpower/meta-inventec/conf/layer.conf b/meta-openbmc-machines/meta-openpower/meta-inventec/conf/layer.conf
new file mode 100644
index 0000000..de22db1
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-inventec/conf/layer.conf
@@ -0,0 +1,5 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+BBFILE_COLLECTIONS += "inventec"
+BBFILE_PATTERN_inventec = ""
diff --git a/meta-openbmc-machines/meta-openpower/meta-inventec/conf/machine/include/inventec.inc b/meta-openbmc-machines/meta-openpower/meta-inventec/conf/machine/include/inventec.inc
new file mode 100644
index 0000000..c79ddd7
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-inventec/conf/machine/include/inventec.inc
@@ -0,0 +1 @@
+require conf/machine/include/openpower.inc
diff --git a/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/bblayers.conf.sample b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/bblayers.conf.sample
new file mode 100644
index 0000000..8b1312f
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/bblayers.conf.sample
@@ -0,0 +1,37 @@
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+LCONF_VERSION = "6"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+  ##OEROOT##/meta \
+  ##OEROOT##/meta-poky \
+  ##OEROOT##/import-layers/meta-openembedded/meta-oe \
+  ##OEROOT##/import-layers/meta-openembedded/meta-networking \
+  ##OEROOT##/import-layers/meta-openembedded/meta-perl \
+  ##OEROOT##/import-layers/meta-openembedded/meta-python \
+  ##OEROOT##/import-layers/meta-virtualization \
+  ##OEROOT##/meta-phosphor \
+  ##OEROOT##/meta-openbmc-bsp/meta-aspeed \
+  ##OEROOT##/meta-openbmc-bsp/meta-aspeed/meta-ast2500 \
+  ##OEROOT##/meta-openbmc-machines/meta-openpower \
+  ##OEROOT##/meta-openbmc-machines/meta-openpower/meta-inventec \
+  ##OEROOT##/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang \
+  "
+BBLAYERS_NON_REMOVABLE ?= " \
+  ##OEROOT##/meta \
+  ##OEROOT##/meta-poky \
+  ##OEROOT##/import-layers/meta-openembedded/meta-oe \
+  ##OEROOT##/import-layers/meta-openembedded/meta-networking \
+  ##OEROOT##/import-layers/meta-openembedded/meta-perl \
+  ##OEROOT##/import-layers/meta-openembedded/meta-python \
+  ##OEROOT##/import-layers/meta-virtualization \
+  ##OEROOT##/meta-phosphor \
+  ##OEROOT##/meta-openbmc-bsp/meta-aspeed \
+  ##OEROOT##/meta-openbmc-bsp/meta-aspeed/meta-ast2500 \
+  ##OEROOT##/meta-openbmc-machines/meta-openpower \
+  ##OEROOT##/meta-openbmc-machines/meta-openpower/meta-inventec \
+  ##OEROOT##/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang \
+  "
diff --git a/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/conf-notes.txt b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/conf-notes.txt
new file mode 100644
index 0000000..9b3c01a
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/conf-notes.txt
@@ -0,0 +1,2 @@
+Common targets are:
+     obmc-phosphor-image
diff --git a/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/layer.conf b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/layer.conf
new file mode 100644
index 0000000..64223a2
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/layer.conf
@@ -0,0 +1,9 @@
+# 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 += "lanyang"
+BBFILE_PATTERN_lanyang = ""
diff --git a/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/local.conf.sample b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/local.conf.sample
new file mode 100644
index 0000000..a4a3343
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/local.conf.sample
@@ -0,0 +1,21 @@
+MACHINE ??= "lanyang"
+DISTRO ?= "openbmc-openpower"
+PACKAGE_CLASSES ?= "package_rpm"
+SANITY_TESTED_DISTROS_append ?= " *"
+EXTRA_IMAGE_FEATURES = "debug-tweaks"
+USER_CLASSES ?= "buildstats image-mklibs image-prelink"
+PATCHRESOLVE = "noop"
+BB_DISKMON_DIRS = "\
+    STOPTASKS,${TMPDIR},1G,100K \
+    STOPTASKS,${DL_DIR},1G,100K \
+    STOPTASKS,${SSTATE_DIR},1G,100K \
+    STOPTASKS,/tmp,100M,100K \
+    ABORT,${TMPDIR},100M,1K \
+    ABORT,${DL_DIR},100M,1K \
+    ABORT,${SSTATE_DIR},100M,1K \
+    ABORT,/tmp,10M,1K"
+CONF_VERSION = "1"
+INHERIT += "extrausers"
+EXTRA_USERS_PARAMS = " \
+  usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root; \
+  "
diff --git a/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/machine/lanyang.conf b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/machine/lanyang.conf
new file mode 100644
index 0000000..e6e0bb0
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-inventec/meta-lanyang/conf/machine/lanyang.conf
@@ -0,0 +1,15 @@
+KMACHINE = "aspeed"
+KERNEL_DEVICETREE = "${KMACHINE}-bmc-opp-${MACHINE}.dtb"
+
+UBOOT_MACHINE = "ast_g5_ncsi_config"
+
+FLASH_SIZE = "65536"
+
+PREFERRED_PROVIDER_virtual/p9-vcs-workaround = 'vcs-control'
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory = "lanyang-ipmi-inventory-map-native"
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "lanyang-led-manager-config-native"
+
+require conf/machine/include/ast2500.inc
+require conf/machine/include/obmc-bsp-common.inc
+require conf/machine/include/inventec.inc
+require conf/machine/include/p9.inc