- 论坛徽章:
- 0
|
5可用积分
busybox做的initramfs,在启动时出现问题,停住了。
busybox下的init/init.c中run()运行到while(read(0, &c, 1) == 1 && c != '\n');停住了。
追踪后发现,是运行read(0, &c, 1)时停住了,对应于内核中的函数是drivers/char/tty_io.c中的tty_read()
下面的调用过程如下:
tty_read() -> read_chan() -> schedule_timeout() -> schedule()最前面的一个 -> 出去后就回不来了。
通过打印信息发现,这个schedule()让出后运行了另一进程,这个进程再次调用schedule()后,运行了第三个进程,然后就不再调用schedule(),估计是死循环在这个第三个进程中了。
这时,中断还是可以响应的,时钟中断和串口中断都可以运行。但是就是再也回不去接着运行tty_read()了。
请问会死在什么地方呢?应该不是死在中断里面,因为可能的中断处理函数我都加上了打印语句,没有发现哪个中断处理程序被调用。(打印语句不是printk,而是直接写串口寄存器的程序段)。有没有什么办法找出问题?
谢谢了!
具体信息如下:
Auto run second count down: 0
Booting from latest image (0xbe020000) ...
Code Address: 0x80010000, Entry Address: 0x80014430
Decompression OK!
Entry at 0x80014430
Closing network.
Starting program at 0x80014430
Linux version 2.6.27 (root@localhost.localdomain) (gcc version 3.4.2) #483 Fri Jun 12 13:17:04 CST 2009
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB
96359PONG prom init
mips_hpt_frequency = 0x8f0d180, r4k_interval = 0x16e360
CPU revision is: 0002a010 (Broadcom BCM635
Determined physical RAM map:
memory: 07fa0000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00007fa0
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00007fa0
On node 0 totalpages: 32672
free_area_init_node: node 0, pgdat 80148cf0, node_mem_map 81000000
Normal zone: 32416 pages, LIFO batch:7
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32416
Kernel command line: rdinit=/sbin/init console=ttyS0,115200
Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
PID hash table entries: 512 (order: 9, 2048 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 127416k/130688k available (1081k kernel code, 3100k reserved, 176k data, 440k init, 0k highmem)
Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
Mount-cache hash table entries: 512
Total Flash size: 32768K with 512 sectors
File system address: 0xbf000100
msgmni has been set to 249
io scheduler noop registered (default)
brd: module loaded
loop: module loaded
brcmboard: brcm_board_init entry
Serial: BCM63XX driver $Revision: 3.00 $
ttyS0 at MMIO 0xfffe0100 (irq = 10) is a BCM63XX
Freeing unused kernel memory: 440k freed
init started: BusyBox v1.00 (2009.06.10-06:34+0000) multi-call #1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
这里是响应串口收数据中断的打印 |
|