summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-experimental/README.md
blob: 5ca782bf46d78a9e3e4b92579c3fa4e9fe0d9ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# meta-xilinx-standalone-experimental

This layer contains experimental items that may eventually be added to the
meta-xilinx-standalone layer.  The components in this layer may or may not be
buildable as they may require unreleased code.

The non-Linux software components are still in development and this should be
considered to be a preview release only.  For instance, some components may not
be buildable, expect APIs to change on various parts and pieces.

## Build Instructions

The Yocto Project setup for the System Device Tree (SDT) workflow is as follows.
Be sure to read everything below.

> **Pre-requisites:**
> * To use this layer you must REMOVE meta-xilinx-tools from your project.
meta-xilinx-tools is not compatible with this experimental approach. You may
also have to remove other layers that depend on meta-xilinx-tools, such as
meta-kria and meta-system-controller.
> * Follow [System Device Tree Instructions](https://github.com/Xilinx/system-device-tree-xlnx/blob/master/README.md)
>   to generate the SDT output.
> * To use the experimental version of the embedded software (firmware) as well
as system configuration, you must build through gen-machineconf tool. This tool
is passed a output of system device tree directory.

1. Follow [Building Instructions](../README.building.md) upto step 2.

2. Clone the meta-openamp repository.

```
$ git clone -b <rel-version> https://github.com/Xilinx/meta-openamp
```
3. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md)
   from step 3 to step 4.

4. Remove meta-xilinx-tools and meta-xilinx-tools dependency layers(such as
   meta-kria and meta-system-controller if included in bblayers.conf), then add
   the meta-xilinx-standalone-experimental and meta-openamp layer.

> **Note:** SDT builds for following devices are not supported in 2024.1 release.
> * Zynq 7000
> * MicoBlaze
> * Kria
> * System Controller

```
$ bitbake-layers remove-layer meta-xilinx-tools
$ bitbake-layers remove-layer meta-kria
$ bitbake-layers remove-layer meta-system-controller
$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-experimental
$ bitbake-layers add-layer ./<path-to-layer>/meta-openamp
```

5. Export gen-machineconf tool.
```
$ export PATH=$PATH:<ABSOLUTE_PATH>/gen-machine-conf
```

6. Run the script from the build or ${TOPDIR} directory. This step describes
   System Device Tree (SDT) with and without pl overlays. Configruations are same
   for both SDT with and without pl overlays except for linux dts content.

> **Note:**
> 1. The -l option will automatically add the necessary parameters to the
   local.conf file.  If you need to re-run this comment, you just clear the
   parameters from the end of the file.  Without the -l option the items are
   printed to the screen and must be manually added to your conf/local.conf
> 2. The --soc-family argument is an optional argument and user can skip this.
> 3. By default minimal set of multiconfigs are generated by gen-machineconf tool.
>    To enable full multiconfig(APU/RPU baremetal or FreeRTOS) then use
>    `--multiconfigfull` option.

   a. Without SDT pl overlay:
```
 $ gen-machineconf --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf
```

   b. With SDT pl overlay:
      To generate SDT pl overlay run gen-machineconf command with
      `-g {full|dfx}` option. Once SDT pl overlay command is executed successfully
      pl.dtsi will be generated under <conf>/dts/${MACHINE}/pl-overlay-{full|dfx}
      directory. User can use this pl.dtsi as input to full or dfx static firmware
      recipes.

> **Note:** DFx partial dtsi is not processed by gen-machineconf(lopper) tool, User
>          needs to use the *_partial.dtsi and *_partial.pdi/bit from sdtgen output
>          artifacts to DFx partial firmware recipes.

   * ZynqMP Full bitstream or Versal Segmented Configuration:
```
 $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g full
```

   * ZynqMP or Versal DFx:
```
 $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g dfx
```

For example, zynqmp:
```
$ gen-machineconf --soc-family zynqmp --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf
```
The following will be written to the end of the conf/local.conf file:

```
# Use the newly generated MACHINE
MACHINE = "xlnx-zynqmp-zcu102-rev1-0"

# Avoid errors in some baremetal configs as these layers may be present
# but are not used.  Note the following lines are optional and can be
# safetly disabled.
SKIP_META_VIRT_SANITY_CHECK = "1"
SKIP_META_SECURITY_SANITY_CHECK = "1"
SKIP_META_TPM_SANITY_CHECK = "1"

# Each generated multiconfig defines it's own TMPDIR, either edit the
# multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below
#MC_TMPDIR_PREFIX = "${TOPDIR}/tmp"
```

For example, versal:
```
$ gen-machineconf --soc-family versal --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf
```

The following will be written to the end of the conf/local.conf file:

```
# Use the newly generated MACHINE
MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva"

# Avoid errors in some baremetal configs as these layers may be present
# but are not used.  Note the following lines are optional and can be
# safetly disabled.
SKIP_META_VIRT_SANITY_CHECK = "1"
SKIP_META_SECURITY_SANITY_CHECK = "1"
SKIP_META_TPM_SANITY_CHECK = "1"

# Each generated multiconfig defines it's own TMPDIR, either edit the
# multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below
#MC_TMPDIR_PREFIX = "${TOPDIR}/tmp"
```
> **Bitbake Performance Note:**
Each BBMULTICONFIG value requires all of the recipes to be parsed for that
configuration.  Thus each multiconfig will add more parsing time.  A long list
can lead to a very slow parse (many minutes).  To speed up parsing, it is
suggested that you trim this down to only the configurations you require.
A minimum configuration is included with the generated configuration.


7. Build your project, You should now be able to build your project normally.
   See the Yocto Project documentation if you have questions on how to work with
   the multiconfig recipes. The following is a simple build for testing.

8. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md)
   from step 6.

## Dependencies

This layer depends on:

	URI: https://git.yoctoproject.org/poky
	layers: meta, meta-poky
	branch: langdale

	URI: https://git.openembedded.org/meta-openembedded
	layers: meta-oe
	branch: langdale

	URI:
        https://git.yoctoproject.org/meta-xilinx (official version)
        https://github.com/Xilinx/meta-xilinx (development and amd xilinx release)
	layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone
	branch: langdale or amd xilinx release version (e.g. rel-v2024.1)

	URI:
        https://git.yoctoproject.org/meta-virtualization (official version)
        https://github.com/Xilinx/meta-virtualization (development and amd xilinx release)
	branch: langdale or amd xilinx release version (e.g. rel-v2024.1)

	URI:
        https://github.com/OpenAMP/meta-openamp (official version)
        https://github.com/Xilinx/meta-openamp (development and amd xilinx release)
	branch: langdale or amd xilinx release version (e.g. rel-v2024.1)