Add support for Enclustra Mars ZX3 board as a BMC
This adds preliminary support for the Enclustra Mars ZX3 using the upstream
meta-xilinx layer. In order to get it to compile this removes the
phosphor-gpio-keys feature even though it could theoretically be supported.
Change-Id: I8f9c0ff11a6f5916ce15a2fdc35c33848f496953
Signed-off-by: Alexander Hedges <ahedges@ethz.ch>
diff --git a/meta-evb-enclustra/meta-evb-zx3-pm3/conf/bblayers.conf.sample b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/bblayers.conf.sample
new file mode 100644
index 0000000..f1f9b4e
--- /dev/null
+++ b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/bblayers.conf.sample
@@ -0,0 +1,35 @@
+# 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-perl \
+ ##OEROOT##/meta-openembedded/meta-python \
+ ##OEROOT##/meta-openembedded/meta-webserver \
+ ##OEROOT##/meta-phosphor \
+ ##OEROOT##/meta-xilinx/meta-xilinx-bsp/ \
+ ##OEROOT##/meta-evb \
+ ##OEROOT##/meta-evb/meta-evb-enclustra \
+ ##OEROOT##/meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3 \
+ "
+BBLAYERS_NON_REMOVABLE ?= " \
+##OEROOT##/meta \
+##OEROOT##/meta-poky \
+##OEROOT##/meta-openembedded/meta-oe \
+##OEROOT##/meta-openembedded/meta-networking \
+##OEROOT##/meta-openembedded/meta-perl \
+##OEROOT##/meta-openembedded/meta-python \
+##OEROOT##/meta-openembedded/meta-webserver \
+##OEROOT##/meta-phosphor \
+##OEROOT##/meta-xilinx/meta-xilinx-bsp/ \
+##OEROOT##/meta-evb \
+##OEROOT##/meta-evb/meta-evb-enclustra \
+##OEROOT##/meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3 \
+ "
diff --git a/meta-evb-enclustra/meta-evb-zx3-pm3/conf/conf-notes.txt b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/conf-notes.txt
new file mode 100644
index 0000000..9b3c01a
--- /dev/null
+++ b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/conf-notes.txt
@@ -0,0 +1,2 @@
+Common targets are:
+ obmc-phosphor-image
diff --git a/meta-evb-enclustra/meta-evb-zx3-pm3/conf/layer.conf b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/layer.conf
new file mode 100644
index 0000000..1053e77
--- /dev/null
+++ b/meta-evb-enclustra/meta-evb-zx3-pm3/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 += "evb-zx3-pm3"
+BBFILE_PATTERN_evb-zx3-pm3 = ""
+LAYERSERIES_COMPAT_evb-zx3-pm3 = "sumo"
diff --git a/meta-evb-enclustra/meta-evb-zx3-pm3/conf/local.conf.sample b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/local.conf.sample
new file mode 100644
index 0000000..add76ec
--- /dev/null
+++ b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/local.conf.sample
@@ -0,0 +1,23 @@
+MACHINE ??= "evb-zx3-pm3"
+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"
+
+# Set the root password to '0penBmc'
+INHERIT += "extrausers"
+EXTRA_USERS_PARAMS = " \
+ usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root; \
+ "
diff --git a/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf
new file mode 100644
index 0000000..0fcb971
--- /dev/null
+++ b/meta-evb-enclustra/meta-evb-zx3-pm3/conf/machine/evb-zx3-pm3.conf
@@ -0,0 +1,39 @@
+SOC_VARIANT ?= "7z"
+
+require conf/machine/include/tune-zynq.inc
+require conf/machine/include/machine-xilinx-overrides.inc
+require conf/machine/include/machine-xilinx-default.inc
+require conf/machine/include/machine-xilinx-board.inc
+require conf/machine/include/machine-xilinx-qemu.inc
+require conf/machine/include/obmc-bsp-common.inc
+
+MACHINE_FEATURES = "rtc ext2 ext3 vfat usbhost"
+
+# u-boot configuration
+UBOOT_MACHINE = "zynq_zc702_config"
+SPL_BINARY = "spl/boot.bin"
+
+EXTRA_IMAGEDEPENDS += " \
+ u-boot-zynq-uenv \
+ virtual/boot-bin \
+ "
+
+SERIAL_CONSOLE = "115200 ttyPS0"
+
+KERNEL_DEVICETREE = "zynq-zc702.dtb"
+
+IMAGE_BOOT_FILES += "boot.bin uEnv.txt ${KERNEL_IMAGETYPE}-zynq-zc702.dtb"
+
+KERNEL_FEATURES_remove = "phosphor-gpio-keys"
+
+# Overwrite flash offsets
+FLASH_UBOOT_OFFSET = "0"
+FLASH_KERNEL_OFFSET = "6144"
+FLASH_UBI_OFFSET = "${FLASH_KERNEL_OFFSET}"
+FLASH_ROFS_OFFSET = "12288"
+FLASH_RWFS_OFFSET = "65024"
+FLASH_SIZE = "65536"
+
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "evb-zx3-pm3-led-manager-config-native"
+PREFERRED_PROVIDER_u-boot = "u-boot-xlnx"
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot"