Skip to content

Commit

Permalink
Add support for Enclustra Mars ZX3 board as a BMC
Browse files Browse the repository at this point in the history
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.

(From meta-evb rev: 07837e0d7d62497302c114008d27e0a808106ca2)

Change-Id: Ie02c329864d2c981dbe245a16e0e9858b37d6aee
Signed-off-by: Alexander Hedges <ahedges@ethz.ch>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
  • Loading branch information
Alexander Hedges authored and bradbishop committed Oct 4, 2018
1 parent 34261d6 commit 951fe70
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 0 deletions.
6 changes: 6 additions & 0 deletions meta-evb/meta-evb-enclustra/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

BBFILE_COLLECTIONS += "evb-enclustra"
BBFILE_PATTERN_evb-enclustra = ""
LAYERSERIES_COMPAT_evb-enclustra = "sumo"
Original file line number Diff line number Diff line change
@@ -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 \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Common targets are:
obmc-phosphor-image
10 changes: 10 additions & 0 deletions meta-evb/meta-evb-enclustra/meta-evb-zx3-pm3/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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; \
"
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SUMMARY = "Phosphor LED Group Management for Enclustra Mars ZX3"
PR = "r1"

inherit native
inherit obmc-phosphor-license

PROVIDES += "virtual/phosphor-led-manager-config-native"

SRC_URI += "file://led.yaml"
S = "${WORKDIR}"

# Copies example led layout yaml file
do_install() {
SRC=${S}
DEST=${D}${datadir}/phosphor-led-manager
install -D ${SRC}/led.yaml ${DEST}/led.yaml
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
enclosure_identify:
led1:
Action: 'Blink'
DutyOn: 20
Period: 100

bmc_booted:
led2:
Action: 'Blink'
DutyOn: 50
Period: 1000

power_on:
led3:
Action: 'Blink'
DutyOn: 50
Period: 1000

enclosure_fault:
led3:
Action: 'Blink'
DutyOn: 50
Period: 30

lamp_test:
led1:
Action: 'Blink'
DutyOn: 20
Period: 50
led2:
Action: 'Blink'
DutyOn: 20
Period: 100
led3:
Action: 'Blink'
DutyOn: 20
Period: 150

0 comments on commit 951fe70

Please sign in to comment.