Chinaunix首页 | 论坛 | 博客
  • 博客访问: 396593
  • 博文数量: 380
  • 博客积分: 75
  • 博客等级: 民兵
  • 技术积分: 1925
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-05 15:35
文章分类

全部博文(380)

文章存档

2014年(1)

2013年(2)

2012年(19)

2011年(358)

我的朋友

分类:

2011-09-05 18:35:40

原文地址:基本内核编译 作者:chenxibing008

内核解压后停止

    2009年1月份,第一个发布版本出现,采用2.6.27.8版本,使用arm-vfp-linux-gnu 4.3.2的编译器,主机环境为Fedora 9。能够编译通过,却无法正常启动,在解压内核后就停止了。
    如下是串口终端的信息:

TFTP from server 192.168.7.110; our IP address is 192.168.7.236
Filename 'uImage'.
Load address: 0x80100000
Loading: #################################################################
         ################################################
done
Bytes transferred = 1648452 (192744 hex)
## Booting kernel from Legacy Image at 80100000 ...
   Image Name:   Linux-2.6.27.8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1648388 Bytes =  1.6 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...


Starting kernel ...

Uncompressing Linux............................................................................... done, booting the kernel.

    与2.6.25版本的启动信息对比,内核校验信息里面少了XIP选项。
    此时的内核启动参数是:
CONFIG_CMDLINE="root=/dev/nfsroot rw console=tty0 console=ttyS0,115200n81 nfsroot=192.168.7.231:/home/chenxibing/lpc3250/ltib/rootfs ip=192.168.7.236:192.168.7.1:192.168.7.1:255.255.255.0:nxp.zlgmcu.com:eth0:off"

    分析

    done, booting the kernel. 是从arch/arm/boot/compressed/misc.c文件中打印出来的。
    配置了内核的1HZ指示灯,可是主板的指示灯并没有闪烁,可见内核没有运行。应该是内核加载的问题。

    解决

    问题不在内核,而在U-Boor。由于之前使用2.6.25配套的u-boot,一些参数不同。更换成2.6.27.8的U-Boot,并设置相应的参数后问题解决,能够正常启动了。
    bootlog:
TFTP from server 192.168.7.110; our IP address is 192.168.7.236
Filename 'uImage'.
Load address: 0x80010000
Loading: #################################################################
         ################################################
done
Bytes transferred = 1648380 (1926fc hex)
## Booting kernel from Legacy Image at 80010000 ...
   Image Name:   Linux-2.6.27.8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1648316 Bytes =  1.6 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................ done, booting the kernel.
Linux version 2.6.27.8 (chenxibing@localhost.localdomain) (gcc version 4.3.2 (crosstool-NG-1.3.1) ) #8 PREEMPT Tue Feb 3 17:13:38 CST 2009
CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
Machine: Phytec 3250 board with the LPC3250 Microcontroller
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200n81 root=/dev/nfs rw nfsroot=192.168.1.51:/home/usb10132/dev/ltib-8-1-2-sv/rootfs ip=dhcp init=/sbin/init
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61396KB available (3128K code, 225K data, 104K init)
Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok


停在loop: module loaded处

    选中[ ] Check to enable MII support or leave disabled for RMII support 后会出现这个问题。


配置菜单的变量

PHY3250的两个变量,在c代码中实际上没有用到。
PHY3250_CPU_MODULE_1304_0
PHY3250_CPU_MODULE_1304_1

PHY3250的两外3个变量在C代码中也没有用到。
CONFIG_PHY3250_CARRIER_1305_01
CONFIG_PHY3250_CARRIER_1305_2
CONFIG_PHY3250_CARRIER_1305_3

只有LCD相关的几个变量用到了,用于处理背光和电源等差异。
CONFIG_PHY3250_LCD_PANEL
CONFIG_PHY3250_QVGA_PANEL_1307_0
CONFIG_PHY3250_QVGA_PANEL_1307_1


保留内核源代码
dist/lfs-5.1/kernel/kernel-common.tmpl

320 %Clean
321 rm -rf $RPM_BUILD_ROOT
322 if [ -z "$PKG_KERNEL_LEAVESRC" ]
323 then
324     rm -f $RPM_BUILD_DIR/linux
325 fi
阅读(310) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~