免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5679 | 回复: 9
打印 上一主题 下一主题

移植linux2.6.24.4加载yaffs2文件系统的问题。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-16 20:07 |只看该作者 |倒序浏览
NAND FLASH里面已经烧好了uboot,kernel2.6.11,yaffs2,我只是想测试一下新编译的内核有没有问题,按要求编译好内核2.6.24.4,支持MTD,NAND flash,打好了yaffs2的补丁,分区也没问题。然后将编译好的内核下到ram 0x30008000处,运行到最后说无法加载文件系统?为什么我把别人移植好的内核2.6.11下载到ram里运行就没有问题,能正常加载一直到shell??? 我把启动信息方在下面:

Starting kernel ...

Uncompressing Linux...................................................................................................... done, booting the ke.

Linux version 2.6.24.4 (root@localhost.localdomain) (gcc version 4.1.0) #4 Wed Apr 16 15:46:41 CST 2008

CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177

Machine: SMDK2410

Memory policy: ECC disabled, Data cache writeback

CPU S3C2410A (id 0x32410002)

S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 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 in Zone order, mobility grouping on.  Total pages: 16256

Kernel command line: noinitrd root=/dev/mtdblock/2 console=ttySAC0,115200 mem=64M

irq: clearing subpending status 00000002

PID hash table entries: 256 (order: 8, 1024 bytes)

timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c

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: 61568KB available (2880K code, 311K data, 132K init)

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

net_namespace: 64 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 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 204

TCP reno registered

NetWinder Floating Point Emulator V0.97 (double precision)

yaffs Apr 16 2008 15:44:08 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

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, 29ns Twrph0=7 69ns, Twrph1=3 29ns

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-0x00030000 : "bootloader"

0x00030000-0x00200000 : "kernel"

0x00200000-0x04000000 : "root"

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 99 KHz

s3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapter

S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics

s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled

TCP cubic registered

NET: Registered protocol family 1

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

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 "mtdblock/2" or unknown-block(2,0)

Please append a correct "root=" boot option; here are the available partitions:

1f00        192 mtdblock0 (driver?)

1f01       1856 mtdblock1 (driver?)

1f02      63488 mtdblock2 (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

论坛徽章:
0
2 [报告]
发表于 2008-04-16 20:09 |只看该作者
有哪位高手指点一下阿,感激不尽,都折腾两天了,快不行了。

论坛徽章:
0
3 [报告]
发表于 2008-04-22 10:14 |只看该作者
1.root=/dev/mtdblock/2改为root=/dev/mtdblock2
2.mtd的2410的ecc由ECC_SOFT改为ECC_NONE.

不过我移植测试发现,打开文件系统有问题。是yaffs和mtd的不兼容导致。因为mtd更新比yaffs快。
主要是oob的处理不同。

论坛徽章:
0
4 [报告]
发表于 2008-04-22 15:31 |只看该作者
因为2.6.24内核不在支持devfs文件系统所以在uboot的启动参数里因该把
root=/dev/mtdblock/2改为root=31:2
此外还要把drivers里的ECC_SOFT和ECC_HW都改为ECC_NONE.
看网上有些系统移植文章要在fs的kconfig里增加对devfs的支持,我看是多余的。
但是我的班子启动后显示:
yaffs: dev is 32505858 name is "mtdblock2"

yaffs: passed flags ""

yaffs: Attempting MTD mount on 31.2, "mtdblock2"

VFS: Mounted root (yaffs filesystem).

Freeing init memory: 132K

Warning: unable to open an initial console.

Failed to execute /linuxrc.  Attempting defaults...

Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

可能是flash上的文件系统映像的问题。

论坛徽章:
0
5 [报告]
发表于 2008-05-02 12:29 |只看该作者
可能还是busybox做的有问题.提示linuxrc有错啊.
fs/Kconfig中是否加DEVFS,是根据你建根文件系统时用的是devfs还是mdev,似乎2.6.16以上内核就建议用mdev了,但也仍然可以使用devfs

论坛徽章:
0
6 [报告]
发表于 2008-10-03 13:48 |只看该作者
本人优价出售2440+VIVI+yaffs2方案代码!QQ:805396213!

在s3c2410 s3c2440平台测试ok!
支持2.6所有内核!
已出售过的内核版本有2.6.11 2.6.13 2.6.16 2.6.19 2.6.21 2.6.22 2.6.24等
为了能够让新手进入嵌入式行业,本人优价出售源代码!
QQ:805396213!

论坛徽章:
0
7 [报告]
发表于 2008-10-03 18:17 |只看该作者
原帖由 hrz2008 于 2008-10-3 13:48 发表
本人优价出售2440+VIVI+yaffs2方案代码!QQ:805396213!

在s3c2410 s3c2440平台测试ok!
支持2.6所有内核!
已出售过的内核版本有2.6.11 2.6.13 2.6.16 2.6.19 2.6.21 2.6.22 2.6.24等
为了能够让新手进入 ...

见过无耻的,但是没有见过像你那么无耻的
想骗钱就直说,说什么屁“为了能够让新手进入嵌入式行业”
有你这种人,真是人类基因的一大失败

论坛徽章:
0
8 [报告]
发表于 2008-10-14 15:26 |只看该作者

回复 #7 sep 的帖子

真他妈说好 大伙都提倡开源

论坛徽章:
0
9 [报告]
发表于 2011-01-03 17:40 |只看该作者
支持开源

论坛徽章:
0
10 [报告]
发表于 2011-01-03 19:49 |只看该作者
做广告是不对的,支持开源,并不是说开源就不收钱了。

楼主的文件系统有问题。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP