zoukankan      html  css  js  c++  java
  • uboot解决flash failed无限挂起的问题

    追踪flash failed的问题在于board.c中的一段代码:

    #if !defined(CONFIG_SYS_NO_FLASH)
     puts ("Flash: ");
     if ((flash_size = flash_init ()) > 0) {
    # ifdef CONFIG_SYS_FLASH_CHECKSUM
      print_size (flash_size, "");
      /*
       * Compute and print flash CRC if flashchecksum is set to 'y'
       *
       * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
       */
      s = getenv ("flashchecksum");
      if (s && (*s == 'y')) {
       printf ("  CRC: %08X",
        crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size)
       );
      }
      putc ('/n');
    # else /* !CONFIG_SYS_FLASH_CHECKSUM */
      print_size (flash_size, "/n");
    # endif /* CONFIG_SYS_FLASH_CHECKSUM */
     } else { 
      puts (failed);
      hang ();   //无限挂起的根源
    }
    #endif

    然后定位hang()

    void hang(void)
    {
      puts("### ERROR ### Please RESET the board ###\n");
      for(;;);   //循环挂起的语句
    }

    因为本人的板子并无flash,只有ELC的2G NAND flash芯片,所以屏蔽此处的挂起函数。

    即可按需执行下去:

    最新版的nand驱动做得非常好了,连nand flash都正确识别了

    然后问题来了:

    板子所带的网卡为DM9000,下面移植DM9000的网卡驱动程序……

  • 相关阅读:
    协程—gevent模块的使用
    协程—概念以及基本使用
    Python—同步和互斥
    Hugo博客搭建
    Linux编辑利器-Vim
    Linux命令与Shell
    python入门基础
    .netcore程序在linux下用supervisor守护
    .netcore中添加Swagger
    winform或wpf中全局异常捕获
  • 原文地址:https://www.cnblogs.com/ikesee/p/2443475.html
Copyright © 2011-2022 走看看