meta-fii/meta-kudo: Add new meta layer for Fii Kudo project

First drop for the meta-kudo layer, initial machine configuration
to supports Nuvoton npcm730 chip and the Ampere ARM system

Tested-by:
1. Load image on the Nuvoton RunBMC CRB
2. Use ipmitool to test the command under BMC console
  a. ipmitool mc info
  b. ipmitool sdr
  c. ipmitool lan print
  d. ipmitool channel info 1
  e. ipmitool user list 1
  f. ipmitool chassis status
  g. ipmitool raw 0x06 0x01
  h. ipmitool power status

Signed-off-by: Lancelot Kao <lancelot.kao@fii-usa.com>
Change-Id: Ic34b77affe0c08e84762ef795f9f06011bd269ce
diff --git a/meta-kudo/conf/bblayers.conf.sample b/meta-kudo/conf/bblayers.conf.sample
new file mode 100644
index 0000000..9fe4207
--- /dev/null
+++ b/meta-kudo/conf/bblayers.conf.sample
@@ -0,0 +1,27 @@
+# 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-python \
+  ##OEROOT##/meta-phosphor \
+  ##OEROOT##/meta-nuvoton \
+  ##OEROOT##/meta-google \
+  ##OEROOT##/meta-fii/meta-kudo \
+  "
+BBLAYERS_NON_REMOVABLE ?= " \
+  ##OEROOT##/meta \
+  ##OEROOT##/meta-openembedded/meta-oe \
+  ##OEROOT##/meta-openembedded/meta-networking \
+  ##OEROOT##/meta-openembedded/meta-python \
+  ##OEROOT##/meta-phosphor \
+  ##OEROOT##/meta-nuvoton \
+  ##OEROOT##/meta-google \
+  ##OEROOT##/meta-fii/meta-kudo \
+  "
diff --git a/meta-kudo/conf/conf-notes.txt b/meta-kudo/conf/conf-notes.txt
new file mode 100644
index 0000000..9b3c01a
--- /dev/null
+++ b/meta-kudo/conf/conf-notes.txt
@@ -0,0 +1,2 @@
+Common targets are:
+     obmc-phosphor-image
diff --git a/meta-kudo/conf/distro/openbmc-kudo.conf b/meta-kudo/conf/distro/openbmc-kudo.conf
new file mode 100644
index 0000000..0470913
--- /dev/null
+++ b/meta-kudo/conf/distro/openbmc-kudo.conf
@@ -0,0 +1,4 @@
+require conf/distro/openbmc-phosphor.conf
+
+DISTRO = "openbmc-kudo"
+
diff --git a/meta-kudo/conf/layer.conf b/meta-kudo/conf/layer.conf
new file mode 100644
index 0000000..e5a3c34
--- /dev/null
+++ b/meta-kudo/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 += "kudo-layer"
+BBFILE_PATTERN_kudo-layer = "^${LAYERDIR}/"
+LAYERSERIES_COMPAT_kudo-layer = "warrior zeus dunfell"
diff --git a/meta-kudo/conf/local.conf.sample b/meta-kudo/conf/local.conf.sample
new file mode 100644
index 0000000..8f66595
--- /dev/null
+++ b/meta-kudo/conf/local.conf.sample
@@ -0,0 +1,18 @@
+MACHINE ??= "kudo"
+DISTRO ?= "openbmc-kudo"
+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"
+
diff --git a/meta-kudo/conf/machine/kudo.conf b/meta-kudo/conf/machine/kudo.conf
new file mode 100644
index 0000000..31036a4
--- /dev/null
+++ b/meta-kudo/conf/machine/kudo.conf
@@ -0,0 +1,21 @@
+KMACHINE = "nuvoton"
+KERNEL_DEVICETREE = "${KMACHINE}-npcm730-kudo.dtb"
+
+require conf/machine/include/npcm7xx.inc
+require conf/machine/include/obmc-bsp-common.inc
+
+FLASH_SIZE = "65536"
+FLASH_UBOOT_OFFSET = "0"
+FLASH_KERNEL_OFFSET = "2048"
+FLASH_ROFS_OFFSET = "8192"
+FLASH_RWFS_OFFSET = "62464"
+
+UBOOT_MACHINE = "PolegSVB_config"
+UBOOT_DEVICETREE = "nuvoton-npcm730-kudo"
+IGPS_MACHINE = "EB"
+
+IMAGE_FSTYPES += " cpio.${INITRAMFS_CTYPE}.u-boot"
+
+VIRTUAL-RUNTIME_obmc-fan-control = "phosphor-pid-control"
+PREFERRED_PROVIDER_virtual/obmc-fan-control = "phosphor-pid-control"
+PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-kudo-apps"