Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/meta/lib/oe/fitimage.py b/meta/lib/oe/fitimage.py
- index f3037991558f..844d38273035 100644
- --- a/meta/lib/oe/fitimage.py
- +++ b/meta/lib/oe/fitimage.py
- @@ -44,7 +44,10 @@ class ItsNode:
- bb.debug(1, "key: %s, value: %s" % (key, str(value)))
- # Single integer: <0x12ab>
- if isinstance(value, int):
- - f.write(indent_str_props + key + ' = <0x%x>;\n' % value)
- + # split into 32 bit words
- + list_entries = ' '.join('0x%x' % entry for entry in split_int(value))
- + f.write(indent_str_props + key + ' = <%s>;\n' % list_entries)
- +
- # list of strings: "string1", "string2" or integers: <0x12ab 0x34cd>
- elif isinstance(value, list):
- if len(value) == 0:
- @@ -271,7 +274,7 @@ class ItsNodeRootKernel(ItsNode):
- for line in result.stdout.splitlines():
- parts = line.split()
- if len(parts) == 3 and parts[2] == entrysymbol:
- - entrypoint = "<0x%s>" % parts[0]
- + entrypoint = parts[0]
- break
- kernel_node = self.its_add_node_image(
- kernel_id,
- @@ -282,8 +285,8 @@ class ItsNodeRootKernel(ItsNode):
- "data": '/incbin/("' + kernel_path + '")',
- "arch": self._arch,
- "os": "linux",
- - "load": f"<{load}>",
- - "entry": f"<{entrypoint}>"
- + "load": int(load, 16),
- + "entry": int(entrypoint, 16),
- }
- )
- self._kernel = kernel_node
- @@ -524,6 +527,15 @@ class ItsNodeRootKernel(ItsNode):
- bb.fatal(f"Command '{' '.join(cmd)}' failed with return code {e.returncode}\nstdout: {e.stdout.decode()}\nstderr: {e.stderr.decode()}")
- +def split_int(value):
- + bits = min(1, number.bit_length())
- + values = []
- + for i in range(math.ceil(bits/32)):
- + values.insert(0, value & 0xffffffff)
- + value = value >> 32
- +
- + return values
- +
- def symlink_points_below(file_or_symlink, expected_parent_dir):
- """returns symlink destination if it points below directory"""
- file_path = os.path.join(expected_parent_dir, file_or_symlink)
Advertisement
Add Comment
Please, Sign In to add comment