add yaffs fs to kernel
来源:百度文库 编辑:神马文学网 时间:2024/04/20 18:20:49
add yaffs fs support in kernel and make yaffs rootfs
1 preparation
a>download yaffs source code and add it in your kernel source code in fs/yaffs
http://husaberg.toby-churchill.com/balloon/linux-2.6.8.1-tcl1/fs/yaffs
modify fs/Kconfig , add following option
config YAFFS_FS
tristate "YAFFS filesystem support"
depends on MTD_NAND
help
If you want YAFFS support on NAND flash devices you either need to have
NAND mtd support or customise the NAND interface.
YAFFS is a journaling filesystem tailored to the idiosyncrasies of
NAND flash memory. For further details see
YAFFS is also available as a module ( = code which can be
i nserted in and removed from the running kernel whenever you want).
The module is called nfsd. If you want to compile it as a module,
say M here and read . If unsure,
say N.
config CRAMFS
tristate "Compressed ROM file system support (cramfs)"
...
b>download nandwrite.c , nanddump.c and eraseall.c from
ftp://166.111.68.183/pub/embed/uclinux/soft/uClinux-dist/user/mtd-utils/
compile them.
arm-linux-gcc nandwrite.c -o nandwrite
arm-linux-gcc nanddump.c -o nanddump
arm-linux-gcc eraseall.c -o eraseall
c>modify devs.c to add a new partition in mtd (optional) , the yaffs will be in the"yaffs" partition
like:
{
name: "user",
size: 0x00c00000,
offset: 0x00400000,
mask_flags: MTD_WRITEABLE,
}, {
name: "yaffs",
size: 0x02000000,
offset: 0x01000000,
mask_flags: MTD_WRITEABLE,
}
......
nr_partitions: 6 ,
note: if you do so, the bootloader(vivi)‘s partition table should be changed too.(part del/add)
2 compile your kernel
3 make yaffs partition
a>make yaffs image
download mkyaffsimage from http://husaberg.toby-churchill.com/balloon/releases/v0.7/roots/
put your files in temp directory
./mkyaffsimage temp temp.yaffs
b>write image to flash
./eraseall /dev/mtd/5
./nandwrite /dev/mtd/5 temp.yaffs 16384
note:I‘ve read the source code of yaffs, and find that the first block is not scaned when the super block is loaded. So your image should be write to the second block.
Each block is 512*32 (BYTESPERCHUNK*CHUNKSPERBLOCK) bytes.
4 Good luck.....
1 preparation
a>download yaffs source code and add it in your kernel source code in fs/yaffs
http://husaberg.toby-churchill.com/balloon/linux-2.6.8.1-tcl1/fs/yaffs
modify fs/Kconfig , add following option
config YAFFS_FS
tristate "YAFFS filesystem support"
depends on MTD_NAND
help
If you want YAFFS support on NAND flash devices you either need to have
NAND mtd support or customise the NAND interface.
YAFFS is a journaling filesystem tailored to the idiosyncrasies of
NAND flash memory. For further details see
YAFFS is also available as a module ( = code which can be
i nserted in and removed from the running kernel whenever you want).
The module is called nfsd. If you want to compile it as a module,
say M here and read . If unsure,
say N.
config CRAMFS
tristate "Compressed ROM file system support (cramfs)"
...
b>download nandwrite.c , nanddump.c and eraseall.c from
ftp://166.111.68.183/pub/embed/uclinux/soft/uClinux-dist/user/mtd-utils/
compile them.
arm-linux-gcc nandwrite.c -o nandwrite
arm-linux-gcc nanddump.c -o nanddump
arm-linux-gcc eraseall.c -o eraseall
c>modify devs.c to add a new partition in mtd (optional) , the yaffs will be in the"yaffs" partition
like:
{
name: "user",
size: 0x00c00000,
offset: 0x00400000,
mask_flags: MTD_WRITEABLE,
}, {
name: "yaffs",
size: 0x02000000,
offset: 0x01000000,
mask_flags: MTD_WRITEABLE,
}
......
nr_partitions: 6 ,
note: if you do so, the bootloader(vivi)‘s partition table should be changed too.(part del/add)
2 compile your kernel
3 make yaffs partition
a>make yaffs image
download mkyaffsimage from http://husaberg.toby-churchill.com/balloon/releases/v0.7/roots/
put your files in temp directory
./mkyaffsimage temp temp.yaffs
b>write image to flash
./eraseall /dev/mtd/5
./nandwrite /dev/mtd/5 temp.yaffs 16384
note:I‘ve read the source code of yaffs, and find that the first block is not scaned when the super block is loaded. So your image should be write to the second block.
Each block is 512*32 (BYTESPERCHUNK*CHUNKSPERBLOCK) bytes.
4 Good luck.....
add yaffs fs to kernel
add yaffs fs to kernel
How To Compile A Kernel
Google Help : Add to Google button
Add dynamic Java code to your application
How to: Compile Linux kernel modules
How to Add Properties to Custom WPF Control
GO2WEB20 Blog: How to Add Gadgets to your Gmail Account
China, Serbia to add impetus to traditional friendship
Add Excel-like formula support to your application (转CodeProject)
Failed to load kernel library!错误解决办法 - 猴子's W...
How to add a column in a Listview dynamically using WPF
hibernate on-to-many 的级联操作解决步骤 clear(),add()
How To Compile A Kernel - Debian Etch | HowtoForge - Linux Howtos and Tutorials
ADD COLOUR
Tuning Asynchronous-I/O Kernel parameters to avoid error KAIO out of resource on HP-UX(IBM Technote)
为人处世fs
YAFFS文件系统移植笔记
Firebug :: Firefox Add-ons
What is ADD?
分析kernel的initcall函数 - Linux Kernel
Yaffs文件系统结构及应用
Yaffs 文件系统分析_天狼星
Yaffs文件系统结构及应用