diff options
author | Tom Rini <trini@konsulko.com> | 2022-02-10 09:02:06 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-02-10 09:19:44 -0500 |
commit | 2ccd2bc8c3580e00c51094c5cc2b3e2ead8d35c3 (patch) | |
tree | 4e7349b8831fee4b342a971025273d3cd042a2f9 /tools/binman/state.py | |
parent | 6662e5e406fdee26ba981dd4af3308f51f254f0a (diff) | |
parent | f3078d4ea707931c2307a623ecf6e4d215b413d5 (diff) |
Merge tag 'dm-pull-8feb22-take3' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
patman snake-case conversion
binman fit improvements
ACPI fixes and making MCFG available to ARM
[trini: Update scripts/pylint.base]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/binman/state.py')
-rw-r--r-- | tools/binman/state.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/binman/state.py b/tools/binman/state.py index af0a65e8418..8cd8a483182 100644 --- a/tools/binman/state.py +++ b/tools/binman/state.py @@ -138,8 +138,8 @@ def GetFdtContents(etype='u-boot-dtb'): data = GetFdtForEtype(etype).GetContents() else: fname = output_fdt_info[etype][1] - pathname = tools.GetInputFilename(fname) - data = tools.ReadFile(pathname) + pathname = tools.get_input_filename(fname) + data = tools.read_file(pathname) return pathname, data def UpdateFdtContents(etype, data): @@ -154,7 +154,7 @@ def UpdateFdtContents(etype, data): """ dtb, fname = output_fdt_info[etype] dtb_fname = dtb.GetFilename() - tools.WriteFile(dtb_fname, data) + tools.write_file(dtb_fname, data) dtb = fdt.FdtScan(dtb_fname) output_fdt_info[etype] = [dtb, fname] @@ -170,16 +170,16 @@ def SetEntryArgs(args): global entry_args entry_args = {} - tout.Debug('Processing entry args:') + tout.debug('Processing entry args:') if args: for arg in args: m = re.match('([^=]*)=(.*)', arg) if not m: raise ValueError("Invalid entry arguemnt '%s'" % arg) name, value = m.groups() - tout.Debug(' %20s = %s' % (name, value)) + tout.debug(' %20s = %s' % (name, value)) entry_args[name] = value - tout.Debug('Processing entry args done') + tout.debug('Processing entry args done') def GetEntryArg(name): """Get the value of an entry argument @@ -235,12 +235,12 @@ def Prepare(images, dtb): else: fdt_set = {} for etype, fname in DTB_TYPE_FNAME.items(): - infile = tools.GetInputFilename(fname, allow_missing=True) + infile = tools.get_input_filename(fname, allow_missing=True) if infile and os.path.exists(infile): fname_dtb = fdt_util.EnsureCompiled(infile) - out_fname = tools.GetOutputFilename('%s.out' % + out_fname = tools.get_output_filename('%s.out' % os.path.split(fname)[1]) - tools.WriteFile(out_fname, tools.ReadFile(fname_dtb)) + tools.write_file(out_fname, tools.read_file(fname_dtb)) other_dtb = fdt.FdtScan(out_fname) output_fdt_info[etype] = [other_dtb, out_fname] @@ -263,21 +263,21 @@ def PrepareFromLoadedData(image): """ global output_fdt_info, main_dtb, fdt_path_prefix - tout.Info('Preparing device trees') + tout.info('Preparing device trees') output_fdt_info.clear() fdt_path_prefix = '' output_fdt_info['fdtmap'] = [image.fdtmap_dtb, 'u-boot.dtb'] main_dtb = None - tout.Info(" Found device tree type 'fdtmap' '%s'" % image.fdtmap_dtb.name) + tout.info(" Found device tree type 'fdtmap' '%s'" % image.fdtmap_dtb.name) for etype, value in image.GetFdts().items(): entry, fname = value - out_fname = tools.GetOutputFilename('%s.dtb' % entry.etype) - tout.Info(" Found device tree type '%s' at '%s' path '%s'" % + out_fname = tools.get_output_filename('%s.dtb' % entry.etype) + tout.info(" Found device tree type '%s' at '%s' path '%s'" % (etype, out_fname, entry.GetPath())) entry._filename = entry.GetDefaultFilename() data = entry.ReadData() - tools.WriteFile(out_fname, data) + tools.write_file(out_fname, data) dtb = fdt.Fdt(out_fname) dtb.Scan() image_node = dtb.GetNode('/binman') @@ -285,7 +285,7 @@ def PrepareFromLoadedData(image): image_node = dtb.GetNode('/binman/%s' % image.image_node) fdt_path_prefix = image_node.path output_fdt_info[etype] = [dtb, None] - tout.Info(" FDT path prefix '%s'" % fdt_path_prefix) + tout.info(" FDT path prefix '%s'" % fdt_path_prefix) def GetAllFdts(): @@ -384,7 +384,7 @@ def SetInt(node, prop, value, for_repack=False): for_repack: True is this property is only needed for repacking """ for n in GetUpdateNodes(node, for_repack): - tout.Detail("File %s: Update node '%s' prop '%s' to %#x" % + tout.detail("File %s: Update node '%s' prop '%s' to %#x" % (n.GetFdt().name, n.path, prop, value)) n.SetInt(prop, value) @@ -529,7 +529,7 @@ def GetVersion(path=OUR_PATH): """ version_fname = os.path.join(path, 'version') if os.path.exists(version_fname): - version = tools.ReadFile(version_fname, binary=False) + version = tools.read_file(version_fname, binary=False) else: version = '(unreleased)' return version |