[PATCH 0/3] binman: Make FIT image subentries respect offset, alignment and padding

Alper Nebi Yasak alpernebiyasak at gmail.com
Tue Aug 25 19:59:48 CEST 2020


I've been automating the process in doc/README.chromium-chainload and
while experimenting with whether a "kernel" image with u-boot-spl and
u-boot would work, noticed I couldn't align/offset/pad the two parts.

E.g. in something like the following, binman doesn't add the necessary
padding to place the "u-boot" to the correct offset within the
"kernel-1" data:

	fit {
		description = "example";

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

				u-boot-spl {
				};
				u-boot {
					offset = <CONFIG_SPL_PAD_TO>;
				};
			};
		};
	};

Not sure if that'll ever be really necessary besides my experiment, but
it doesn't seem like skipping the padding was a deliberate choice, so
here are some fixes I wrote for that.


Alper Nebi Yasak (3):
  binman: Ignore hash*, signature* nodes in sections
  binman: Respect pad-before property of section subentries
  binman: Build FIT image subentries with the section etype

 tools/binman/etype/fit.py                     | 22 +++----
 tools/binman/etype/section.py                 |  4 +-
 tools/binman/ftest.py                         | 32 +++++++++++
 tools/binman/test/165_pad_in_sections.dts     | 26 +++++++++
 .../test/166_fit_image_subentry_alignment.dts | 57 +++++++++++++++++++
 5 files changed, 129 insertions(+), 12 deletions(-)
 create mode 100644 tools/binman/test/165_pad_in_sections.dts
 create mode 100644 tools/binman/test/166_fit_image_subentry_alignment.dts

-- 
2.28.0



More information about the U-Boot mailing list