summaryrefslogtreecommitdiff
path: root/tools/binman/etype
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-03-27 18:31:50 +0300
committerTom Rini <trini@konsulko.com>2022-04-25 10:11:05 -0400
commit82337bb6b63226c9a8a78dc03a1af1eab6494a6b (patch)
treec20fced1d8ddff5fae5a2843b73b79ce9bb187da /tools/binman/etype
parent99283e5389cd5b8b7bb191913fa1d3d18e4bfbec (diff)
binman: Refuse to replace sections for now
Binman interfaces allow attempts to replace any entry in the image with arbitrary data. When trying to replace sections, the changes in the section entry's data are not propagated to its child entries. This, combined with how sections rebuild their contents from its children, eventually causes the replaced contents to be silently overwritten by rebuilt contents equivalent to the original data. Add a simple test for replacing a section that is currently failing due to this behaviour, and mark it as an expected failure. Also, raise an error when replacing a section instead of silently pretending it was replaced. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/etype')
-rw-r--r--tools/binman/etype/section.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index ccac658c18..bd67238b91 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -788,6 +788,9 @@ class Entry_section(Entry):
data = new_data
return data
+ def WriteData(self, data, decomp=True):
+ self.Raise("Replacing sections is not implemented yet")
+
def WriteChildData(self, child):
return True