From fbd4c044291288a5df0426db7ffcff3d075df5ef Mon Sep 17 00:00:00 2001 From: Alejandro Enedino Hernandez Samaniego Date: Thu, 13 Feb 2020 15:42:49 -0800 Subject: system-zcu102: Create heterogeneous machine configuration for ZCU102 evaluation board. Using the MACHINE=system-zcu102 should allow users to build the required artifacts for the several architectures inside a ZCU102 board. This machine along with the declared multiconfigs set up the wiring to do so, building Linux, PMU firmware and FSBL on a single bitbake invokation: $ bitbake core-image-minimal Three different TMP directories will be used, these depend both on the architecture for which packages are being generated and the C library that was used for that configuration. This should be used as an example that can easily be adapted to other boards. Signed-off-by: Alejandro Enedino Hernandez Samaniego --- meta-xilinx-bsp/conf/machine/system-zcu102.conf | 61 +++++++++++++++++++++++++ meta-xilinx-bsp/conf/multiconfig/fsblmc.conf | 8 ++++ meta-xilinx-bsp/conf/multiconfig/pmumc.conf | 8 ++++ 3 files changed, 77 insertions(+) create mode 100644 meta-xilinx-bsp/conf/machine/system-zcu102.conf create mode 100644 meta-xilinx-bsp/conf/multiconfig/fsblmc.conf create mode 100644 meta-xilinx-bsp/conf/multiconfig/pmumc.conf diff --git a/meta-xilinx-bsp/conf/machine/system-zcu102.conf b/meta-xilinx-bsp/conf/machine/system-zcu102.conf new file mode 100644 index 00000000..5d3bbd28 --- /dev/null +++ b/meta-xilinx-bsp/conf/machine/system-zcu102.conf @@ -0,0 +1,61 @@ +#@TYPE: Machine +#@NAME: system-zcu102 +#@DESCRIPTION: Machine supporting the architectures in the ZCU102 evaluation board. + +# This machine sets up a build for a heterogeneous architecture board. +# In this specific case, this refers to a zcu102-zynqmp board, which +# should build artifacts for the hard microblaze architecture, and the +# cortex-a53. + +# This is meant to be used as a base case and adapting it to +# other boards should be fairly simple. + +# To build a full system, simply invoke the command: +# $ bitbake +# which is analogous to +# $ bitbake mc:: +# Where image can be core-image-minimal for example +# If a user wants to build a package for a certain architecture +# a similar command can be invoked, just changing the parameter +# between : and : to the desired multiconfig from one of the +# declared values below. +# For example, to build the xilstandalone library for the microblaze: +# $ bitbake mc:pmumc:xilstandalone +# or to build fsbl for cortexa53: +# $ bitbake mc:fsblmc:zyqmp-fsbl + + +# These artifacts are the pmu firmware along with the fsbl and the +# Linux OS respectively + +# Keep in mind that there would still be a wiring required to merge +# the artifacts from their respective deploy directories using bootgen. +BBMULTICONFIG = "fsblmc pmumc" + +# The following should be changed to the machine which corresponds to +# the architecture of a specific device, in this case cortexa53 +# But there are several hard coded expected values from several +# repos, e.g. linux-xlnx which expects a defconfig depending on +# the machine that is being used, as a TEMPORARY solution and +# to prove how multiconfig can be used to build a full system +# with heterogeneous architectures we'll use MACHINE=zcu102-zynqmp. + +# The downside is that this stills needs xsct and would technically +# build two pmu firmwrares and two fsbls, one coming from our +# multiconfig and one that uses xsct respectively, once the values +# mentioned above are fixed, this should work properly with: +# MACHINE = "cortexa53-zynqmp" + +MACHINE = "zcu102-zynqmp" +require conf/machine/${MACHINE}.conf + +# Use the same format for TMPDIR as in the other multiconfigs so its less confusing. +TMPDIR = "${TOPDIR}/tmp-${MACHINE}-${TCLIBC}" + +# Create dependencies for Linux only, other multiconfig applications, +# can be built separately, e.g. bitbake mc:pmumc:pmufw +# in this case, linux cannot, also worth mentioning that these should +# eventually be set on a recipe level and would probably be useful to +# create a chain of dependencies: pmufw<-fsbl<-Linux +do_image[mcdepends] += "multiconfig::fsblmc:zynqmp-fsbl:do_deploy" +do_image[mcdepends] += "multiconfig::pmumc:pmufw:do_deploy" \ No newline at end of file diff --git a/meta-xilinx-bsp/conf/multiconfig/fsblmc.conf b/meta-xilinx-bsp/conf/multiconfig/fsblmc.conf new file mode 100644 index 00000000..87bb56a8 --- /dev/null +++ b/meta-xilinx-bsp/conf/multiconfig/fsblmc.conf @@ -0,0 +1,8 @@ +MACHINE = "cortexa53-zynqmp" +DISTRO = "xilinx-standalone" +TMPDIR = "${TOPDIR}/tmp-${MACHINE}-${TCLIBC}" + +# These should be temporary until the dtg repo has the correct design +HDF_BASE ?= "file://" +HDF_PATH ?= "${TOPDIR}/system.dsa" +HDF_EXT ?= "dsa" diff --git a/meta-xilinx-bsp/conf/multiconfig/pmumc.conf b/meta-xilinx-bsp/conf/multiconfig/pmumc.conf new file mode 100644 index 00000000..756ea94a --- /dev/null +++ b/meta-xilinx-bsp/conf/multiconfig/pmumc.conf @@ -0,0 +1,8 @@ +MACHINE = "microblaze-pmu" +DISTRO = "xilinx-standalone" +TMPDIR = "${TOPDIR}/tmp-${MACHINE}-${TCLIBC}" + +# These should be temporary until the dtg repo has the correct design +HDF_BASE ?= "file://" +HDF_PATH ?= "${TOPDIR}/system.dsa" +HDF_EXT ?= "dsa" -- cgit v1.2.3-54-g00ecf