Thanks to visit codestin.com
Credit goes to github.com

Skip to content

内核太大,加载的时候panic了。 #8

@wangwenbin

Description

@wangwenbin

我使用教程编译了内核,并且做了 tftp 的 server 和 nfs 的 server。 但是发现无法启动路由器,通过日志发现不停的加载vmlinuz,然后分析可能是内核加载的时候出问题了。

我拆了路由器引出串口线。观察启动过程发现应该是内核太大panic了。看readme里面说的3M内核也没什么问题,但是在我这里就出问题了。

我的路由器是那个带1TB硬盘的那个,和本项目的硬件应该是一样的。

我想知道,如何设置可以解决加载比较大的内核,比如该3M的内核,或者该如何调整内核编译使得编译的内核更小(<262144 KBytes,根据日志发现)。 make menuconfig 的时候那些模块取消比较好。

内核加载过程的部分日志如下:


CFE version v1.0.4                                                              
BSP: 6.37.14.34 (r415984) based on BBP 1.0.37 for BCM947XX (32bit,SP,)          
Build Date: Tue Jul 22 14:47:07 CST 2014 (xqdevel@fanjialin-ct)                 
Copyright (C) 2000-2008 Broadcom Corporation.                                   

Init Arena                                                                      
Init Devs.                                                                      
Boot up from NOR flash...                                                       
Boot partition size = 262144(0x40000)                                           
Can't find nandflash! ccrev = 42, chipst= 0                                     
DDR Clock: 800 MHz                                                              
Info: DDR frequency set from clkfreq=1000,*800*                                 
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 6.37.14.34 (r415984) 
CPU type 0x0: 1000MHz                                                           
Tot mem: 262144 KBytes                                                          

CFE mem:    0x00F00000 - 0x0179FE88 (9043592)                                   
Data:       0x00F583E4 - 0x00F5891C (1336)                                      
BSS:        0x00F58928 - 0x00F9DE88 (284000)                                    
Heap:       0x00F9DE88 - 0x0179DE88 (8388608)                                   
Stack:      0x0179DE88 - 0x0179FE88 (8192)                                      
Text:       0x00F00000 - 0x00F4CCF0 (314608)                                    
Boot:       0x017A0000 - 0x017E0000                                             
Reloc:      I:00000000 - D:00000000                                             

Device eth0:  hwaddr 8C-BE-BE-2D-38-8D, ipaddr 192.168.1.1, mask 255.255.255.0  
        gateway not set, nameserver not set                                     
********** flag_tftp_bootup=on **********                                       
tftp network: ifconfig eth0 -addr=192.168.1.1 -mask=255.255.255.0 -gw=192.168.11
Device eth0:  hwaddr 8C-BE-BE-2D-38-8D, ipaddr 192.168.1.1, mask 255.255.255.0  
        gateway 192.168.1.1, nameserver not set                                 
kernel: boot -raw -z -addr=0x8000 -max=0x800000 192.168.1.2:vmlinuz             
Loader:raw Filesys:tftp Dev:eth0 File:192.168.1.2:vmlinuz Options:(null)        
Loading: .PANIC: out of memory!                                                 
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
PANIC: out of memory!                                                           
.. 1271708 bytes read                                                           
Failed.                                                                         
Could not load 192.168.1.2:vmlinuz: Error                                       
Digital core power voltage set to 1.0V                                          
Decompressing...done                                                            
Digital core power voltage set to 1.0V                                          
Decompressing...done                                                            
Found a ST compatible (Marconix) serial flash with 256 64KB blocks; total size B

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions