yaffs这种文件系统专门为NAND Flash设计的嵌入式文件系统,

虽减少了一些功能,但比JFFS速度更快,占用内存更少。

一般而言,在Nor Flash上使用JFFS2文件系统,在NAND Flash上使用YAFFS文件系统。

我在JFFS2与YAFFS的性能比较表格上看到,YAFFS适用的操作系统很多,容易移植。

(1) 将yaffs2代码加入内核

通过yaffs目录下的脚本文件patch-ker.sh 来给内核打补丁,操作如下:

cd  /work/system/Development/yaffs2

./patch-ker.sh  c  /work/linux-2.6.22.6

(2) 配置、编译内核

make s3c2410_defconfig

make menuconfig

File systems --->

Miscellaneous filesystems --->

<*>  YAFFS2 file  system support

(3)u-boot 烧写内核

OpenJTAG> tftp 0x32000000 uImage
dm9000 i/o: 0x28000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
TFTP from server 172.22.136.38; our IP address is 172.22.136.55
Filename 'uImage'.
Load address: 0x32000000
Loading: checksum bad
checksum bad
T #################################################################
     #################################################################
     #################################################################
     #################################################################
     ###########################################
done
Bytes transferred = 1549248 (17a3c0 hex)

OpenJTAG  > nand erase 0 0x00200000
NAND erase: device 0 offset 0x0, size 0x200000
Erasing at 0x1fc000 -- 100% complete.
OK
OpenJTAG> nand write.jffs2 0x32000000 0 $(filesize)

NAND write: device 0 offset 0x0, size 0x17a3bc

Writing data at 0x17a200 -- 100% complete.
1549244 bytes written: OK
OpenJTAG> nboot 0x32000000 0 0

Loading from NAND 64MiB 3,3V 8-bit, offset 0x0
   Image Name:   Linux-2.6.22.6
   Created:      2009-12-09  13:38:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1549180 Bytes =  1.5 MB
   Load Address: 30008000
   Entry Point:  30008000
OpenJTAG> bootm 0x32000000
## Booting image at 32000000 ...
   Image Name:   Linux-2.6.22.6
   Created:      2009-12-09  13:38:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1549180 Bytes =  1.5 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK

OK

Starting kernel ...

