spl: Align FDT load address
While the image size is generally a multiple of 8 bytes, this is not actually guaranteed; some linkers (like LLD) will shave a few bytes off of the end of output sections if there are no content bytes there. Since libfdt imposes a hard rule of 8-byte alignment, make the SPL also be explicit about the alignment when loading the FDT. Signed-off-by: Sam Edwards <CFSworks@gmail.com>
This commit is contained in:
@@ -397,7 +397,7 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image,
|
||||
* Use the address following the image as target address for the
|
||||
* device tree.
|
||||
*/
|
||||
image_info.load_addr = spl_image->load_addr + spl_image->size;
|
||||
image_info.load_addr = ALIGN(spl_image->load_addr + spl_image->size, 8);
|
||||
|
||||
/* Figure out which device tree the board wants to use */
|
||||
node = spl_fit_get_image_node(ctx, FIT_FDT_PROP, index++);
|
||||
|
||||
Reference in New Issue
Block a user