Document Version: 20211209

The Yocto Project setup for the new workflow is as follows.  Be sure to read
everything below, as the steps will be updated in the future if the
setup script changes.

The steps in this document expect that you have already built the setup
(meta-xilinx-setup) SDK, and installed it.

* Configure you local.conf

The following items should be in your conf/local.conf.  This ensures that
the correct configurations are available, and the correct firmware version
is selected for this workflow.

# Instruct the system to use the decoupling firmware sources,
# add the following to the conf/local.conf:
PREFERRED_VERSION_fsbl-firmware = "experimental%"
PREFERRED_VERSION_pmu-firmware = "experimental%"
PREFERRED_VERSION_plm-firmware = "experimental%"
PREFERRED_VERSION_psm-firmware = "experimental%"

* Run the setup script

The setup environment should be run in a new shell (not the build shell)
to ensure that you do not contaminate the environment for your build.

We will assume below that the directory "prestep" was used for the SDK,
however you may use any path you wish.

# Source the SDK environment file
. <build>/prestep/environment-setup-x86_64-petalinux-linux

# Run the script from the same directory as this README
<build>/prestep/dt-processor.sh -c <conf> -s <dtb>

# For example, zynqmp:
# <build>/prestep/dt-processor.sh -c <build>/conf -s <device-tree>/zu-sdt/system-top.dts
#
# Follow the instructions returned by the script!
# Such as:

To enable this, add the following to your local.conf:

# Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere
BASE_TMPDIR = "${TOPDIR}"
require conf/cortexa53-zynqmp-linux.conf
SYSTEM_DTFILE = "/proj/yocto/zu_sdt/system-top.dts"
BBMULTICONFIG += " cortexa53-zynqmp-fsbl-baremetal cortexa53-zynqmp-baremetal cortexa53-zynqmp-freertos cortexr5-zynqmp-fsbl-baremetal cortexr5-zynqmp-baremetal cortexr5-zynqmp-freertos microblaze-pmu"
FSBL_DEPENDS = ""
FSBL_MCDEPENDS = "mc::cortexa53-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy"
FSBL_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-cortexa53-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}"
R5FSBL_DEPENDS = ""
R5FSBL_MCDEPENDS = "mc::cortexr5-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy"
R5FSBL_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-cortexr5-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}"
PMU_DEPENDS = ""
PMU_MCDEPENDS = "mc::microblaze-pmu:pmu-firmware:do_deploy"
PMU_FIRMWARE_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-microblaze-pmu/deploy/images/${MACHINE}"

#
# OR
#
# Versal:
# <build>/prestep/dt-processor.sh -c <build>/conf -s <device-tree>/vck190-sdt/system-top.dts
#
# Follow the instructions returned by the script!
# Such as:

To enable this, add the following to your local.conf:

# Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere
BASE_TMPDIR = "${TOPDIR}"
require conf/cortexa72-versal-linux.conf
SYSTEM_DTFILE = "/proj/yocto/mhatle/DTB-FLOW/testing/vck190-sdt/system-top.dts"
BBMULTICONFIG += " cortexa72-versal-baremetal cortexa72-versal-freertos microblaze-pmc microblaze-psm cortexr5-versal-baremetal cortexr5-versal-freertos"
PLM_DEPENDS = ""
PLM_MCDEPENDS = "mc::microblaze-pmc:plm-firmware:do_deploy"
PLM_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-microblaze-pmc/deploy/images/${MACHINE}"
PSM_DEPENDS = ""
PSM_MCDEPENDS = "mc::microblaze-psm:psm-firmware:do_deploy"
PSM_FIRMWARE_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-microblaze-psm/deploy/images/${MACHINE}"
PDI_PATH = "__PATH TO PDI FILE HERE__"

# NOTE: On versal, you MUST specify the PDI file as directed by the instructions.
# such as: PDI_PATH = "__PATH TO PDI FILE HERE__"
# Use the full path to the corresponding PDI file, such as:
PDI_PATH = "/proj/yocto/vck190-sdt/base-design.pdi"

# _EXIT THE NEW SHELL_  return the build environment

### In the original build shell
# Build your Linux sytem:
bitbake petalinux-image-minimal

# The output will be in tmp/deploy/images/...
