主题 : linux2.6.32.2移植yaffs2出错,帮忙看一下,新手,谢谢 复制链接 | 浏览器收藏 | 打印
人类最伟大的品质在于坚持,所有的目标和梦想都会因此而实现!
级别: 新手上路
UID: 16777
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
综合积分: 22 分
注册时间: 2010-03-21
最后登录: 2013-05-18
楼主  发表于: 2010-06-05 17:19

 linux2.6.32.2移植yaffs2出错,帮忙看一下,新手,谢谢

load Image of Linux...Uncompressing Linux.................................................................................................................................... done, booting the kernel.
Linux version 2.6.32.2 (root@yangjie-desktop) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #8 Sat Jun 5 16:16:31 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Friendly ARM Mini2440 development board
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
PID hash table entries: 256 (order: -2, 1024 bytes)
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: 60468KB available (3668K code, 418K data, 168K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:85
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
yaffs Jun  5 2010 16:16:07 Installing.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
leds    initialized
buttons    initialized
pwm    initialized
adc    initialized
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=4, 39ns Twrph0=8 79ns, Twrph1=8 79ns
Unable to handle kernel NULL pointer dereference at virtual address 00000018
pgd = c0004000
[00000018] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.32.2 #8)
PC is at s3c24xx_nand_probe+0x2d8/0x514
LR is at s3c24xx_nand_probe+0x1a4/0x514
pc : [<c01f288c>]    lr : [<c01f2758>]    psr: 60000013
sp : c3823f08  ip : 00000000  fp : 00000001
r10: 00000000  r9 : 00000000  r8 : 00000000
r7 : c03ed388  r6 : 00000000  r5 : c39b3980  r4 : c388f800
r3 : 00000001  r2 : c388f988  r1 : c4c00000  r0 : 00000002
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: c000717f  Table: 30004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc3822270)
Stack: (0xc3823f08 to 0xc3824000)
3f00:                   00000000 c00dc98c c38522d0 00000000 00000000 c03ed390
3f20: c03ed390 c0403e08 c39b0b40 c04028c0 00000000 00000000 00000000 c01cda80
3f40: c03ed390 c01ccc6c c03ed390 c03ed3c4 c0403e08 c39b0b40 c04028c0 c01ccd7c
3f60: 00000000 c01ccd20 c0403e08 c01cc54c c3804938 c38474b0 c002226c c0403e08
3f80: c0403e08 c01cbeac c0398deb c0398deb 00000006 c002226c 00000000 c0403e08
3fa0: c001aa04 00000000 00000000 c01cd048 c002226c 00000000 00000000 c001aa04
3fc0: 00000000 c003237c c001aa04 c0407cfc c040f820 c00223d4 c002226c 00000000
3fe0: 00000000 00000000 00000000 c00083f8 00000000 c0033854 37cc33ed 3bcc134c
[<c01f288c>] (s3c24xx_nand_probe+0x2d8/0x514) from [<c01cda80>] (platform_drv_probe+0x18/0x1c)
[<c01cda80>] (platform_drv_probe+0x18/0x1c) from [<c01ccc6c>] (driver_probe_device+0xa8/0x15c)
[<c01ccc6c>] (driver_probe_device+0xa8/0x15c) from [<c01ccd7c>] (__driver_attach+0x5c/0x7c)
[<c01ccd7c>] (__driver_attach+0x5c/0x7c) from [<c01cc54c>] (bus_for_each_dev+0x48/0x78)
[<c01cc54c>] (bus_for_each_dev+0x48/0x78) from [<c01cbeac>] (bus_add_driver+0x98/0x21c)
[<c01cbeac>] (bus_add_driver+0x98/0x21c) from [<c01cd048>] (driver_register+0xa4/0x130)
[<c01cd048>] (driver_register+0xa4/0x130) from [<c003237c>] (do_one_initcall+0x5c/0x1b4)
[<c003237c>] (do_one_initcall+0x5c/0x1b4) from [<c00083f8>] (kernel_init+0x94/0x10c)
[<c00083f8>] (kernel_init+0x94/0x10c) from [<c0033854>] (kernel_thread_exit+0x0/0x8)
Code: e584321c e58420c4 e58452ac e58482a8 (e5983018)
---[ end trace 932096dacb618a46 ]---
Kernel panic - not syncing: Attempted to kill init!
[<c00379f8>] (unwind_backtrace+0x0/0xdc) from [<c02e8d40>] (panic+0x40/0x120)
[<c02e8d40>] (panic+0x40/0x120) from [<c0047be0>] (do_exit+0x64/0x58c)
[<c0047be0>] (do_exit+0x64/0x58c) from [<c003670c>] (die+0x15c/0x180)
[<c003670c>] (die+0x15c/0x180) from [<c0038780>] (__do_kernel_fault+0x64/0x74)
[<c0038780>] (__do_kernel_fault+0x64/0x74) from [<c0038948>] (do_page_fault+0x1b8/0x1cc)
[<c0038948>] (do_page_fault+0x1b8/0x1cc) from [<c00322c0>] (do_DataAbort+0x34/0x94)
[<c00322c0>] (do_DataAbort+0x34/0x94) from [<c0032a40>] (__dabt_svc+0x40/0x60)
Exception stack(0xc3823ec0 to 0xc3823f08)
3ec0: 00000002 c4c00000 c388f988 00000001 c388f800 c39b3980 00000000 c03ed388
3ee0: 00000000 00000000 00000000 00000001 00000000 c3823f08 c01f2758 c01f288c
3f00: 60000013 ffffffff
[<c0032a40>] (__dabt_svc+0x40/0x60) from [<c01f288c>] (s3c24xx_nand_probe+0x2d8/0x514)
[<c01f288c>] (s3c24xx_nand_probe+0x2d8/0x514) from [<c01cda80>] (platform_drv_probe+0x18/0x1c)
[<c01cda80>] (platform_drv_probe+0x18/0x1c) from [<c01ccc6c>] (driver_probe_device+0xa8/0x15c)
[<c01ccc6c>] (driver_probe_device+0xa8/0x15c) from [<c01ccd7c>] (__driver_attach+0x5c/0x7c)
[<c01ccd7c>] (__driver_attach+0x5c/0x7c) from [<c01cc54c>] (bus_for_each_dev+0x48/0x78)
[<c01cc54c>] (bus_for_each_dev+0x48/0x78) from [<c01cbeac>] (bus_add_driver+0x98/0x21c)
[<c01cbeac>] (bus_add_driver+0x98/0x21c) from [<c01cd048>] (driver_register+0xa4/0x130)
[<c01cd048>] (driver_register+0xa4/0x130) from [<c003237c>] (do_one_initcall+0x5c/0x1b4)
[<c003237c>] (do_one_initcall+0x5c/0x1b4) from [<c00083f8>] (kernel_init+0x94/0x10c)
[<c00083f8>] (kernel_init+0x94/0x10c) from [<c0033854>] (kernel_thread_exit+0x0/0x8)
级别: 新手上路
UID: 1765
精华: 0
发帖: 37
金钱: 230 两
威望: 89 点
综合积分: 74 分
注册时间: 2008-09-26
最后登录: 2017-06-25
1楼  发表于: 2010-06-05 17:48
出现了内核访问非法指针null了,是你的nand flash驱动在注册时,有个指针成员没有初始化所致
级别: 新手上路
UID: 1765
精华: 0
发帖: 37
金钱: 230 两
威望: 89 点
综合积分: 74 分
注册时间: 2008-09-26
最后登录: 2017-06-25
2楼  发表于: 2010-06-05 17:52
void __init friendly_arm_machine_init(void)
{
    /* Configure the LEDs (even if we have no LED support)*/

    s3c_device_nand.dev.platform_data = &friendly_arm_nand_info;  /*就是类似友善初始化的这里,你漏了(注不一定命名一样)*/

    platform_add_devices(friendly_arm_devs, ARRAY_SIZE(friendly_arm_devs));

    s3c2410_pm_init();
}
人类最伟大的品质在于坚持,所有的目标和梦想都会因此而实现!
级别: 新手上路
UID: 16777
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
综合积分: 22 分
注册时间: 2010-03-21
最后登录: 2013-05-18
3楼  发表于: 2010-06-05 20:18
多谢,按照2楼的意见进行修改,可以启动yaffs2了。但是又出现一个问题,贴在下面
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
[<c00379f8>] (unwind_backtrace+0x0/0xdc) from [<c02e8d40>] (panic+0x40/0x120)
[<c02e8d40>] (panic+0x40/0x120) from [<c00325b4>] (init_post+0xcc/0xf4)
[<c00325b4>] (init_post+0xcc/0xf4) from [<c0008440>] (kernel_init+0xdc/0x10c)
[<c0008440>] (kernel_init+0xdc/0x10c) from [<c0033854>] (kernel_thread_exit+0x0/0x8)
级别: 骑士
UID: 14324
精华: 0
发帖: 160
金钱: 810 两
威望: 162 点
综合积分: 320 分
注册时间: 2010-02-06
最后登录: 2015-06-02
4楼  发表于: 2010-06-06 20:23
Warning: unable to open an initial console.没有 console这个文件或者里面没有对应的设备。