TI中文支持网
TI专业的中文技术问题搜集分享网站

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

大家好,我的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 headermagic: 0xd00dfeedtotalsize: 0x3248 (12872)off_dt_struct: 0x38off_dt_strings: 0x2ce4off_mem_rsvmap: 0x28version: 17last_comp_version: 16boot_cpuid_phys: 0x0size_dt_strings: 0x564size_dt_struct: 0x2cacnumber mem_rsv: 0x0U-Boot > fdt print /memorymemory { device_type = "memory"; reg = <0xc0000000 0x08000000>;};

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

Zhihua Zhang:

补充一下:

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 rootfstype=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 … …

然后就没有然后了

Shine:

回复 Zhihua Zhang:

请看一下你用的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

赞(0)
未经允许不得转载:TI中文支持网 » 关于OMAPL138加载Device Tree失败的问题
分享到: 更多 (0)