mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-02 01:19:49 +00:00
fe05701b05
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>
57 lines
939 B
Text
57 lines
939 B
Text
// 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";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|