summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-02-15 19:02:37 -0700
committerSimon Glass <[email protected]>2025-05-27 10:07:39 +0100
commit92d5d1e1cdf3c146a054d36da2f6a2778d12637f (patch)
tree47c41b8fc91c539ad079bd70eec0369e6de3d503 /tools
parent96b0a77da0e3877308effd3d916c779fb3deb9df (diff)
binman: x86: Write skip-at-start when end-at-4gb is used
The end-at-4gb property implies a value for skip-at-start so add it into the output FDT so that U-Boot can read it. Now that skip-at-start is implemented, we can drop the workarounds used in the x86 code to obtain the correct image-pos value. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/etype/section.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index 4c4c8c417f8..1d50bb47753 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -189,7 +189,7 @@ class Entry_section(Entry):
self._sort = fdt_util.GetBool(self._node, 'sort-by-offset')
self._end_at_4gb = fdt_util.GetBool(self._node, 'end-at-4gb')
self._skip_at_start = fdt_util.GetInt(self._node, 'skip-at-start')
- if self._end_at_4gb:
+ if self._end_at_4gb and self.GetImage().copy_to_orig:
if not self.size:
self.Raise("Section size must be provided when using end-at-4gb")
if self._skip_at_start is not None:
@@ -263,6 +263,8 @@ class Entry_section(Entry):
super().AddMissingProperties(have_image_pos)
if self.compress != 'none':
have_image_pos = False
+ if self._end_at_4gb:
+ state.AddZeroProp(self._node, 'skip-at-start')
for entry in self._entries.values():
entry.AddMissingProperties(have_image_pos)
@@ -505,6 +507,8 @@ class Entry_section(Entry):
def SetCalculatedProperties(self):
super().SetCalculatedProperties()
+ if self._end_at_4gb:
+ state.SetInt(self._node, 'skip-at-start', self._skip_at_start)
for entry in self._entries.values():
entry.SetCalculatedProperties()