QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2648|回复: 5

JFFS2根文件系统模拟成功。

[复制链接]
发表于 2009-8-26 18:34:21 | 显示全部楼层 |阅读模式
修改了mknandflashdump.c,实现了LINUX SOFT ECC,增加了随机性错误块生成。JFFS2少描有点满哦。

$ ./skyeye  -e vmlinux_2.6.28
Your elf file is little endian.
arch: arm
cpu info: armv4, arm920t, 41009200, ff00fff0, 2
mach info: name s3c2410x, mach_init addr 0x806bc70
nandflash: dump ./nand.dump
file size:69206016
lcd_mod:1
setup lcd
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm920t mmu ops
Loaded RAM   ./rootfs.arm.rom
exec file "vmlinux_2.6.28"'s format is elf32-little.
load section .note.gnu.build-id: addr = 0x00000000  size = 0x00000024.
load section .text.head: addr = 0xc0008000  size = 0x000003e0.
load section .init: addr = 0xc00083e0  size = 0x0001ac20.
load section .text: addr = 0xc0023000  size = 0x00215564.
load section __ksymtab: addr = 0xc0239000  size = 0x00004078.
load section __ksymtab_gpl: addr = 0xc023d078  size = 0x000014a8.
load section __ksymtab_strings: addr = 0xc023e520  size = 0x0000b391.
load section __param: addr = 0xc02498b4  size = 0x0000074c.
load section .data: addr = 0xc024a000  size = 0x00016090.
not load section .bss: addr = 0xc02600a0  size = 0x0002512c .
not load section .comment: addr = 0x00000000  size = 0x0000604e .
not load section .ARM.attributes: addr = 0x00000000  size = 0x00000026 .
not load section .debug_line: addr = 0x00000000  size = 0x00114e64 .
not load section .debug_info: addr = 0x00000000  size = 0x0116dc4a .
not load section .debug_abbrev: addr = 0x00000000  size = 0x0009e88a .
not load section .debug_aranges: addr = 0x00000000  size = 0x00006318 .
not load section .debug_pubnames: addr = 0x00000000  size = 0x0001d547 .
not load section .debug_str: addr = 0x00000000  size = 0x0007cbd6 .
not load section .debug_frame: addr = 0x00000000  size = 0x0005223c .
not load section .debug_loc: addr = 0x00000000  size = 0x001871bd .
not load section .debug_ranges: addr = 0x00000000  size = 0x00059940 .
call ARMul_InitSymTable,kernel filename is vmlinux_2.6.28.
start addr is set to 0xc0008000 by exec file.
Linux version 2.6.28.9 (elf@elf-desktop) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #82 Wed Aug 26 16:47:17 CST 2009 ()
CPU: ARM920T [41009200] revision 0 (ARMvundefined/unknown), cr=00003177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2410
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410 (id 0x32410000)
S3C2410: core 62.400 MHz, memory 62.400 MHz, peripheral 62.400 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
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: mem=64M console=ttySAC0 root=/dev/mtdblock5 rootfstype=jffs2 init=/linuxrc
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt cb1f, tcfg 00000200,00000000, usec 0000189e
Console: colour dummy device 80x30
console [ttySAC0] enabled
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: 62316KB available (2204K code, 236K data, 108K init)
Calibrating delay loop... 12.67 BogoMIPS (lpj=31680)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 484 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2410: Initialising architecture
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
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 204
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 121
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver4 ports, IRQ sharing enabled
s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
brd: module loaded
loop: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand s3c2410-nand: Tacls=2, 32ns Twrph0=4 64ns, Twrph1=2 32ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 922 at 0x00e68000
Bad eraseblock 932 at 0x00e90000
Bad eraseblock 987 at 0x00f6c000
Bad eraseblock 1018 at 0x00fe8000
Bad eraseblock 1053 at 0x01074000
Creating 8 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00004000 : "Boot Agent"
0x00000000-0x00200000 : "S3C2410 flash partition 1"
0x00400000-0x00800000 : "S3C2410 flash partition 2"
0x00800000-0x00a00000 : "S3C2410 flash partition 3"
0x00a00000-0x00e00000 : "S3C2410 flash partition 4"
0x00e00000-0x01800000 : "S3C2410 flash partition 5"
0x01800000-0x03000000 : "S3C2410 flash partition 6"
0x03000000-0x04000000 : "S3C2410 flash partition 7"
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
TCP cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing init memory: 108K
init started: BusyBox v1.14.1 (2009-08-24 18:48:54 CST)
starting pid 753, tty '': '/etc/init.d/rcS'
---mdev start---
---mdev end---
starting pid 758, tty '': '/bin/sh'


