I was pointed to a u-boot mod project that would allow me to install a u-boot with a webserver on my aging TL-WR1043ND v1, which, given the limited recovery capabilities if you're not handy with serial like me, would be a great step forward.
Unfortunately, while the author talks about precompiled images I'm not able to find any and I am stuck building the source myself. It was suggested on IRC it should work with the 15.05 toolchain, so I tried that one, but that breaks... Well, to be fair, they all break; I tried 18.06, 15.05, 14.07 and 12.09 .
Errors I'm seeing:
lib_generic/libgeneric.a(string.o): In function `strcpy':
string.c:(.text+0x0): multiple definition of `strcpy'
board/ar7100/ap83/libap83.a(ar7240_flash.o):ar7240_flash.c:(.text+0x67c): first defined here
lib_generic/libgeneric.a(string.o): In function `strncpy':
string.c:(.text+0x24): multiple definition of `strncpy'
board/ar7100/ap83/libap83.a(ar7240_flash.o):ar7240_flash.c:(.text+0x6a0): first defined here
lib_generic/libgeneric.a(string.o): In function `strcmp':
string.c:(.text+0x5c): multiple definition of `strcmp'
board/ar7100/ap83/libap83.a(ar7240_flash.o):ar7240_flash.c:(.text+0x6d8): first defined here
lib_generic/libgeneric.a(string.o): In function `strncmp':
string.c:(.text+0x88): multiple definition of `strncmp'
board/ar7100/ap83/libap83.a(ar7240_flash.o):ar7240_flash.c:(.text+0x704): first defined here
lib_generic/libgeneric.a(string.o): In function `memscan':
string.c:(.text+0xb8): multiple definition of `memscan'
board/ar7100/ap83/libap83.a(ar7240_flash.o):ar7240_flash.c:(.text+0x734): first defined here
Makefile:195: recept voor doel 'u-boot' is mislukt
make[1]: *** [u-boot] Fout 1
Makefile:160: recept voor doel 'tplink_wr1043nd_v1' is mislukt
make: *** [tplink_wr1043nd_v1] Fout 2
I've grepped the source code for multiple definitions, but I'm unsure how to proceed from here, so I'd appreciate all the help I can get. I have filtered further for const with the str* functions since they returned a lot of output, but I can post everything of course.
Grepping for strcpy
$ git grep strcpy|grep const
u-boot/include/asm-mips/string.h:extern __inline__ char *strcpy(char *__dest, __const__ char *__src)
u-boot/include/linux/string.h:extern char * strcpy(char *,const char *);
u-boot/lib_bootstrap/string.c:char * strcpy(char * dest,const char *src)
u-boot/lib_generic/string.c:char * strcpy(char * dest,const char *src)
Grepping for strcmp
$ git grep strcmp|grep const
u-boot/httpd/fs.c:fs_strcmp(const char *str1, const char *str2)
u-boot/include/asm-mips/string.h:extern __inline__ int strcmp(__const__ char *__cs, __const__ char *__ct)
u-boot/include/linux/string.h:extern int strcmp(const char *,const char *);
u-boot/lib_bootstrap/string.c:int strcmp(const char * cs,const char * ct)
u-boot/lib_generic/string.c:int strcmp(const char * cs,const char * ct)
Grepping for strncmp
$ git grep strncmp|grep const
u-boot/include/asm-mips/string.h:strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count)
u-boot/include/linux/string.h:extern int strncmp(const char *,const char *,__kernel_size_t);
u-boot/lib_bootstrap/string.c:int strncmp(const char * cs,const char * ct,size_t count)
u-boot/lib_generic/string.c:int strncmp(const char * cs,const char * ct,size_t count)
Grepping for memscan
$ git grep memscan
u-boot/include/asm-mips/string.h:extern __inline__ void *memscan(void *__addr, int __c, size_t __size)
u-boot/include/linux/string.h:extern void * memscan(void *,int,__kernel_size_t);
u-boot/lib_bootstrap/string.c: * memscan - Find a character in an area of memory.
u-boot/lib_bootstrap/string.c:void * memscan(void * addr, int c, size_t size)
u-boot/lib_generic/string.c: * memscan - Find a character in an area of memory.
u-boot/lib_generic/string.c:void * memscan(void * addr, int c, size_t size)
Thanks!