当前位置: 技术问答>linux和unix
向内核中加了一个led驱动后,内核无法启动,高手帮忙看一下吧
来源: 互联网 发布时间:2016-12-18
本文导语: Scanning device for bad blocks Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit": 0x000000000000-0x000000060000 : "supervivi" 0x000000060000-0x000000260000 : "Kernel" 0x000000260000-0x000040260000 : "root" mtd: partition "root" extends beyond the end of d...
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000060000 : "supervivi"
0x000000060000-0x000000260000 : "Kernel"
0x000000260000-0x000040260000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 128MiB 3,3V 8-bit"
-- size truncated to 0x7da0000
0x000000000000-0x000040000000 : "nand"
mtd: partition "nand" extends beyond the end of device "NAND 128MiB 3,3V 8-bit"
-- size truncated to 0x8000000
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.29.4-FriendlyARM ohci_hcd
usb usb1: SerialNumber: s3c24xx
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-serial: usb_serial_init - tty_register_driver failed
usb-serial: usb_serial_init - returning with error -16
Unable to handle kernel NULL pointer dereference at virtual address 00000001
pgd = c0004000
[00000001] *pgd=00000000
Internal error: Oops: 3 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.29.4-FriendlyARM #12)
PC is at kset_find_obj+0x1c/0x74
LR is at driver_register+0x4c/0x138
pc : [] lr : [] psr: 60000013
sp : c381dec0 ip : c381dee0 fp : c381dedc
r10: c03f9240 r9 : c0017b34 r8 : 00000000
r7 : c38ce180 r6 : 00000000 r5 : c03f06c4 r4 : fffffffd
r3 : fffffffd r2 : c03f064c r1 : c03a0584 r0 : c38ce180
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 = 0xc381c268)
Stack: (0xc381dec0 to 0xc381e000)
dec0: c03f06b0 c03f06c4 00000000 c381c000 c381defc c381dee0 c0164128 c012a750
dee0: c03f06b0 c001cb9c 00000000 c381c000 c381df0c c381df00 c01ee5b0 c01640ec
df00: c381df24 c381df10 c01eba20 c01ee598 c001ce74 c001cb9c c381df3c c381df28
df20: c0017b48 c01eb97c c001ce74 c001cb9c c381dfcc c381df40 c0027284 c0017b44
df40: c381df8e c3830500 c03d00f4 c041cee0 00000050 00000000 c381df84 c381df68
df60: c00c2000 c00c1d88 c381df84 c3831120 c00c2140 c381df8e c381dfb4 c381df88
df80: c006024c c00c1fc0 c01628dc 30380e60 00000000 00000000 00000055 c03d0220
dfa0: c001cf54 c001ce74 c001cb9c c001cf54 00000000 00000000 00000000 00000000
dfc0: c381dff4 c381dfd0 c0008404 c0027258 00000000 00000001 00000000 00000000
dfe0: 00000000 00000000 00000000 c381dff8 c003ca24 c0008384 33cc32cc 27cc33cc
Backtrace:
[] (kset_find_obj+0x0/0x74) from [] (driver_register+0x4c/0x
138)
r7:c381c000 r6:00000000 r5:c03f06c4 r4:c03f06b0
[] (driver_register+0x0/0x138) from [] (usb_serial_bus_regis
ter+0x28/0x30)
r7:c381c000 r6:00000000 r5:c001cb9c r4:c03f06b0
[] (usb_serial_bus_register+0x0/0x30) from [] (usb_serial_re
gister+0xb4/0x2d0)
[] (usb_serial_register+0x0/0x2d0) from [] (pl2303_init+0x14
/0x64)
r5:c001cb9c r4:c001ce74
[] (pl2303_init+0x0/0x64) from [] (do_one_initcall+0x3c/0x1b
c)
r5:c001cb9c r4:c001ce74
[] (do_one_initcall+0x0/0x1bc) from [] (kernel_init+0x90/0xf
c)
[] (kernel_init+0x0/0xfc) from [] (do_exit+0x0/0x72c)
r6:00000000 r5:00000000 r4:00000000
Code: e5903000 e1a07000 e2434004 e1a03004 (e5b35004)
---[ end trace 96e228b207cc0713 ]---
Kernel panic - not syncing: Attempted to kill init!
请大虾们帮忙分析一下,错误可能出在哪里啊?谢谢啦!
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000060000 : "supervivi"
0x000000060000-0x000000260000 : "Kernel"
0x000000260000-0x000040260000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 128MiB 3,3V 8-bit"
-- size truncated to 0x7da0000
0x000000000000-0x000040000000 : "nand"
mtd: partition "nand" extends beyond the end of device "NAND 128MiB 3,3V 8-bit"
-- size truncated to 0x8000000
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.29.4-FriendlyARM ohci_hcd
usb usb1: SerialNumber: s3c24xx
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-serial: usb_serial_init - tty_register_driver failed
usb-serial: usb_serial_init - returning with error -16
Unable to handle kernel NULL pointer dereference at virtual address 00000001
pgd = c0004000
[00000001] *pgd=00000000
Internal error: Oops: 3 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.29.4-FriendlyARM #12)
PC is at kset_find_obj+0x1c/0x74
LR is at driver_register+0x4c/0x138
pc : [] lr : [] psr: 60000013
sp : c381dec0 ip : c381dee0 fp : c381dedc
r10: c03f9240 r9 : c0017b34 r8 : 00000000
r7 : c38ce180 r6 : 00000000 r5 : c03f06c4 r4 : fffffffd
r3 : fffffffd r2 : c03f064c r1 : c03a0584 r0 : c38ce180
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 = 0xc381c268)
Stack: (0xc381dec0 to 0xc381e000)
dec0: c03f06b0 c03f06c4 00000000 c381c000 c381defc c381dee0 c0164128 c012a750
dee0: c03f06b0 c001cb9c 00000000 c381c000 c381df0c c381df00 c01ee5b0 c01640ec
df00: c381df24 c381df10 c01eba20 c01ee598 c001ce74 c001cb9c c381df3c c381df28
df20: c0017b48 c01eb97c c001ce74 c001cb9c c381dfcc c381df40 c0027284 c0017b44
df40: c381df8e c3830500 c03d00f4 c041cee0 00000050 00000000 c381df84 c381df68
df60: c00c2000 c00c1d88 c381df84 c3831120 c00c2140 c381df8e c381dfb4 c381df88
df80: c006024c c00c1fc0 c01628dc 30380e60 00000000 00000000 00000055 c03d0220
dfa0: c001cf54 c001ce74 c001cb9c c001cf54 00000000 00000000 00000000 00000000
dfc0: c381dff4 c381dfd0 c0008404 c0027258 00000000 00000001 00000000 00000000
dfe0: 00000000 00000000 00000000 c381dff8 c003ca24 c0008384 33cc32cc 27cc33cc
Backtrace:
[] (kset_find_obj+0x0/0x74) from [] (driver_register+0x4c/0x
138)
r7:c381c000 r6:00000000 r5:c03f06c4 r4:c03f06b0
[] (driver_register+0x0/0x138) from [] (usb_serial_bus_regis
ter+0x28/0x30)
r7:c381c000 r6:00000000 r5:c001cb9c r4:c03f06b0
[] (usb_serial_bus_register+0x0/0x30) from [] (usb_serial_re
gister+0xb4/0x2d0)
[] (usb_serial_register+0x0/0x2d0) from [] (pl2303_init+0x14
/0x64)
r5:c001cb9c r4:c001ce74
[] (pl2303_init+0x0/0x64) from [] (do_one_initcall+0x3c/0x1b
c)
r5:c001cb9c r4:c001ce74
[] (do_one_initcall+0x0/0x1bc) from [] (kernel_init+0x90/0xf
c)
[] (kernel_init+0x0/0xfc) from [] (do_exit+0x0/0x72c)
r6:00000000 r5:00000000 r4:00000000
Code: e5903000 e1a07000 e2434004 e1a03004 (e5b35004)
---[ end trace 96e228b207cc0713 ]---
Kernel panic - not syncing: Attempted to kill init!
请大虾们帮忙分析一下,错误可能出在哪里啊?谢谢啦!
|
PC is at kset_find_obj+0x1c/0x74
LR is at driver_register+0x4c/0x138
可能在设备注册的时候就出问题了,你检查一下驱动里有没有访问非内核空间的内存
绿色辅助工具——《Csdn收音机》帮你轻松掌握Csdn最新动向!
LR is at driver_register+0x4c/0x138
可能在设备注册的时候就出问题了,你检查一下驱动里有没有访问非内核空间的内存
绿色辅助工具——《Csdn收音机》帮你轻松掌握Csdn最新动向!
|
你的驱动加载时出错了,访问了非法内存
|
driver_register的时候有空指针
|
你在 light_init中 又调用了light_init.自己仔细检查一下啊