From ea51a6282316f383fa04defa30ea15feb36d5d69 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 12 Jun 2014 07:24:51 -0600 Subject: Allow compiling common/bootm.c on with HOSTCC We want to use some of the functionality in this file, so make it build on the host. Signed-off-by: Simon Glass --- common/bootm.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'common/bootm.c') diff --git a/common/bootm.c b/common/bootm.c index 1e66929387..d83ddedaa7 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -5,10 +5,10 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#ifndef USE_HOSTCC #include -#include +#include #include -#include #include #include #include @@ -17,12 +17,16 @@ #include #include #include - #if defined(CONFIG_CMD_USB) #include #endif +#else +#include "mkimage.h" +#endif -DECLARE_GLOBAL_DATA_PTR; +#include +#include +#include #ifndef CONFIG_SYS_BOOTM_LEN /* use 8MByte as default max gunzip size */ @@ -31,6 +35,10 @@ DECLARE_GLOBAL_DATA_PTR; #define IH_INITRD_ARCH IH_ARCH_DEFAULT +#ifndef USE_HOSTCC + +DECLARE_GLOBAL_DATA_PTR; + static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], bootm_headers_t *images, ulong *os_data, ulong *os_len); @@ -809,3 +817,5 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, return buf; } + +#endif /* ndef USE_HOSTCC */ -- cgit v1.2.1