summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-experimental
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2023-02-06 12:15:31 -0600
committerMark Hatle <mark.hatle@amd.com>2023-02-09 07:01:01 -0800
commit23769a4c390941a12b959eb1da0e124a1f3b06b7 (patch)
tree5292e8a297f4566654566dc8f8f1611e0039282f /meta-xilinx-standalone-experimental
parent4d0f6cba3204e83c8217f35f18154ec39027ef0a (diff)
downloadmeta-xilinx-23769a4c390941a12b959eb1da0e124a1f3b06b7.tar.gz
dt-processor.sh: Move from DTB to DTS
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-standalone-experimental')
-rwxr-xr-xmeta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh253
1 files changed, 114 insertions, 139 deletions
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh
index 42d916a5..b4140345 100755
--- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh
+++ b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh
@@ -34,13 +34,13 @@ usage() {
34 cat <<EOF 34 cat <<EOF
35$0 35$0
36 -c <config_dir> Location of the build conf directory 36 -c <config_dir> Location of the build conf directory
37 -s <system_dtb> Path to system DTB 37 -s <system_dts> Path to system dts
38 [-d <domain_file>] Path to domain file (.yml/.dts) 38 [-d <domain_file>] Path to domain file (.yml/.dts)
39 [-o <overlay_dtb>] Generate overlay dts 39 [-o <overlay_dts>] Generate overlay dts
40 [-e <external_fpga>] Apply a partial overlay 40 [-e <external_fpga>] Apply a partial overlay
41 [-m <machine_conf>] The name of the machine .conf to generate 41 [-m <machine_conf>] The name of the machine .conf to generate
42 [-t <machine>] Machine type: zynqmp or versal (usually auto detected) 42 [-t <machine>] Machine type: zynqmp or versal (usually auto detected)
43 [-p <psu_init_path>] Path to psu_init files, defaults to system_dtb path 43 [-p <psu_init_path>] Path to psu_init files, defaults to system_dts path
44 [-i <pdu_path>] Path to the pdi file 44 [-i <pdu_path>] Path to the pdi file
45 [-l <config_file>] write local.conf changes to this file 45 [-l <config_file>] write local.conf changes to this file
46 [-P <petalinux_schema>] Path to petalinux schema file 46 [-P <petalinux_schema>] Path to petalinux schema file
@@ -56,8 +56,8 @@ parse_args() {
56 while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do 56 while getopts ":c:s:d:o:e:m:l:hP:p:i:" opt; do
57 case ${opt} in 57 case ${opt} in
58 c) config_dir=$OPTARG ;; 58 c) config_dir=$OPTARG ;;
59 s) system_dtb=$OPTARG ;; 59 s) system_dts=$OPTARG ;;
60 o) overlay_dtb=$OPTARG ;; 60 o) overlay_dts=$OPTARG ;;
61 d) domain_file=$OPTARG ;; 61 d) domain_file=$OPTARG ;;
62 e) external_fpga=$OPTARG ;; 62 e) external_fpga=$OPTARG ;;
63 m) mach_conf=$OPTARG ; mach_conf=${mach_conf%%.conf} ;; 63 m) mach_conf=$OPTARG ; mach_conf=${mach_conf%%.conf} ;;
@@ -73,17 +73,17 @@ parse_args() {
73 done 73 done
74 74
75 [ -z "${config_dir}" ] && error "You must specify the path to the build conf directory with -c" 75 [ -z "${config_dir}" ] && error "You must specify the path to the build conf directory with -c"
76 [ -z "${system_dtb}" ] && error "You must specify the path to the system device tree with -s" 76 [ -z "${system_dts}" ] && error "You must specify the path to the system device tree with -s"
77 [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}" 77 [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}"
78 [ -f "${system_dtb}" ] || error "Unable to find: ${system_dtb}" 78 [ -f "${system_dts}" ] || error "Unable to find: ${system_dts}"
79 system_dtb=$(realpath ${system_dtb}) 79 system_dts=$(realpath ${system_dts})
80 if [ -z "$psu_init_path" ]; then 80 if [ -z "$psu_init_path" ]; then
81 psu_init_path=$(dirname ${system_dtb}) 81 psu_init_path=$(dirname ${system_dts})
82 else 82 else
83 psu_init_path=$(realpath ${psu_init_path}) 83 psu_init_path=$(realpath ${psu_init_path})
84 fi 84 fi
85 if [ -z "$pdi_path" ]; then 85 if [ -z "$pdi_path" ]; then
86 pdi_path=$(dirname ${system_dtb}) 86 pdi_path=$(dirname ${system_dts})
87 else 87 else
88 pdi_path=$(realpath ${pdi_path}) 88 pdi_path=$(realpath ${pdi_path})
89 fi 89 fi
@@ -136,27 +136,25 @@ cortex_a53_linux() {
136 info "cortex-a53 for Linux [ $1 ]" 136 info "cortex-a53 for Linux [ $1 ]"
137 137
138 if [ "$1" = "None" ]; then 138 if [ "$1" = "None" ]; then
139 dtb_file="cortexa53-${machine}-linux.dtb"
140 dts_file="cortexa53-${machine}-linux.dts" 139 dts_file="cortexa53-${machine}-linux.dts"
141 system_conf=${dtb_file} 140 system_conf=${dts_file}
142 conf_file="" 141 conf_file=""
143 else 142 else
144 mc_name=cortexa53-${machine}-$1-linux 143 mc_name=cortexa53-${machine}-$1-linux
145 dtb_file="${mc_name}.dtb"
146 dts_file="${mc_name}.dts" 144 dts_file="${mc_name}.dts"
147 multiconf="${multiconf} ${mc_name}" 145 multiconf="${multiconf} ${mc_name}"
148 conf_file=multiconfig/${mc_name}.conf 146 conf_file=multiconfig/${mc_name}.conf
149 fi 147 fi
150 148
151 # Check if it is overlay dts otherwise just create linux dtb 149 # Check if it is overlay dts otherwise just create linux dts
152 ( 150 (
153 cd dtb || error "Unable to cd to dtb dir" 151 cd dts || error "Unable to cd to dts dir"
154 if [ "${overlay_dtb}" = "true" ]; then 152 if [ "${overlay_dts}" = "true" ]; then
155 if [ "${external_fpga}" = "true" ]; then 153 if [ "${external_fpga}" = "true" ]; then
156 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- xlnx_overlay_dt ${machine} full \ 154 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- xlnx_overlay_dt ${machine} full \
157 || error "lopper failed" 155 || error "lopper failed"
158 else 156 else
159 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dtb}" -- xlnx_overlay_dt ${machine} partial \ 157 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- xlnx_overlay_dt ${machine} partial \
160 || error "lopper failed" 158 || error "lopper failed"
161 fi 159 fi
162 dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed" 160 dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed"
@@ -165,27 +163,16 @@ cortex_a53_linux() {
165 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" \ 163 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" \
166 -i "${lops_dir}/lop-domain-linux-a53.dts" \ 164 -i "${lops_dir}/lop-domain-linux-a53.dts" \
167 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \ 165 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \
168 "${system_dtb}" "${dtb_file}" \ 166 "${system_dts}" "${dts_file}" \
169 || error "lopper failed"
170 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
171 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" \
172 -i "${lops_dir}/lop-domain-linux-a53.dts" \
173 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \
174 "${system_dtb}" "${dts_file}" \
175 || error "lopper failed" 167 || error "lopper failed"
176 else 168 else
177 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \ 169 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \
178 -i "${lops_dir}/lop-domain-linux-a53.dts" \ 170 -i "${lops_dir}/lop-domain-linux-a53.dts" \
179 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \ 171 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \
180 "${system_dtb}" "${dtb_file}" \ 172 "${system_dts}" "${dts_file}" \
181 || error "lopper failed"
182 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \
183 -i "${lops_dir}/lop-domain-linux-a53.dts" \
184 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \
185 "${system_dtb}" "${dts_file}" \
186 || error "lopper failed" 173 || error "lopper failed"
187 fi 174 fi
188 rm -f pl.dtsi lop-a53-imux.dts.dtb lop-domain-linux-a53.dts.dtb 175 rm -f pl.dtsi lop-a53-imux.dts.dtb lop-domain-linux-a53.dts.dtb lop-domain-linux-a53-prune.dts.dtb
189 ) 176 )
190 177
191 if [ -z "${conf_file}" ]; then 178 if [ -z "${conf_file}" ]; then
@@ -194,7 +181,7 @@ cortex_a53_linux() {
194 181
195 ## Generate a multiconfig 182 ## Generate a multiconfig
196 cat <<EOF >"${conf_file}" 183 cat <<EOF >"${conf_file}"
197CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 184CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
198 185
199TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" 186TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
200EOF 187EOF
@@ -215,7 +202,7 @@ cortex_a53_baremetal() {
215 fi 202 fi
216 203
217 mc_name="cortexa53-$2-${machine}${suffix}-baremetal" 204 mc_name="cortexa53-$2-${machine}${suffix}-baremetal"
218 dtb_file="${mc_name}.dtb" 205 dts_file="${mc_name}.dts"
219 multiconf="${multiconf} ${mc_name}" 206 multiconf="${multiconf} ${mc_name}"
220 conf_file="multiconfig/${mc_name}.conf" 207 conf_file="multiconfig/${mc_name}.conf"
221 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" 208 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
@@ -230,25 +217,25 @@ cortex_a53_baremetal() {
230 217
231 # Build device tree 218 # Build device tree
232 ( 219 (
233 cd dtb || error "Unable to cd to dtb dir" 220 cd dts || error "Unable to cd to dts dir"
234 if [ -n "${domain_file}" ]; then 221 if [ -n "${domain_file}" ]; then
235 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ 222 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
236 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dtb}" "${dtb_file}" \ 223 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dts}" "${dts_file}" \
237 || error "lopper failed" 224 || error "lopper failed"
238 else 225 else
239 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \ 226 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \
240 "${system_dtb}" "${dtb_file}" || error "lopper failed" 227 "${system_dts}" "${dts_file}" || error "lopper failed"
241 fi 228 fi
242 rm -f lop-a53-imux.dts.dtb 229 rm -f lop-a53-imux.dts.dtb
243 ) 230 )
244 231
245 # Build baremetal multiconfig 232 # Build baremetal multiconfig
246 if [ -n "${domain_file}" ]; then 233 if [ -n "${domain_file}" ]; then
247 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 234 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
248 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ 235 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
249 || error "lopper failed" 236 || error "lopper failed"
250 else 237 else
251 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ 238 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
252 || error "lopper failed" 239 || error "lopper failed"
253 fi 240 fi
254 241
@@ -271,7 +258,7 @@ EOF
271 cat /dev/null >"${conf_file}" 258 cat /dev/null >"${conf_file}"
272 fi 259 fi
273 cat <<EOF >>"${conf_file}" 260 cat <<EOF >>"${conf_file}"
274CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 261CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
275 262
276ESW_MACHINE = "$3" 263ESW_MACHINE = "$3"
277DEFAULTTUNE = "cortexa53" 264DEFAULTTUNE = "cortexa53"
@@ -289,7 +276,7 @@ cortex_a53_freertos() {
289 [ "$1" != "None" ] && suffix="-$1" 276 [ "$1" != "None" ] && suffix="-$1"
290 277
291 mc_name="cortexa53-$2-${machine}${suffix}-freertos" 278 mc_name="cortexa53-$2-${machine}${suffix}-freertos"
292 dtb_file="${mc_name}.dtb" 279 dts_file="${mc_name}.dts"
293 multiconf="${multiconf} ${mc_name}" 280 multiconf="${multiconf} ${mc_name}"
294 conf_file="multiconfig/${mc_name}.conf" 281 conf_file="multiconfig/${mc_name}.conf"
295 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" 282 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
@@ -297,24 +284,24 @@ cortex_a53_freertos() {
297 284
298 # Build device tree 285 # Build device tree
299 ( 286 (
300 cd dtb || error "Unable to cd to dtb dir" 287 cd dts || error "Unable to cd to dts dir"
301 if [ -n "${domain_file}" ]; then 288 if [ -n "${domain_file}" ]; then
302 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ 289 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
303 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dtb}" "${dtb_file}" \ 290 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dts}" "${dts_file}" \
304 || error "lopper failed" 291 || error "lopper failed"
305 else 292 else
306 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \ 293 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \
307 "${system_dtb}" "${dtb_file}" || error "lopper failed" 294 "${system_dts}" "${dts_file}" || error "lopper failed"
308 fi 295 fi
309 rm -f lop-a53-imux.dts.dtb 296 rm -f lop-a53-imux.dts.dtb
310 ) 297 )
311 298
312 # Build baremetal multiconfig 299 # Build baremetal multiconfig
313 if [ -n "${domain_file}" ]; then 300 if [ -n "${domain_file}" ]; then
314 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 301 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
315 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" 302 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
316 else 303 else
317 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ 304 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
318 || error "lopper failed" 305 || error "lopper failed"
319 fi 306 fi
320 307
@@ -323,7 +310,7 @@ cortex_a53_freertos() {
323 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," 310 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
324 311
325 cat <<EOF >"${conf_file}" 312 cat <<EOF >"${conf_file}"
326CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 313CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
327 314
328ESW_MACHINE = "$3" 315ESW_MACHINE = "$3"
329DEFAULTTUNE = "cortexa53" 316DEFAULTTUNE = "cortexa53"
@@ -347,30 +334,28 @@ cortex_a72_linux() {
347 fi 334 fi
348 335
349 if [ "$1" = "None" ]; then 336 if [ "$1" = "None" ]; then
350 dtb_file="cortexa72-${machine}-linux.dtb"
351 dts_file="cortexa72-${machine}-linux.dts" 337 dts_file="cortexa72-${machine}-linux.dts"
352 system_conf=${dtb_file} 338 system_conf=${dts_file}
353 conf_file="" 339 conf_file=""
354 else 340 else
355 mc_name="cortexa72-${machine}-$1-linux" 341 mc_name="cortexa72-${machine}-$1-linux"
356 dtb_file="${mc_name}.dtb"
357 dts_file="${mc_name}.dts" 342 dts_file="${mc_name}.dts"
358 multiconf="${multiconf} ${mc_name}" 343 multiconf="${multiconf} ${mc_name}"
359 conf_file=multiconfig/${mc_name}.conf 344 conf_file=multiconfig/${mc_name}.conf
360 fi 345 fi
361 346
362 ( 347 (
363 cd dtb || error "Unable to cd to dtb dir" 348 cd dts || error "Unable to cd to dts dir"
364 # Check if it is overlay dts otherwise just create linux dtb 349 # Check if it is overlay dts otherwise just create linux dts
365 if [ "${overlay_dtb}" = "true" ]; then 350 if [ "${overlay_dts}" = "true" ]; then
366 # As there is no partial support on Versal, As per fpga manager implementatin there is 351 # As there is no partial support on Versal, As per fpga manager implementatin there is
367 # a flag "external_fpga" which says apply overlay without loading the bit file. 352 # a flag "external_fpga" which says apply overlay without loading the bit file.
368 if [ "${external_fpga}" = "true" ]; then 353 if [ "${external_fpga}" = "true" ]; then
369 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- xlnx_overlay_dt \ 354 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- xlnx_overlay_dt \
370 ${machine} full external_fpga || error "lopper failed" 355 ${machine} full external_fpga || error "lopper failed"
371 else 356 else
372 # If there is no external_fpga flag, then the default is full 357 # If there is no external_fpga flag, then the default is full
373 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dtb}" -- xlnx_overlay_dt \ 358 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- xlnx_overlay_dt \
374 ${machine} full || error "lopper failed" 359 ${machine} full || error "lopper failed"
375 fi 360 fi
376 dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed" 361 dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed"
@@ -379,25 +364,15 @@ cortex_a72_linux() {
379 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" \ 364 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" \
380 -i "${lops_dir}/lop-domain-a72.dts" \ 365 -i "${lops_dir}/lop-domain-a72.dts" \
381 -i "${lops_dir}/lop-domain-a72-prune.dts" \ 366 -i "${lops_dir}/lop-domain-a72-prune.dts" \
382 "${system_dtb}" "${dtb_file}" \ 367 "${system_dts}" "${dts_file}" \
383 || error "lopper failed"
384 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
385 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" \
386 -i "${lops_dir}/lop-domain-a72.dts" \
387 -i "${lops_dir}/lop-domain-a72-prune.dts" \
388 "${system_dtb}" "${dts_file}" \
389 || error "lopper failed" 368 || error "lopper failed"
390 else 369 else
391 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \ 370 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \
392 -i "${lops_dir}/lop-domain-a72.dts" \ 371 -i "${lops_dir}/lop-domain-a72.dts" \
393 -i "${lops_dir}/lop-domain-a72-prune.dts" \ 372 -i "${lops_dir}/lop-domain-a72-prune.dts" \
394 "${system_dtb}" "${dtb_file}" || error "lopper failed" 373 "${system_dts}" "${dts_file}" || error "lopper failed"
395 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \
396 -i "${lops_dir}/lop-domain-a72.dts" \
397 -i "${lops_dir}/lop-domain-a72-prune.dts" \
398 "${system_dtb}" "${dts_file}" || error "lopper failed"
399 fi 374 fi
400 rm -f pl.dtsi lop-a72-imux.dts.dtb lop-domain-a72.dts.dtb 375 rm -f pl.dtsi lop-a72-imux.dts.dtb lop-domain-a72.dts.dtb lop-domain-a72-prune.dts.dtb
401 ) 376 )
402 377
403 if [ -z "${conf_file}" ]; then 378 if [ -z "${conf_file}" ]; then
@@ -406,7 +381,7 @@ cortex_a72_linux() {
406 381
407 ## Generate a multiconfig 382 ## Generate a multiconfig
408 cat <<EOF >"${conf_file}" 383 cat <<EOF >"${conf_file}"
409CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 384CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
410 385
411TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" 386TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
412EOF 387EOF
@@ -419,7 +394,7 @@ cortex_a72_baremetal() {
419 [ "$1" != "None" ] && suffix="-$1" 394 [ "$1" != "None" ] && suffix="-$1"
420 395
421 mc_name="cortexa72-$2-${machine}${suffix}-baremetal" 396 mc_name="cortexa72-$2-${machine}${suffix}-baremetal"
422 dtb_file="${mc_name}.dtb" 397 dts_file="${mc_name}.dts"
423 multiconf="${multiconf} ${mc_name}" 398 multiconf="${multiconf} ${mc_name}"
424 conf_file="multiconfig/${mc_name}.conf" 399 conf_file="multiconfig/${mc_name}.conf"
425 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" 400 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
@@ -427,24 +402,24 @@ cortex_a72_baremetal() {
427 402
428 # Build device tree 403 # Build device tree
429 ( 404 (
430 cd dtb || error "Unable to cd to dtb dir" 405 cd dts || error "Unable to cd to dts dir"
431 if [ -n "${domain_file}" ]; then 406 if [ -n "${domain_file}" ]; then
432 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ 407 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
433 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dtb}" "${dtb_file}" \ 408 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dts}" "${dts_file}" \
434 || error "lopper failed" 409 || error "lopper failed"
435 else 410 else
436 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \ 411 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \
437 "${system_dtb}" "${dtb_file}" || error "lopper failed" 412 "${system_dts}" "${dts_file}" || error "lopper failed"
438 fi 413 fi
439 rm -f lop-a72-imux.dts.dtb 414 rm -f lop-a72-imux.dts.dtb
440 ) 415 )
441 416
442 # Build baremetal multiconfig 417 # Build baremetal multiconfig
443 if [ -n "${domain_file}" ]; then 418 if [ -n "${domain_file}" ]; then
444 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 419 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
445 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" 420 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
446 else 421 else
447 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ 422 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
448 || error "lopper failed" 423 || error "lopper failed"
449 fi 424 fi
450 425
@@ -453,7 +428,7 @@ cortex_a72_baremetal() {
453 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," 428 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
454 429
455 cat <<EOF >"${conf_file}" 430 cat <<EOF >"${conf_file}"
456CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 431CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
457 432
458ESW_MACHINE = "$3" 433ESW_MACHINE = "$3"
459DEFAULTTUNE = "cortexa72" 434DEFAULTTUNE = "cortexa72"
@@ -471,7 +446,7 @@ cortex_a72_freertos() {
471 [ "$1" != "None" ] && suffix="-$1" 446 [ "$1" != "None" ] && suffix="-$1"
472 447
473 mc_name="cortexa72-$2-${machine}${suffix}-freertos" 448 mc_name="cortexa72-$2-${machine}${suffix}-freertos"
474 dtb_file="${mc_name}.dtb" 449 dts_file="${mc_name}.dts"
475 multiconf="${multiconf} ${mc_name}" 450 multiconf="${multiconf} ${mc_name}"
476 conf_file="multiconfig/${mc_name}.conf" 451 conf_file="multiconfig/${mc_name}.conf"
477 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" 452 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
@@ -479,24 +454,24 @@ cortex_a72_freertos() {
479 454
480 # Build device tree 455 # Build device tree
481 ( 456 (
482 cd dtb || error "Unable to cd to dtb dir" 457 cd dts || error "Unable to cd to dts dir"
483 if [ -n "${domain_file}" ]; then 458 if [ -n "${domain_file}" ]; then
484 LOPPER_DTC_FLAGS="-b 0 -@" lopper -f --enhanced -x '*.yaml' \ 459 LOPPER_DTC_FLAGS="-b 0 -@" lopper -f --enhanced -x '*.yaml' \
485 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dtb}" "${dtb_file}" \ 460 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dts}" "${dts_file}" \
486 || error "lopper failed" 461 || error "lopper failed"
487 else 462 else
488 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \ 463 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \
489 "${system_dtb}" "${dtb_file}" || error "lopper failed" 464 "${system_dts}" "${dts_file}" || error "lopper failed"
490 fi 465 fi
491 rm -f lop-a72-imux.dts.dtb 466 rm -f lop-a72-imux.dts.dtb
492 ) 467 )
493 468
494 # Build baremetal multiconfig 469 # Build baremetal multiconfig
495 if [ -n "${domain_file}" ]; then 470 if [ -n "${domain_file}" ]; then
496 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 471 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
497 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" 472 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
498 else 473 else
499 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ 474 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
500 || error "lopper failed" 475 || error "lopper failed"
501 fi 476 fi
502 477
@@ -505,7 +480,7 @@ cortex_a72_freertos() {
505 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," 480 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
506 481
507 cat <<EOF >"${conf_file}" 482 cat <<EOF >"${conf_file}"
508CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 483CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
509 484
510ESW_MACHINE = "$3" 485ESW_MACHINE = "$3"
511DEFAULTTUNE = "cortexa72" 486DEFAULTTUNE = "cortexa72"
@@ -531,7 +506,7 @@ cortex_r5_baremetal() {
531 fi 506 fi
532 507
533 mc_name="cortexr5-$2-${machine}${suffix}-baremetal" 508 mc_name="cortexr5-$2-${machine}${suffix}-baremetal"
534 dtb_file="${mc_name}.dtb" 509 dts_file="${mc_name}.dts"
535 multiconf="${multiconf} ${mc_name}" 510 multiconf="${multiconf} ${mc_name}"
536 conf_file="multiconfig/${mc_name}.conf" 511 conf_file="multiconfig/${mc_name}.conf"
537 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" 512 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
@@ -546,24 +521,24 @@ cortex_r5_baremetal() {
546 521
547 # Build device tree 522 # Build device tree
548 ( 523 (
549 cd dtb || error "Unable to cd to dtb dir" 524 cd dts || error "Unable to cd to dts dir"
550 if [ -n "$domain_file" ]; then 525 if [ -n "$domain_file" ]; then
551 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ 526 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
552 -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dtb}" "${dtb_file}" \ 527 -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dts}" "${dts_file}" \
553 || error "lopper failed" 528 || error "lopper failed"
554 else 529 else
555 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \ 530 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \
556 "${system_dtb}" "${dtb_file}" || error "lopper failed" 531 "${system_dts}" "${dts_file}" || error "lopper failed"
557 fi 532 fi
558 rm -f lop-r5-imux.dts.dtb 533 rm -f lop-r5-imux.dts.dtb
559 ) 534 )
560 535
561 # Build baremetal multiconfig 536 # Build baremetal multiconfig
562 if [ -n "${domain_file}" ]; then 537 if [ -n "${domain_file}" ]; then
563 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 538 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
564 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" 539 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
565 else 540 else
566 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ 541 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
567 || error "lopper failed" 542 || error "lopper failed"
568 fi 543 fi
569 544
@@ -586,7 +561,7 @@ EOF
586 cat /dev/null >"${conf_file}" 561 cat /dev/null >"${conf_file}"
587 fi 562 fi
588 cat <<EOF >>"${conf_file}" 563 cat <<EOF >>"${conf_file}"
589CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 564CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
590 565
591ESW_MACHINE = "$3" 566ESW_MACHINE = "$3"
592DEFAULTTUNE = "cortexr5" 567DEFAULTTUNE = "cortexr5"
@@ -604,7 +579,7 @@ cortex_r5_freertos() {
604 [ "$1" != "None" ] && suffix="-$1" 579 [ "$1" != "None" ] && suffix="-$1"
605 580
606 mc_name="cortexr5-$2-${machine}${suffix}-freertos" 581 mc_name="cortexr5-$2-${machine}${suffix}-freertos"
607 dtb_file="${mc_name}.dtb" 582 dts_file="${mc_name}.dts"
608 multiconf="${multiconf} ${mc_name}" 583 multiconf="${multiconf} ${mc_name}"
609 conf_file="multiconfig/${mc_name}.conf" 584 conf_file="multiconfig/${mc_name}.conf"
610 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" 585 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
@@ -612,24 +587,24 @@ cortex_r5_freertos() {
612 587
613 # Build device tree 588 # Build device tree
614 ( 589 (
615 cd dtb || error "Unable to cd to dtb dir" 590 cd dts || error "Unable to cd to dts dir"
616 if [ -n "$domain_file" ]; then 591 if [ -n "$domain_file" ]; then
617 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ 592 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
618 -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dtb}" "${dtb_file}" \ 593 -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dts}" "${dts_file}" \
619 || error "lopper failed" 594 || error "lopper failed"
620 else 595 else
621 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \ 596 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \
622 "${system_dtb}" "${dtb_file}" || error "lopper failed" 597 "${system_dts}" "${dts_file}" || error "lopper failed"
623 fi 598 fi
624 rm -f lop-r5-imux.dts.dtb 599 rm -f lop-r5-imux.dts.dtb
625 ) 600 )
626 601
627 # Build baremetal multiconfig 602 # Build baremetal multiconfig
628 if [ -n "${domain_file}" ]; then 603 if [ -n "${domain_file}" ]; then
629 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 604 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
630 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" 605 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
631 else 606 else
632 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ 607 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
633 || error "lopper failed" 608 || error "lopper failed"
634 fi 609 fi
635 610
@@ -638,7 +613,7 @@ cortex_r5_freertos() {
638 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," 613 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
639 614
640 cat <<EOF >"${conf_file}" 615 cat <<EOF >"${conf_file}"
641CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 616CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
642 617
643ESW_MACHINE = "$3" 618ESW_MACHINE = "$3"
644DEFAULTTUNE = "cortexr5" 619DEFAULTTUNE = "cortexr5"
@@ -658,8 +633,8 @@ process_microblaze() {
658 633
659 mkdir -p machine/include/${mach_conf} 634 mkdir -p machine/include/${mach_conf}
660 ( 635 (
661 cd dtb || error "Unable to cd to dtb dir" 636 cd dts || error "Unable to cd to dts dir"
662 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-microblaze-yocto.dts" "${system_dtb}" \ 637 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-microblaze-yocto.dts" "${system_dts}" \
663 || error "lopper failed" 638 || error "lopper failed"
664 rm -f lop-microblaze-yocto.dts.dtb 639 rm -f lop-microblaze-yocto.dts.dtb
665 ) >machine/include/${mach_conf}/microblaze.inc 640 ) >machine/include/${mach_conf}/microblaze.inc
@@ -676,7 +651,7 @@ pmu-microblaze() {
676 process_microblaze 651 process_microblaze
677 652
678 mc_name="microblaze-0-pmu" 653 mc_name="microblaze-0-pmu"
679 dtb_file="${mc_name}.dtb" 654 dts_file="${mc_name}.dts"
680 multiconf="${multiconf} ${mc_name}" 655 multiconf="${multiconf} ${mc_name}"
681 multiconf_min="${multiconf_min} ${mc_name}" 656 multiconf_min="${multiconf_min} ${mc_name}"
682 conf_file="multiconfig/${mc_name}.conf" 657 conf_file="multiconfig/${mc_name}.conf"
@@ -688,16 +663,16 @@ pmu-microblaze() {
688 663
689 # Build device tree 664 # Build device tree
690 ( 665 (
691 cd dtb || error "Unable to cd to dtb dir" 666 cd dts || error "Unable to cd to dts dir"
692 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" "${dtb_file}" || error "lopper failed" 667 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed"
693 ) 668 )
694 669
695 # Build baremetal multiconfig 670 # Build baremetal multiconfig
696 if [ -n "${domain_file}" ]; then 671 if [ -n "${domain_file}" ]; then
697 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 672 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
698 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed" 673 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed"
699 else 674 else
700 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \ 675 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \
701 || error "lopper failed" 676 || error "lopper failed"
702 fi 677 fi
703 678
@@ -706,7 +681,7 @@ pmu-microblaze() {
706 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," 681 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
707 682
708 cat <<EOF >"${conf_file}" 683 cat <<EOF >"${conf_file}"
709CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 684CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
710 685
711ESW_MACHINE = "$1" 686ESW_MACHINE = "$1"
712 687
@@ -727,7 +702,7 @@ pmc-microblaze() {
727 process_microblaze 702 process_microblaze
728 703
729 mc_name="microblaze-0-pmc" 704 mc_name="microblaze-0-pmc"
730 dtb_file="${mc_name}.dtb" 705 dts_file="${mc_name}.dts"
731 multiconf="${multiconf} ${mc_name}" 706 multiconf="${multiconf} ${mc_name}"
732 multiconf_min="${multiconf_min} ${mc_name}" 707 multiconf_min="${multiconf_min} ${mc_name}"
733 conf_file="multiconfig/${mc_name}.conf" 708 conf_file="multiconfig/${mc_name}.conf"
@@ -739,16 +714,16 @@ pmc-microblaze() {
739 714
740 # Build device tree 715 # Build device tree
741 ( 716 (
742 cd dtb || error "Unable to cd to dtb dir" 717 cd dts || error "Unable to cd to dts dir"
743 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" "${dtb_file}" || error "lopper failed" 718 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed"
744 ) 719 )
745 720
746 # Build baremetal multiconfig 721 # Build baremetal multiconfig
747 if [ -n "${domain_file}" ]; then 722 if [ -n "${domain_file}" ]; then
748 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 723 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
749 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed" 724 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed"
750 else 725 else
751 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \ 726 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \
752 || error "lopper failed" 727 || error "lopper failed"
753 fi 728 fi
754 729
@@ -757,7 +732,7 @@ pmc-microblaze() {
757 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," 732 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
758 733
759 cat <<EOF >"${conf_file}" 734 cat <<EOF >"${conf_file}"
760CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 735CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
761 736
762ESW_MACHINE = "$1" 737ESW_MACHINE = "$1"
763 738
@@ -778,7 +753,7 @@ psm-microblaze() {
778 process_microblaze 753 process_microblaze
779 754
780 mc_name="microblaze-0-psm" 755 mc_name="microblaze-0-psm"
781 dtb_file="${mc_name}.dtb" 756 dts_file="${mc_name}.dts"
782 multiconf="${multiconf} ${mc_name}" 757 multiconf="${multiconf} ${mc_name}"
783 multiconf_min="${multiconf_min} ${mc_name}" 758 multiconf_min="${multiconf_min} ${mc_name}"
784 conf_file="multiconfig/${mc_name}.conf" 759 conf_file="multiconfig/${mc_name}.conf"
@@ -790,16 +765,16 @@ psm-microblaze() {
790 765
791 # Build device tree 766 # Build device tree
792 ( 767 (
793 cd dtb || error "Unable to cd to dtb dir" 768 cd dts || error "Unable to cd to dts dir"
794 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" "${dtb_file}" || error "lopper failed" 769 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed"
795 ) 770 )
796 771
797 # Build baremetal multiconfig 772 # Build baremetal multiconfig
798 if [ -n "${domain_file}" ]; then 773 if [ -n "${domain_file}" ]; then
799 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dtb}" \ 774 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
800 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed" 775 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed"
801 else 776 else
802 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dtb}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \ 777 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \
803 || error "lopper failed" 778 || error "lopper failed"
804 fi 779 fi
805 780
@@ -808,7 +783,7 @@ psm-microblaze() {
808 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," 783 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
809 784
810 cat <<EOF >"${conf_file}" 785 cat <<EOF >"${conf_file}"
811CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" 786CONFIG_DTFILE = "\${TOPDIR}/conf/dts/${dts_file}"
812 787
813ESW_MACHINE = "$1" 788ESW_MACHINE = "$1"
814 789
@@ -849,12 +824,12 @@ TUNEFILE[microblaze-psm] = "conf/machine/include/${mach_conf}/microblaze.inc"
849EOF 824EOF
850 fi 825 fi
851 826
852 sysdt_path=$(dirname ${system_dtb}) 827 sysdt_path=$(dirname ${system_dts})
853 sysdt_base=$(basename ${system_dtb}) 828 sysdt_base=$(basename ${system_dts})
854 cat <<EOF >>"${conf_file}" 829 cat <<EOF >>"${conf_file}"
855 830
856# Set the default (linux) domain device tree 831# Set the default (linux) domain device tree
857CONFIG_DTFILE ?= "\${TOPDIR}/conf/dtb/${system_conf}" 832CONFIG_DTFILE ?= "\${TOPDIR}/conf/dts/${system_conf}"
858CONFIG_DTFILE[vardepsexclude] += "TOPDIR" 833CONFIG_DTFILE[vardepsexclude] += "TOPDIR"
859 834
860require conf/machine/${machine}-generic.conf 835require conf/machine/${machine}-generic.conf
@@ -944,11 +919,11 @@ BB_HASHEXCLUDE_COMMON:append = " BASE_TMPDIR"
944# We don't want the kernel to build us a device-tree 919# We don't want the kernel to build us a device-tree
945KERNEL_DEVICETREE:example-sdt = "" 920KERNEL_DEVICETREE:example-sdt = ""
946# We need u-boot to use the one we passed in 921# We need u-boot to use the one we passed in
947DEVICE_TREE_NAME:pn-u-boot-xlnx-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" 922DEVICE_TREE_NAME:pn-u-boot-xlnx-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts', '.dtb'))}"
948# Update bootbin to use proper device tree 923# Update bootbin to use proper device tree
949BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" 924BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts', '.dtb'))}"
950# Remap boot files to ensure the right device tree is listed first 925# Remap boot files to ensure the right device tree is listed first
951IMAGE_BOOT_FILES =+ "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" 926IMAGE_BOOT_FILES =+ "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts', '.dtb'))}"
952 927
953#### No additional settings should be after the Postamble 928#### No additional settings should be after the Postamble
954#### Postamble 929#### Postamble
@@ -957,7 +932,7 @@ EOF
957} 932}
958 933
959parse_cpus() { 934parse_cpus() {
960 gen_linux_dtb="None" 935 gen_linux_dts="None"
961 while read -r cpu core domain cpu_name os_hint; do 936 while read -r cpu core domain cpu_name os_hint; do
962 # Skip commented lines and WARNINGs 937 # Skip commented lines and WARNINGs
963 case ${cpu} in 938 case ${cpu} in
@@ -972,18 +947,18 @@ parse_cpus() {
972 cortex_a53_baremetal fsbl ${core} ${cpu_name} 947 cortex_a53_baremetal fsbl ${core} ${cpu_name}
973 fi 948 fi
974 if [ "${os_hint}" == "None" ]; then 949 if [ "${os_hint}" == "None" ]; then
975 if [ "${gen_linux_dtb}" == "None" ]; then 950 if [ "${gen_linux_dts}" == "None" ]; then
976 cortex_a53_linux "${domain}" 951 cortex_a53_linux "${domain}"
977 gen_linux_dtb="True" 952 gen_linux_dts="True"
978 fi 953 fi
979 cortex_a53_baremetal "${domain}" ${core} ${cpu_name} 954 cortex_a53_baremetal "${domain}" ${core} ${cpu_name}
980 cortex_a53_freertos "${domain}" ${core} ${cpu_name} 955 cortex_a53_freertos "${domain}" ${core} ${cpu_name}
981 else 956 else
982 case "${os_hint}" in 957 case "${os_hint}" in
983 linux*) 958 linux*)
984 if [ "${gen_linux_dtb}" == "None" ]; then 959 if [ "${gen_linux_dts}" == "None" ]; then
985 cortex_a53_linux "${domain}" 960 cortex_a53_linux "${domain}"
986 gen_linux_dtb="True" 961 gen_linux_dts="True"
987 fi 962 fi
988 ;; 963 ;;
989 baremetal*) 964 baremetal*)
@@ -999,18 +974,18 @@ parse_cpus() {
999 974
1000 arm,cortex-a72) 975 arm,cortex-a72)
1001 if [ "${os_hint}" == "None" ]; then 976 if [ "${os_hint}" == "None" ]; then
1002 if [ "${gen_linux_dtb}" == "None" ]; then 977 if [ "${gen_linux_dts}" == "None" ]; then
1003 cortex_a72_linux "${domain}" 978 cortex_a72_linux "${domain}"
1004 gen_linux_dtb="True" 979 gen_linux_dts="True"
1005 fi 980 fi
1006 cortex_a72_baremetal "${domain}" ${core} ${cpu_name} 981 cortex_a72_baremetal "${domain}" ${core} ${cpu_name}
1007 cortex_a72_freertos "${domain}" ${core} ${cpu_name} 982 cortex_a72_freertos "${domain}" ${core} ${cpu_name}
1008 else 983 else
1009 case "${os_hint}" in 984 case "${os_hint}" in
1010 linux*) 985 linux*)
1011 if [ "${gen_linux_dtb}" == "None" ]; then 986 if [ "${gen_linux_dts}" == "None" ]; then
1012 cortex_a72_linux "${domain}" 987 cortex_a72_linux "${domain}"
1013 gen_linux_dtb="True" 988 gen_linux_dts="True"
1014 fi 989 fi
1015 ;; 990 ;;
1016 baremetal*) 991 baremetal*)
@@ -1103,10 +1078,10 @@ gen_petalinux_conf() {
1103 cd "${config_dir}" || exit 1078 cd "${config_dir}" || exit
1104 ( 1079 (
1105 if [ "$machine" == "zynqmp" ]; then 1080 if [ "$machine" == "zynqmp" ]; then
1106 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dtb}" -- petalinuxconfig_xlnx psu_cortexa53_0 ${petalinux_schema} \ 1081 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- petalinuxconfig_xlnx psu_cortexa53_0 ${petalinux_schema} \
1107 || error "lopper failed" 1082 || error "lopper failed"
1108 else 1083 else
1109 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dtb}" -- petalinuxconfig_xlnx psv_cortexa72_0 ${petalinux_schema} \ 1084 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- petalinuxconfig_xlnx psv_cortexa72_0 ${petalinux_schema} \
1110 || error "lopper failed" 1085 || error "lopper failed"
1111 fi 1086 fi
1112 ) 1087 )
@@ -1126,11 +1101,11 @@ cpulist=$(mktemp)
1126 1101
1127priordir=$(pwd) 1102priordir=$(pwd)
1128cd "${config_dir}" || exit 1103cd "${config_dir}" || exit
1129mkdir -p dtb multiconfig machine/include 1104mkdir -p dts multiconfig machine/include
1130# Get mach_conf name and model name 1105# Get mach_conf name and model name
1131( 1106(
1132 cd dtb || error "Unable to cd to dtb dir" 1107 cd dts || error "Unable to cd to dts dir"
1133 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-machine-name.dts" "${system_dtb}" \ 1108 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-machine-name.dts" "${system_dts}" \
1134 /dev/null > ${cpulist} || error "lopper failed" 1109 /dev/null > ${cpulist} || error "lopper failed"
1135 rm -f "lop-machine-name.dts.dtb" 1110 rm -f "lop-machine-name.dts.dtb"
1136) 1111)
@@ -1141,8 +1116,8 @@ fi
1141 1116
1142# Generate CPU list 1117# Generate CPU list
1143( 1118(
1144 cd dtb || error "Unable to cd to dtb dir" 1119 cd dts || error "Unable to cd to dts dir"
1145 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-xilinx-id-cpus.dts" "${system_dtb}" \ 1120 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-xilinx-id-cpus.dts" "${system_dts}" \
1146 /dev/null > ${cpulist} || error "lopper failed" 1121 /dev/null > ${cpulist} || error "lopper failed"
1147 rm -f "lop-xilinx-id-cpus.dts.dtb" 1122 rm -f "lop-xilinx-id-cpus.dts.dtb"
1148) 1123)