Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • 社区主页

    uboot 中可以打印设备树但在uboot 启动内核过程中报错找不到设备树

    Linux
    1
    1
    76
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chen95 LV 2 last edited by

      使用的芯片是 全志H6 的orangepi 3 开发板,在uboot 启动过程报错如下:

      ** File not Found /boot/dts/sunxi/sunxi-orangepi-3.dts**
      	libfdt fdt_check_header:FDT_ERR_BADMAGIC
      

      查看uboot 源码是在函数

      int fdt_check_header(const void *fdt)
      {
      	if (fdt_magic(fdt) == FDT_MAGIC) {
      		/* Complete tree */
      		if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
      			return -FDT_ERR_BADVERSION;
      		if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
      			return -FDT_ERR_BADVERSION;
      	} else if (fdt_magic(fdt) == FDT_SW_MAGIC) {
      		/* Unfinished sequential-write blob */
      		if (fdt_size_dt_struct(fdt) == 0)
      			return -FDT_ERR_BADSTATE;
      	} else {
      		return -FDT_ERR_BADMAGIC;
      	}
      
      	return 0;
      }
      

      中设备树头部校验出错 但在uboot init_sequence_f 中有执行 reserve_fdt 中也有对设备树头的校验,这里校验就通过了。 进入uboot 使用命令 fdt print 打印也可以正确打印出设备树,但在uboot autoboot_command 中 run_command_list 中的cmd_fdt 中对设备树头校验就出错了,导致无法正确进入内核
      请问有人遇到过这种情况吗?
      请问要怎么解决呢?

      1 Reply Last reply Reply Quote Share 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2021 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策