diff options
author | Simon Glass <sjg@chromium.org> | 2019-08-24 07:23:03 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-10-15 08:40:02 -0600 |
commit | bf4d0e284267067a65000f37c66cd4f05253381f (patch) | |
tree | 5341bfacb7d46800bfc05ae29dd8bc726e13dc3e /tools/binman/test | |
parent | dfdd2b62173e473580e51804b718389bad37ee3a (diff) |
binman: Avoid needing the section size in advance
Entries which include a section and need to obtain its contents call
GetData(), as with any other entry. But the current implementation of this
method in entry_Section requires the size of the section to be known. If
it is unknown, an error is produced, since size is None:
TypeError: can't multiply sequence by non-int of type 'NoneType'
There is no need to know the size in advance since the code can be
adjusted to build up the section piece by piece, instead of patching each
entry into an existing bytearray.
Update the code to handle this and add a test.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/test')
-rw-r--r-- | tools/binman/test/151_x86_rom_ifwi_section.dts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/binman/test/151_x86_rom_ifwi_section.dts b/tools/binman/test/151_x86_rom_ifwi_section.dts new file mode 100644 index 0000000000..7e455c3a4b --- /dev/null +++ b/tools/binman/test/151_x86_rom_ifwi_section.dts @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + sort-by-offset; + end-at-4gb; + size = <0x800000>; + intel-descriptor { + filename = "descriptor.bin"; + }; + + intel-ifwi { + offset-unset; + filename = "fitimage.bin"; + convert-fit; + + section { + ifwi-replace; + ifwi-subpart = "IBBP"; + ifwi-entry = "IBBL"; + u-boot-tpl { + }; + u-boot-dtb { + }; + }; + }; + }; +}; |