linux-3.4.6内核添加yaffs2文件系统支持后编译出错

原作网址 :http://my.oschina.net/u/174242/blog/73280

内核 移植 编译时出现下面的错误无法编译,求解决方法。最新yaffs2+linux-3.4.6

fs/yaffs2/yaffs_vfs.c:440: warning: initialization from incompatible pointer type 
fs/yaffs2/yaffs_vfs.c:445: warning: initialization from incompatible pointer type 
fs/yaffs2/yaffs_vfs.c:447: warning: initialization from incompatible pointer type 
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_mtd_put_super': 
fs/yaffs2/yaffs_vfs.c:2514:  error : 'struct mtd_info' has no member named 'sync' 
fs/yaffs2/yaffs_vfs.c:2515: error: 'struct mtd_info' has no member named 'sync' 
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_internal_read_super': 
fs/yaffs2/yaffs_vfs.c:2702: error: 'struct mtd_info' has no member named 'erase' 
fs/yaffs2/yaffs_vfs.c:2703: error: 'struct mtd_info' has no member named 'read' 
fs/yaffs2/yaffs_vfs.c:2704: error: 'struct mtd_info' has no member named 'write' 
fs/yaffs2/yaffs_vfs.c:2705: error: 'struct mtd_info' has no member named 'read_oob' 
fs/yaffs2/yaffs_vfs.c:2706: error: 'struct mtd_info' has no member named 'write_oob' 
fs/yaffs2/yaffs_vfs.c:2707: error: 'struct mtd_info' has no member named 'block_isbad' 
fs/yaffs2/yaffs_vfs.c:2708: error: 'struct mtd_info' has no member named 'block_markbad' 
fs/yaffs2/yaffs_vfs.c:2732: error: 'struct mtd_info' has no member named 'erase' 
fs/yaffs2/yaffs_vfs.c:2733: error: 'struct mtd_info' has no member named 'block_isbad' 
fs/yaffs2/yaffs_vfs.c:2734: error: 'struct mtd_info' has no member named 'block_markbad' 
fs/yaffs2/yaffs_vfs.c:2734: error: 'struct mtd_info' has no member named 'read' 
fs/yaffs2/yaffs_vfs.c:2734: error: 'struct mtd_info' has no member named 'write' 
fs/yaffs2/yaffs_vfs.c:2736: error: 'struct mtd_info' has no member named 'read_oob' 
fs/yaffs2/yaffs_vfs.c:2736: error: 'struct mtd_info' has no member named 'write_oob' 
fs/yaffs2/yaffs_vfs.c:2757: error: 'struct mtd_info' has no member named 'erase' 
fs/yaffs2/yaffs_vfs.c:2757: error: 'struct mtd_info' has no member named 'read' 
fs/yaffs2/yaffs_vfs.c:2757: error: 'struct mtd_info' has no member named 'write' 
fs/yaffs2/yaffs_vfs.c:2759: error: 'struct mtd_info' has no member named 'read_oob' 
fs/yaffs2/yaffs_vfs.c:2759: error: 'struct mtd_info' has no member named 'write_oob' 
fs/yaffs2/yaffs_vfs.c:2967: error: implicit declaration of function 'd_alloc_root' 
fs/yaffs2/yaffs_vfs.c:2967: warning: assignment makes pointer from integer without a cast 
make[2]: *** [fs/yaffs2/yaffs_vfs.o] 错误 1 
make[1]: *** [fs/yaffs2] 错误 2 

make: *** [fs] 错误 2

出错解决:

1.需要将mtd下的函数前加下划线,例如mtd->read改为mtd->_read(只有yaffs_vfs.c yaffs_mtdif.c yaffs_mtdif1.c yaffs_mtdif2.c这几个文件会出现这种问题)。

2.查看dache.c中这个函数已经改为了d_make_root,将d_alloc_root改为d_make_root。

3.end_writeback(inode)改成clear_inode(inode)

(未验证,貌似不用改,我没改,也照样引导起来了)



Boot Loader By Steven King 2012.8.7                                             
Thanks for the help of 100ask                                                                               
Starting ......                                                                 
                                                                                
Copying kernel from nand flash ......                                           
Setting kernel params ......                                                    
Booting kernel ......                                                           
Uncompressing Linux... done, booting the kernel.                                
Booting Linux on physical CPU 0                                                 
Linux version 3.4.6 (root@Jinshi) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-2
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177                        
CPU: VIVT data cache, VIVT instruction cache                                    
Machine: SMDK2440                                                               
Memory policy: ECC disabled, Data cache writeback                               
CPU S3C2440A (id 0x32440001)                                                    
S3C24XX Clocks, Copyright 2004 Simtec Electronics                               
S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 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/mtdblock2 init=/linuxrc console=ttySAC00
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: 60108k/60108k available, 5428k reserved, 0K highmem                     
Virtual kernel memory layout:                                                   
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)                               
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)                               
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)                               
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)                               
    modules : 0xbf000000 - 0xc0000000   (  16 MB)                               
      .text : 0xc0008000 - 0xc043588c   (4279 kB)                               
      .init : 0xc0436000 - 0xc045a000   ( 144 kB)                               
      .data : 0xc045a000 - 0xc0487560   ( 182 kB)                               
       .bss : 0xc0487584 - 0xc04af5c8   ( 161 kB)                               