Uncompressing Linux..................................................................................................... done, booting the kernel.
Linux version 2.6.22.6 (root@huanghuang-desktop) (gcc version 3.4.5) #1 Wed Dec 9 21:37:57 CST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
Console: colour dummy device 80x30
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: 61568KB available (2864K code, 314K data, 132K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
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 c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
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
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
yaffs Dec  9 2009 21:36:30 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
s3c2410-lcd s3c2410-lcd: no platform data for lcd, cannot attach
s3c2410-lcd: probe of s3c2410-lcd failed with error -22
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
Serial: 8250/16550 driver $Revision: 1.90 $ 4 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
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
dm9000 Ethernet Driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand s3c2410-nand: Tacls=3, 30ns Twrph0=7 70ns, Twrph1=3 30ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "kernel"
0x00200000-0x00a00000 : "jffs2"
0x00a00000-0x04000000 : "yaffs"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-i2c s3c2410-i2c: slave address 0x10
s3c2410-i2c s3c2410-i2c: bus frequency set to 390 KHz
s3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mtdblock3" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00       2048 mtdblock0 (driver?)
1f01       8192 mtdblock1 (driver?)
1f02      55296 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

(4) 上面还有那行错误,我试了网上的几种方法,

将linux_cmd_line设置为"noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttySAC0,115200",问题
依旧。根据东山老师所说,这还是属于正常现象,待后面构建linux根文件系统之后再说。。

转载于:https://www.cnblogs.com/huanghuang/archive/2011/08/30/2159576.html

内核移植(4)移植yaffs文件系统相关推荐

  1. 在内核中增加对yaffs文件系统的支持

    1.解压下载的内核源代码linux-2.6.30.4.tar.bz2.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-co ...

  2. 【移植Linux 3.4.2内核之四】修改内核代码支持YAFFS文件系统

    上一篇文章,我们从0制作jffs2文件系统,因为我们的内核本身就支持iffs2文件系统,但是它不支持yaffs文件系统.今天我们就来修改内核代码,让内核支持yaffs文件系统的格式. 1.首先我们获取 ...

  3. 第二部分 s3c2440 移植linux内核 添加网卡支持 yaffs2文件系统支持

    三.内核的移植 说明:针对的是百问网的jz2440 gcc:4.9.1 1.移植内核 首先,下载源码包:https://www.kernel.org/ 现在时间为2014年12月20日其主界面截图为: ...

  4. 移植根文件系统到linux内核 s3c2440,u-boot-2011.06在基于s3c2440开发板的移植之引导内核与加载根文件系统...

    三.根文件系统的制作 我们利用busybox来制作根文件系统 1.在下列网站下载busybox-1.15.0.tar.bz2 在当前目录下解压busybox tar -jxvf busybox-1.1 ...

  5. 移植U-BOOT之支持烧写YAFFS文件系统以及制作U-BOOT补丁

    今天,我们来移植U-BOOT让其支持YAFFS文件系统映像的烧写,以及最后的终极目标,制作Uboot补丁,因为我们信心苦苦移植好了Uboot,如果换一个地方的或者换一台电脑之类的,我们也不想再浪费时间 ...

  6. u-boot-2011.06在基于s3c2440开发板的移植之引导内核与加载根文件系统

    http://www.linuxidc.com/Linux/2012-09/70510.htm  来源:Linux社区  作者:赵春江 uboot最主要的功能就是能够引导内核启动.本文就介绍如何实现该 ...

  7. u-boot-2012.04.01移植到TQ2440(八):支持烧写yaffs文件系统

    一.支持yaffs烧写文件系统 先直接烧写试一下 TQ2440 # nand write.yaffs32000000 rootfs $filesize NAND write: device 0 off ...

  8. linux内核的裁剪和移植实验,实验5 linux内核的裁剪移植.doc

    实验5 linux内核的裁剪移植 一.实验目的: 学习利用menuconfig配置文件进行裁减内核,编译内核并移植到开发板上. 二.实验内容 一.开发环境 宿主机:ubuntu10.04 开发板:ti ...

  9. 移植ubuntu14.04根文件系统至beaglebone开发板探索

    移植ubuntu14.04根文件系统至BeagleBone开发板探索 移植背景 我是一个linux小白,然而由于项目需要,一个师兄为机器人的控制定制了一个开发板,基于beaglebone.由于此开发板 ...

最新文章

  1. 苹果系统下如何粘贴复制?
  2. 王立众:学习多媒体开发从编解码开始
  3. 动态加载vs静态加载
  4. A20修改串口设备文件
  5. 缺陷定位 | 分析推理定位BUG案例(三)
  6. swift网络编程入门应用:天气预报
  7. MYSQL 引擎的情况
  8. AtCoder Grand Contest 017D (AGC017D) Game on Tree 博弈
  9. 编译mcu media server
  10. 全球及中国晶圆锯划片刀行业发展态势及投资潜力预测报告2021-2027年
  11. oracle按相同年份_英语表达方式有几个类型,时间和日期表达都是不相同的
  12. Ubuntu18.04手动安装Realtek网卡驱动
  13. 【无标题】2021年施工员-装饰方向-岗位技能(施工员)考试题及施工员-装饰方向-岗位技能(施工员)考试试卷
  14. 深入分析实战可重入读写锁ReentrantReadWriteLock
  15. CGMM 基于上下文的马尔可夫模型
  16. VBA向单元格输入双引号
  17. XML 中的 ﹤![CDATA[ ]]
  18. A. DS内排—直插排序
  19. 怎么在HTML中加入热区,关于网页点击热区图
  20. html鼠标悬停图片释义文字消失,鼠标悬停,在图片上显示文字~

热门文章

  1. Oracle大型数据库在AIX UNIX上的实战详解
  2. 用Python编写干净 可测试 高质量的代码
  3. 使用C语言计算utf-8字符串长度 和取子字符串-转
  4. L1-075 强迫症 (10 分)-PAT 团体程序设计天梯赛 GPLT
  5. html定义不同的类,定义不同的节点类型.html
  6. oracle 时间戳
  7. [Hadoop]SSH免密码登录以及失败解决方案
  8. 推荐 7 个超棒的监控工具
  9. python之路-02 Python基础
  10. #51CTO学院四周年#感谢有你,一路相伴