diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2021-10-26 14:47:53 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2021-10-27 00:08:02 +0300 |
commit | b6d590af3f28f1737ff681ed0ed94d812878962c (patch) | |
tree | 59cdd5c1003468ef563cd0b4d0426cf38d04f715 /meta-xilinx/meta-xilinx-standalone/scripts | |
parent | 7bf39c061342ec43d4fe59d041858515a5afca92 (diff) | |
download | openbmc-b6d590af3f28f1737ff681ed0ed94d812878962c.tar.xz |
meta-xilinx: remove subtree
The meta-xilinx layer was used for a now-deleted EVB. Neither the EVB
nor the meta-xilinx layer have been updated for the Yocto override
syntax change and the meta-xilinx still doesn't have a hardknott or
honister branch (or corresponding support).
I've asked the Xilinx maintainer back in May on when a hardknott
version would be supported and I was told "about a month from now". I
followed up in August and was told "work is in progress". As of today
there are still zero commits in meta-xilinx since January 2021.
As such, I do not believe this layer is well-maintained and we have no
specific use for it anymore. Remove it until someone finds a good
reason to include it and the upstream shows signs of life.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id14ea55db2ac2779edf42e63cb57ad7d25172ad5
Diffstat (limited to 'meta-xilinx/meta-xilinx-standalone/scripts')
-rw-r--r-- | meta-xilinx/meta-xilinx-standalone/scripts/microblaze_dtb.py | 170 |
1 files changed, 0 insertions, 170 deletions
diff --git a/meta-xilinx/meta-xilinx-standalone/scripts/microblaze_dtb.py b/meta-xilinx/meta-xilinx-standalone/scripts/microblaze_dtb.py deleted file mode 100644 index 1c5ed8352..000000000 --- a/meta-xilinx/meta-xilinx-standalone/scripts/microblaze_dtb.py +++ /dev/null @@ -1,170 +0,0 @@ -import argparse -import libfdt -import os -import sys - -# Format: FEATURE : (dtb property, condition_operator, condition_value) -# If dtb property is None, then the item is always on -# -# If the condition_operator is None, then enable if it exists for existance -# -# If the condition_operator is '!', and condition_value is None then enable if -# if is not defined -# -# Otherwise 'condition' and value are evaluated by type. -# -# If the condition is = then any value of condition_values will set it -# If the condition is ! then no value of condition_values will set it - -microblaze_tune_features = { - 'microblaze' : (None, None, None), - 'bigendian': ('xlnx,endianness', '!', 1), - '64-bit' : ('xlnx,data-size', '=', 64), - 'barrel-shift': ('xlnx,use-barrel', '=', 1), - 'pattern-compare': ('xlnx,use-pcmp-instr', '=', 1), - 'reorder' : ('xlnx,use-reorder-instr', '!', 0), - 'frequency-optimized': ('xlnx,area-optimized', '=', 2), - 'multiply-low': ('xlnx,use-hw-mul', '=', 1), - 'multiply-high': ('xlnx,use-hw-mul', '=', 2), - 'divide-hard': ('xlnx,use-div', '=', 1), - 'fpu-soft': ('xlnx,use-fpu', '!', [1,2]), - 'fpu-hard': ('xlnx,use-fpu', '=', 1), - 'fpu-hard-extended':('xlnx,use-fpu', '=', 2), -} - -def processProperties(fdt, node): - TUNE_FEATURES = [] - - for feature in microblaze_tune_features: - (property, cop, cvalue) = microblaze_tune_features[feature] - - if not property: - TUNE_FEATURES.append(feature) - - # Special processing to get the version - if feature == "microblaze": - ver = microblazeVersion(fdt, node) - if ver: - TUNE_FEATURES.append(ver) - continue - - prop_value = fdt.getprop( node, property, libfdt.QUIET_NOTFOUND) - - if not prop_value or prop_value == -1: - if cop == '!': - if not cvalue: - TUNE_FEATURES.append(ver) - continue - continue - - # If no operator - if not cop or (cop == '=' and not cvalue): - TUNE_FEATURES.append(feature) - continue - - ctype = type(cvalue) - if ctype == type(list()): - val_list = cvalue - else: - val_list = [ cvalue ] - - result = False - for value in val_list: - ctype = type(value) - if ctype == type(int()): - val = prop_value.as_uint32() - else: - raise TypeError('Unknown type %s' % ctype) - - if value == val: - result = True - break - else: - result = False - - if (cop == '!' and result == False) or \ - (cop == '=' and result == True): - TUNE_FEATURES.append(feature) - - return TUNE_FEATURES - -def microblazeVersion(fdt, node): - version = None - - val = fdt.getprop( node, 'model', libfdt.QUIET_NOTFOUND) - - if val and val != -1: - val = fdt.getprop( node, 'model' ).as_str() - version = val[val.find('microblaze,') + 11:] - - if version.startswith('8'): - # Strip 8.xx.y, to just 8.xx - v = version.split('.') - version = '.'.join(v[0:2]) - - version = 'v' + version - - return version - -def MicroblazeConfig(dtbfile, out): - fdt = libfdt.Fdt(open(dtbfile, mode='rb').read()) - - cpu = -1 - while (True): - cpu = cpu + 1 - try: - node = fdt.path_offset('/cpus/cpu@%d' % cpu) - - try: - prop = fdt.getprop( node, 'compatible' ) - - prop_val = prop[:-1].decode('utf-8').split('\x00') - - microblaze = False - for val in prop_val: - if "microblaze" in val: - microblaze = True - break - - if not microblaze: - continue - - # Construct TUNE_FEATURE here - TUNE_FEATURES = processProperties(fdt, node) - - out.write('AVAILTUNES += "microblaze-cpu%s"\n' % (cpu)) - out.write('TUNE_FEATURES_tune-microblaze-cpu%s = "%s"\n' % (cpu, ' '.join(TUNE_FEATURES))) - out.write('PACKAGE_EXTRA_ARCHS_tune-microblaze-cpu%s = "${TUNE_PKGARCH}"\n' % (cpu)) - - except Exception as e: - sys.stderr.write("Exception looking at properties: %s\n" % e) - - continue - - except Exception as e: - # CPUs SHOULD be consecutive w/o gaps, so no more to search - break - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description='Generate MicroBlaze TUNE_FEATURES') - - parser.add_argument('-d', '--dtb-file', action='store', - help='DTB file to process') - - parser.add_argument('-o', '--output', action='store', - help='Output file to store TUNE_FEATURE settings') - - args = parser.parse_args() - - if not args.dtb_file: - sys.stderr.write('ERROR: You must specify a DTB_FILE to process.\n') - sys.exit(1) - - outputf = sys.stdout - if args.output: - if os.path.exists(args.output): - sys.stderr.write('ERROR: The output file "%s" exists!\n' % args.output) - sys.exit(1) - outputf = open(args.output, 'w') - - MicroblazeConfig(args.dtb_file, outputf) |