meta-fii:meta-mori: Add Mori machine

First drop for the meta-mori machine, initial machine configuration to
supports Mori machine with Nuvoton npcm730.

Tested-by: Load image on Kudo_BMC board.

Signed-off-by: Mustafa Shehabi <mustafa.shehabi@fii-na.com>
Change-Id: I74cd554f5eb8bd6778ce27a0d7be12ed228f4c9e
diff --git a/meta-fii/README.md b/meta-fii/README.md
index ec520aa..144cbb2 100644
--- a/meta-fii/README.md
+++ b/meta-fii/README.md
@@ -5,3 +5,4 @@
 
 ├── meta-fii
  └── meta-kudo
+ └── meta-mori
diff --git a/meta-fii/meta-mori/conf/bblayers.conf.sample b/meta-fii/meta-mori/conf/bblayers.conf.sample
new file mode 100644
index 0000000..06f62c4
--- /dev/null
+++ b/meta-fii/meta-mori/conf/bblayers.conf.sample
@@ -0,0 +1,20 @@
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+LCONF_VERSION = "8"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+  ##OEROOT##/meta \
+  ##OEROOT##/meta-openembedded/meta-oe \
+  ##OEROOT##/meta-openembedded/meta-networking \
+  ##OEROOT##/meta-openembedded/meta-perl \
+  ##OEROOT##/meta-openembedded/meta-python \
+  ##OEROOT##/meta-security \
+  ##OEROOT##/meta-phosphor \
+  ##OEROOT##/meta-nuvoton \
+  ##OEROOT##/meta-google \
+  ##OEROOT##/meta-fii \
+  ##OEROOT##/meta-fii/meta-mori \
+  "
diff --git a/meta-fii/meta-mori/conf/conf-notes.txt b/meta-fii/meta-mori/conf/conf-notes.txt
new file mode 100644
index 0000000..9b3c01a
--- /dev/null
+++ b/meta-fii/meta-mori/conf/conf-notes.txt
@@ -0,0 +1,2 @@
+Common targets are:
+     obmc-phosphor-image
diff --git a/meta-fii/meta-mori/conf/distro/openbmc-mori.conf b/meta-fii/meta-mori/conf/distro/openbmc-mori.conf
new file mode 100644
index 0000000..be036c4
--- /dev/null
+++ b/meta-fii/meta-mori/conf/distro/openbmc-mori.conf
@@ -0,0 +1,4 @@
+require conf/distro/gbmc.conf
+
+DISTRO = "openbmc-mori"
+VERSION_ID:mori = "v0.1-00-mori"
diff --git a/meta-fii/meta-mori/conf/layer.conf b/meta-fii/meta-mori/conf/layer.conf
new file mode 100644
index 0000000..bdafaa5
--- /dev/null
+++ b/meta-fii/meta-mori/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 += "mori-layer"
+BBFILE_PATTERN_mori-layer = "^${LAYERDIR}/"
+LAYERSERIES_COMPAT_mori-layer = "hardknott honister"
diff --git a/meta-fii/meta-mori/conf/local.conf.sample b/meta-fii/meta-mori/conf/local.conf.sample
new file mode 100644
index 0000000..726e280
--- /dev/null
+++ b/meta-fii/meta-mori/conf/local.conf.sample
@@ -0,0 +1,18 @@
+MACHINE ??= "mori"
+DISTRO ?= "openbmc-mori"
+PACKAGE_CLASSES ?= "package_rpm"
+SANITY_TESTED_DISTROS:append ?= " *"
+EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
+USER_CLASSES ?= "buildstats"
+PATCHRESOLVE = "noop"
+BB_DISKMON_DIRS ??= "\
+    STOPTASKS,${TMPDIR},1G,100K \
+    STOPTASKS,${DL_DIR},1G,100K \
+    STOPTASKS,${SSTATE_DIR},1G,100K \
+    STOPTASKS,/tmp,100M,100K \
+    ABORT,${TMPDIR},100M,1K \
+    ABORT,${DL_DIR},100M,1K \
+    ABORT,${SSTATE_DIR},100M,1K \
+    ABORT,/tmp,10M,1K"
+CONF_VERSION = "2"
+
diff --git a/meta-fii/meta-mori/conf/machine/mori.conf b/meta-fii/meta-mori/conf/machine/mori.conf
new file mode 100644
index 0000000..71806c9
--- /dev/null
+++ b/meta-fii/meta-mori/conf/machine/mori.conf
@@ -0,0 +1,26 @@
+KMACHINE = "nuvoton"
+
+require conf/machine/include/npcm7xx.inc
+require conf/machine/include/obmc-bsp-common.inc
+
+FLASH_SIZE = "65536"
+FLASH_UBOOT_OFFSET:flash-65536 = "0"
+FLASH_KERNEL_OFFSET:flash-65536 = "2048"
+FLASH_ROFS_OFFSET:flash-65536 = "7168"
+FLASH_RWFS_OFFSET:flash-65536 = "62400"
+
+UBOOT_MACHINE = "PolegSVB_config"
+IGPS_MACHINE = "EB"
+
+GBMC_MAC_EEPROM_OF_NAME = "bmcfru"
+GBMC_NCSI_IF_NAME = "eth0"
+GBMC_MAC_IF_MAP = "[0]=eth1"
+
+IMAGE_FSTYPES += " cpio.${INITRAMFS_CTYPE}.u-boot"
+
+SERIAL_CONSOLES = "115200;ttyS0"
+
+OBMC_MACHINE_FEATURES += " \
+    obmc-host-ipmi \
+    obmc-host-state-mgmt \
+    "