Guest User

Untitled

a guest
Sep 25th, 2025
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.24 KB | None | 0 0
  1. diff --git a/meta/lib/oe/fitimage.py b/meta/lib/oe/fitimage.py
  2. index f3037991558f..844d38273035 100644
  3. --- a/meta/lib/oe/fitimage.py
  4. +++ b/meta/lib/oe/fitimage.py
  5. @@ -44,7 +44,10 @@ class ItsNode:
  6.              bb.debug(1, "key: %s, value: %s" % (key, str(value)))
  7.              # Single integer: <0x12ab>
  8.              if isinstance(value, int):
  9. -                f.write(indent_str_props + key + ' = <0x%x>;\n' % value)
  10. +                # split into 32 bit words
  11. +                list_entries = ' '.join('0x%x' % entry for entry in split_int(value))
  12. +                f.write(indent_str_props + key + ' = <%s>;\n' % list_entries)
  13. +
  14.              # list of strings: "string1", "string2" or integers: <0x12ab 0x34cd>
  15.              elif isinstance(value, list):
  16.                  if len(value) == 0:
  17. @@ -271,7 +274,7 @@ class ItsNodeRootKernel(ItsNode):
  18.              for line in result.stdout.splitlines():
  19.                  parts = line.split()
  20.                  if len(parts) == 3 and parts[2] == entrysymbol:
  21. -                    entrypoint = "<0x%s>" % parts[0]
  22. +                    entrypoint = parts[0]
  23.                      break
  24.          kernel_node = self.its_add_node_image(
  25.              kernel_id,
  26. @@ -282,8 +285,8 @@ class ItsNodeRootKernel(ItsNode):
  27.                  "data": '/incbin/("' + kernel_path + '")',
  28.                  "arch": self._arch,
  29.                  "os": "linux",
  30. -                "load": f"<{load}>",
  31. -                "entry": f"<{entrypoint}>"
  32. +                "load": int(load, 16),
  33. +                "entry": int(entrypoint, 16),
  34.              }
  35.          )
  36.          self._kernel = kernel_node
  37. @@ -524,6 +527,15 @@ class ItsNodeRootKernel(ItsNode):
  38.              bb.fatal(f"Command '{' '.join(cmd)}' failed with return code {e.returncode}\nstdout: {e.stdout.decode()}\nstderr: {e.stderr.decode()}")
  39.  
  40.  
  41. +def split_int(value):
  42. +    bits = min(1, number.bit_length())
  43. +    values = []
  44. +    for i in range(math.ceil(bits/32)):
  45. +        values.insert(0, value & 0xffffffff)
  46. +        value = value >> 32
  47. +
  48. +    return values
  49. +
  50.  def symlink_points_below(file_or_symlink, expected_parent_dir):
  51.      """returns symlink destination if it points below directory"""
  52.      file_path = os.path.join(expected_parent_dir, file_or_symlink)
Advertisement
Add Comment
Please, Sign In to add comment