diff options
author | Simon Glass <sjg@chromium.org> | 2018-07-06 10:27:19 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-07-09 09:11:00 -0600 |
commit | 5c890238c480a96d4d0b06c92199e21867170c31 (patch) | |
tree | e538c0257a7f4d8c8377ecb00044281536085dec /tools/binman/etype/u_boot_with_ucode_ptr.py | |
parent | 2cd01285b53f376e439e4cbdbce808ca8231ef84 (diff) | |
download | u-boot-5c890238c480a96d4d0b06c92199e21867170c31.tar.gz |
binman: Tidy up setting of entry contents
At present the contents of an entry are set in subclasses simply by
assigning to the data and content_size properties. Add some methods to do
this, so that we have more control. In particular, add a method to set the
contents without changing its size, so we can validate that case.
Add a test case for trying to change the size when this is not allowed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/etype/u_boot_with_ucode_ptr.py')
-rw-r--r-- | tools/binman/etype/u_boot_with_ucode_ptr.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/binman/etype/u_boot_with_ucode_ptr.py b/tools/binman/etype/u_boot_with_ucode_ptr.py index 41c2ded2fe..86945f3318 100644 --- a/tools/binman/etype/u_boot_with_ucode_ptr.py +++ b/tools/binman/etype/u_boot_with_ucode_ptr.py @@ -81,5 +81,5 @@ class Entry_u_boot_with_ucode_ptr(Entry_blob): # Write the microcode position and size into the entry pos_and_size = struct.pack('<2L', pos, size) self.target_pos -= self.pos - self.data = (self.data[:self.target_pos] + pos_and_size + - self.data[self.target_pos + 8:]) + self.ProcessContentsUpdate(self.data[:self.target_pos] + pos_and_size + + self.data[self.target_pos + 8:]) |