I'm trying to compile U-Boot and the i.MX6SL Kindle Linux kernel as to run them in qemu-system-arm. The Linux kernel compiles successfully, but the resulting Image and zImage won't boot in QEMU. I then told myself that it was a good "excuse" to get U-Boot compiled too.
However, the U-Boot compile is failing. I have no idea why it's doing that.
For the record, I'm using a Linaro toolchain (from this direct link), recommended in a kernel compilation guide on this forum, instead of Amazon's own, because that fails to compile too. But let's leave that aside.
However, the U-Boot compile is failing. I have no idea why it's doing that.
Code:
$ :/path/to/uboot_2009.08$ TYPE=prod CROSS_COMPILE=~/arm-2014.05/bin/arm-none-linux-gnueabi- ARCH=arm make
for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done
make[1]: Entering directory '/path/to/uboot_2009.08/tools'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/path/to/uboot_2009.08/tools'
make[1]: Entering directory '/path/to/uboot_2009.08/examples/standalone'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/path/to/uboot_2009.08/examples/standalone'
make[1]: Entering directory '/path/to/uboot_2009.08/examples/api'
make[1]: Nothing to be done for '_depend'.
make[1]: Leaving directory '/path/to/uboot_2009.08/examples/api'
make -C tools all
make[1]: Entering directory '/path/to/uboot_2009.08/tools'
gcc -g -Wall -idirafter /path/to/uboot_2009.08/include -idirafter /path/to/uboot_2009.08/include2 -idirafter /path/to/uboot_2009.08/include -I /path/to/uboot_2009.08/libfdt -I /path/to/uboot_2009.08/tools -DTEXT_BASE=0xF8007000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o mkimage.o /path/to/uboot_2009.08/tools/mkimage.c
In file included from /path/to/uboot_2009.08/tools/../include/libfdt.h:55,
from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/usr/include/fdt.h:57:8: error: redefinition of struct fdt_header
struct fdt_header {
^~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:24,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/fdt.h:6:8: note: originally defined here
struct fdt_header {
^~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/../include/libfdt.h:55,
from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/usr/include/fdt.h:76:8: error: redefinition of struct fdt_reserve_entry
struct fdt_reserve_entry {
^~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:24,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/fdt.h:25:8: note: originally defined here
struct fdt_reserve_entry {
^~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/../include/libfdt.h:55,
from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/usr/include/fdt.h:81:8: error: redefinition of struct fdt_node_header
struct fdt_node_header {
^~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:24,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/fdt.h:30:8: note: originally defined here
struct fdt_node_header {
^~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/../include/libfdt.h:55,
from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/usr/include/fdt.h:86:8: error: redefinition of struct fdt_property
struct fdt_property {
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:24,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/fdt.h:35:8: note: originally defined here
struct fdt_property {
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:150:21: error: redefinition of fdt_offset_ptr_w
static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
^~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:126:21: note: previous definition of fdt_offset_ptr_w was here
static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
^~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:258:1: error: redefinition of fdt_set_magic
fdt_set_hdr_(magic);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_magic was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:162:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(magic);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:259:1: error: redefinition of fdt_set_totalsize
fdt_set_hdr_(totalsize);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_totalsize was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:163:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(totalsize);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:260:1: error: redefinition of fdt_set_off_dt_struct
fdt_set_hdr_(off_dt_struct);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_off_dt_struct was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:164:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(off_dt_struct);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:261:1: error: redefinition of fdt_set_off_dt_strings
fdt_set_hdr_(off_dt_strings);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_off_dt_strings was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:165:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(off_dt_strings);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:262:1: error: redefinition of fdt_set_off_mem_rsvmap
fdt_set_hdr_(off_mem_rsvmap);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_off_mem_rsvmap was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:166:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(off_mem_rsvmap);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:263:1: error: redefinition of fdt_set_version
fdt_set_hdr_(version);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_version was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:167:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(version);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:264:1: error: redefinition of fdt_set_last_comp_version
fdt_set_hdr_(last_comp_version);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_last_comp_version was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:168:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(last_comp_version);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:265:1: error: redefinition of fdt_set_boot_cpuid_phys
fdt_set_hdr_(boot_cpuid_phys);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_boot_cpuid_phys was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:169:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(boot_cpuid_phys);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:266:1: error: redefinition of fdt_set_size_dt_strings
fdt_set_hdr_(size_dt_strings);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_size_dt_strings was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:170:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(size_dt_strings);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:267:1: error: redefinition of fdt_set_size_dt_struct
fdt_set_hdr_(size_dt_struct);
^~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:157:21: note: previous definition of fdt_set_size_dt_struct was here
static inline void fdt_set_##name(void *fdt, uint32_t val) \
^~~~~~~~
/path/to/uboot_2009.08/tools/../include/libfdt.h:171:1: note: in expansion of macro __fdt_set_hdr
__fdt_set_hdr(size_dt_struct);
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:653:36: error: redefinition of fdt_get_property_w
static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:390:36: note: previous definition of fdt_get_property_w was here
static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:750:21: error: redefinition of fdt_getprop_w
static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:441:21: note: previous definition of fdt_getprop_w was here
static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
^~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:1295:19: error: redefinition of fdt_setprop_inplace_cell
static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:779:19: note: previous definition of fdt_setprop_inplace_cell was here
static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:1373:19: error: redefinition of fdt_property_cell
static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
^~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:845:19: note: previous definition of fdt_property_cell was here
static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
^~~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/include/image.h:56,
from /path/to/uboot_2009.08/tools/mkimage.c:26:
/usr/include/libfdt.h:1618:19: error: redefinition of fdt_setprop_cell
static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
^~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/fdt_host.h:25,
from /path/to/uboot_2009.08/tools/mkimage.h:33,
from /path/to/uboot_2009.08/tools/mkimage.c:25:
/path/to/uboot_2009.08/tools/../include/libfdt.h:995:19: note: previous definition of fdt_setprop_cell was here
static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
^~~~~~~~~~~~~~~~
In file included from /path/to/uboot_2009.08/tools/mkimage.c:26:
/path/to/uboot_2009.08/include/image.h:524:12: warning: inline function fit_parse_subimage declared but never defined
inline int fit_parse_subimage (const char *spec, ulong addr_curr,
^~~~~~~~~~~~~~~~~~
/path/to/uboot_2009.08/include/image.h:522:12: warning: inline function fit_parse_conf declared but never defined
inline int fit_parse_conf (const char *spec, ulong addr_curr,
^~~~~~~~~~~~~~
make[1]: *** [Makefile:211: mkimage.o] Error 1
make[1]: Leaving directory '/path/to/uboot_2009.08/tools'
make: *** [Makefile:357: tools] Error 2