summaryrefslogtreecommitdiffstats
path: root/README.building.md
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>2023-02-26 23:12:18 -0700
committerMark Hatle <mark.hatle@amd.com>2023-02-28 08:42:28 -0600
commitf1b4eae7dbd4af95c98329858aba8a7d14051262 (patch)
tree2088728417357bad1f6a0fa0fb589ed67bb3501f /README.building.md
parentab194f5565f772cd2982ac9386824b745849f326 (diff)
downloadmeta-xilinx-f1b4eae7dbd4af95c98329858aba8a7d14051262.tar.gz
README.building.md: Update README on build instructions
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'README.building.md')
-rw-r--r--README.building.md174
1 files changed, 78 insertions, 96 deletions
diff --git a/README.building.md b/README.building.md
index 230037c1..0638b75e 100644
--- a/README.building.md
+++ b/README.building.md
@@ -1,100 +1,82 @@
1Build Instructions 1# Build Instructions
2================== 2
3This section describes how to get your build host ready to work with meta-xilinx
4layers.
3 5
4The following instructions require OE-Core meta and BitBake. Poky provides these 6The following instructions require OE-Core meta and BitBake. Poky provides these
5components, however they can be acquired separately. 7components, however they can be acquired separately.
6 8
7Initialize a build using the `oe-init-build-env` script. Once initialized 9> **Pre-requisites:** Refer [Preparing Build Host](https://docs.yoctoproject.org/4.1.2/singleindex.html#preparing-the-build-host) documentation.
8configure `bblayers.conf` by adding the `meta-xilinx-bsp` and 10
9`meta-xilinx-contrib` layer. e.g.: 111. Create a project directory.
10 12```
11 BBLAYERS ?= " \ 13$ mkdir sources
12 <path to layer>/oe-core/meta \ 14$ cd sources
13 <path to layer>/meta-xilinx-bsp \ 15```
14 <path to layer>/meta-xilinx-standalone \ 162. Clone the poky, openembedded and amd xilinx repository.
15 <path to layer>/meta-xilinx-contrib \ 17> **Note:**
16 " 18> * *release_branch:* refers to upstream stable release branch.
17 19> * *rel-version:* refers to amd xilinx release version.
18meta-xilinx-standalone layer provides recipes which enable building baremetal 20```
19toolchain for PMU firmware. This layer is required for ZU+ devices which 21$ mkdir sources
20depends on PMU firmware 22$ git clone -b <release-branch> https://git.yoctoproject.org/poky.git
21 23$ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git
22meta-xilinx-contrib is a contribution layer and is optional. 24$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git
23 25```
24To build a specific target BSP configure the associated machine in `local.conf`: 263. Initialize a build environment using the `oe-init-build-env` script.
25 27```
26 MACHINE ?= "zc702-zynq7" 28$ source poky/oe-init-build-env
27 29```
28Build the target file system image using `bitbake`: 304. Once initialized configure `bblayers.conf` add `meta-xilinx` layer as shown
29 31 below using `bitbake-layers` command
30 $ bitbake core-image-minimal 32```
31 33$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microbalze
32Once complete the images for the target machine will be available in the output 34$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core
33directory `tmp/deploy/images/<machine name>/`. 35$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone
34 36$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-bsp
35Using SPL flow to build ZU+ 37$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-vendor
36------------------------------ 38$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-contrib
37 39```
38The pmufw needs a "configuration object" to know what it should do, and it 405. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf
39expects to receive it at runtime. 41 file for a specific target which can boot and run the in the board or QEMU.
40 42```
41With the U-Boot SPL workflow there's no FSBL, and passing a cfg obj to pmufw is 43MACHINE = "<target_machine_name>"
42just not implemented in U-Boot 44```
43 45Available target machines are:
44To work around this problem a small patch has been developed so that 46
45pm_cfg_obj.c is linked into pmufw and loaded directly, without waiting for it 47| Device | target machines |
46from the outside. Find the original patch on the meta-topic layer [1] and the 48|------------|---------------------|
47patch updated for pmufw 2018.x here [2]. 49| MicroBlaze | microblaze-generic |
48 50| | ac701-microblazeel |
49[1] 51| | kc705-microblazeel |
50https://github.com/topic-embedded-products/meta-topic/blob/master/recipes-bsp/pmu-firmware/pmu-firmware_2017.%25.bbappend 52| | kcu105-microblazeel |
51 53| | vcu118-microblazeel |
52[2] 54| Zynq-7000 | zynq-generic |
53https://github.com/lucaceresoli/zynqmp-pmufw-builder/blob/master/0001-Load-XPm_ConfigObject-at-boot.patch 55| | zc702-zynq7 |
54 56| | zc706-zynq7 |
55 57| ZynqMP | zynqmp-generic |
56Using multiconfig to build ZU+ 58| | zcu102-zynqmp |
57------------------------------ 59| | zcu104-zynqmp |
58 60| | zcu106-zynqmp |
59In your local.conf multiconfig should be enabled by: 61| | zcu111-zynqmp |
60 62| | zcu208-zynqmp |
61`BBMULTICONFIG ?= "pmu"` 63| | zcu216-zynqmp |
62 64| | zcu670-zynqmp |
63Add a directory conf/multiconfig in the build directory and create pmu.conf inside it. 65| | zcu1275-zynqmp |
64 66| | zcu1285-zynqmp |
65Add the following in pmu.conf: 67| | ultra96-zynqmp |
66 68| Versal | versal-generic |
67 MACHINE="zynqmp-pmu" 69| | versal-net-generic |
68 DISTRO="xilinx-standalone" 70| | vck190-versal |
69 TMPDIR="${TOPDIR}/pmutmp" 71| | vmk180-versal |
70 72| | vek280-versal |
71Add the following in your local.conf 73| | vpk120-versal |
72 74| | vpk180-versal |
73 MACHINE="zcu102-zynqmp" 75| | vhk158-versal |
74 DISTRO="poky" 76
75 776. Build an OS image for the target using `bitbake` command.
76A multiconfig dependency has to be added in the image recipe or local.conf. 78```
77 79$ bitbake core-image-minimal
78For example in core-image-minimal you would need: 80```
79 817. Once complete the images for the target machine will be available in the output
80 do_image[mcdepends] = "multiconfig::pmu:pmu-firmware:do_deploy" 82 directory `${TMPDIR}/deploy/images/${MACHINE}/`.
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