免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7323 | 回复: 13
打印 上一主题 下一主题

2.6内核为什么无法启动 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-07 18:21 |只看该作者 |倒序浏览
[求助] 大专生搞linux不容易啊

救命!!! 5555555
我在2410上运行2.6.13内核,可是怎么弄它都只到
Linux.............................................................................. done, booting the kernel.
就没有下文了,我做了好久,改了bootloader命令行中的console=ttySAC0可是问题依然存在,在网站上看到有人说是主频的问题,可是又有人说不是,说2.6的时实性很好.到底是不是频率的问题呢,如果是该怎么改呢??
我刚到公司,还在实用期,大专生找个工作不容易,斑竹和各位大侠您们多费心拉兄弟一把吧,帮我分析一下这到底是什么问题
我的邮箱是xt_lala@163.com
我的QQ是407642701
不论怎样路过的大侠都给我点思路啊

论坛徽章:
0
2 [报告]
发表于 2006-07-07 18:37 |只看该作者

回复 1楼 jojolin 的帖子

对了,对上面的问题我补充说明几点:

    我试过很多bootloader,uboot,vivi等等,只要加载2.6的都运行不起来,2.4的却都可以,我郁闷......

    我在网上看到很多人都遇到过类似的问题,可是人家都是忘了2.6把串口名改成了console=ttySAC0我好坏还知道这个为什么改了还不行呢,我崩溃..........

    我这几天追踪内核发现是在time_init中出现了问题,程序走入死循环,可是为什么我下了很多版本的2.6的内核却都是这样的结果.(我也不确定一定是这里惹的祸)  我悲哀............
   
    我还在试用期,这几天为了这个问题我进展甚微,明天经理让我一个人来加班,在不解决估计会让我滚蛋,所以这对我已经不是单纯的技术性障碍了,简直是人生的绊脚石,我一次次痛苦..........

    在很多网站发贴无人回复,我失望..........

   昨天我幕名在这里注册,希望大家拉我一把,先谢谢各位了!!我期待.............

     我的QQ 407642701
     
     我的邮箱 xt_lala@163.com

论坛徽章:
0
3 [报告]
发表于 2006-07-07 19:30 |只看该作者
心情可以理解,内容描述不清。

大家无法确定你遇到了什么问题。

论坛徽章:
0
4 [报告]
发表于 2006-07-08 18:41 |只看该作者
今天我暂时把问题解决了,写出来大家侃侃,有不足的请指正啊

   我把上面的问题再详细说明一下,我们再做一个数控的项目,看中了2.6的时实性好的特点所以选用2.6内核.我们用的ARM开发版是基于s3c2410核心板的,我用cgywin编译通过,可是用各种bootloader却都无法启动它,确切的说我也不知道是否启动,总之串口没有输出,只显示:
Uncompressing Linux.............................................................................. done, booting the kernel.
就没有下文了.


    网上很多人说2.6内核把串口名称更改了

    所以我的bootloader命令行也修改如下:
    "root=/dev/mtdblock2 load_ramdisk=0 init=/linuxrc console=ttySAC0 mem=64M devfs=mount"

    可是问题依然存在

     go on .......

    之后用仿真器追踪内核结果发现:

    start_kernel函数的time_init()中程序进入死循环~~

    我随之进入time_init()

    继续进入        system_timer->init();
     
    结果发现,我的fclk,pclk都不能得到正确的值,积存器正确,我拿笔都能算出来,可是他就是总出错,所以我一气之下把他们全部写死.

    具体如下:
       在\arch\arm\mach_s3c2410\s3c2410.c 中 搜索 fclk ;

       fclk = s3c2410_get_pll(MPLLCON, xtal);   //这是他原来的,结果不是我们想要的200MHZ


            fclk =200*1000*1000 ; // 这是我改的

       在\arch\arm\mach_s3c2410\time.c 中搜索 pclk:

        pclk =   clk_get_rate(clk);         //这是原来的

        pclk = 50*1000*1000;           //这是我改的

       当然这都是根据你的开发板的DATASHEET而定的
  
       我现在用的是FCLK : HCLK : PCLK  =  1 : 2 : 4 ,所以我分别写死为200M 100M 50M.

    之后再运行,这个野蛮的问题终于解决了 , 不过我还有一事不明 ,为什么他用原来的表达式就会取值错误呢 ???

下面是我的加载信息和启动后串口输出的信息:

