当前位置: 技术问答>linux和unix
求救s3c2443 linux2.6移植,停在解压缩完kernel
来源: 互联网 发布时间:2016-08-08
本文导语: 我编译出一个kernel 大小1MB 烧到板子smdk2443 processor s3c2443 64MB SDRAM 128MB NAND flash 在解压缩完的时候停住了 下面一堆数字为head.S DEBUG讯息. 讯息如下: U-Boot 1.1.6 (Feb 12 2010 - 10:47:37) for SMDK2443 CPU: S3C2443@534MHz Fc...
我编译出一个kernel 大小1MB
烧到板子smdk2443
processor s3c2443
64MB SDRAM
128MB NAND flash
在解压缩完的时候停住了
下面一堆数字为head.S DEBUG讯息.
讯息如下:
U-Boot 1.1.6 (Feb 12 2010 - 10:47:37) for SMDK2443
CPU: S3C2443@534MHz
Fclk = 534MHz, Hclk = 133MHz, Pclk = 66MHz
Board: SMDK2443 Mobile SDRAM
DRAM: 64 MB
NAND: 128 MB
In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x100000, size 0x300000
3145728 bytes read: OK
NAND read: device 0 offset 0x400000, size 0x100000
1048576 bytes read: OK
## Booting image at 30008000 ...
Image Name: linux-2.6.23
Created: 2010-03-04 6:45:02 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1016424 Bytes = 992.6 kB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK
## Loading Ramdisk Image at 30800000 ...
Image Name: ramdisk
Created: 2010-03-01 3:59:23 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 143486 Bytes = 140.1 kB
Load Address: 30800000
Entry Point: 30800000
Verifying Checksum ... OK
Starting kernel ...
Uncompressing Linux.................................................................... done, booting the kernel.
41129200:0000043C:C000507B
301196E8-3031A0E8>30008000
3031A0E8
30008000: E3A00000 E3A010C1 E59F2108 E321F0D3 EE109F10 EB0000B3 E1B0A005 0A00005C
30008020: EB0000C8 E1B08005 0A00006A EB0000D7 EB000010 E59FD0E8 E28FE000 E28AF010
30008040: E3800002 E3A0501F EE035F10 EE024F10 EA000002 E1A00000 E1A00000 E1A00000
30008060: E1A00000 EE010F10 EE103F10 E1A03003 E1A03003 E1A0F00D E59F409C E1A00004
30008080: E3A03000 E2806901 E4803004 E4803004 E4803004 E4803004 E1300006 1AFFFFF9
300080A0: E59A7008 E1A06A2F E1873A06 E7843106 E2840A03 E5A03000 E59F6060 E2800004
300080C0: E0846926 E1500006 E2833601 94803004 9AFFFFFB E2840A03 E3876203 E5806000
300080E0: E59A700C E5983008 E0840003 E2633901 E3530B02 83A03B02 E0806003 E5983004
上面数字为
processor id(arm920T) : architecture id(smdk2443) : control reg
decompressed kernel start - decompressed kernel end > kernel execution address
end of kernel
dump 256 bytes at start of kernel
我的板子设定如下:
bootcmd=nand read 30008000 100000 300000; nand read 30800000 400000 100000; bootm 30008000 30800000
bootargs=/dev/ram0 rw initrd=30800000,400000 mem=64M ramdisk=143486 init=/linuxrc console=ttySAC0,115200n8 mtdparts=smdk2443-nand:256K(misc),5M(recovery),6M(Kernel),1MB(Ramdisk),60MB(System),20MB(cache),3MB(userdata),-(unused)
我试过用printk在main.c的start_kernel function,发现没显示出来,就表示没跑起来,接下来要怎DEBUG
烧到板子smdk2443
processor s3c2443
64MB SDRAM
128MB NAND flash
在解压缩完的时候停住了
下面一堆数字为head.S DEBUG讯息.
讯息如下:
U-Boot 1.1.6 (Feb 12 2010 - 10:47:37) for SMDK2443
CPU: S3C2443@534MHz
Fclk = 534MHz, Hclk = 133MHz, Pclk = 66MHz
Board: SMDK2443 Mobile SDRAM
DRAM: 64 MB
NAND: 128 MB
In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x100000, size 0x300000
3145728 bytes read: OK
NAND read: device 0 offset 0x400000, size 0x100000
1048576 bytes read: OK
## Booting image at 30008000 ...
Image Name: linux-2.6.23
Created: 2010-03-04 6:45:02 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1016424 Bytes = 992.6 kB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK
## Loading Ramdisk Image at 30800000 ...
Image Name: ramdisk
Created: 2010-03-01 3:59:23 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 143486 Bytes = 140.1 kB
Load Address: 30800000
Entry Point: 30800000
Verifying Checksum ... OK
Starting kernel ...
Uncompressing Linux.................................................................... done, booting the kernel.
41129200:0000043C:C000507B
301196E8-3031A0E8>30008000
3031A0E8
30008000: E3A00000 E3A010C1 E59F2108 E321F0D3 EE109F10 EB0000B3 E1B0A005 0A00005C
30008020: EB0000C8 E1B08005 0A00006A EB0000D7 EB000010 E59FD0E8 E28FE000 E28AF010
30008040: E3800002 E3A0501F EE035F10 EE024F10 EA000002 E1A00000 E1A00000 E1A00000
30008060: E1A00000 EE010F10 EE103F10 E1A03003 E1A03003 E1A0F00D E59F409C E1A00004
30008080: E3A03000 E2806901 E4803004 E4803004 E4803004 E4803004 E1300006 1AFFFFF9
300080A0: E59A7008 E1A06A2F E1873A06 E7843106 E2840A03 E5A03000 E59F6060 E2800004
300080C0: E0846926 E1500006 E2833601 94803004 9AFFFFFB E2840A03 E3876203 E5806000
300080E0: E59A700C E5983008 E0840003 E2633901 E3530B02 83A03B02 E0806003 E5983004
上面数字为
processor id(arm920T) : architecture id(smdk2443) : control reg
decompressed kernel start - decompressed kernel end > kernel execution address
end of kernel
dump 256 bytes at start of kernel
我的板子设定如下:
bootcmd=nand read 30008000 100000 300000; nand read 30800000 400000 100000; bootm 30008000 30800000
bootargs=/dev/ram0 rw initrd=30800000,400000 mem=64M ramdisk=143486 init=/linuxrc console=ttySAC0,115200n8 mtdparts=smdk2443-nand:256K(misc),5M(recovery),6M(Kernel),1MB(Ramdisk),60MB(System),20MB(cache),3MB(userdata),-(unused)
我试过用printk在main.c的start_kernel function,发现没显示出来,就表示没跑起来,接下来要怎DEBUG
|
参考:http://www.bmrtech.com/old/xiazai/linux.pdf
http://blog.ednchina.com/Upload/Blog/96939946-f5f1-48a4-a545-6ed6520bb568.pdf
|
------------------------------
|
1. 先要找出41129200:0000043C:C000507B
301196E8-3031A0E8>30008000
3031A0E8
30008000: E3A00000 E3A010C1 E59F2108 E321F0D3 EE109F10 EB0000B3 E1B0A005 0A00005C
30008020: EB0000C8 E1B08005 0A00006A EB0000D7 EB000010 E59FD0E8 E28FE000 E28AF010
30008040: E3800002 E3A0501F EE035F10 EE024F10 EA000002 E1A00000 E1A00000 E1A00000
30008060: E1A00000 EE010F10 EE103F10 E1A03003 E1A03003 E1A0F00D E59F409C E1A00004
30008080: E3A03000 E2806901 E4803004 E4803004 E4803004 E4803004 E1300006 1AFFFFF9
300080A0: E59A7008 E1A06A2F E1873A06 E7843106 E2840A03 E5A03000 E59F6060 E2800004
300080C0: E0846926 E1500006 E2833601 94803004 9AFFFFFB E2840A03 E3876203 E5806000
300080E0: E59A700C E5983008 E0840003 E2633901 E3530B02 83A03B02 E0806003 E5983004
这些打印是从哪里来得?
2. 有可能是内存有问题
在u-boot下做下内存测试
3. 还有一种可能是串口没有正常工作, 这个情况要检查下console=ttySAC0,115200n8这个参数是否正确(和开发板的资料对下).另外要检查串口的驱动是否有问题
301196E8-3031A0E8>30008000
3031A0E8
30008000: E3A00000 E3A010C1 E59F2108 E321F0D3 EE109F10 EB0000B3 E1B0A005 0A00005C
30008020: EB0000C8 E1B08005 0A00006A EB0000D7 EB000010 E59FD0E8 E28FE000 E28AF010
30008040: E3800002 E3A0501F EE035F10 EE024F10 EA000002 E1A00000 E1A00000 E1A00000
30008060: E1A00000 EE010F10 EE103F10 E1A03003 E1A03003 E1A0F00D E59F409C E1A00004
30008080: E3A03000 E2806901 E4803004 E4803004 E4803004 E4803004 E1300006 1AFFFFF9
300080A0: E59A7008 E1A06A2F E1873A06 E7843106 E2840A03 E5A03000 E59F6060 E2800004
300080C0: E0846926 E1500006 E2833601 94803004 9AFFFFFB E2840A03 E3876203 E5806000
300080E0: E59A700C E5983008 E0840003 E2633901 E3530B02 83A03B02 E0806003 E5983004
这些打印是从哪里来得?
2. 有可能是内存有问题
在u-boot下做下内存测试
3. 还有一种可能是串口没有正常工作, 这个情况要检查下console=ttySAC0,115200n8这个参数是否正确(和开发板的资料对下).另外要检查串口的驱动是否有问题
|
这种情况注意下开发板的编号,这个没传对好像就会这样~
|
subs r0, r0, r1 @ calculate the delta offset
kputc #'3'
kputc #'n'
kphex r0, 8
kputc #'n'
kphex r1, 8
@ if delta is zero, we are
beq not_relocated
not_relocated的tag在哪里?这里beq导致死循环?查一下当时的flag是什么?
只用X86,没怎么接触过ARM,希望能帮上忙。
kputc #'3'
kputc #'n'
kphex r0, 8
kputc #'n'
kphex r1, 8
@ if delta is zero, we are
beq not_relocated
not_relocated的tag在哪里?这里beq导致死循环?查一下当时的flag是什么?
只用X86,没怎么接触过ARM,希望能帮上忙。
|
先看看串口是不是配对了吧,先不要考虑那么复杂,从简单的问题开始差。