u-boot/tools/binman/test/151_x86_rom_ifwi_section.dts
Simon Glass bf4d0e2842 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>
2019-10-15 08:40:02 -06:00

33 lines
447 B
Text

// 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 {
};
};
};
};
};