搜索
bottom↓
回复: 22

实践证明yaffs可以移植到非linux,wince操作系统

[复制链接]

出0入0汤圆

发表于 2009-6-1 20:17:20 | 显示全部楼层 |阅读模式
经过一个多月的研究,yaffs在rtems下工作正常,呵呵

阿莫论坛20周年了!感谢大家的支持与爱护!!

曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……

出0入0汤圆

发表于 2009-6-1 20:23:49 | 显示全部楼层
楼主写详细一点?例如主要做了哪方面的工作?主要修改那些函数等等
相信这个东西会有用的

出0入0汤圆

发表于 2009-6-1 20:58:24 | 显示全部楼层
当然很有用
YAFFS2有Direct API,不用OS的,不过移植麻烦~LZ要是弄了就Open啦~这是这里的精神哦

出0入0汤圆

发表于 2009-7-12 16:40:55 | 显示全部楼层
请问将YAFFS移到单片机中,有可能吗?

出0入0汤圆

发表于 2009-7-12 17:22:07 | 显示全部楼层
yaffs2不适合于单片机,64M NandFlash大约需要400K的内存。RT-Thread目前正在做Yaffs2的移植,完成后会公布所有代码。

出0入0汤圆

 楼主| 发表于 2009-7-17 14:07:57 | 显示全部楼层
网上有YAFFS移植到ecos和linux的例子,我这里把ecos的上传上来吧。对于没有给出mtd的操作系统,需要根据具体的内核进行修改。类似于linux的操作系统,比如ecos,rtems,在文件系统上有不同的地方,也有相似的地方,可以相互参照学习,领会也会更多。

至于单片机可以不可以,我没有试过,我的开发环境是eclipse,用的是AT91RM9200板子

ecos下yaffs的移植ourdev_462049.rar(文件大小:497K) (原文件名:yaffs-r647.rar)

出0入0汤圆

发表于 2009-7-23 22:23:32 | 显示全部楼层
我们在uCos 下用yaffs 也很久了

出0入31汤圆

发表于 2009-7-24 08:12:12 | 显示全部楼层
强烈建议楼上写个移植文档,造福大众,哈哈

出0入0汤圆

发表于 2009-7-27 06:52:10 | 显示全部楼层
文档中写得很清楚亚 Direct API  ,只要实现几个接口函数就可以了。

出0入20汤圆

发表于 2009-7-27 07:27:29 | 显示全部楼层
昨天把YAFFFS2作为根文件系统使用了。使用了256M NAND FLASH,划分了两个分区。速度不错。






U-Boot 1.3.4 (Jul 25 2009 - 21:23:33)

DRAM:  64 MB
NAND:  256 MiB
DataFlash:AT45DB321
Nb pages:   8192
Page Size:    528
Size= 4325376 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D00041FF (RO) Bootstrap
Area 1: D0004200 to D00083FF      Environment
Area 2: D0008400 to D0041FFF (RO) U-Boot
Area 3: D0042000 to D0251FFF      Kernel
Area 4: D0252000 to D041FFFF      FS
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Hit any key to stop autoboot:  0
## Booting kernel from Legacy Image at 22000000 ...
   Image Name:   Linux-2.6.27
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1574444 Bytes =  1.5 MB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux...................................................................................................... done, booting the kernel.
Linux version 2.6.27 (wenming@localhost.localdomain) (gcc version 4.2.2) #9 Sun Jul 26 20:25:16 CST 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9G20-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 396 MHz, master 132 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=yaffs2 ip=192.168.1.110:192.168.1.1:192.168.1.1:255.255.255.0
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] 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: 61584KB available (2908K code, 233K data, 128K init)
Calibrating delay loop... 197.83 BogoMIPS (lpj=989184)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after software reset
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
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
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
yaffs Jul 26 2009 20:18:53 Installing.
msgmni has been set to 120
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.0: Atmel SSC device at 0xc4870000 (irq 14)
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:11:22:33:44:55)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
Driver 'sd' needs updating - please use bus_type methods
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Creating 2 MTD partitions on "atmel_nand":
0x00000000-0x04000000 : "Partition 1"
0x04000000-0x10000000 : "Partition 2"
usbmon: debugfs is not available
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: configuration #1 chosen from 1 choice
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.
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
i2c /dev entries driver
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
Registered led device: ds5
Registered led device: ds1
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.17.
ASoC version 0.13.2
WM8731 Audio Codec 0.13<6>ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
IP-Config: Complete:
     device=eth0, addr=192.168.1.110, mask=255.255.255.0, gw=192.168.1.1,
     host=192.168.1.110, domain=, nis-domain=(none),
     bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