NR_IRQS:85                                                                      
irq: clearing subpending status 00000002                                        
sched_clock: 32 bits at 200 Hz, resolution 5000000ns, wraps every 4294967291ms  
Console: colour dummy device 80x30                                              
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)                          
pid_max: default: 32768 minimum: 301                                            
Mount-cache hash table entries: 512                                             
CPU: Testing write buffer coherency: ok                                         
Setting up static identity map for 0x30308aa8 - 0x30308b00                      
gpiochip_add: registered GPIOs 0 to 23 on device: GPIOA                         
gpiochip_add: registered GPIOs 32 to 47 on device: GPIOB                        
gpiochip_add: registered GPIOs 64 to 79 on device: GPIOC                        
gpiochip_add: registered GPIOs 96 to 111 on device: GPIOD                       
gpiochip_add: registered GPIOs 128 to 143 on device: GPIOE                      
gpiochip_add: registered GPIOs 160 to 167 on device: GPIOF                      
gpiochip_add: registered GPIOs 192 to 207 on device: GPIOG                      
gpiochip_add: registered GPIOs 224 to 234 on device: GPIOH                      
gpiochip_add: registered GPIOs 256 to 271 on device: GPIOJ                      
NET: Registered protocol family 16                                              
S3C Power Management, Copyright 2004 Simtec Electronics                         
S3C2440: Initialising architecture                                              
S3C2440: IRQ Support                                                            
S3C244X: Clock Support, DVS off                                                 
bio: create slab <bio-0> at 0                                                   
SCSI subsystem initialized                                                      
usbcore: registered new interface driver usbfs                                  
usbcore: registered new interface driver hub                                    
usbcore: registered new device driver usb                                       
Advanced Linux Sound Architecture Driver Version 1.0.25.                        
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                                                            
UDP hash table entries: 256 (order: 0, 4096 bytes)                              
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)                         
NET: Registered protocol family 1                                               
RPC: Registered named UNIX socket transport module.                             
RPC: Registered udp transport module.                                           
RPC: Registered tcp transport module.                                           
RPC: Registered tcp NFSv4.1 backchannel transport module.                       
NetWinder Floating Point Emulator V0.97 (extended precision)                    
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.                 
ROMFS MTD (C) 2007 Red Hat, Inc.                                                
msgmni has been set to 117                                                      
io scheduler noop registered                                                    
io scheduler deadline registered                                                
io scheduler cfq registered (default)                                           
Console: switching to colour frame buffer device 30x40                          
fb0: s3c2410fb frame buffer device                                              
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled                         
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440              
console [ttySAC0] enabled                                                       
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440              
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440              
lp: driver loaded but no devices found                                          
ppdev: user-space parallel port driver                                          
brd: module loaded                                                              
loop: module loaded                                                             
S3C24XX NAND Driver, (c) 2004 Simtec Electronics                                
s3c24xx-nand s3c2440-nand: Tacls=1, 10ns Twrph0=3 30ns, Twrph1=1 10ns           
s3c24xx-nand s3c2440-nand: NAND ECC disabled                                    
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-b)
NAND_ECC_NONE selected by board driver. This is not recommended!                
Scanning device for bad blocks                                                  
Creating 3 MTD partitions on "NAND":                                            
0x000000000000-0x000000200000 : "Boot Loader"                                   
0x000000200000-0x000000500000 : "Kernel"                                        
0x000000500000-0x000010000000 : "File System"                                   
dm9000 Ethernet Driver, V1.31                                                   
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                              
usbcore: registered new interface driver usbserial_generic                      
USB Serial support registered for generic                                       
usbserial: USB Serial Driver core                                               
usbcore: registered new interface driver ftdi_sio                               
USB Serial support registered for FTDI USB Serial Device                        
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver                              
usbcore: registered new interface driver pl2303                                 
USB Serial support registered for pl2303                                        
mousedev: PS/2 mouse device common for all mice                                 
s3c2410_wdt: S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics                
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq disabled        
TCP: cubic registered                                                           
NET: Registered protocol family 17                                              
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)                         
ALSA device list:                                                               
  No soundcards found.                                                          
yaffs: dev is 32505858 name is "mtdblock2" rw                                   
yaffs: passed flags ""                                                          
VFS: Mounted root (yaffs filesystem) on device 31:2.                            
Freeing init memory: 144K                                                       
                                                                                
Please press Enter to activate this console.                                    
[root@StevenKing /]# ls                                                         
bin         home        lost+found  proc        sddisk      udisk               
dev         lib         mnt         root        sys         usr                 
etc         linuxrc     opt         sbin        tmp         var   



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值