本人原创,如需转载,请注明出处,谢谢合作。 原以为LINUX内核的YAFFS2文件系统移植很简单,网上一大片的,多的是,其实只要给LINUX内核打个补丁就行了,对于LINUX2.6.37及以前的内核,可能真的是很简单,就像上面说的,直接下载YAFFS2源码,然后通过执行源代码内的补丁就行了,但是对于LINUX2.6.38及以后的内核,估计打完补丁也会编译不过,因为LINUX2.6.38是LINUX内核发展的一个分水岭,FS文件系统发生了变化,据官方说还加入了一个啥子神奇补丁,没仔细研究过,不清楚,但是文件系统的确是发生了变化,正是这种文件系统的变化,导致了YAFFS2移植遇到了问题,好了,夜已深了,也搞了几个小时了,眼睛都快打架了,野棉花扯多了,呵呵,还是步入正题吧,喜欢与人分享我的经验,呵呵,菜鸟一个,经验估计也谈不上,还是算愚见吧!
好了,本来是打算写点OK6410之LINUX2.6.39.2触摸屏等驱动移植愚见的,心血来潮,放在NAND第四分区(MTDBLOCK3)的QT-YAFFS2文件系统无法启动,心里就怪痒痒的,既然老天让我们在此时相遇,那我也不再躲闪了(原本是放在后面再移植的,因为原以为打个补丁就行了),哎,说真的,遇到编译不过时,在网上找了好久,完全找不到解决办法,哎,算了,还是自己慢慢分析,解决吧。
移植方法:
第一步,我们需要YAFFS2的源码,如果大家有兴趣想了解YAFFS2文件系统的驱动原理的话可以直接去访问他们的官网,地址是www.yaffs2.net,上面说的很详细的,也有源码下载地址,怕大家进去后难找,直接贴出YAFFS2的最新源码地址吧http://www.aleph1.co.uk/gitweb?p=yaffs2.git;a=summary,直接点击,点那个2011年6月28号的那个版本,点击最右边的SNAPSHOT下载,这个是目前最新的YAFFS2的源码了,不过虽然是最新源码已经被打过好多次补丁,但是对于LINUX2.6.39.2的内核版本,还是不给力啊,编译依然无法通过,不是说过了吗,文件系统发生了变化。
第二步,将下载下来的YAFFS2最新源码 YAFFS2.tar.gz 放入你LINUX的任意一个目录下,执行 tar zxvf YAFFS2.tar.gz 然后进入YAFFS2源码包,由于最新的源码再执行脚本 patch-ker.sh 时 有四个参数,可以追加:c,l,m,s,
./patch-ker.sh c/l m/s kernelpath
if c/l is c, then copy. If l then link
if m/s is m, then use multi version code. If s then use single version code
上面这段英文应该很好懂吧,简而言之,C 是复制文件,L是链接文件,M是多种,S是单个的,
那么在这里,我们只需执行 ./patch-ker.sh c m /your linux2.6.39.2 kernel directory
执行完这条命令之后,你将会发现在linux2.6.39.2/fs/下发现有了yaffs2目录了,并且里面也出现了好多文件
root@hewenqiang-ubuntu:/SHARE/linux-2.6.39.2/fs/yaffs2# ls
Kconfig yaffs_linux.h yaffs_summary.c
Makefile yaffs_mtdif1.c yaffs_summary.h
yaffs_allocator.c yaffs_mtdif1.h yaffs_tagscompat.c
yaffs_allocator.h yaffs_mtdif2.c yaffs_tagscompat.h
yaffs_attribs.c yaffs_mtdif2.h yaffs_trace.h
yaffs_attribs.h yaffs_mtdif.c yaffs_verify.c
yaffs_bitmap.c yaffs_mtdif.h yaffs_verify.h
yaffs_bitmap.h yaffs_nameval.c yaffs_vfs.c
yaffs_checkptrw.c yaffs_nameval.h yaffs_yaffs1.c
yaffs_checkptrw.h yaffs_nand.c yaffs_yaffs1.h
yaffs_ecc.c yaffs_nand.h yaffs_yaffs2.c
yaffs_ecc.h yaffs_packedtags1.c yaffs_yaffs2.h
yaffs_getblockinfo.h yaffs_packedtags1.h yportenv.h
yaffs_guts.c yaffs_packedtags2.c
yaffs_guts.h yaffs_packedtags2.h
说明这个补丁是打成功了,同时,你会发现,在fs目录下的Kconfig 和Makefile文件里也被相应的添加了加入yaffs2的支持信息,好了,到这一步,说明YAFFS2的补丁是打上了,但是由于是新版的LINUX2.6.39.2,所以导致编译无法通过,如果你不信的话,可以现在就编译试试看,会在生成YAFFS2.o时出错,而错误主要就是出现 在yaffs_vfs.c
这个文件上,
一个是
.get_sb ERROR问题,
还有就是get_sb_bdev ERROR问题,
根据自己的仔细分析,原来是新版的LINUX2.6.39.2文件系统发生变化,通过代码定位,
在LINUX2.6.39.2/includde/linux/fs.h上发现了一丝端倪,原来在新版的linux2.6.39.2里面,由于VFS发生变化,对于get_sb 以及get_sb_bdev这两个变量均为使用,
struct file_system_type {
const char *name;
int fs_flags;
struct dentry *(*mount) (struct file_system_type *, int,
const char *, void *);
void (*kill_sb) (struct super_block *);
。。。。。。
},在file_system_type这个结构体中我们根本就找不到 get_sb这个变量
通过对比linux2.6.36内核里面的fs.h,
struct file_system_type {
const char *name;
int fs_flags;
int (*get_sb) (struct file_system_type *, int,
const char *, void *, struct vfsmount *);
void (*kill_sb) (struct super_block *);
struct module *owner;
............
}
发现在结构体file_system_type是有get_sb这个变量定义的,
而在yaffs_vfs.c里面有两处是需要这个变量的,
第一处:
static struct file_system_type yaffs_fs_type = {
.owner = THIS_MODULE,
.name = "yaffs",
.get_sb = yaffs_read_super,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
第二处:
static struct file_system_type yaffs2_fs_type = {
.owner = THIS_MODULE,
.name = "yaffs2",
.get_sb = yaffs2_read_super,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
}; 所以,我们需要更改yaffs_vfs.c里面的get_sb这个变量满足LINUX2.6.39.2的要求,通过比对,不难发现,其实LINUX2.6.39.2的fs.h里面的
struct dentry *(*mount) (struct file_system_type *, int,
const char *, void *);这个函数与
int (*get_sb) (struct file_system_type *, int,
const char *, void *, struct vfsmount *);很相似,
于是 直接修改yaffs_vfs.c的
static struct file_system_type yaffs_fs_type
以及static struct file_system_type yaffs2_fs_type
两个结构体的get_sb变量,分别为:
.mount = yaffs_read_super,
.mount = yaffs2_read_super, 同理,对比,发现,用mount_bdev函数变量代替get_sb_bdev函数变量
return mount_bdev(fs, flags, dev_name, data,
yaffs_internal_read_super_mtd);
return mount_bdev(fs, flags, dev_name, data,
yaffs2_internal_read_super_mtd);
第三步:
由于mount这个结构体函数少了struct vfsmount 这个参数,因此,我们还需要更改yaffs_vfs.c的两个位置,
通过阅读源代码不难发现
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
static int yaffs_internal_read_super_mtd(struct super_block *sb, void *data,
int silent)
{
return yaffs_internal_read_super(1, sb, data, silent) ? 0 : -EINVAL;
}
/*
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
static int yaffs_read_super(struct file_system_type *fs,
int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
{
return get_sb_bdev(fs, flags, dev_name, data,
yaffs_internal_read_super_mtd, mnt);
}
#else
static struct super_block *yaffs_read_super(struct file_system_type *fs,
int flags, const char *dev_name,
void *data)
{
return get_sb_bdev(fs, flags, dev_name, data,
yaffs_internal_read_super_mtd);
}
#endif
*/
static struct super_block *yaffs_read_super(struct file_system_type *fs,
int flags, const char *dev_name,
void *data)
{
return mount_bdev(fs, flags, dev_name, data,
yaffs_internal_read_super_mtd);
}
static struct file_system_type yaffs_fs_type = {
.owner = THIS_MODULE,
.name = "yaffs",
//.get_sb = yaffs_read_super,
.mount = yaffs_read_super,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
#else
static struct super_block *yaffs_read_super(struct super_block *sb, void *data,
int silent)
{
return yaffs_internal_read_super(1, sb, data, silent);
}
static DECLARE_FSTYPE(yaffs_fs_type, "yaffs", yaffs_read_super,
FS_REQUIRES_DEV);
#endif
在这段代码中,我发现,当LINXU内核版本大于2.6.17时与大于2.5.0而小于2.6.17时,采用的yaffs_read_super函数不一样,参数个数不同,而且类型也有所不同,一个是整形,一个是结构体,于是修改代码,红色为删掉不要的,蓝色为更改的,同理,第二处YAFFS2修改方法原理同上:直接贴出
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
int silent)
{
return yaffs_internal_read_super(2, sb, data, silent) ? 0 : -EINVAL;
}
/*
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
static int yaffs2_read_super(struct file_system_type *fs,
int flags, const char *dev_name, void *data,
struct vfsmount *mnt)
{
return get_sb_bdev(fs, flags, dev_name, data,
yaffs2_internal_read_super_mtd, mnt);
}
#else
static struct super_block *yaffs2_read_super(struct file_system_type *fs,
int flags, const char *dev_name,
void *data)
{
return get_sb_bdev(fs, flags, dev_name, data,
yaffs2_internal_read_super_mtd);
}
#endif
*/
static struct super_block *yaffs2_read_super(struct file_system_type *fs,
int flags, const char *dev_name,
void *data)
{
return mount_bdev(fs, flags, dev_name, data,
yaffs2_internal_read_super_mtd);
}
static struct file_system_type yaffs2_fs_type = {
.owner = THIS_MODULE,
.name = "yaffs2",
//.get_sb = yaffs2_read_super,
.mount = yaffs2_read_super,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
#else
static struct super_block *yaffs2_read_super(struct super_block *sb,
void *data, int silent)
{
return yaffs_internal_read_super(2, sb, data, silent);
}
static DECLARE_FSTYPE(yaffs2_fs_type, "yaffs2", yaffs2_read_super,
FS_REQUIRES_DEV);
#endif 好了,经过这3步修改之后,编译通过,当然,还是会有告警信息打印,很正常,因为原来的get_sb_bdev函数是一个 INT型,而mount_bdev函数是一个 STRUCT结构体型,导致RETURN 指针类型不符的告警,无大碍。
在YAFFS2官方未出适合LINUX2.6.39.2的补丁以前,我也只能这么去修改它们的代码了,知道自己修改的很稀烂,呵呵,破坏了代码的可读性啊 不过 自己玩玩先呗。以下是我运行OK6410单板NAND第四分区的QT_OPIA的YAFFS2文件系统的串口系统打印信息:
NAND read: device 0 offset 0x100000, size 0x500000
5242880 bytes read: OK
## Booting image at c0008000 ...
Image Name: Linux-2.6.39.2
Created: 2011-07-31 18:17:33 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2870108 Bytes = 2.7 MB
Load Address: 50008000
Entry Point: 50008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39.2 (root@hewenqiang-ubuntu) (gcc version 4.2.2) #1 Mon Aug 1 02:17:11 CST 2011
CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OK6410
Memory policy: ECC disabled, Data cache writeback
CPU S3C6410 (id 0x36410101)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
camera: no parent clock specified
S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 532000000
mout_epll: source is epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-bus-host: source is clk_48m (0), rate is 48000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
camera: no parent clock specified
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: root=/dev/mtdblock3 rootfstype=yaffs2 console=ttySAC0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 123580k/123580k available, 7492k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xff600000 - 0xffe00000 ( 8 MB)
vmalloc : 0xc8800000 - 0xf6000000 ( 728 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.init : 0xc0008000 - 0xc002e000 ( 152 kB)
.text : 0xc002e000 - 0xc05940f8 (5529 kB)
.data : 0xc0596000 - 0xc05d1bc0 ( 239 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:246
VIC @f6000000: id 0x00041192, vendor 0x41
VIC @f6010000: id 0x00041192, vendor 0x41
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 528.79 BogoMIPS (lpj=2643968)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
OK6410: Option string ok6410=0
OK6410: selected LCD display is 480x272
s3c64xx_dma_init: Registering DMA channels
PL080: IRQ 73, at c8808000, channels 0..8
PL080: IRQ 74, at c880c000, channels 8..16
S3C6410: Initialising architecture
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
s3c-i2c s3c2440-i2c.0: slave address 0x10
s3c-i2c s3c2440-i2c.0: bus frequency set to 64 KHz
s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Installing knfsd (copyright (C) 1996 [email protected]).
NTFS driver 2.1.30 [Flags: R/W].
ROMFS MTD (C) 2007 Red Hat, Inc.
fuse init (API version 7.16)
msgmni has been set to 241
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x34
s3c-fb s3c-fb: window 0: fb
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10
s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10
s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 24) is a S3C6400/10
s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 28) is a S3C6400/10
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c6400-nand: Tacls=4, 30ns Twrph0=8 60ns, Twrph1=6 45ns
s3c24xx-nand s3c6400-nand: System booted from NAND
s3c24xx-nand s3c6400-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000100000 : "Bootloader"
0x000000100000-0x000000600000 : "Kernel"
0x000000600000-0x000007e00000 : "User"
0x000007e00000-0x000040000000 : "File System"
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth2090025647: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000b at c8826000,c882a004 IRQ 108 MAC: 12:56:48:d8:51:a6 (random)
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 79, io mem 0x74300000
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.39.2 ohci_hcd
usb usb1: SerialNumber: s3c24xx
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.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C Touchscreen driver, (c) 2008 Samsung Electronics
S3C TouchScreen got loaded successfully : 12 bits
input: S3C TouchScreen as /devices/virtual/input/input1
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
Linux media interface: v0.10
lirc_dev: IR Remote Control driver registered, major 252
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
i2c-core: driver [tuner] using legacy suspend method
i2c-core: driver [tuner] using legacy resume method
i2c-core: driver [msp3400] using legacy suspend method
i2c-core: driver [msp3400] using legacy resume method
usbcore: registered new interface driver pvrusb2
pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
pvrusb2: Debug mask is 31 (0x1f)
usbcore: registered new interface driver hdpvr
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v1.0.0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_bus (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
usbcore: registered new interface driver ushc
leds initialized
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
s3c-rtc s3c64xx-rtc: setting system clock to 2000-12-12 02:43:08 UTC (976588988)
mmc0: new high speed SD card at address 0001
mmcblk0: mmc0:0001 1.85 GiB
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
mmcblk0: p1
mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 200000 Hz
VFS: Mounted root (yaffs2 filesystem) on device 31:3.
Freeing init memory: 152K
mmc1: mmc_rescan_try_freq: trying to init card at 100000 Hz
*************************************
http://www.witech.com.cn
*************************************
mkdir: cannot create directory '/mnt/disk': File exists
Try to bring eth0 interface up......dm9000 dm9000: eth0: link down
Done
Starting Qtopia, please waiting...
Please press Enter to activate this console. touch...
[root@FORLINX6410 /]#
[root@FORLINX6410 /]#
运行很好,完全没问题,通过[root@FORLINX6410 /]# cat /proc/filesystems 打印信息:
nodev sockfs
nodev usbfs
nodev pipefs
nodev anon_inodefs
nodev rpc_pipefs
nodev devpts
ext3
ext2
cramfs
nodev ramfs
vfat
msdos
nodev nfs
nodev nfs4
nodev nfsd
ntfs
romfs
nodev fuse
fuseblk
nodev fusectl
yaffs
yaffs2
nodev mtd_inodefs
可见,这个修改方法还是很成功的 ,看到网上那么多的朋友都遇到LINUX2.6.38及以后版本的YAFFS2的文件系统移植问题,又没人提出解决方案,所以一解决问题就马上贴了出来,希望对你们有所帮助!!好了,该睡觉了啊,写的有点仓促,如果有地方没看明白,就留言吧。
最后还是附上我修改好的LINUX2.6.39.2的YAFFS2的包包吧,本人115的网盘地址:
http://u.115.com/file/bh5hellh,安装方法,在linux2.6.39.2/fs/ 下 mkdir yaffs2 然后解压,将其全部内容拷贝进去,并修改linux2.6.39.2/fs/ 下的Kconfig 在
source "fs/efs/Kconfig"与
source "fs/jffs2/Kconfig"之间添加source "fs/yaffs2/Kconfig",然后还需修改Makefile,在最后一行添加:
obj-$(CONFIG_YAFFS_FS) += yaffs2/,最后贴上我的MENUCONFIG吧:
<*> yaffs2 file system support
-*- 512 byte / page devices
-*- 2048 byte (or larger) / page devices
[*] Autoselect yaffs2 format
[*] Enable yaffs2 xattr support