4,465
社区成员




最近在修改https://github.com/MarvellEmbeddedProcessors/u-boot-marvell 这个u-boot,在include/configs/msys.h中打开宏#define CONFIG_HW_WATCHDOG
在编译过程中,有两个函数crc32.c,time.c出错
sw@ubuntu:~/Work/u-boot-2013.01$ ./build.pl -b ac3_db -f spi -v 2016_T1.0.eng_drop_v6-1500 -i nand:spi -c -o /home/sw/Work/out/u-boot-2013.01
**** [Cleaning Make] *****
Configuring for ac3_db - Board: msys, Options: DB_AC3,ALLEYCAT3
**** [Setting Macros] *****
Boot from SPI
** Little ENDIAN **
Support flash: NAND SPI
*** DDR3LIB = v2 *********************************
** DDRTYPE = DDR3 **
**** [Building U-BOOT] *****
CC base64.c
CC arc4.c
CC bignum.c
CC aes.c
CC certs.c
CC debug.c
CC des.c
CC dhm.c
CC havege.c
CC md2.c
CC md4.c
CC md5.c
CC net.c
CC padlock.c
CC rsa.c
CC sha1.c
CC sha2.c
CC sha4.c
CC ssl_cli.c
CC ssl_srv.c
CC ssl_tls.c
CC x509parse.c
CC timing.c
CC xtea.c
CC camellia.c
CC mvMemPool.c
AR libpolarssl.a
ar: creating libpolarssl.a
RL libpolarssl.a
CC aes/aescrypt2.c
CC hash/md5sum.c
CC hash/hello.c
CC hash/sha1sum.c
CC pkey/dh_client.c
CC hash/sha2sum.c
CC pkey/dh_genprime.c
CC pkey/dh_server.c
CC pkey/mpi_demo.c
CC pkey/rsa_genkey.c
CC pkey/rsa_sign.c
CC pkey/rsa_verify.c
pkey/rsa_sign.c: In function ‘main’:
pkey/rsa_sign.c:104:17: warning: implicit declaration of function ‘sha4_file’ [-Wimplicit-function-declaration]
if( ( ret = sha4_file( argv[1], hash, 0 ) ) != 0 )
^
CC ssl/ssl_client1.c
CC ssl/ssl_server.c
CC ssl/ssl_client2.c
pkey/rsa_verify.c: In function ‘main’:
pkey/rsa_verify.c:129:17: warning: implicit declaration of function ‘sha4_file’ [-Wimplicit-function-declaration]
if( ( ret = sha4_file( argv[1], hash, 0 ) ) != 0 )
^
CC test/benchmark.c
CC test/selftest.c
CC test/ssl_test.c
test/selftest.c: In function ‘main’:
test/selftest.c:143:17: warning: implicit declaration of function ‘camellia_self_test’ [-Wimplicit-function-declaration]
if( ( ret = camellia_self_test( v ) ) != 0 )
^
Building linker script for board msys, Non-secure mode
Building linker script for board msys, Secure mode
a - uboot_drv.o
a - uboot_skb.o
a - sky2.o
a - skge.o
a - sky2le.o
a - skdim.o
a - skaddr.o
a - skgehwt.o
a - skgeinit.o
a - skgesirq.o
a - sktwsi.o
a - sklm80.o
a - skqueue.o
a - skrlmt.o
a - sktimer.o
a - skvpd.o
a - skxmac2.o
a - skcsum.o
crc32.o: In function `crc32_wd':
/home/sw/Work/u-boot-2013.01/lib/crc32.c:244: undefined reference to `hw_watchdog_reset'
time.o: In function `udelay':
/home/sw/Work/u-boot-2013.01/lib/time.c:37: undefined reference to `hw_watchdog_reset'
Makefile:74: recipe for target 'demo' failed
make[1]: *** [demo] Error 1
make[1]: *** Waiting for unfinished jobs....
crc32.o: In function `crc32_wd':
/home/sw/Work/u-boot-2013.01/lib/crc32.c:244: undefined reference to `hw_watchdog_reset'
time.o: In function `udelay':
/home/sw/Work/u-boot-2013.01/lib/time.c:37: undefined reference to `hw_watchdog_reset'
Makefile:70: recipe for target 'monext' failed
make[2]: *** [monext] Error 1
Makefile:87: recipe for target 'marvell/monext.bin' failed
make[1]: *** [marvell/monext.bin] Error 2
Makefile:605: recipe for target 'examples/api' failed
make: *** [examples/api] Error 2
*** Error: Build failed
hw_watchdog_reset这个函数没有定义,你可以在源代码中查找该函数,看看是不是具体的watchdog驱动没有加上