mellanox-msn: initial machine support.

Add layer for mellanox msn platform.

Change-Id: Ic624670f828004cea43e310d74bcdc689e4c1f6f
Signed-off-by: Mykola Kostenok <c_mykolak@mellanox.com>
diff --git a/meta-mellanox/conf/layer.conf b/meta-mellanox/conf/layer.conf
new file mode 100644
index 0000000..9b1c6b9
--- /dev/null
+++ b/meta-mellanox/conf/layer.conf
@@ -0,0 +1,5 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+BBFILE_COLLECTIONS += "mellanox"
+BBFILE_PATTERN_mellanox = ""
diff --git a/meta-mellanox/meta-msn/conf/bblayers.conf.sample b/meta-mellanox/meta-msn/conf/bblayers.conf.sample
new file mode 100644
index 0000000..273971a
--- /dev/null
+++ b/meta-mellanox/meta-msn/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-x86 \
+  ##OEROOT##/meta-openbmc-machines/meta-x86/meta-mellanox \
+  ##OEROOT##/meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn \
+  "
+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-x86 \
+  ##OEROOT##/meta-openbmc-machines/meta-x86/meta-mellanox \
+  ##OEROOT##/meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn \
+  "
diff --git a/meta-mellanox/meta-msn/conf/conf-notes.txt b/meta-mellanox/meta-msn/conf/conf-notes.txt
new file mode 100644
index 0000000..9b3c01a
--- /dev/null
+++ b/meta-mellanox/meta-msn/conf/conf-notes.txt
@@ -0,0 +1,2 @@
+Common targets are:
+     obmc-phosphor-image
diff --git a/meta-mellanox/meta-msn/conf/layer.conf b/meta-mellanox/meta-msn/conf/layer.conf
new file mode 100644
index 0000000..a571169
--- /dev/null
+++ b/meta-mellanox/meta-msn/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 += "msn"
+BBFILE_PATTERN_msn = ""
diff --git a/meta-mellanox/meta-msn/conf/local.conf.sample b/meta-mellanox/meta-msn/conf/local.conf.sample
new file mode 100644
index 0000000..2547907
--- /dev/null
+++ b/meta-mellanox/meta-msn/conf/local.conf.sample
@@ -0,0 +1,21 @@
+MACHINE ??= "msn"
+DISTRO ?= "openbmc-phosphor"
+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-mellanox/meta-msn/conf/machine/msn.conf b/meta-mellanox/meta-msn/conf/machine/msn.conf
new file mode 100644
index 0000000..76bba38
--- /dev/null
+++ b/meta-mellanox/meta-msn/conf/machine/msn.conf
@@ -0,0 +1,9 @@
+KMACHINE = "aspeed"
+KERNEL_DEVICETREE = "${KMACHINE}-bmc-mellanox-${MACHINE}.dtb"
+
+UBOOT_MACHINE = "ast_g5_ncsi_2boot_config"
+
+FLASH_SIZE = "32768"
+
+require conf/machine/include/ast2500.inc
+require conf/machine/include/obmc-bsp-common.inc
diff --git a/meta-mellanox/meta-msn/recipes.txt b/meta-mellanox/meta-msn/recipes.txt
new file mode 100644
index 0000000..c583668
--- /dev/null
+++ b/meta-mellanox/meta-msn/recipes.txt
@@ -0,0 +1 @@
+recipes-phosphor     - Phosphor OpenBMC applications and configuration