diff --git a/cmd/mvebu/Kconfig b/cmd/mvebu/Kconfig index 99fcc50958b7..8d6ade5eb827 100644 --- a/cmd/mvebu/Kconfig +++ b/cmd/mvebu/Kconfig @@ -11,7 +11,6 @@ config CMD_MVEBU_BUBT config MVEBU_UBOOT_DFLT_NAME string "Default image name for bubt command" - depends on ENV_IS_ON_SELECTED_BOOT_DEVICE default "u-boot-spl-mmc.kwb" if MVEBU_SPL_BOOT_DEVICE_MMC default "u-boot-spl-nand.kwb" if MVEBU_SPL_BOOT_DEVICE_NAND default "u-boot-spl-sata.kwb" if MVEBU_SPL_BOOT_DEVICE_SATA diff --git a/include/libfdt.h b/include/libfdt.h index 7ba13e634b65..dbc56ec62e9f 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -1 +1,14 @@ +#ifndef UBOOT_LIBFDT_H +#define UBOOT_LIBFDT_H +/* + * SPDX-License-Identifier: GPL-2.0+ BSD-2-Clause + */ + #include "../lib/libfdt/libfdt.h" + +extern struct fdt_header *working_fdt; /* Pointer to the working fdt */ + +/* adding a ramdisk needs 0x44 bytes in version 2008.10 */ +#define FDT_RAMDISK_OVERHEAD 0x80 + +#endif /* UBOOT_LIBFDT_H */ diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 273b5d30f867..d7e9d3286354 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -1,29 +1,5 @@ -/* - * libfdt - Flat Device Tree manipulation (build/run environment adaptation) - * Copyright (C) 2007 Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com - * Original version written by David Gibson, IBM Corporation. - * - * SPDX-License-Identifier: LGPL-2.1+ - */ - -#ifndef _LIBFDT_ENV_H -#define _LIBFDT_ENV_H - -#include "compiler.h" -#include "linux/types.h" - -extern struct fdt_header *working_fdt; /* Pointer to the working fdt */ - -typedef __be16 fdt16_t; -typedef __be32 fdt32_t; -typedef __be64 fdt64_t; - -#define fdt32_to_cpu(x) be32_to_cpu(x) -#define cpu_to_fdt32(x) cpu_to_be32(x) -#define fdt64_to_cpu(x) be64_to_cpu(x) -#define cpu_to_fdt64(x) cpu_to_be64(x) - -/* adding a ramdisk needs 0x44 bytes in version 2008.10 */ -#define FDT_RAMDISK_OVERHEAD 0x80 - -#endif /* _LIBFDT_ENV_H */ +#ifdef USE_HOSTCC +#include "../scripts/dtc/libfdt/libfdt_env.h" +#else +#include +#endif diff --git a/tools/Makefile b/tools/Makefile index 4d32fe5910f2..fd53b9a1180a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -238,9 +238,9 @@ endif # !LOGO_BMP # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps # Define _GNU_SOURCE to obtain the getline prototype from stdio.h # -HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \ +HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \ - -I$(srctree)/lib/libfdt \ + -I$(srctree)/scripts/dtc/libfdt \ -I$(srctree)/tools \ -DUSE_HOSTCC \ -D__KERNEL_STRICT_NAMES \ diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c index 5897b6d5f780..b46f775d1546 100644 --- a/tools/fdtgrep.c +++ b/tools/fdtgrep.c @@ -10,7 +10,10 @@ #include #include +#include #include +#include +#include #include #include #include diff --git a/tools/gen_ethaddr_crc.c b/tools/gen_ethaddr_crc.c index fe9896dca94d..8cf86f4835d8 100644 --- a/tools/gen_ethaddr_crc.c +++ b/tools/gen_ethaddr_crc.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/tools/ifdtool.c b/tools/ifdtool.c index 195b1533ab69..729991ee33f7 100644 --- a/tools/ifdtool.c +++ b/tools/ifdtool.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/imagetool.h b/tools/imagetool.h index a8d505423b87..e67de9b5ad34 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -12,6 +12,7 @@ #include "os_support.h" #include #include +#include #include #include #include diff --git a/tools/mips-relocs.c b/tools/mips-relocs.c index 8be69d320fb3..27d47308e003 100644 --- a/tools/mips-relocs.c +++ b/tools/mips-relocs.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include