u-boot开启硬件看门狗,问题请教

m0_66890461 2022-12-04 14:09:08

最近在修改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
 

...全文
813 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kyph 2023-06-04
  • 打赏
  • 举报
回复

hw_watchdog_reset这个函数没有定义,你可以在源代码中查找该函数,看看是不是具体的watchdog驱动没有加上

4,465

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