在google source下了linux-2.6.25-android-1.0_r1进行移植 按照网上搜到的教程来做,但是下到板子上面运行就有问题了,串口输出如下:
NOW, Booting Linux......
Uncompressing Linux.............................................................
............................................. done, booting the kernel.
Linux version 2.6.25 (
root@localhost.localdomain) (gcc version 4.3.2 (Sourcery G
++ Lite 2008q3-72) ) #12 Mon Dec 21 02:31:56 CST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
console [ttySAC0] enabled
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.25 #12)
PC is at kmem_cache_alloc+0x20/0x80
LR is at init_rs_internal+0xfc/0x460
pc : [<c008d2a4>] lr : [<c0153cc4>] psr: 600000d3
sp : c031bec8 ip : c031bee8 fp : c031bee4
r10: 00000000 r9 : 41129200 r8 : 00000000
r7 : 000000d0 r6 : 00000000 r5 : 60000053 r4 : c032c8b8
r3 : 600000d3 r2 : c032c8d0 r1 : 000000d0 r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel
Control: c000717f Table: 30004000 DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc031a268)
Stack: (0xc031bec8 to 0xc031c000)
bec0: c032c8b8 00000008 00000100 0000011d c031bf24 c031bee8
bee0: c0153cc4 c008d294 c031bf64 c031bef8 c002c5e4 c002c010 000005d2 c0360328
bf00: 00000000 c0024f2c c031dd60 30023198 41129200 30023130 c031bf3c c031bf28
bf20: c0154088 c0153bd8 00000001 00000010 c031bfb4 c031bf40 c001e318 c0154070
bf40: 00000010 00000000 c033b190 00000000 c033b168 41129200 c031bf94 c031bf68
bf60: c004aef0 c004a2cc c031bf94 c031bf78 c01846f4 c03309cc c033a108 c0330a50
bf80: c031dd60 30023198 c031bfb4 c031bf98 c0184898 c004ac6c c0023c14 c0024f30
bfa0: c0024f2c c031dd60 c031bfcc c031bfb8 c001a368 c001e2e0 c0339580 c0024f30
bfc0: c031bff4 c031bfd0 c0008bec c001a34c c00087cc 00000000 00000000 c0024f30
bfe0: c0007175 c0339f2c 00000000 c031bff8 30008034 c0008a58 00000000 00000000
Backtrace:
[<c008d284>] (kmem_cache_alloc+0x0/0x80) from [<c0153cc4>] (init_rs_internal+0xf
c/0x460)
r7:0000011d r6:00000100 r5:00000008 r4:c032c8b8
[<c0153bc8>] (init_rs_internal+0x0/0x460) from [<c0154088>] (init_rs+0x28/0x30)
[<c0154060>] (init_rs+0x0/0x30) from [<c001e318>] (ram_console_early_init+0x48/0
x2c8)
[<c001e2d0>] (ram_console_early_init+0x0/0x2c8) from [<c001a368>] (console_init+
0x2c/0x48)
r7:c031dd60 r6:c0024f2c r5:c0024f30 r4:c0023c14
[<c001a33c>] (console_init+0x0/0x48) from [<c0008bec>] (start_kernel+0x1a4/0x2b8
)
r5:c0024f30 r4:c0339580
[<c0008a48>] (start_kernel+0x0/0x2b8) from [<30008034>] (0x30008034)
r5:c0339f2c r4:c0007175
Code: e1a07001 e10f5000 e3853080 e121f003 (e590c000)
---[ end trace ca143223eefdc828 ]---
Kernel panic - not syncing: Attempted to kill the idle task!
看到这里Unable to handle kernel NULL pointer dereference at virtual address 00000000
start_kernel>console_init>ram_console_early_init>init_rs_internal>kmem_cache_alloc
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
调用了空指针,source insight查到mm的slub.c这个应该是底层操作,而且看了mini2440 android的kernel发现函数是一样的,
这个要怎么改呢?
而且去掉了
Device Drivers ---> Character devices ---> < > Goldfish TTY Driver
Device Drivers ---> Power supply class support ---> < > Goldfish battery driver (NEW)
Device Drivers ---> Real Time Clock ---> < > GOLDFISH (NEW)
Device Drivers ---> Graphics support ---> Support for frame buffer devices ---> < > Goldfish Framebuffer
编译下载到开发板碰到的结果是一样的。希望高手能解答一下,谢谢!