summaryrefslogtreecommitdiffstats
path: root/README.building.md
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>2024-10-18 17:11:40 -0600
committerMark Hatle <mark.hatle@amd.com>2024-10-22 10:06:24 -0500
commit4e6d4c67fca41fa7fff0530e4444f7c99905d5f3 (patch)
treee50497f8565a8c9131c183aadbe516054e75bfb0 /README.building.md
parent957bd0cbb610eff946288d069786e94f92cc1a0d (diff)
downloadmeta-xilinx-4e6d4c67fca41fa7fff0530e4444f7c99905d5f3.tar.gz
README.building.md: Update build instructions
1. Update build instrcutions for scrathgap release. 2. Add instrcutions to generate SDT/XSCT machine configuration files. 2. Move QEMU Configuration from README.sdt.bsp.md to README.building.md 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.md123
1 files changed, 102 insertions, 21 deletions
diff --git a/README.building.md b/README.building.md
index 456aa634..c39e89c1 100644
--- a/README.building.md
+++ b/README.building.md
@@ -6,17 +6,24 @@ layers.
6The following instructions require OE-Core meta and BitBake. Poky provides these 6The following instructions require OE-Core meta and BitBake. Poky provides these
7components, however they can be acquired separately. 7components, however they can be acquired separately.
8 8
9> **Pre-requisites:** Refer [Preparing Build Host](https://docs.yoctoproject.org/4.1.2/singleindex.html#preparing-the-build-host) documentation. 9> **Pre-requisites:** Refer [Preparing Build Host](https://docs.yoctoproject.org/5.0.4/singleindex.html#preparing-the-build-host) documentation.
10 10
111. Create a project directory. 111. Create a project directory.
12``` 12```
13$ mkdir sources 13$ mkdir sources
14$ cd sources 14$ cd sources
15``` 15```
162. Clone the poky, openembedded and amd xilinx repository. 16
172. Clone the poky, openembedded and AMD repository.
17> **Note:** 18> **Note:**
18> * *release_branch:* refers to upstream stable release branch. 19> * *release_branch:* refers to upstream stable release branch.
19> * *rel-version:* refers to amd xilinx release version. 20> * *rel-version:* refers to AMD release version.
21> * *README:* By default README file link will be pointing to master branch so make
22> sure to checkout the release_branch or rel-version branch.
23> * *Upstream Pending Patches:* It is intended to resync Scarthgap (upstream) for
24> both meta-virtualization and meta-openamp, but currently there are some patches
25> in there that have not yet been accepted by upstream. So using the fork from
26> https://github.com/Xilinx is recommended.
20 27
21``` 28```
22$ mkdir sources 29$ mkdir sources
@@ -25,6 +32,7 @@ $ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.g
25$ git clone -b <release-branch> https://git.yoctoproject.org/git/meta-virtualization 32$ git clone -b <release-branch> https://git.yoctoproject.org/git/meta-virtualization
26$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git --recurse-submodules 33$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git --recurse-submodules
27$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git 34$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git
35$ git clone -b <rel-version> https://github.com/Xilinx/meta-arm.git
28``` 36```
29> **Note:** 37> **Note:**
30> * When meta-xilinx layer is cloned using git tool by default it will clone 38> * When meta-xilinx layer is cloned using git tool by default it will clone
@@ -37,6 +45,7 @@ $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git
37``` 45```
38$ source poky/oe-init-build-env 46$ source poky/oe-init-build-env
39``` 47```
48
404. Once initialized configure `bblayers.conf` by adding dependency layers as shown 494. Once initialized configure `bblayers.conf` by adding dependency layers as shown
41 below using `bitbake-layers` command. 50 below using `bitbake-layers` command.
42> **Note:** From step 3 by default `meta-yocto-bsp` will be included in bblayers.conf 51> **Note:** From step 3 by default `meta-yocto-bsp` will be included in bblayers.conf
@@ -52,23 +61,27 @@ $ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization
52$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze 61$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze
53$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core 62$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core
54$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone 63$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone
64$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-sdt
55$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-bsp 65$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-bsp
56$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-vendor
57$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-contrib
58$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools 66$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools
67$ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm
68$ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm-toolchain
59``` 69```
60> **Note:** We recommend using meta-xilinx-tools, the version that is built as 70> **Note:**
61> standalone may not work on many boards as it does not know the board configuration. 71> 1. For SDT build flow user can remove meta-xilinx-tools as this layer is
62 72> optional.
635. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf 73> 2. If user wants to build machine files supported by meta-xilinx-vendor or
64 file for a specific target which can boot and run the in the board or QEMU. 74> met-xilinx-contrib layer then include these layer running following commands.
65``` 75```
66MACHINE = "<target_machine_name>" 76$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-vendor
77$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-contrib
67``` 78```
68* For list of available target machines see meta layer README files.
69 79
70 * [meta-xilinx-bsp README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files) 805. Create a new layer to for SDT or XSCT machine files geneated using gen-machineconf
71 * [meta-kria README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files) 81 tool. If user already has a custom-bsp layer then you can skip this step.
82```
83$ bitbake-layers create-layer --add-layer --layerid <layerid> <layername>
84```
72 85
736. For NFS build host system modify the build/conf/local.conf and add TMPDIR 866. For NFS build host system modify the build/conf/local.conf and add TMPDIR
74 path as shown below. On local storage $TMPDIR will be set to build/tmp 87 path as shown below. On local storage $TMPDIR will be set to build/tmp
@@ -76,19 +89,41 @@ MACHINE = "<target_machine_name>"
76TMPDIR = "/tmp/$USER/yocto/release_version/build" 89TMPDIR = "/tmp/$USER/yocto/release_version/build"
77``` 90```
78 91
797. Modify the build/conf/local.conf file to add wic image to default target 927. Follow generating SDT or XSCT machine configuration file instructions using
93 gen-machineconf tool. SDT or XSCT machine files are generated using sdtgen
94 output or xsa.
95 * [SDT](https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-standalone-sdt/README.sdt.bsp.md)
96 * [XSCT](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md)
97
988. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf
99 file for a specific target which can boot and run the in the board or QEMU.
100```
101MACHINE = "<target_machine_name>"
102```
103* For list of available pre-built target machines see meta layer README files.
104
105 * [meta-amd-adaptive-socs-bsp README](https://github.com/Xilinx/meta-amd-adaptive-socs/blob/master/meta-amd-adaptive-socs-bsp/README.asoc.bsp.md)
106 * [meta-xilinx-tools README](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md)
107 * [meta-kria README](https://github.com/Xilinx/meta-kria/blob/master/README.kria.bsp.md)
108
1099. Once machine files are generated in <conf-directory>/machine/<soc-family>-<board-name>-<sdt-or-xsct>-<design-name>.conf,
110 include the QEMU DT files, See [QEMU Configurations](#qemu-configurations)
111 section for more details. This step can be skipped if you are using pre-built
112 target machines files.
113
11410. Modify the build/conf/local.conf file to add wic image to default target
80 image as shown below. 115 image as shown below.
81``` 116```
82IMAGE_FSTYPES += "wic" 117IMAGE_FSTYPES += "wic"
83WKS_FILES = "xilinx-default-sd.wks" 118WKS_FILES = "xilinx-default-sd.wks"
84``` 119```
85 120
868. Build the qemu-helper-native package to setup QEMU network tap devices. 12111. Build the qemu-helper-native package to setup QEMU network tap devices.
87``` 122```
88$ bitbake qemu-helper-native 123$ bitbake qemu-helper-native
89``` 124```
90 125
919. Manually configure a tap interface for your build system. As root run 12612. Manually configure a tap interface for your build system. As root run
92 <path-to>/sources/poky/scripts/runqemu-gen-tapdevs, which should generate a 127 <path-to>/sources/poky/scripts/runqemu-gen-tapdevs, which should generate a
93 list of tap devices. Once tap interfaces are successfully create you should 128 list of tap devices. Once tap interfaces are successfully create you should
94 be able to see all the interfaces by running ifconfig command. 129 be able to see all the interfaces by running ifconfig command.
@@ -97,15 +132,61 @@ $ bitbake qemu-helper-native
97$ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -u $USER) $(id -g $USER) 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin 132$ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -u $USER) $(id -g $USER) 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
98``` 133```
99 134
10010. Build an OS image for the target using `bitbake` command. 13513. Build an OS image for the target using `bitbake` command.
101> **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt 136> **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt
102> for available target image-name. e.g. core-image-minimal or petalinux-image-minimal 137> for available target image-name. e.g. core-image-minimal or petalinux-image-minimal
103
104``` 138```
105$ bitbake <target-image> 139$ bitbake <target-image>
106``` 140```
107 141
1087. Once complete the images for the target machine will be available in the output 14214. Once complete the images for the target machine will be available in the output
109 directory `${TMPDIR}/deploy/images/${MACHINE}/`. 143 directory `${TMPDIR}/deploy/images/${MACHINE}/`.
110 144
1118. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md) 14515. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md)
146
147## QEMU Configurations
148
149This section describes the QEMU settings which must be added to the generated
150machine configuration file in order to use the runqemu command. The following
151board settings need to be added in sdt or xsct machine configuration file to
152define which QEMU device trees should be used.
153
154> **Variable usage examples:**
155>
156> QEMU Device tree deploy directory: `QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"`
157>
158> QEMU PMU Device tree: `QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb"`
159>
160> QEMU PS Device tree: `QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"`
161>
162> QEMU PMC Board Device tree: `QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"`
163>
164> QEMU Memory: Some boards for example VEK280 and VH158 memory configurations are
165> different, Hence we need to adjust the same in QB_MEM to match board dtsi files.
166> Below are some examples.
167> * ZynqMP `QB_MEM = "-m 4096"`
168> * Versal VEK280 `QB_MEM = "-m 12G"`
169
170> **Note:** QEMU_HW_DTB_PS files are based on eval board schematics. If you are
171> using a custom board then user has to create a QEMU_HW_DTB_PS to match their
172> custom boards. Refer https://github.com/Xilinx/qemu-devicetrees/blob/master/board-versal-ps-vek280.dts
173> as an example.
174
175| Devices | Evaluation Board | QEMU PMC or PMU DTB file | QEMU PS DTB file | QB Mem |
176|---------|-------------------------------------------------------------------------------|-----------------------------|-------------------------------|--------|
177| ZynqMP | [ZCU102](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
178| | [ZCU104](https://www.xilinx.com/products/boards-and-kits/zcu104.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
179| | [ZCU106](https://www.xilinx.com/products/boards-and-kits/zcu106.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
180| | [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
181| | [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
182| | [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
183| | [ZCU670](https://www.xilinx.com/products/boards-and-kits/zcu670.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
184| Versal | [VCK190](https://www.xilinx.com/products/boards-and-kits/vck190.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vck190.dtb` | 8G |
185| | [VMK180](https://www.xilinx.com/products/boards-and-kits/vmk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vmk180.dtb` | 8G |
186| | [VPK120](https://www.xilinx.com/products/boards-and-kits/vpk120.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk120.dtb` | 8G |
187| | [VPK180](https://www.xilinx.com/products/boards-and-kits/vpk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk180.dtb` | 8G |
188| | [VEK280](https://www.xilinx.com/products/boards-and-kits/vek280.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vek280.dtb` | 12G |
189| | [VHK158](https://www.xilinx.com/products/boards-and-kits/vhk158.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vhk158.dtb` | 32G |
190
191> **Note:** Additional information on AMD Adaptive SoC's and FPGA's can be found at:
192 https://www.amd.com/en/products/adaptive-socs-and-fpgas.html