BusyBox v1.14.1 (2009-08-24 18:48:54 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
#
# mount
rootfs on / type rootfs (rw)
/dev/root on / type jffs2 (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
sysfs on /sys type sysfs (rw)
mdev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=600)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 发表于 2009-8-26 18:37:12 | 显示全部楼层
制作JFFFS2文件系统    在http://sources.redhat.com/jffs2/网站下载了编译好的mkfs.jffs2 v1.17 for i386 Linu,利用该工具将目录打包成JFFS2文件系统。

    mkfs.jffs2 -r ./busybox-1.14.1/_install/ -o rootfs.arm.jffs2 -e 0x4000 -s 512 -n
        -e:指定擦除块大小;
        -s:指定页大小;
        -n:忽略cleanmarker;
    生成的是一页挨一页的JFFS2格式文件系统数据,不包含OOB和ECC。然后使用Skyeye Nand Flash工具将该文件写到nand.dump的0xe00000(分区5)。
    mknandflashdump ./rootfs.arm.jffs2 ./nand.dump 0xe00000

    Linux内核配置支持MTD,2410 NAND使用Soft ECC。命令行配置为:

    CONFIG_CMDLINE="mem=64M console=ttySAC0 root=/dev/mtdblock5 rootfstype=jffs2 rw init=/linuxrc"
    在/dev目录下包含mtd分区5设备的节点:
        brw-rw----    1 0        0         31,   5 Jan  1 00:00 /dev/mtdblock5
回复

使用道具 举报

发表于 2009-9-2 13:56:51 | 显示全部楼层
能贴一下你的skyeye.conf麽?
能研究下yaffs麽?
回复

使用道具 举报

 楼主| 发表于 2009-9-4 17:28:04 | 显示全部楼层
# skyeye config file for S3C2410X

cpu: arm920t
mach: s3c2410x

dbct:state=on

# physical memory
mem_bank: map=M, type=RW, addr=0x00000000, size=0x00800000#, file=./u-boot.bin
#mem_bank: map=M, type=RW, addr=0x30000000, size=0x04000000

mem_bank: map=M, type=RW, addr=0xc0000000, size=0x03000000
mem_bank: map=M, type=RW, addr=0xc3000000, size=0x01000000, file=./rootfs.arm.rom

# nand
nandflash: type=s3c2410x,name=K9F1208U0B,dump=./nand.dump

# all peripherals I/O mapping area
mem_bank: map=I, type=RW, addr=0x48000000, size=0x20000000

#mem_bank: map=I, type=RW, addr=0x19000300, size=0x00000020
#net: type=cs8900a, base=0x19000300, size=0x20,int=9, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1

# lcd
lcd: type=s3c2410x, mod=gtk

[ 本帖最后由 深思 于 2009-9-4 17:30 编辑 ]
回复

使用道具 举报

发表于 2009-9-7 10:25:41 | 显示全部楼层
mem_bank: map=M, type=RW, addr=0xc3000000, size=0x01000000, file=./rootfs.arm.rom
这个应该不起作用吧, 真的rootfs已经写到nand.dump中.

能试下yaffs麽,我弄了4个星期都没搞定.
http://www.linuxfans.org/bbs/thread-189499-1-1.html
回复

使用道具 举报

 楼主| 发表于 2009-9-8 16:47:02 | 显示全部楼层
我另外开了个帖子,jffs搞定了yaffs就很简单的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-24 22:36 , Processed in 0.090251 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表