yaffs: restored from checkpoint
yaffs_read_super: isCheckpointed 1
VFS: Mounted root (yaffs2 filesystem).
Freeing init memory: 128K
init started: BusyBox v1.7.1 (2008-11-24 17:40:49 MET)
starting pid 362, tty '': '/etc/rc.sh'
starting pid 367, tty '': '/bin/sh'
~ # eth0: link up (100/Full)

出0入20汤圆

发表于 2009-7-27 07:29:45 | 显示全部楼层
注意看后面的部分:

yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
yaffs: restored from checkpoint
yaffs_read_super: isCheckpointed 1
VFS: Mounted root (yaffs2 filesystem).
Freeing init memory: 128K
init started: BusyBox v1.7.1 (2008-11-24 17:40:49 MET)
starting pid 362, tty '': '/etc/rc.sh'
starting pid 367, tty '': '/bin/sh'
~ # eth0: link up (100/Full)

出0入0汤圆

发表于 2009-12-4 12:41:10 | 显示全部楼层
【5楼】 zzwuyu 微凉的晚风

写个ucos移植文档!!

出0入0汤圆

发表于 2009-12-4 12:41:10 | 显示全部楼层
【5楼】 zzwuyu 微凉的晚风

写个ucos移植文档!!

出0入0汤圆

发表于 2009-12-5 12:14:45 | 显示全部楼层
关注wince怎么用yaff2

出0入0汤圆

发表于 2010-5-15 22:35:29 | 显示全部楼层
移植yaffs2到uc/os的时候,malloc和free函数都是自己写 为什么不用uc/os自带的内存管理函数呢

出0入0汤圆

发表于 2010-5-17 19:58:05 | 显示全部楼层
yaffs2到ucos2,内存处理基本上都是参考lwip的那一套的

出0入0汤圆

发表于 2010-5-17 21:20:27 | 显示全部楼层
学习

出0入0汤圆

发表于 2011-2-23 20:47:56 | 显示全部楼层
mark

出0入0汤圆

发表于 2011-2-23 23:53:54 | 显示全部楼层
没有代码?

出0入0汤圆

发表于 2011-5-6 23:04:37 | 显示全部楼层
回复【4楼】ffxz
yaffs2不适合于单片机,64m nandflash大约需要400k的内存。rt-thread目前正在做yaffs2的移植,完成后会公布所有代码。
-----------------------------------------------------------------------

mark.

出0入0汤圆

发表于 2011-11-9 10:18:14 | 显示全部楼层
回复【10楼】wenming 老王
-----------------------------------------------------------------------

yaffs: dev is 32505856 name is "mtdblock0"  
yaffs: passed flags ""  

这个32505856 有什么含义???
我自己在9261ek上面弄了一个,启动不了,看看什么原因
yaffs: dev is 32505856 name is "mtdblock0" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:0.
Freeing init memory: 124K
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Backtrace:
[<c0030a70>] (dump_backtrace+0x0/0x114) from [<c02d7d40>] (dump_stack+0x18/0x1c)
r7:00000013 r6:c003fe30 r5:c0008370 r4:c03c34d8
[<c02d7d28>] (dump_stack+0x0/0x1c) from [<c02d7da4>] (panic+0x60/0x188)
[<c02d7d44>] (panic+0x0/0x188) from [<c00275dc>] (init_post+0xa8/0xcc)
r3:00000010 r2:0000000d r1:0000000c r0:c0353dbd
[<c0027534>] (init_post+0x0/0xcc) from [<c000847c>] (kernel_init+0x10c/0x144)
r4:c03c3160
[<c0008370>] (kernel_init+0x0/0x144) from [<c003fe30>] (do_exit+0x0/0x64c)
r4:00000000

我的flash分区
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000001000000 : "Partition 1 jiffs2 rootfs"
0x000001000000-0x000040000000 : "Partition 2 not used"

难道是rootfs分区太小了???

出0入0汤圆

发表于 2012-2-4 11:27:38 | 显示全部楼层
正在看yaffs

出0入114汤圆

发表于 2012-4-28 16:27:52 | 显示全部楼层
yaffs 必须要加操作系统吗?
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-6-2 02:04

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

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