mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-09 06:13:21 +09:00
![Alper Nebi Yasak](/assets/img/avatar_default.png)
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>
58 lines
939 B
Plaintext
58 lines
939 B
Plaintext
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
/dts-v1/;
|
|
|
|
/ {
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
binman {
|
|
fit {
|
|
description = "test-desc";
|
|
#address-cells = <1>;
|
|
|
|
images {
|
|
kernel {
|
|
description = "Offset-Align Test";
|
|
type = "kernel";
|
|
arch = "arm64";
|
|
os = "linux";
|
|
compression = "none";
|
|
load = <00000000>;
|
|
entry = <00000000>;
|
|
u-boot-spl {
|
|
offset = <0x20>;
|
|
};
|
|
u-boot {
|
|
align = <0x10>;
|
|
};
|
|
};
|
|
fdt-1 {
|
|
description = "Pad-Before-After Test";
|
|
type = "flat_dt";
|
|
arch = "arm64";
|
|
compression = "none";
|
|
u-boot-spl-dtb {
|
|
};
|
|
text {
|
|
text-label = "test-id";
|
|
pad-before = <20>;
|
|
pad-after = <30>;
|
|
};
|
|
u-boot-dtb {
|
|
};
|
|
};
|
|
};
|
|
|
|
configurations {
|
|
default = "conf-1";
|
|
conf-1 {
|
|
description = "Kernel with FDT blob";
|
|
kernel = "kernel";
|
|
fdt = "fdt-1";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|