summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/recipes-kernel/lopper
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2023-01-13 18:20:24 -0800
committerMark Hatle <mark.hatle@amd.com>2023-01-16 07:26:08 -0800
commit94f89efa051df9b1444f2973db55ceb8cd1cc5fc (patch)
tree053f1633b16999b157c86e40631a751333191385 /meta-xilinx-core/recipes-kernel/lopper
parente3e0d0cff038cf9e31e78aaa0944d731078c7546 (diff)
downloadmeta-xilinx-94f89efa051df9b1444f2973db55ceb8cd1cc5fc.tar.gz
meta-xilinx-setup: Rework dt-processor.sh to generate a machine and configs
lop-microblaze-yocto.dts has been modified to generate the file in a slightly different format. There is no need for an intermediate representation for the various microblaze tunings, instead use fixed names for pmc, psm and pmu configurations. dt-processor.sh was reworked to generate a machine.conf file and shrink the amount of information that ends up in the local.conf file. As part of this work the -m option has been renamed to -t. This option is rarely used, so should not impact many users. A new -m option is implemented to allow the user to manually name the generated machine.conf file. Otherwise, it will discover the name from the system device tree using the root 'compatible' object. The tool will also print more useful diagnostics to the screen, this should help ensure that the correct machine is being targeted by the actions and improve early system debuggability. Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core/recipes-kernel/lopper')
-rw-r--r--meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb2
-rw-r--r--meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-microblaze-yocto.dts31
2 files changed, 18 insertions, 15 deletions
diff --git a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb
index 1dc5dc29..2648c372 100644
--- a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb
+++ b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb
@@ -11,7 +11,7 @@ SRC_URI = " \
11 file://lop-machine-name.dts \ 11 file://lop-machine-name.dts \
12 " 12 "
13 13
14LIC_FILES_CHKSUM = "file://lop-microblaze-yocto.dts;endline=8;md5=a0e89d39fa397ec5d5320409ff701280" 14LIC_FILES_CHKSUM = "file://lop-microblaze-yocto.dts;endline=10;md5=27139f9b862dc6fe466c7157aba7ed9c"
15 15
16S = "${WORKDIR}" 16S = "${WORKDIR}"
17 17
diff --git a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-microblaze-yocto.dts b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-microblaze-yocto.dts
index 72eb4665..5e5f7986 100644
--- a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-microblaze-yocto.dts
+++ b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-microblaze-yocto.dts
@@ -1,8 +1,10 @@
1/* 1/*
2 * Copyright (c) 2020 Xilinx Inc. All rights reserved. 2 * Copyright (c) 2020 Xilinx Inc. All rights reserved.
3 * Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
3 * 4 *
4 * Author: 5 * Author:
5 * Bruce Ashfield <bruce.ashfield@xilinx.com> 6 * Bruce Ashfield <bruce.ashfield@amd.com>
7 * Mark Hatle <mark.hatle@amd.com>
6 * 8 *
7 * SPDX-License-Identifier: BSD-3-Clause 9 * SPDX-License-Identifier: BSD-3-Clause
8 */ 10 */
@@ -38,13 +40,16 @@
38 n.tunes = OrderedDict() 40 n.tunes = OrderedDict()
39 n.tunes['microblaze'] = 'microblaze' 41 n.tunes['microblaze'] = 'microblaze'
40 n.tunes['version'] = 'v9.2' 42 n.tunes['version'] = 'v9.2'
43 n.tune_type = val.split('-')[0]
41 44
42 if val == 'pmc-microblaze' or val == 'psm-microblaze': 45 elif val == 'pmc-microblaze' or val == 'psm-microblaze':
43 n.tunes = OrderedDict() 46 n.tunes = OrderedDict()
44 n.tunes['microblaze'] = 'microblaze' 47 n.tunes['microblaze'] = 'microblaze'
45 n.tunes['version'] = 'v10.0' 48 n.tunes['version'] = 'v10.0'
49 n.tune_type = val.split('-')[0]
46 50
47 n.tune_type = val 51 else:
52 n.tune_type = re.split('@', n.name)[0]
48 "; 53 ";
49 }; 54 };
50 }; 55 };
@@ -225,18 +230,16 @@
225 compatible = "system-device-tree-v1,lop,code-v1"; 230 compatible = "system-device-tree-v1,lop,code-v1";
226 code = " 231 code = "
227 cpu_addr = 0 232 cpu_addr = 0
233 firmware_cpus = {}
228 for n in __selected__: 234 for n in __selected__:
229 tname = re.split('@', n.name) 235 tname = 'microblaze-'+n.tune_type
230 tname = tname[0]+str(cpu_addr) 236 if n.tune_type == 'cpu':
231 cpu_addr += 1 237 tname = tname + str(cpu_addr)
232 print( 'AVAILTUNES += \"microblaze-%s\"' % tname ) 238 cpu_addr += 1
233 print( 'TUNE_FEATURES:tune-microblaze-%s = \"' % tname, end='' ) 239 print( '# %s\\n# compatible = \"%s\";' % (n, n['compatible'].value[0]))
234 for t in n.tunes.values(): 240 print( 'AVAILTUNES += \"%s\"' % tname )
235 print( ' %s' % t, end='' ) 241 print( 'TUNE_FEATURES:tune-%s = \"%s\"' % (tname, ' '.join(n.tunes.values())))
236 print( '\"' ) 242 print( 'PACKAGE_EXTRA_ARCHS:tune-%s = \"${TUNE_PKGARCH}\"\\n' % tname )
237 print( 'PACKAGE_EXTRA_ARCHS:tune-microblaze-%s = \"${TUNE_PKGARCH}\"' % tname )
238 print( 'TUNE_FEATURES:tune-%s = \"${TUNE_FEATURES:tune-microblaze-%s}\"\\n' % (n.tune_type,tname) )
239
240 "; 243 ";
241 }; 244 };
242 }; 245 };