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

uboot引导内核启动卡在Staring kernel该怎么分析原因?

你好,

软件环境为:ti-processor-sdk-linux-rt-am335x-evm-03.01.00.0

硬件:基于am3358定制板子

系统引导如下:

U-Boot SPL 2016.05 (Mar 29 2017 – 12:14:35)
spl_boot_list[0] = 0xb
spl -> board_init_r()Trying to boot from SPI
spl -> board_init_r() 2.spl_image.size = 0x5a0cc
spl_image.os = 0x11

U-Boot 2016.05 (Mar 29 2017 – 12:14:35 +0800)

Watchdog enabled
I2C: ready
DRAM: 256 MiB
board_r -> board_init_r
dm_init() success: 0
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
SF: Detected W25Q64CV with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Net: cpsw, usb_ether
run_main_loop
bootdelay_process, bootdelay: 2
Hit any key to stop autoboot: 2 abort_0 = 0 0abort = 0SF: Detected W25Q64CV with page size 256 Bytes, erase size 4 KiB, total 8 MiB
device 0 offset 0x100000, size 0x400000
SF: 4194304 bytes @ 0x100000 Read: OK
device 0 offset 0x80000, size 0x20000
SF: 131072 bytes @ 0x80000 Read: OK
device 0 offset 0x500000, size 0x200000
SF: 2097152 bytes @ 0x500000 Read: OK
## Booting kernel from Legacy Image at 82000000 …
Image Name: Linux-4.4.19-rt25
Created: 2017-03-29 6:19:45 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3135440 Bytes = 3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK
## Loading init Ramdisk from Legacy Image at 88000000 …
Image Name: ramdisk
Created: 2017-03-28 12:16:55 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 1003882 Bytes = 980.4 KiB
Load Address: 88080000
Entry Point: 88080000
Verifying Checksum … OK
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Loading Kernel Image … OK
Loading Ramdisk to 8ee3a000, end 8ef2f16a … OK
Loading Device Tree to 8ee2d000, end 8ee39709 … OK

Starting kernel …

系统运行过程中卡在了此处,无法继续。。。。。。。。。。

请帮忙分析是什么原因引起的,,谢谢

状态信息如下:

=> printenv bootargs
bootargs=mem=256M console=ttyO0,115200n8
=> bdinfo
arch_number = 0x00000E05
boot_params = 0x80000100
DRAM bank = 0x00000000
-> start = 0x80000000
-> size = 0x10000000
eth0name = cpsw
ethaddr = 88:c2:55:48:ff:3a
eth1name = usb_ether
eth1addr = 88:c2:55:48:ff:3c
current eth = cpsw
ip_addr = <NULL>
baudrate = 115200 bps
TLB addr = 0x8FFF0000
relocaddr = 0x8FF51000
reloc off = 0x0F751000
irq_sp = 0x8EF30EC0
sp start = 0x8EF30EB0
=>

Denny%20Yang99373:

仿真器连上看看PC指针位置

可以通过.map文件定位卡在哪个函数上了

Jian Zhou:

回复 Denny%20Yang99373:

kernel做过移植么?

郑州–大胜:

回复 Denny%20Yang99373:

你好,

   通过CCS跟踪调试,发现程序在运行至下图中红框标注的c07f16a8: ebe2ba57 bl c00a000c <printk>后出现异常,,

该位置对应linux 源码为:

start_kenerl ->  setup_arch(&command_line) -> setup_processor(); -> cacheid_init()的如下函数pr_info时发生了异常中断

如果把pr_info 函数注释掉,程序还可以继续运行,但是程序运行到下一个调用printk函数时,仍会出现异常

请问该问题产生原因是什么??该如何解决??

调试过程中还遇到了另外一个问题,就是在linux4.4.19中make menuconfig 打开

Denny%20Yang99373:

回复 郑州–大胜:

硬件和EVM对比有什么修改?软件有无修改?可以尝试先用非RT版本的LINUX测试一下。 

郑州–大胜:

回复 Denny%20Yang99373:

你好,经过分析测试,现在程序能够运行到void calibrate_delay(void)函数中,然后CCS就会自动断掉,

采用的am3358BZCZA80芯片,关于时钟这块采用的配置是pdk3.0中的配置,如:

dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);   

do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);                        //这个配置是1GHZ do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);

开发板ICEv2(AM3359BZCZA80)、AM3358BZCZA100)均采用的是该配置,根据手册资料显示,am3358BZCZA80芯片最大应该是800MHz,我这边该如何调整这些参数?????????????  是否是时钟配置问题引起的kernel 无法打印?

郑州–大胜:

回复 郑州–大胜:

谢谢,大家的指导,

问题解决了,关于卡在打印信息显示,卡在staring kernel位置,则可能是bootargs 参数无法传递到kernel中,通过make menuconfig 配置 CONFIG_COMLINE

配置参数

使能earlyprintk的方式是开启如下配置:

通过以上测试,能够正常打印了额,

多个疑问交织在了一起,现在解决了两个

现在遇到的问题是汇编调试时的问题如下:

????

赞(0)
未经允许不得转载:TI中文支持网 » uboot引导内核启动卡在Staring kernel该怎么分析原因?
分享到: 更多 (0)