[U-Boot] [PATCH] include: compiler: fix tools-only compiles on Cygwin and with the Android NDK on Linux
Chris Renshaw
osm0sis at outlook.com
Fri Apr 12 19:18:31 UTC 2019
Hi again, I am submitting this patch with some easy fixes for the ongoing broken compiling U-Boot tools-only on Cygwin and cross-compiling with the Android NDK on Linux. The added __kernel_* definitions in posix_types.h come from mainline so should be safe for inclusion: https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/posix_types.h
I also feel it worth mentioning that my previous bug report for dumpimage failing on untrimmed dumps has not received any response yet, so I'll link it again for your attention as the issue remains in 2019.04: https://lists.denx.de/pipermail/u-boot/2019-January/355670.html
Errors on Cygwin resolved by this patch:
HOSTCC tools/aisimage.o
In file included from tools/aisimage.c:9:0:
include/image.h:321:2: error: unknown type name ‘__be32’
__be32 ih_magic; /* Image Header Magic Number */
^~~~~~
(and 6 similar __be32 errors)
make[1]: *** [scripts/Makefile.host:114: tools/aisimage.o] Error 1
make: *** [Makefile:1722: tools-only] Error 2
HOSTCC tools/imx8image.o
In file included from include/linux/kernel.h:5:0,
from include/imx8image.h:14,
from tools/imx8image.c:8:
include/linux/types.h:155:2: error: unknown type name ‘__kernel_daddr_t’
__kernel_daddr_t f_tfree;
^~~~~~~~~~~~~~~~
include/linux/types.h:156:2: error: unknown type name ‘__kernel_ino_t’
__kernel_ino_t f_tinode;
^~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.host:114: tools/imx8image.o] Error 1
make: *** [Makefile:1722: tools-only] Error 2
HOSTCC tools/mtk_image.o
In file included from tools/mtk_image.c:12:0:
tools/mtk_image.h:18:3: error: unknown type name ‘__le32’
__le32 version;
^~~~~~
(and 30 similar __le32 errors)
tools/mtk_image.h:35:3: error: unknown type name ‘__le16’
__le16 ioif;
^~~~~~
(and 10 similar __le16 errors)
make[1]: *** [scripts/Makefile.host:114: tools/mtk_image.o] Error 1
make: *** [Makefile:1722: tools-only] Error 2
HOSTCC tools/zynqmpbif.o
tools/zynqmpbif.c: In function ‘bif_add_bit’:
tools/zynqmpbif.c:520:15: warning: implicit declaration of function ‘__swab32’; did you mean ‘__bswap32’? [-Wimplicit-function-declaration]
*bitbin32 = __swab32(*bitbin32);
^~~~~~~~
__bswap32
tools/zynqmpbif.o:zynqmpbif.c:(.text+0xdb7): undefined reference to `__swab32'
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:106: tools/dumpimage] Error 1
make: *** [Makefile:1722: tools-only] Error 2
Errors with the Android NDK on Linux resolved by this patch:
HOSTCC tools/aisimage.o
In file included from tools/aisimage.c:7:0:
tools/imagetool.h:215:2: error: unknown type name 'ulong'
ulong file_data,
^
In file included from tools/aisimage.c:9:0:
include/image.h:335:2: error: unknown type name 'ulong'
ulong start, end; /* start/end of blob */
^
(and 42 similar ulong errors)
make[1]: *** [tools/aisimage.o] Error 1
make: *** [tools-only] Error 2
HOSTCC tools/zynqmpbif.o
tools/zynqmpbif.c: In function 'bif_add_bit':
tools/zynqmpbif.c:520:3: warning: implicit declaration of function '__fswab32' [-Wimplicit-function-declaration]
*bitbin32 = __swab32(*bitbin32);
^
tools/zynqmpbif.o:zynqmpbif.c:function bif_add_bit: error: undefined reference to '__fswab32'
collect2: error: ld returned 1 exit status
make[1]: *** [tools/mkimage] Error 1
make: *** [tools-only] Error 2
Thanks for your time and consideration!
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-include-compiler-fix-tools-only-compiles-on-Cygwin-a.patch
Type: application/octet-stream
Size: 1857 bytes
Desc: 0001-include-compiler-fix-tools-only-compiles-on-Cygwin-a.patch
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190412/b0904ff6/attachment.obj>
More information about the U-Boot
mailing list