[21474541.365000]  
Power on reset
Read chip id = ec76
Nand flash status = c0
Env.Os_Auto_Flag=ff
************************************
*                                  *
*     JHS2410 Board BIOS V1.00     *
*     Http://www.jhembed.com       *
*                                  *
************************************
NOR Flash Boot, Read ID is : 0x234b00bf
SST39VF1601 found

Please select function :
0 : USB download file
1 : Uart download file
2 : Write Nand flash with download file
3 : Load Pragram from Nand flash and run
4 : Erase Nand flash regions
5 : Write NOR flash with download file
6 : Set boot params
7 : Set AutoBoot parameter,1:linux 2:wince
0
USB download file, press Esc key to exit
Now USB is connected.
Now, Downloading [ADDRESS:30800000h,TOTAL:1162366]
ddNow, Checksum calculation
Download O.K.

Do you want to run? [y/n] : y
Uncompressing Linux.............................................................................. done, booting the kernel.
[21474536.480000] ************test**************

[21474536.480000] Linux version 2.6.13 (Admin@WinXP-SP2) (gcc version 2.95.4 20010319 (prerelease)) #73 Sat Jul 8 17:14:59 2006

[21474536.480000] CPU: ARM920T [41129200] revision 0 (ARMv4T)

[21474536.480000] Machine: SMDK2410

[21474536.480000] Warning: bad configuration page, trying to continue

[21474536.480000] Memory policy: ECC disabled, Data cache buffered

[21474536.480000] CPU S3C2410A (id 0x32410002)

[21474536.480000] S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz

[21474536.480000] S3C2410 Clocks, (c) 2004 Simtec Electronics

[21474536.480000] CPU0: D VIVT write-back cache

[21474536.480000] CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] Built 1 zonelists

[21474536.480000] Kernel command line: root=/dev/mtdblock2 load_ramdisk=0 init=/linuxrc console=ttySAC0,115200 mem=64M devfs=mount

[21474536.480000] irq: clearing pending ext status 00010300

[21474536.480000] irq: clearing pending ext status 00000200

[21474536.480000] irq: clearing subpending status 00000093

[21474536.480000] irq: clearing subpending status 00000092

[21474536.480000] PID hash table entries: 512 (order: 9, 8192 bytes)

[21474536.480000] S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz

[21474536.480000] S3C2410 Clocks, (c) 2004 Simtec Electronics

[21474536.480000] timer tcon=00090d00, tcnt a2c1, tcfg 00000200,00001030, usec 00001eb8

[21474536.480000] timer tcon=00590d00, tcnt a2c1, tcfg 00000200,00001030, usec 00001eb8

[21474536.480000] Console: colour dummy device 80x30

