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/cbfs_util.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/cbfs_util.py')
-rw-r--r-- | tools/binman/cbfs_util.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/binman/cbfs_util.py b/tools/binman/cbfs_util.py index eea7868b16c..9cad03886f7 100644 --- a/tools/binman/cbfs_util.py +++ b/tools/binman/cbfs_util.py @@ -189,9 +189,9 @@ def _pack_string(instr): Returns: String with required padding (at least one 0x00 byte) at the end """ - val = tools.ToBytes(instr) + val = tools.to_bytes(instr) pad_len = align_int(len(val) + 1, FILENAME_ALIGN) - return val + tools.GetBytes(0, pad_len - len(val)) + return val + tools.get_bytes(0, pad_len - len(val)) class CbfsFile(object): @@ -371,7 +371,7 @@ class CbfsFile(object): FILE_ATTR_TAG_COMPRESSION, ATTR_COMPRESSION_LEN, self.compress, self.memlen) elif self.ftype == TYPE_EMPTY: - data = tools.GetBytes(self.erase_byte, self.size) + data = tools.get_bytes(self.erase_byte, self.size) else: raise ValueError('Unknown type %#x when writing\n' % self.ftype) if attr: @@ -388,7 +388,7 @@ class CbfsFile(object): # possible. raise ValueError("Internal error: CBFS file '%s': Requested offset %#x but current output position is %#x" % (self.name, self.cbfs_offset, offset)) - pad = tools.GetBytes(pad_byte, pad_len) + pad = tools.get_bytes(pad_byte, pad_len) hdr_len += pad_len # This is the offset of the start of the file's data, @@ -414,7 +414,7 @@ class CbfsWriter(object): Usage is something like: cbw = CbfsWriter(size) - cbw.add_file_raw('u-boot', tools.ReadFile('u-boot.bin')) + cbw.add_file_raw('u-boot', tools.read_file('u-boot.bin')) ... data, cbfs_offset = cbw.get_data_and_offset() @@ -482,7 +482,7 @@ class CbfsWriter(object): if fd.tell() > offset: raise ValueError('No space for data before offset %#x (current offset %#x)' % (offset, fd.tell())) - fd.write(tools.GetBytes(self._erase_byte, offset - fd.tell())) + fd.write(tools.get_bytes(self._erase_byte, offset - fd.tell())) def _pad_to(self, fd, offset): """Write out pad bytes and/or an empty file until a given offset |