![]() |
#1 |
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
U-Boot compilation issues
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. 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 |
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
That's probably the wrong TC for the job.
Never built uboot myself, so I can't vouch for it, but you probably need to use Amazon's TC, or build one that sticks as close to it as possible. What you're using is much older than the already old TC you probably should be using ![]() (A close fit is probably the final GCC 4.9 Linaro release). Possibly critical sidebar: I'm not even sure if we actually can build uboot with a Linux TC, it might need a baremetal one? Last edited by NiLuJe; 09-10-2019 at 09:03 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | ||
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
Quote:
![]() Quote:
Edited to add:This U-Boot building guide for some other Freescale-based board seems to use a Linux toolchain, too. Is that correct? And building Amazon's toolchain results in this odd error while building binutils. It's as if there is an error in the Tex files for the documentation. I tried to remove them, but the compile refuses to continue without building them. Code:
$ make make -C build/binutils make[1]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils' make[2]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils' make[3]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/libiberty' make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/libiberty/testsuite' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/libiberty/testsuite' make[3]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/libiberty' make[3]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/intl' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/intl' make[3]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' Making info in doc make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/doc' make[4]: Nothing to be done for 'info'. make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/doc' Making info in po make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/po' make[4]: Nothing to be done for 'info'. make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/po' make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' make[4]: Nothing to be done for 'info-am'. make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' make all-recursive make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' Making all in doc make[5]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/doc' make[5]: Nothing to be done for 'all'. make[5]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/doc' Making all in po make[5]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/po' make[5]: Nothing to be done for 'all'. make[5]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd/po' make[5]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' make[5]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' make[3]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/bfd' make[3]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes' make all-recursive make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes' Making all in . make[5]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes' make[5]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes' Making all in po make[5]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes/po' make[5]: Nothing to be done for 'all'. make[5]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes/po' make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes' make[3]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/opcodes' make[3]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils' Making info in doc make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils/doc' restore=: && backupdir=".am$$" && \ rm -rf $backupdir && mkdir $backupdir && \ if (makeinfo --split-size=5000000 --split-size=5000000 --version) >/dev/null 2>&1; then \ for f in binutils.info binutils.info-[0-9] binutils.info-[0-9][0-9] binutils.i[0-9] binutils.i[0-9][0-9]; do \ if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ if makeinfo --split-size=5000000 --split-size=5000000 -I "../../../../src/binutils-2.21.0.20110327/binutils/doc" -I "../../../../src/binutils-2.21.0.20110327/binutils/../libiberty" -I "../../../../src/binutils-2.21.0.20110327/binutils/../bfd/doc" -I ../../bfd/doc -I ../../../../src/binutils-2.21.0.20110327/binutils/doc \ -o binutils.info `test -f 'binutils.texi' || echo '../../../../src/binutils-2.21.0.20110327/binutils/doc/'`binutils.texi; \ then \ rc=0; \ else \ rc=$?; \ $restore $backupdir/* `echo "./binutils.info" | sed 's|[^/]*$||'`; \ fi; \ rm -rf $backupdir; exit $rc ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4191: warning: @itemx should not begin @table ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4198: @itemx must follow @item ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4202: @itemx must follow @item ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4208: @itemx must follow @item ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4212: @itemx must follow @item ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4221: @itemx must follow @item ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:2291: warning: node next `ranlib' in menu `readelf' and in sectioning `size' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:2344: warning: node prev `size' in menu `readelf' and in sectioning `ranlib' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:2568: warning: node next `strip' in menu `elfedit' and in sectioning `c++filt' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3074: warning: node next `nlmconv' in menu `windres' and in sectioning `windmc' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3179: warning: node next `windmc' in menu `dlltool' and in sectioning `windres' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3179: warning: node prev `windmc' in menu `windres' and in sectioning `nlmconv' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3340: warning: node next `windres' in menu `windmc' and in sectioning `dlltool' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3340: warning: node prev `windres' in menu `nlmconv' and in sectioning `windmc' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3527: warning: node next `dlltool' in menu `Common Options' and in sectioning `readelf' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3527: warning: node prev `dlltool' in menu `windmc' and in sectioning `windres' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3921: warning: node next `readelf' in menu `size' and in sectioning `elfedit' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:3921: warning: node prev `readelf' in menu `ranlib' and in sectioning `dlltool' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4151: warning: node next `elfedit' in menu `c++filt' and in sectioning `Common Options' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4151: warning: node prev `elfedit' in menu `strip' and in sectioning `readelf' differ ../../../../src/binutils-2.21.0.20110327/binutils/doc/binutils.texi:4243: warning: node prev `Common Options' in menu `dlltool' and in sectioning `elfedit' differ make[4]: *** [Makefile:350: binutils.info] Error 1 make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils/doc' Making info in po make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils/po' make[4]: Nothing to be done for 'info'. make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils/po' make[4]: Entering directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils' make[4]: Nothing to be done for 'info-am'. make[4]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils' make[3]: *** [Makefile:865: info-recursive] Error 1 make[3]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils/binutils' make[2]: *** [Makefile:4189: all-binutils] Error 2 make[2]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils' make[1]: *** [Makefile:851: all] Error 2 make[1]: Leaving directory '/path/to/amazon/toolchain/build_linaro-gcc_4.5.4/build/binutils' make: *** [Makefile:118: stamp/binutils-install] Error 2 Last edited by WaseemAlkurdi; 09-12-2019 at 04:09 AM. |
||
![]() |
![]() |
![]() |
#4 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Don't build the docs?
And yeah, u-boot being fine with a Linux TC makes sense. |
![]() |
![]() |
![]() |
#5 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17
Karma: 222284
Join Date: Jul 2018
Device: PW3
|
I just tried it and got a u-boot.bin:
Code:
┬─[simon@yogal390:~/D/g/uboot_2009.08]─[01:58:49] ╰─>$ ls api/ doc/ lib_i386/ MAKEALL* tools/ board/ drivers/ lib_m68k/ Makefile u-boot* CHANGELOG examples/ lib_microblaze/ mkconfig* u-boot.bin* CHANGELOG-before-U-Boot-1.1.5 fs/ lib_mips/ nand_spl/ u-boot.lds common/ include/ lib_nios/ net/ u-boot.map config.mk lib_arm/ lib_nios2/ onenand_ipl/ u-boot.srec* COPYING lib_avr32/ lib_ppc/ post/ cpu/ lib_blackfin/ lib_sh/ README CREDITS libfdt/ lib_sparc/ rules.mk disk/ lib_generic/ MAINTAINERS System.map ┬─[simon@yogal390:~/D/g/uboot_2009.08]─[01:59:01] Code:
cp ../linux-3.0.35/include/boardid.h ./include/ cp ../linux-3.0.35/include/boardid_base.h ./include/ cp ../linux-3.0.35/include/max77696_registers.h ./include/ cp ../linux-3.0.35/include/linux/frontlight.h ./include/linux/ env TYPE=prod make CROSS_COMPILE=/usr/bin/arm-none-eabi- imx60_wario_config env TYPE=prod make CROSS_COMPILE=/usr/bin/arm-none-eabi- -j8 Last edited by schuhumi; 09-12-2019 at 08:11 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
Quote:
I tried building U-Boot again with this toolchain ("gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz" from: https://releases.linaro.org/componen...linux-gnueabi/), but the build fails with the same exact error. I'm going to try building U-Boot again with the toolchain recommended by @schuhumi. EDIT: It's AUR ... and I have to build it myself. Normally, I don't have an issue, but "build anxiety" strikes hard this time. And it seems to point back to Linaro's source archives. EDIT 2: Turns out that AUR depends on the 'makepkg' command, only available with 'pacman' on Arch. I'm on Ubuntu, which has APT. What should I do? Last edited by WaseemAlkurdi; 09-13-2019 at 07:30 AM. |
|
![]() |
![]() |
![]() |
#7 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17
Karma: 222284
Join Date: Jul 2018
Device: PW3
|
Quote:
You can see:
|
|
![]() |
![]() |
![]() |
#8 | |
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17
Karma: 222284
Join Date: Jul 2018
Device: PW3
|
Quote:
What I'm not sure about is why you need uboot for this? |
|
![]() |
![]() |
![]() |
#10 | |
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
Quote:
I'm doing it primarily to learn more about both QEMU and Linux on the Kindle, and it should work in theory because QEMU has an i.MX6 board that is very close to the i.MX6SL in the Kindle Paperwhite 2 and above. I tried booting the Kindle's stock kernel without U-Boot (directly in QEMU, by passing appropriate kernel and console parameters) but to no avail (QEMU doesn't start). This gave me the idea of building U-Boot, since it's going to be needed later on to define idme variables and fake serial number information for the Kindle firmware to completely boot in QEMU. Last edited by WaseemAlkurdi; 09-16-2019 at 12:48 PM. |
|
![]() |
![]() |
![]() |
#11 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Ah, a small problem with your plan ...
QEMU is a 'single program' loader, stock QEMU can not load two programs (u-boot and kernel). There is published the means to patch QEMU to load the multi-part u-boot and multi-part kernel along with the description of how-to do it and a worked example. I found that using a common web search tool. |
![]() |
![]() |
![]() |
#12 | |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
|
U-boot is normally used as Stage2 bootloader and used to setup cpu timmings and sdram. Stage1 bootloader is normally part of the hardware and it is loaded and executed from On Chip RAM (OCRAM).
The process of building u-boot is similar to build the kernel itself. Set a cross compile toolchain, make a .config using an already available defconfig and make to build. Normally (on imx at least) a little header is wrapped at the beginning of the binary and that is specific to your model DRAM configuration. I don't know much about Kindle but the sources of Kobo's uboot ship with a helper script that does exactly the steps mentioned above. Quote:
But yeah, OP has a difficult task at hand. Good luck and keep us informed ![]() edit: I found a interesting link about the topic. Basically you can try the same but using a different device configuration. It seems that i.MX6 Dual Lite SABRE is available on qemu 2 and should be a good place to start. Use that instead of "versatile" Last edited by pazos; 09-16-2019 at 07:01 PM. Reason: link |
|
![]() |
![]() |
![]() |
#13 | ||||||
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
Quote:
![]() For now, I don't think this is an issue. If I actually get U-Boot successfully built and booted in QEMU, then it would be very easy to follow a set of instructions to patch QEMU accordingly. Quote:
Quote:
Quote:
Quote:
![]() Quote:
Edit: 1. When doing a chroot with an image of the Kindle's main partition + user-mode QEMU ARM + Xephyr, I noticed that some Kindle executables work, namely xtestlab126. But starting the Kindle's framework properly requires init, or at least executing the Upstart scripts in the correct order. I thought I'd make it easier and scrap that plan, especially when a complete Kindle emulation in QEMU is much more "accurate". 2. According to this message on the U-Boot mailing list, the U-Boot compilation problem is caused by the system's own version of libfdt. But removing that package only makes matters worse: Code:
$ env TYPE=prod make CROSS_COMPILE=~/arm-2014.05/bin/arm-linux-gnueabi- -j8 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 -C examples/standalone all make[1]: Entering directory '/path/to/uboot_2009.08/tools' make -C examples/api all make[1]: Entering directory '/path/to/uboot_2009.08/examples/standalone' make -C cpu/arm_cortexa8 start.o make[1]: Entering directory '/path/to/uboot_2009.08/examples/api' make[1]: *** No rule to make target '/usr/include/libfdt_env.h', needed by 'mkimage.o'. Stop. make[1]: Leaving directory '/path/to/uboot_2009.08/tools' make: *** [Makefile:357: tools] Error 2 make: *** Waiting for unfinished jobs.... make[1]: *** No rule to make target '~/arm-2014.05/lib/gcc/arm-none-linux-gnueabi/4.8.3/include/stdarg.h', needed by 'hello_world.o'. Stop. make[1]: Leaving directory '/path/to/uboot_2009.08/examples/standalone' make: *** [Makefile:357: examples/standalone] Error 2 make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/path/to/uboot_2009.08/examples/api' Last edited by WaseemAlkurdi; 09-17-2019 at 04:58 PM. |
||||||
![]() |
![]() |
![]() |
#14 |
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
Finally! It compiled when using a Ubuntu chroot!
But the final product didn't boot in QEMU. I'm going to build the mainline U-Boot tree for the "versatilepb" target to see if my build setup produces anything that boots at all in QEMU. Edit: That worked. Why doesn't this one work? Last edited by WaseemAlkurdi; 09-19-2019 at 08:28 AM. |
![]() |
![]() |
![]() |
#15 |
Zealot
![]() Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
|
When targeting the vexpress board for a mainline U-Boot compile, the compiled U-Boot works flawlessly.
But when targeting any i.MX6 board that has a corresponding QEMU "machine" on mainline, it won't boot. I'm stumped. Last edited by WaseemAlkurdi; 09-19-2019 at 09:39 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Please help with these compilation errors | darkbreath | Sigil | 24 | 07-22-2016 11:47 AM |
How to show kernel boot information instead Amazon boot picture? | madtrapper | Kindle Developer's Corner | 8 | 01-04-2013 08:51 AM |
Can I make a compilation within a compilation? | Villordsutch | Amazon Kindle | 5 | 01-04-2012 03:10 AM |
Opus cannot boot, stuck on boot screen | baloma | Bookeen | 35 | 11-13-2010 04:20 AM |
Compilation of Q&A | FGFuzaxx | iRex | 14 | 07-17-2006 07:51 AM |