summaryrefslogtreecommitdiffstats
path: root/README.building.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.building.md')
-rw-r--r--README.building.md139
1 files changed, 111 insertions, 28 deletions
diff --git a/README.building.md b/README.building.md
index 456aa634..7cbeb262 100644
--- a/README.building.md
+++ b/README.building.md
@@ -6,25 +6,34 @@ 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
23$ git clone -b <release-branch> https://git.yoctoproject.org/poky.git 30$ git clone -b <release-branch> https://git.yoctoproject.org/poky
24$ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git 31$ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded
25$ git clone -b <release-branch> https://git.yoctoproject.org/git/meta-virtualization 32$ git clone -b <release-branch> https://git.yoctoproject.org/meta-virtualization
26$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git --recurse-submodules 33$ git clone -b <release-branch> https://git.yoctoproject.org/meta-arm
27$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git 34$ git clone -b <release-branch> https://github.com/OpenAMP/meta-openamp
35$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx --recurse-submodules
36$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools
28``` 37```
29> **Note:** 38> **Note:**
30> * When meta-xilinx layer is cloned using git tool by default it will clone 39> * When meta-xilinx layer is cloned using git tool by default it will clone
@@ -37,6 +46,7 @@ $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git
37``` 46```
38$ source poky/oe-init-build-env 47$ source poky/oe-init-build-env
39``` 48```
49
404. Once initialized configure `bblayers.conf` by adding dependency layers as shown 504. Once initialized configure `bblayers.conf` by adding dependency layers as shown
41 below using `bitbake-layers` command. 51 below using `bitbake-layers` command.
42> **Note:** From step 3 by default `meta-yocto-bsp` will be included in bblayers.conf 52> **Note:** From step 3 by default `meta-yocto-bsp` will be included in bblayers.conf
@@ -46,29 +56,34 @@ $ source poky/oe-init-build-env
46``` 56```
47$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-oe 57$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-oe
48$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python 58$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python
49$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems
50$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking 59$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking
60$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems
51$ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization 61$ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization
62$ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm-toolchain
63$ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm
64$ bitbake-layers add-layer ./<path-to-layer>/meta-openamp
52$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze 65$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze
53$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core 66$ 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 67$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone
68$ 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 69$ 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 70$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools
59``` 71```
60> **Note:** We recommend using meta-xilinx-tools, the version that is built as 72> **Note:**
61> standalone may not work on many boards as it does not know the board configuration. 73> 1. For SDT build flow user can remove meta-xilinx-tools as this layer is
62 74> optional.
635. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf 75> 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. 76> met-xilinx-contrib layer then include these layer running following commands.
65``` 77```
66MACHINE = "<target_machine_name>" 78$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-vendor
79$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-contrib
67``` 80```
68* For list of available target machines see meta layer README files.
69 81
70 * [meta-xilinx-bsp README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files) 825. 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) 83 tool. If user already has a custom-bsp layer then you can skip this step.
84```
85$ bitbake-layers create-layer --add-layer --layerid <layerid> <layername>
86```
72 87
736. For NFS build host system modify the build/conf/local.conf and add TMPDIR 886. 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 89 path as shown below. On local storage $TMPDIR will be set to build/tmp
@@ -76,36 +91,104 @@ MACHINE = "<target_machine_name>"
76TMPDIR = "/tmp/$USER/yocto/release_version/build" 91TMPDIR = "/tmp/$USER/yocto/release_version/build"
77``` 92```
78 93
797. Modify the build/conf/local.conf file to add wic image to default target 947. Follow generating SDT or XSCT machine configuration file instructions using
95 gen-machineconf tool. SDT or XSCT machine files are generated using sdtgen
96 output or xsa.
97 * [SDT](https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-standalone-sdt/README.sdt.bsp.md)
98 * [XSCT](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md)
99
1008. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf
101 file for a specific target which can boot and run the in the board or QEMU.
102```
103MACHINE = "<target_machine_name>"
104```
105* For list of available pre-built target machines see meta layer README files.
106
107 * [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)
108 * [meta-xilinx-tools README](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md)
109 * [meta-kria README](https://github.com/Xilinx/meta-kria/blob/master/README.kria.bsp.md)
110
1119. Once machine files are generated in <conf-directory>/machine/<soc-family>-<board-name>-<sdt-or-xsct>-<design-name>.conf,
112 include the QEMU DT files, See [QEMU Configurations](#qemu-configurations)
113 section for more details. This step can be skipped if you are using pre-built
114 target machines files.
115
11610. Modify the build/conf/local.conf file to add wic image to default target
80 image as shown below. 117 image as shown below.
81``` 118```
82IMAGE_FSTYPES += "wic" 119IMAGE_FSTYPES += "wic"
83WKS_FILES = "xilinx-default-sd.wks" 120WKS_FILES = "xilinx-default-sd.wks"
84``` 121```
85 122
868. Build the qemu-helper-native package to setup QEMU network tap devices. 12311. Build the qemu-helper-native package to setup QEMU network tap devices.
87``` 124```
88$ bitbake qemu-helper-native 125$ bitbake qemu-helper-native
89``` 126```
90 127
919. Manually configure a tap interface for your build system. As root run 12812. 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 129 <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 130 list of tap devices. Once tap interfaces are successfully create you should
94 be able to see all the interfaces by running ifconfig command. 131 be able to see all the interfaces by running ifconfig command.
95 132
96``` 133```
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 134$ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -g $USER) 4
98``` 135```
99 136
10010. Build an OS image for the target using `bitbake` command. 13713. Build an OS image for the target using `bitbake` command.
101> **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt 138> **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 139> for available target image-name. e.g. core-image-minimal or petalinux-image-minimal
103
104``` 140```
105$ bitbake <target-image> 141$ bitbake <target-image>
106``` 142```
107 143
1087. Once complete the images for the target machine will be available in the output 14414. Once complete the images for the target machine will be available in the output
109 directory `${TMPDIR}/deploy/images/${MACHINE}/`. 145 directory `${TMPDIR}/deploy/images/${MACHINE}/`.
110 146
1118. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md) 14715. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md)
148
149## QEMU Configurations
150
151This section describes the QEMU settings which must be added to the generated
152machine configuration file in order to use the runqemu command. The following
153board settings need to be added in sdt or xsct machine configuration file to
154define which QEMU device trees should be used.
155
156> **Variable usage examples:**
157>
158> QEMU Device tree deploy directory: `QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"`
159>
160> QEMU PMU Device tree: `QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb"`
161>
162> QEMU PS Device tree: `QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"`
163>
164> QEMU PMC Board Device tree: `QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"`
165>
166> QEMU Memory: Some boards for example VEK280 and VH158 memory configurations are
167> different, Hence we need to adjust the same in QB_MEM to match board dtsi files.
168> Below are some examples.
169> * ZynqMP `QB_MEM = "-m 4096"`
170> * Versal VEK280 `QB_MEM = "-m 12G"`
171
172> **Note:** QEMU_HW_DTB_PS files are based on eval board schematics. If you are
173> using a custom board then user has to create a QEMU_HW_DTB_PS to match their
174> custom boards. Refer https://github.com/Xilinx/qemu-devicetrees/blob/master/board-versal-ps-vek280.dts
175> as an example.
176
177| Devices | Evaluation Board | QEMU PMC or PMU DTB file | QEMU PS DTB file | QB Mem |
178|---------|-------------------------------------------------------------------------------|-----------------------------|-------------------------------|--------|
179| ZynqMP | [ZCU102](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
180| | [ZCU104](https://www.xilinx.com/products/boards-and-kits/zcu104.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
181| | [ZCU106](https://www.xilinx.com/products/boards-and-kits/zcu106.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
182| | [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
183| | [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
184| | [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
185| | [ZCU670](https://www.xilinx.com/products/boards-and-kits/zcu670.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
186| Versal | [VCK190](https://www.xilinx.com/products/boards-and-kits/vck190.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vck190.dtb` | 8G |
187| | [VMK180](https://www.xilinx.com/products/boards-and-kits/vmk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vmk180.dtb` | 8G |
188| | [VPK120](https://www.xilinx.com/products/boards-and-kits/vpk120.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk120.dtb` | 8G |
189| | [VPK180](https://www.xilinx.com/products/boards-and-kits/vpk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk180.dtb` | 8G |
190| | [VEK280](https://www.xilinx.com/products/boards-and-kits/vek280.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vek280.dtb` | 12G |
191| | [VHK158](https://www.xilinx.com/products/boards-and-kits/vhk158.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vhk158.dtb` | 32G |
192
193> **Note:** Additional information on AMD Adaptive SoC's and FPGA's can be found at:
194 https://www.amd.com/en/products/adaptive-socs-and-fpgas.html