[21474536.485000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

[21474536.525000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

[21474536.700000] Memory: 64MB = 64MB total

[21474536.700000] Memory: 62336KB available (1902K code, 506K data, 92K init)

[21474536.820000] Mount-cache hash table entries: 512

[21474536.845000] CPU: Testing write buffer coherency: ok

[21474536.900000] Linux NoNET1.0 for Linux 2.6

[21474536.910000] S3C2410: Initialising architecture

[21474537.010000] SCSI subsystem initialized

[21474537.025000] usbcore: registered new driver usbfs

[21474537.030000] usbcore: registered new driver hub

[21474537.090000] NetWinder Floating Point Emulator V0.97 (double precision)

[21474537.195000] devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

[21474537.200000] devfs: boot_options: 0x1

[21474537.205000] NTFS driver 2.1.23 [Flags: R/W].

[21474537.210000] JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.

[21474540.655000] s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410

[21474540.670000] s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410

[21474540.685000] s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410

[21474540.700000] io scheduler noop registered

[21474540.705000] io scheduler anticipatory registered

[21474540.780000] RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

[21474540.820000] loop: loaded (max 8 devices)

[21474540.825000] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

[21474540.835000] ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx

[21474540.890000] Probing YL-9200 Application Flash at physical address 0x10000000 (16-bit buswidth)

[21474540.925000] usbmon: debugfs is not available

[21474540.935000] s3c2410-ohci s3c2410-ohci: S3C24XX OHCI

[21474540.950000] s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1

[21474540.955000] s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000

[21474541.030000] hub 1-0:1.0: USB hub found

[21474541.035000] hub 1-0:1.0: 2 ports detected

[21474541.050000] Initializing USB Mass Storage driver...

[21474541.060000] usbcore: registered new driver usb-storage

[21474541.065000] USB Mass Storage support registered.

[21474541.075000] usbcore: registered new driver usbhid

[21474541.080000] drivers/usb/input/hid-core.c: v2.01:USB HID core driver

[21474541.100000] dummy_hcd dummy_hcd: USB Host+Gadget Emulator, driver 02 May 2005

[21474541.105000] dummy_hcd dummy_hcd: Dummy host controller

[21474541.115000] dummy_hcd dummy_hcd: new USB bus registered, assigned bus number 2

[21474541.140000] hub 2-0:1.0: USB hub found

[21474541.145000] hub 2-0:1.0: 1 port detected

[21474541.165000] mice: PS/2 mouse device common for all mice

[21474541.170000] i2c /dev entries driver

[21474541.340000] VFS: Cannot open root device "mtdblock2" or unknown-block(0,0)

[21474541.350000] Please append a correct "root=" boot option

[21474541.355000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


现在还不能挂载文件,不过启动的问题暂时解决了 ,  呵呵 好开心

其实我现在着实是个菜鸟,刚刚毕业,希望大家多提意见,看我这样合适吗? 小弟再次谢了

论坛徽章:
0
5 [报告]
发表于 2006-07-08 20:20 |只看该作者
楼主是什么环境?
VFS没挂上?

[ 本帖最后由 1jjk 于 2006-7-9 00:06 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2006-07-08 23:58 |只看该作者
我也遇到楼主类似的问题了,不过好象不大一样,求助各位!
我用BLOB启动Kernel 2.4,打印出“Uncompressing linux......Done!Booting kernel.."后就没有下文了,这和楼主类似,但是我感觉我的是KERNEL自解压成功后就找不到解压的kernel入口了,可能是这样,因为我的根本就没有进入到Start_kernel去(若进入便有我的打印消息,只能串口调试),而且我觉得也不会是因为处理器结构不匹配,因为若有错误的话也应该打印出P,或者A字符出来,但是没有,所以我不明白还有什么其他原因会造成这样,求助各位,谢谢。

论坛徽章:
0
7 [报告]
发表于 2006-07-10 08:44 |只看该作者
楼上的兄弟,我觉的你说的不一定对,你想,如果你一进start_kernel去就打印
printk("*test*");肯定是打印不出来啊,我做上面的调试的时候也试过,因为它的console_init()函数初始化串口还没有执行啊,所以如果这之前你的程序已经跑飞了你也就不得而之了.

论坛徽章:
0
8 [报告]
发表于 2006-07-10 09:17 |只看该作者

回复 6楼 pmic 的帖子

兄弟,我看你在很多论坛上都在我楼下发了贴,看来你也是很着急啊
   你用的是Kernel 2.4是吧,你的问题我在研究2.4的时候也遇到过,不过我不知道你是不和我一样是研究ARM的,我们当时是把他移植到基于ARM9处理器的S3C2410开发板上,如果你也是的话,可以在:
\kernel\include\asm-arm\arch-s3c2410  time.h文件的230行左右的结构体中加一句:
struct timer_counts count_values[] = {
        {  16500,         5156 },
        {  20000,         6250 },
        {  33000,        10312 },
        {  50000,        15626 },
        {  50700,       15844 },          // rework 06,5,22  这是要加的
        {  66000,        20625 },
        {  70000,        21875 },
        {  75000,        23437 },
        {  80000,        25000 },
        {  90000,        28125 },
        { 100000,        31250 },
        {      0,            0 }        /* last entry */
};
这样他就可以在2410上启动了.

     可能你和我用到的不是一样,不过希望给你点思路,哎~~我刚出道真觉得这条路到处都是障碍啊,good luck for you !

论坛徽章:
0
9 [报告]
发表于 2006-07-10 11:18 |只看该作者

回复 5楼 1jjk 的帖子

是啊,我的VFS还没有挂上,现在我应该先下个rootfs对吧?

    我是在windows下安装了模拟linux环境的软件cygwin.
    我的那个bootloader可能有些怪,是我们公司前辈自己搞的,其实和UBOOT,VIVI
一个效果.

论坛徽章:
0
10 [报告]
发表于 2006-07-12 12:36 |只看该作者
我现在要用ramdisk的方法挂载文件系统.
可是一到这里就停下来了.
哪位前辈出来给点建议啊.
以下是我的启动信息和一些调试信息:
Uncompressing Linux...................................................................... done, booting the kernel.
[21474536.480000] ************test**************

[21474536.480000] Linux version 2.6.13 (Admin@WinXP-SP2) (gcc version 2.95.4 20010319 (prerelease)) #107 Wed Jul 12 11:26:33 2006

[21474536.480000] CPU: ARM920T [41129200] revision 0 (ARMv4T)

[21474536.480000] Machine: SMDK2410

[21474536.480000] Warning: bad configuration page, trying to continue

[21474536.480000] Memory policy: ECC disabled, Data cache buffered

[21474536.480000] CPU S3C2410A (id 0x32410002)

[21474536.480000] S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz

[21474536.480000] S3C2410 Clocks, (c) 2004 Simtec Electronics

[21474536.480000] CPU0: D VIVT write-back cache

[21474536.480000] CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] Built 1 zonelists

[21474536.480000] Kernel command line: root=/dev/ram0 console=ttySAC0,115200

[21474536.480000] irq: clearing pending ext status 00018200

[21474536.480000] irq: clearing pending ext status 00010000

[21474536.480000] irq: clearing pending ext status 00010200

[21474536.480000] irq: clearing subpending status 00000093

[21474536.480000] irq: clearing subpending status 00000092

[21474536.480000] PID hash table entries: 128 (order: 7, 2048 bytes)

[21474536.480000] timer tcon=00090d00, tcnt a2c1, tcfg 00000200,00001030, usec 00001eb8

[21474536.480000] Console: colour dummy device 80x30

[21474536.485000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

[21474536.495000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

[21474536.540000] Memory: 16MB = 16MB total

[21474536.545000] Memory: 13952KB available (1637K code, 493K data, 92K init)

[21474536.655000] Mount-cache hash table entries: 512

[21474536.680000] CPU: Testing write buffer coherency: ok

[21474536.715000]

[21474536.715000]

[21474536.715000] **populate_rootfs has been called**

[21474536.715000]

[21474536.750000] Linux NoNET1.0 for Linux 2.6

[21474536.755000] S3C2410: Initialising architecture

[21474536.855000] SCSI subsystem initialized

[21474536.865000] usbcore: registered new driver usbfs

[21474536.875000] usbcore: registered new driver hub

[21474536.935000] NetWinder Floating Point Emulator V0.97 (double precision)

[21474537.035000] devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

[21474537.045000] devfs: boot_options: 0x1

[21474537.050000] JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.

[21474540.495000] s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410

[21474540.505000] s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410

[21474540.520000] s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410

[21474540.535000] io scheduler noop registered

[21474540.540000] io scheduler anticipatory registered

[21474540.615000] RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize

[21474540.665000] loop: loaded (max 8 devices)

[21474540.665000] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

[21474540.675000] ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx

[21474540.725000] Probing YL-9200 Application Flash at physical address 0x10000000 (16-bit buswidth)

[21474540.770000] usbmon: debugfs is not available

[21474540.780000] s3c2410-ohci s3c2410-ohci: S3C24XX OHCI

[21474540.795000] s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1

[21474540.805000] s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000

[21474540.880000] hub 1-0:1.0: USB hub found

[21474540.885000] hub 1-0:1.0: 2 ports detected

[21474540.900000] Initializing USB Mass Storage driver...

[21474540.910000] usbcore: registered new driver usb-storage

[21474540.915000] USB Mass Storage support registered.

[21474540.925000] usbcore: registered new driver usbhid

[21474540.930000] drivers/usb/input/hid-core.c: v2.01:USB HID core driver

[21474540.950000] dummy_hcd dummy_hcd: USB Host+Gadget Emulator, driver 02 May 2005

[21474540.960000] dummy_hcd dummy_hcd: Dummy host controller

[21474540.970000] dummy_hcd dummy_hcd: new USB bus registered, assigned bus number 2

[21474540.995000] hub 2-0:1.0: USB hub found

[21474541.000000] hub 2-0:1.0: 1 port detected

[21474541.020000] mice: PS/2 mouse device common for all mice

[21474541.025000] i2c /dev entries driver

[21474541.050000]

[21474541.050000]

[21474541.050000] ***********prepare_namespace has been called***************

[21474541.050000]

[21474541.095000]

[21474541.095000]

[21474541.095000] *******initrd_load has been called********

[21474541.095000]

[21474541.190000]

[21474541.190000]

[21474541.190000] *****rd_load_image has been called******

[21474541.190000]

[21474541.345000] Kernel panic - not syncing: **2**VFS: Unable to mount root fs on unknown-block(1,0)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP