QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3698|回复: 10

请教一个关于uclinux启动的问题

[复制链接]
发表于 2005-6-13 14:50:32 | 显示全部楼层 |阅读模式
我的板子是4Mflash,16M SDRAM ,4510的CPU,一个COM1口,两个8201链接两个网口,我编译了一个uClinux的内核,但是放到SDRAM中一直启动不了,一个问题:告诉page_alloc.c有bug,第二个问题:当初始化网口的时候,AXD里面报错有内部断点,哪位能告诉我问题可能在什么地方,或者哪位大侠能给一个移植的详细方案啊(包括哪些文件需要修改,哪些文件和硬件电路有关什么的),我折腾这个内核都半个月了,还没有成效,我的配置如下:
CPU:S3C4510B;Flash:MBM29LV160   2片,32位,4M; SDRAM:HY57V641620  2片,32位,16M;
串口:一个COM1,MAX232;网口:两个,两片RTL8201,物理地址通过其连接的LED设定,分别为00001、00010;
JTAG:20脚;复位电路:74HC04

先谢过了!
发表于 2005-6-13 15:19:08 | 显示全部楼层
这个是以前写的 for ARM Evaluator-7T 板子的移植,都是 4510 的芯片,应该差不多。
供你参考。你的 uclinux 已经能从串口输出了么?

3.2 uClinux 的内核配置
在编译 uClinux 的内核之前,首先需要通过 make menuconfig 来配置内核。为了能够使得最后生成的内核在 512k 的 RAM 中运行,这里只能保留那些必须的编译选项,而将其他可有可无的删去。uClinux 在 Evaluator-7T 上的配置如下:
1) 在 System Type 中,选定
(Samsung) ARM system type
[ ] Generate big endian code
  • Set flash/sdram size and base addr   
    (00000000) (S)DRAM Base Address
    (00080000) (S)DRAM Size
    (01800000) FLASH Base Address
    (00080000) FLASH Size
    这里,选择了 Samsung 芯片,编译时生成 little endian code,以及设置了flash/sdram 相应的起始地址和大小。
    2) 在 File systems 中,选定
  • ROM file system support  
    这里,选择了 ROM fs 的文件系统支持,其他的文件系统暂时不选。
    3) 在 Character devices 中,选定
  • Samsung serial port support
  •    Support for console on Samsung serial port
    这里,选择了 Samsung 串口支持,这样就可以通过串口将内核打印的信息传递给主机。
    上面的这些选项可以说是一个能够让 uClinux 运行起来的最小配置了。
  • 回复

    使用道具 举报

     楼主| 发表于 2005-6-14 10:36:55 | 显示全部楼层
    我的串口确认有打印信息,因为uclinux启动的一部分信息是打印出来了的,但是我的make menuconfig中没有

    [ ] Generate big endian code
  • Set flash/sdram size and base addr
    (00000000) (S)DRAM Base Address
    (00080000) (S)DRAM Size
    (01800000) FLASH Base Address
    (00080000) FLASH Size
    只有
    (Samsung) ARM system type 啊,我编译生成image.ram后,通过仿真器直接把这个文件down到0x8000的地址中(sdram),然后把pc指向0x8000,直接运行就没有通过bootloader了。同时,我修改了linux-2.4.x/include/asm-armnommu/arch-samsung/hardware.h中关于DRAM、Flash的地址和大小的。
  • 回复

    使用道具 举报

    发表于 2005-6-14 11:31:12 | 显示全部楼层
    把启动的信息贴出来看看,不然谁知道问题出在哪儿啊?   
    回复

    使用道具 举报

     楼主| 发表于 2005-6-16 21:30:08 | 显示全部楼层
    我的出错信息为Linux version 2.4.17-uc0 ([email protected]) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #2 Thu Jun 2 10:13:11 CST 2005
    Processor: Samsung S3C4510B revision 6
    Architecture: SNDS100
    On node 0 totalpages: 2048
    zone(0): 0 pages.
    zone(1): 2048 pages.
    zone(2): 0 pages.
    Kernel command line: root=/dev/rom0
    Calibrating delay loop... 49.86 BogoMIPS
    Memory: 8MB = 8MB total
    Memory: 6268KB available (1555K code, 153K data, 40K init)
    Dentry-cache hash table entries: 1024 (order: 1, 8192 bytes)
    Inode-cache hash table entries: 512 (order: 0, 4096 bytes)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
    POSIX conformance testing by UNIFIX
    Linux NET4.0 for Linux 2.4
    Based upon Swansea University Computer Society NET3.039
    Initializing RT netlink socket
    Starting kswapd
    Samsung S3C4510 Serial driver version 0.9 (2001-12-27) with no serial options enabled
    ttyS00 at 0x3ffd000 (irq = 5) is a S3C4510B
    ttyS01 at 0x3ffe000 (irq = 7) is a S3C4510B
    block: 64 slots per queue, batch=16
    RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
    Blkmem copyright 1998,1999 D. Jeff Dionne
    Blkmem copyright 1998 Kenneth Albanowski
    Blkmem 1 disk images:
    0: C2310-196F0F [VIRTUAL C2310-196F0F] (RO)
    Samsung S3C4510 Ethernet driver version 0.1 (2002-02-20) <[email protected]>
    eth0: 00:40:95:36:35:34
    就不动了,然后AXD里报错:
    DBE Warning 00256:Execution stopped,because of an unknown breakpoint(this indicates an internal error),
    这是什么原因呢,我没有设断点啊
    回复

    使用道具 举报

     楼主| 发表于 2005-6-16 21:31:49 | 显示全部楼层
    我重新找了个文件编译了一次,又有另外的错了,但是我没有改什么东西,只是把过程从新做了一次:
    Linux version 2.4.17-uc0 ([email protected]) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #2 Thu Jun 2 10:13:11 CST 2005
    Processor: Samsung S3C4510B revision 6
    Architecture: SNDS100
    On node 0 totalpages: 2048
    zone(0): 0 pages.
    zone(1): 2048 pages.
    zone(2): 0 pages.
    Kernel command line: root=/dev/rom0
    Calibrating delay loop... 49.86 BogoMIPS
    Memory: 8MB = 8MB total
    Memory: 6268KB available (1555K code, 153K data, 40K init)
    Dentry-cache hash table entries: 1024 (order: 1, 8192 bytes)
    Inode-cache hash table entries: 512 (order: 0, 4096 bytes)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
    POSIX conformance testing by UNIFIX
    Linux NET4.0 for Linux 2.4
    Based upon Swansea University Computer Society NET3.039
    Initializing RT netlink socket
    Starting kswapd
    Unhandled fault: alignment exception (13) at 0x00000001
    fault-common.c 96
    Internal error: Oops: 0
    CPU: 0
    pc : [<00019e44>]    lr : [<00019dc8>]    Not tainted
    sp : 001fdedc  ip : 00000000  fp : 001fdf2c
    r10: 00010f00  r9 : fffffff5  r8 : 001fc000
    r7 : 001fc000  r6 : 0019ff0c  r5 : 001f0000  r4 : 001fc000
    r3 : 0a00000e  r2 : 001a280c  r1 : 00000005  r0 : 001a17ec
    Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  Segment kernel
    Control: 0
    Process swapper (pid: 1, stackpage=001fd000)
    Stack:
    001fdec0:                            00019dc8  00019e44 20000013 ffffffff 40000013
    001fdee0: ffffffff 00000009 00000000 001fdf48  00199ef8 00013314 00010f00 00000000
    001fdf00: 00010e00 00010e00 00010ec0 0019ff0c  001fc000 00012c80 00000078 00000009
    001fdf20: 001fdf3c 001fdf30 0001649c 00019d70  00000000 001fdf40 00012ae0 00016490
    001fdf40: 00010e00 00018230 00010f00 00000000  00010e00 00031610 00010e00 00010ec0
    001fdf60: 0019ff0c 0019d92c 001bd578 0019ff08  00000009 001fdf9c 00010ec0 00199ef8
    001fdf80: 00060154 00013e8c 20000013 00010f00  001fdfb4 001fdfa0 0000bfa4 00013e7c
    001fdfa0: 000110b0 000110f8 001fdfcc 001fdfb8  00008874 0000bf74 00000800 001bd578
    001fdfc0: 001fdfdc 001fdfd0 000088b4 00008868  001fdffc 001fdfe0 00012064 0000889c
    001fdfe0: 00000800 001bd578 0019ff0c 0019d92c  00000000 001fe000 00013ea4 00012064
    Backtrace:
    Function entered at [<00019d60>] from [<0001649c>]
    Function entered at [<00016480>] from [<00012ae0>]
    Code: e3530000 0a00000e (e5930024) e3500000 0a00000b
    Kernel panic: Attempted to kill init!

    大侠,你一定帮帮我啊,我都搞得想哭了!
    回复

    使用道具 举报

     楼主| 发表于 2005-6-16 21:32:39 | 显示全部楼层
    不好意思,我忘了输入我的名字了,上面的帖子都是我发的,谢谢!
    回复

    使用道具 举报

    发表于 2005-6-17 09:56:40 | 显示全部楼层
    Blkmem copyright 1998,1999 D. Jeff Dionne
    Blkmem copyright 1998 Kenneth Albanowski
    Blkmem 1 disk images:
    0: C2310-196F0F [VIRTUAL C2310-196F0F] (RO)
    Samsung S3C4510 Ethernet driver version 0.1 (2002-02-20) <[email protected]>
    eth0: 00:40:95:36:35:34
    就不动了,然后AXD里报错:

    根据这里的情况看,你先试试把 network support 部分在 make menuconfig 的时候不选,看看能否启动到 shell 里面?
    回复

    使用道具 举报

     楼主| 发表于 2005-7-5 12:25:25 | 显示全部楼层
    [quote:d1ba0a730f="Anomymous"]我重新找了个文件编译了一次,又有另外的错了,但是我没有改什么东西,只是把过程从新做了一次:
    Linux version 2.4.17-uc0 ([email protected]) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #2 Thu Jun 2 10:13:11 CST 2005
    Processor: Samsung S3C4510B revision 6
    Architecture: SNDS100
    On node 0 totalpages: 2048
    zone(0): 0 pages.
    zone(1): 2048 pages.
    zone(2): 0 pages.
    Kernel command line: root=/dev/rom0
    Calibrating delay loop... 49.86 BogoMIPS
    Memory: 8MB = 8MB total
    Memory: 6268KB available (1555K code, 153K data, 40K init)
    Dentry-cache hash table entries: 1024 (order: 1, 8192 bytes)
    Inode-cache hash table entries: 512 (order: 0, 4096 bytes)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
    POSIX conformance testing by UNIFIX
    Linux NET4.0 for Linux 2.4
    Based upon Swansea University Computer Society NET3.039
    Initializing RT netlink socket
    Starting kswapd
    Unhandled fault: alignment exception (13) at 0x00000001
    fault-common.c 96
    Internal error: Oops: 0
    CPU: 0
    pc : [<00019e44>]    lr : [<00019dc8>]    Not tainted
    sp : 001fdedc  ip : 00000000  fp : 001fdf2c
    r10: 00010f00  r9 : fffffff5  r8 : 001fc000
    r7 : 001fc000  r6 : 0019ff0c  r5 : 001f0000  r4 : 001fc000
    r3 : 0a00000e  r2 : 001a280c  r1 : 00000005  r0 : 001a17ec
    Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  Segment kernel
    Control: 0
    Process swapper (pid: 1, stackpage=001fd000)
    Stack:
    001fdec0:                            00019dc8  00019e44 20000013 ffffffff 40000013
    001fdee0: ffffffff 00000009 00000000 001fdf48  00199ef8 00013314 00010f00 00000000
    001fdf00: 00010e00 00010e00 00010ec0 0019ff0c  001fc000 00012c80 00000078 00000009
    001fdf20: 001fdf3c 001fdf30 0001649c 00019d70  00000000 001fdf40 00012ae0 00016490
    001fdf40: 00010e00 00018230 00010f00 00000000  00010e00 00031610 00010e00 00010ec0
    001fdf60: 0019ff0c 0019d92c 001bd578 0019ff08  00000009 001fdf9c 00010ec0 00199ef8
    001fdf80: 00060154 00013e8c 20000013 00010f00  001fdfb4 001fdfa0 0000bfa4 00013e7c
    001fdfa0: 000110b0 000110f8 001fdfcc 001fdfb8  00008874 0000bf74 00000800 001bd578
    001fdfc0: 001fdfdc 001fdfd0 000088b4 00008868  001fdffc 001fdfe0 00012064 0000889c
    001fdfe0: 00000800 001bd578 0019ff0c 0019d92c  00000000 001fe000 00013ea4 00012064
    Backtrace:
    Function entered at [<00019d60>] from [<0001649c>]
    Function entered at [<00016480>] from [<00012ae0>]
    Code: e3530000 0a00000e (e5930024) e3500000 0a00000b
    Kernel panic: Attempted to kill init!

    大侠,你一定帮帮我啊,我都搞得想哭了![/quote]
    回复

    使用道具 举报

     楼主| 发表于 2005-7-14 16:42:39 | 显示全部楼层
    如果连接串口,系统就复位可能是什么原因?
    请教大侠
    回复

    使用道具 举报

     楼主| 发表于 2005-7-19 15:00:53 | 显示全部楼层
    S3C4510B只提供了一个网络接口,而你却需要操作两个网络口,这本身就有问题
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    GMT+8, 2024-6-7 13:31 , Processed in 0.128978 second(s), 16 queries .

    © 2021 Powered by Discuz! X3.5.

    快速回复 返回顶部 返回列表