From 94f89efa051df9b1444f2973db55ceb8cd1cc5fc Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Fri, 13 Jan 2023 18:20:24 -0800 Subject: 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 --- .../recipes-kernel/lopper/xilinx-lops.bb | 2 +- .../lopper/xilinx-lops/lop-microblaze-yocto.dts | 31 ++++++++++++---------- 2 files changed, 18 insertions(+), 15 deletions(-) (limited to 'meta-xilinx-core/recipes-kernel/lopper') 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 = " \ file://lop-machine-name.dts \ " -LIC_FILES_CHKSUM = "file://lop-microblaze-yocto.dts;endline=8;md5=a0e89d39fa397ec5d5320409ff701280" +LIC_FILES_CHKSUM = "file://lop-microblaze-yocto.dts;endline=10;md5=27139f9b862dc6fe466c7157aba7ed9c" S = "${WORKDIR}" 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 @@ /* * Copyright (c) 2020 Xilinx Inc. All rights reserved. + * Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. * * Author: - * Bruce Ashfield + * Bruce Ashfield + * Mark Hatle * * SPDX-License-Identifier: BSD-3-Clause */ @@ -38,13 +40,16 @@ n.tunes = OrderedDict() n.tunes['microblaze'] = 'microblaze' n.tunes['version'] = 'v9.2' + n.tune_type = val.split('-')[0] - if val == 'pmc-microblaze' or val == 'psm-microblaze': + elif val == 'pmc-microblaze' or val == 'psm-microblaze': n.tunes = OrderedDict() n.tunes['microblaze'] = 'microblaze' n.tunes['version'] = 'v10.0' + n.tune_type = val.split('-')[0] - n.tune_type = val + else: + n.tune_type = re.split('@', n.name)[0] "; }; }; @@ -225,18 +230,16 @@ compatible = "system-device-tree-v1,lop,code-v1"; code = " cpu_addr = 0 + firmware_cpus = {} for n in __selected__: - tname = re.split('@', n.name) - tname = tname[0]+str(cpu_addr) - cpu_addr += 1 - print( 'AVAILTUNES += \"microblaze-%s\"' % tname ) - print( 'TUNE_FEATURES:tune-microblaze-%s = \"' % tname, end='' ) - for t in n.tunes.values(): - print( ' %s' % t, end='' ) - print( '\"' ) - print( 'PACKAGE_EXTRA_ARCHS:tune-microblaze-%s = \"${TUNE_PKGARCH}\"' % tname ) - print( 'TUNE_FEATURES:tune-%s = \"${TUNE_FEATURES:tune-microblaze-%s}\"\\n' % (n.tune_type,tname) ) - + tname = 'microblaze-'+n.tune_type + if n.tune_type == 'cpu': + tname = tname + str(cpu_addr) + cpu_addr += 1 + print( '# %s\\n# compatible = \"%s\";' % (n, n['compatible'].value[0])) + print( 'AVAILTUNES += \"%s\"' % tname ) + print( 'TUNE_FEATURES:tune-%s = \"%s\"' % (tname, ' '.join(n.tunes.values()))) + print( 'PACKAGE_EXTRA_ARCHS:tune-%s = \"${TUNE_PKGARCH}\"\\n' % tname ) "; }; }; -- cgit v1.2.3-54-g00ecf