]> git.baikalelectronics.ru Git - uboot.git/commit
binman: Build FIT image subentries with the section etype
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Mon, 31 Aug 2020 09:58:20 +0000 (12:58 +0300)
committerSimon Glass <sjg@chromium.org>
Tue, 22 Sep 2020 18:50:43 +0000 (12:50 -0600)
commitcb551dcf278ac99044b0aa044283dd0d1e2bece4
tree5aafedfbba3101f0add96fcaba54421572559d89
parent41e6d14a1d88137003dd97c8431024b5e220cd29
binman: Build FIT image subentries with the section etype

When reading subentries of each image, the FIT entry type directly
concatenates their contents without padding them according to their
offset, size, align, align-size, align-end, pad-before, pad-after
properties.

This patch makes sure these properties are respected by offloading this
image-data building to the section etype, where each subnode of the
"images" node is processed as a section. Alignments and offsets are
respective to the beginning of each image. For example, the following
fragment can end up having "u-boot-spl" start at 0x88 within the final
FIT binary, while "u-boot" would then end up starting at e.g. 0x20088.

fit {
description = "example";

images {
kernel-1 {
description = "U-Boot with SPL";
type = "kernel";
arch = "arm64";
os = "linux";
compression = "none";

u-boot-spl {
};
u-boot {
align = <0x10000>;
};
};
};
}

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reinstate check in testPadInSections(), squash in
   "binman: Allow FIT binaries to have missing external blobs"
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
tools/binman/etype/fit.py
tools/binman/ftest.py
tools/binman/test/167_fit_image_subentry_alignment.dts [new file with mode: 0644]
tools/binman/test/168_fit_missing_blob.dts [new file with mode: 0644]