This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于OMAPL138加载Device Tree失败的问题

Other Parts Discussed in Thread: OMAP-L138

大家好,我的SDK包是ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04,启动内核发现会停住,追踪代码发现卡在driver/of/fdt.c文件在调用fdt_check_header时没有返回,dtb使用的是sdk包默认的da850-evm.dtb,使用方法如下:

tftpboot 0xc0700000 da850-evm.dtb

tftpboot 0xc1000000 zImage

bootz 0xc1000000 - 0xc0700000

我直接在uboot下使用fdt命令测试结果如下:

U-Boot > fdt header
magic: 0xd00dfeed
totalsize: 0x3248 (12872)
off_dt_struct: 0x38
off_dt_strings: 0x2ce4
off_mem_rsvmap: 0x28
version: 17
last_comp_version: 16
boot_cpuid_phys: 0x0
size_dt_strings: 0x564
size_dt_struct: 0x2cac
number mem_rsv: 0x0

U-Boot > fdt print /memory
memory {
device_type = "memory";
reg = <0xc0000000 0x08000000>;
};

这是什么原因啊?怎么查?

  • 补充一下:

    int size;
    void *mem;

    pr_debug(" -> unflatten_device_tree()\n");

    early_print("%s:Start to unflatten_device_tree ... ...\n",__func__);

    if (!blob) {
    pr_debug("No device tree pointer\n");
    return NULL;
    }
    early_print("%s:in here 1 ... ...\n",__func__);
    pr_debug("Unflattening device tree:\n");
    pr_debug("magic: %08x\n", fdt_magic(blob));
    pr_debug("size: %08x\n", fdt_totalsize(blob));
    pr_debug("version: %08x\n", fdt_version(blob));

    early_print("%s:in here 2 ... ...\n",__func__);

    if (fdt_check_header(blob)) { /*执行到这里就不返回了,即不报出错,也没有返回*/
    pr_err("Invalid device tree blob header\n");
    return NULL;
    }
    early_print("%s:in here 3 ... ...\n",__func__);

    执行信息如下:

    U-Boot > run nandbootdebug
    Using DaVinci-EMAC device
    TFTP from server 172.16.16.50; our IP address is 172.16.16.123
    Filename 'da850-evm.dtb'.
    Load address: 0xc0700000
    Loading: #
    2 KiB/s
    done
    Bytes transferred = 12872 (3248 hex)
    Using DaVinci-EMAC device
    TFTP from server 172.16.16.50; our IP address is 172.16.16.123
    Filename 'zImage'.
    Load address: 0xc1000000
    Loading: #################################################################
    #################################################################
    #########################################
    65.4 KiB/s
    done
    Bytes transferred = 2500224 (262680 hex)
    ## Flattened Device Tree blob at c0700000
    Booting using the fdt blob at 0xc0700000
    Loading Device Tree to c3e10000, end c3e16247 ... OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.

    Device Tree match machine begain ... ...

    Device Tree match machine sucess ... ...
    Machine:Generic DA850/OMAP-L138/AM18x
    cmd_line = root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 init=/linuxrc rootf
    stype=ubifs rootwait=1 console=ttyS1,115200n8 mem=59M
    __unflatten_device_tree:Start to unflatten_device_tree ... ...
    __unflatten_device_tree:in here 1 ... ...
    __unflatten_device_tree:in here 2 ... ...

    然后就没有然后了

  • 请看一下你用的da850_evm.dts和你的板子硬件是否一致?
    http://processors.wiki.ti.com/index.php/Kernel_-_Common_Problems_Booting_Linux#Cause_.232_B_-_Mis-match_between_device_tree_blob_and_the_actual_hardware

x 出现错误。请重试或与管理员联系。