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