diff options
| author | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> | 2023-02-26 23:12:18 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-02-28 08:42:28 -0600 |
| commit | f1b4eae7dbd4af95c98329858aba8a7d14051262 (patch) | |
| tree | 2088728417357bad1f6a0fa0fb589ed67bb3501f /README.building.md | |
| parent | ab194f5565f772cd2982ac9386824b745849f326 (diff) | |
| download | meta-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.md | 174 |
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 @@ | |||
| 1 | Build Instructions | 1 | # Build Instructions |
| 2 | ================== | 2 | |
| 3 | This section describes how to get your build host ready to work with meta-xilinx | ||
| 4 | layers. | ||
| 3 | 5 | ||
| 4 | The following instructions require OE-Core meta and BitBake. Poky provides these | 6 | The following instructions require OE-Core meta and BitBake. Poky provides these |
| 5 | components, however they can be acquired separately. | 7 | components, however they can be acquired separately. |
| 6 | 8 | ||
| 7 | Initialize 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. |
| 8 | configure `bblayers.conf` by adding the `meta-xilinx-bsp` and | 10 | |
| 9 | `meta-xilinx-contrib` layer. e.g.: | 11 | 1. 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 \ | 16 | 2. 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. | |
| 18 | meta-xilinx-standalone layer provides recipes which enable building baremetal | 20 | ``` |
| 19 | toolchain for PMU firmware. This layer is required for ZU+ devices which | 21 | $ mkdir sources |
| 20 | depends 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 | |
| 22 | meta-xilinx-contrib is a contribution layer and is optional. | 24 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git |
| 23 | 25 | ``` | |
| 24 | To build a specific target BSP configure the associated machine in `local.conf`: | 26 | 3. 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 | ``` | |
| 28 | Build the target file system image using `bitbake`: | 30 | 4. 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 | |
| 32 | Once 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 |
| 33 | directory `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 | |
| 35 | Using 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 | ``` | |
| 38 | The pmufw needs a "configuration object" to know what it should do, and it | 40 | 5. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf |
| 39 | expects to receive it at runtime. | 41 | file for a specific target which can boot and run the in the board or QEMU. |
| 40 | 42 | ``` | |
| 41 | With the U-Boot SPL workflow there's no FSBL, and passing a cfg obj to pmufw is | 43 | MACHINE = "<target_machine_name>" |
| 42 | just not implemented in U-Boot | 44 | ``` |
| 43 | 45 | Available target machines are: | |
| 44 | To work around this problem a small patch has been developed so that | 46 | |
| 45 | pm_cfg_obj.c is linked into pmufw and loaded directly, without waiting for it | 47 | | Device | target machines | |
| 46 | from the outside. Find the original patch on the meta-topic layer [1] and the | 48 | |------------|---------------------| |
| 47 | patch updated for pmufw 2018.x here [2]. | 49 | | MicroBlaze | microblaze-generic | |
| 48 | 50 | | | ac701-microblazeel | | |
| 49 | [1] | 51 | | | kc705-microblazeel | |
| 50 | https://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 | |
| 53 | https://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 | | |
| 56 | Using multiconfig to build ZU+ | 58 | | | zcu102-zynqmp | |
| 57 | ------------------------------ | 59 | | | zcu104-zynqmp | |
| 58 | 60 | | | zcu106-zynqmp | | |
| 59 | In 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 | | |
| 63 | Add a directory conf/multiconfig in the build directory and create pmu.conf inside it. | 65 | | | zcu1275-zynqmp | |
| 64 | 66 | | | zcu1285-zynqmp | | |
| 65 | Add 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 | | |
| 71 | Add 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 | 77 | 6. Build an OS image for the target using `bitbake` command. | |
| 76 | A multiconfig dependency has to be added in the image recipe or local.conf. | 78 | ``` |
| 77 | 79 | $ bitbake core-image-minimal | |
| 78 | For example in core-image-minimal you would need: | 80 | ``` |
| 79 | 81 | 7. 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 | |||
| 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 | |||
