[PATCH] boot/image-fit.c: Restore building tools on macOS

Tom Rini trini at konsulko.com
Mon Dec 1 21:45:12 CET 2025


On Mon, Dec 01, 2025 at 11:40:38AM -0600, Tom Rini wrote:

> The ordering of headers in this file doesn't follow our rules exactly
> because this file ends up being included when building host tools and so
> has to be correct for host include paths and ordering as well. We need
> to have <malloc.h> higher in the file or macOS will fail to build due to
> declaration problems.
> 
> Fixes: 8fbcc0e0e839 ("boot: Assure FDT is always at 8-byte aligned address")
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Cc: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
>  boot/image-fit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/boot/image-fit.c b/boot/image-fit.c
> index cccaa48f6839..3f66bec49041 100644
> --- a/boot/image-fit.c
> +++ b/boot/image-fit.c
> @@ -23,6 +23,7 @@
>  #include <log.h>
>  #include <mapmem.h>
>  #include <asm/io.h>
> +#include <malloc.h>
>  #include <memalign.h>
>  #include <asm/global_data.h>
>  #ifdef CONFIG_DM_HASH
> @@ -35,7 +36,6 @@ DECLARE_GLOBAL_DATA_PTR;
>  #include <bootm.h>
>  #include <image.h>
>  #include <bootstage.h>
> -#include <malloc.h>
>  #include <upl.h>
>  #include <u-boot/crc.h>

Well, this blows up *everywhere* and so is wrong. I'll figure out
something or another for a v2.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251201/629495fc/attachment.sig>


More information about the U-Boot mailing list