1. Produce a JFFS2 image on Linux PC
>sudo apt-get install mtd-tools (这行是什麼,所以我用mkdir iffs2建设资料夹)
>mkfs.jssf2 -d jffs2/ -o jffs2.img (我从网络下载到mkfs.jssf2用他生成jffs2.img)
2. Produce production ROM image
[Image 5] (我在mkrom.ini 加入这些生成rom.bin)
Image=jffs2.img
Name=jffs2
Base=0x7F300000
Load=0x7F300000
Active=0
Copy to RAM=0
Execution=0
Compressed=0
File=1
No Footer=1
3. Configure Kernel
File systems ---> (我使用make linux_menuconfig內查看是这样定义没错)
Journalling Flash File System v2 (JFFS2) support
JFFS2 ZLIB compression support (recommended)
4. JFFS2 partition address
\W90P710-uClinux\uClinux-dist\linux-2.4.x\drivers\mtd\maps\w90n7xx_map.c
{
name: "data (1024k)",
size: 0x100000,
offset: 0
},
{
/*if jffs2 can run on this partition the size can not less than 6 sectors*/ (我沒修改原先就這樣)
name: "user (384k)",
size: 0x60000,
offset: 0x00300000 //offset
}
5. Mount the partition on the target board
/> mount -t jffs2 /dev/mtdblock1 /flash (最後出現錯誤)
mount failed: Unknown error 19
/> |