summaryrefslogtreecommitdiffstats
path: root/README.building.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.building.md')
-rw-r--r--README.building.md100
1 files changed, 100 insertions, 0 deletions
diff --git a/README.building.md b/README.building.md
new file mode 100644
index 00000000..230037c1
--- /dev/null
+++ b/README.building.md
@@ -0,0 +1,100 @@
1Build Instructions
2==================
3
4The following instructions require OE-Core meta and BitBake. Poky provides these
5components, however they can be acquired separately.
6
7Initialize a build using the `oe-init-build-env` script. Once initialized
8configure `bblayers.conf` by adding the `meta-xilinx-bsp` and
9`meta-xilinx-contrib` layer. e.g.:
10
11 BBLAYERS ?= " \
12 <path to layer>/oe-core/meta \
13 <path to layer>/meta-xilinx-bsp \
14 <path to layer>/meta-xilinx-standalone \
15 <path to layer>/meta-xilinx-contrib \
16 "
17
18meta-xilinx-standalone layer provides recipes which enable building baremetal
19toolchain for PMU firmware. This layer is required for ZU+ devices which
20depends on PMU firmware
21
22meta-xilinx-contrib is a contribution layer and is optional.
23
24To build a specific target BSP configure the associated machine in `local.conf`:
25
26 MACHINE ?= "zc702-zynq7"
27
28Build the target file system image using `bitbake`:
29
30 $ bitbake core-image-minimal
31
32Once complete the images for the target machine will be available in the output
33directory `tmp/deploy/images/<machine name>/`.
34
35Using SPL flow to build ZU+
36------------------------------
37
38The pmufw needs a "configuration object" to know what it should do, and it
39expects to receive it at runtime.
40
41With the U-Boot SPL workflow there's no FSBL, and passing a cfg obj to pmufw is
42just not implemented in U-Boot
43
44To work around this problem a small patch has been developed so that
45pm_cfg_obj.c is linked into pmufw and loaded directly, without waiting for it
46from the outside. Find the original patch on the meta-topic layer [1] and the
47patch updated for pmufw 2018.x here [2].
48
49[1]
50https://github.com/topic-embedded-products/meta-topic/blob/master/recipes-bsp/pmu-firmware/pmu-firmware_2017.%25.bbappend
51
52[2]
53https://github.com/lucaceresoli/zynqmp-pmufw-builder/blob/master/0001-Load-XPm_ConfigObject-at-boot.patch
54
55
56Using multiconfig to build ZU+
57------------------------------
58
59In your local.conf multiconfig should be enabled by:
60
61`BBMULTICONFIG ?= "pmu"`
62
63Add a directory conf/multiconfig in the build directory and create pmu.conf inside it.
64
65Add the following in pmu.conf:
66
67 MACHINE="zynqmp-pmu"
68 DISTRO="xilinx-standalone"
69 TMPDIR="${TOPDIR}/pmutmp"
70
71Add the following in your local.conf
72
73 MACHINE="zcu102-zynqmp"
74 DISTRO="poky"
75
76A multiconfig dependency has to be added in the image recipe or local.conf.
77
78For example in core-image-minimal you would need:
79
80 do_image[mcdepends] = "multiconfig::pmu:pmu-firmware:do_deploy"
81
82This creates a multiconfig dependency between the task do_image from the default multiconfig '' (which has no name)
83to the task do_deploy() from the package pmu-firmware from the pmu multiconfig which was just created above.
84
85 $ bitbake core-image-minimal
86
87This will build both core-image-minimal and pmu-firmware.
88
89
90More information about multiconfig:
91https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#dev-building-images-for-multiple-targets-using-multiple-configurations
92
93
94Additional Information
95----------------------
96
97For more complete details on setting up and using Yocto/OE refer to the Yocto
98Project Quick Start guide available at:
99 http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html
100