linux3.0内核移植问题记录

#include <linux/dm9000.h>/
* DM9000AEP 10/100 ethernet controller */
#define MACH_SMDK2440_DM9K_BASE (S3C2410_CS3 + 0x300)
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1046 at 0x000001058000
Creating 8 MTD partitions on "NAND":
0x000000000000-0x000000004000 : "Boot Agent"
0x000000000000-0x000000200000 : "S3C2410 flash partition 1"
0x000000400000-0x000000800000 : "S3C2410 flash partition 2"
0x000000800000-0x000000a00000 : "S3C2410 flash partition 3"
0x000000a00000-0x000000e00000 : "S3C2410 flash partition 4"
0x000000e00000-0x000001800000 : "S3C2410 flash partition 5"
0x000001800000-0x000003000000 : "S3C2410 flash partition 6"
0x000003000000-0x000004000000 : "S3C2410 flash partition 7"
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: read wrong id 0x50002928
dm9000 dm9000: read wrong id 0x002a2900
dm9000 dm9000: read wrong id 0x2b2a0028
dm9000 dm9000: read wrong id 0x2b2a2928
dm9000 dm9000: read wrong id 0x2b002928
dm9000 dm9000: read wrong id 0x002a2900
dm9000 dm9000: read wrong id 0x2b2a2928
dm9000 dm9000: read wrong id 0x2b2a2928
dm9000 dm9000: wrong id: 0x2b2a2928
dm9000 dm9000: not found (-19).
usbmon: debugfs is not available
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
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mousedev: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
List of all partitions:
1f00              16 mtdblock0  (driver?)
1f01            2048 mtdblock1  (driver?)
1f02            4096 mtdblock2  (driver?)
1f03            2048 mtdblock3  (driver?)
1f04            4096 mtdblock4  (driver?)
1f05           10240 mtdblock5  (driver?)
1f06           24576 mtdblock6  (driver?)
1f07           16384 mtdblock7  (driver?)
No filesystem could mount root, tried:  cramfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4)
Backtrace:
[<c0142824>] (dump_backtrace+0x0/0x10c) from [<c0474c8c>] (dump_stack+0x18/0x1c)
 r6:00008000 r5:c38a0000 r4:c381bf50
[<c0474c74>] (dump_stack+0x0/0x1c) from [<c0474cf0>] (panic+0x60/0x1ac)
[<c0474c90>] (panic+0x0/0x1ac) from [<c010903c>] (mount_block_root+0x1d8/0x234)
 r3:00000004 r2:c381bf50 r1:c381bf50 r0:c05012d8
[<c0108e64>] (mount_block_root+0x0/0x234) from [<c0109120>] (mount_root+0x88/0xd0)
[<c0109098>] (mount_root+0x0/0xd0) from [<c0109278>] (prepare_namespace+0x110/0x1d0)
 r5:c012b980 r4:c0592620
[<c0109168>] (prepare_namespace+0x0/0x1d0) from [<c0108494>] (kernel_init+0xec/0x12c)
 r6:c012af50 r5:c012ab38 r4:c012af50
[<c01083a8>] (kernel_init+0x0/0x12c) from [<c015c4bc>] (do_exit+0x0/0x704)
 r6:c015c4bc r5:c01083a8 r4:00000000




错误1:
dm9000 dm9000: wrong id: 0x2b2a2928
dm9000 dm9000: not found (-19).
正常打印:
eth0: dm9000a at c4862300,c4864304 IRQ 51 MAC: 00:0c:20:02:0a:5b (chip)
原因是S3C24XX_PA_DM9000的地址定义错了,应该是0x18000300,错定义为0x20000300


错误2:
1f00              16 mtdblock0  (driver?)
1f01            2048 mtdblock1  (driver?)
1f02            4096 mtdblock2  (driver?)
1f03            2048 mtdblock3  (driver?)
1f04            4096 mtdblock4  (driver?)
1f05           10240 mtdblock5  (driver?)
1f06           24576 mtdblock6  (driver?)
1f07           16384 mtdblock7  (driver?)
修改common-smdk.c的smdk_default_nand_part为
static struct mtd_partition smdk_default_nand_part[] = {
   [0] = {
       .name = "bootloader", 
       .offset = 0x00000000, 
       .size = 0x00060000, 
   },
   [1] = { 
       .name = "kernel", 
       .offset = 0x00060000, 
       .size = 0x00300000, 
   },
   [2] = { 
       .name = "root", 
       .offset = 0x00360000, 
       .size = 0x3c9c000,
   },
   
};


错误3:
List of all partitions:
1f00             384 mtdblock0  (driver?)
1f01            3072 mtdblock1  (driver?)
1f02           62064 mtdblock2  (driver?)
No filesystem could mount root, tried:  cramfs
添加yaffs2文件系统
最新的yaffs2采用git发布,所以采用git工具下载最新的yaffs2源代码。


具体为在终端输入git clone    git://www.aleph1.co.uk/yaffs2下载最新的yaffs2,下


载完成给内核打补丁,进入yaffs目录,执行
 ./patch-ker.sh c m opt/Andy/linux-3.0.4(以自己的内核目录为准),其中的c代表复制,m代表复合类型。


配置内核选中yaffs2
打印
Failed to execute /linuxrc.  Attempting defaults...
待解决

错误4:使用NFS文件系统
dm9000: WARNING: no IRQ resource flags set
解决:[2] = {.start = IRQ_EINT9,.end   = IRQ_EINT9,.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,}};
加了IORESOURCE_IRQ_HIGHEDGE就解决了,不知何故

你可能感兴趣的:(c,linux,list,git,Flash,interface)