天嵌 ARM开发社区

 找回密码
 注册
楼主: vip2009

文件系统挂载问题。

[复制链接]
 楼主| vip2009 发表于 2011-2-18 18:42:20 | 显示全部楼层
15# embedsky_lxt

版主啊,那个选项没起作用额,还是不行。
你看看我 u-boot里面的设置对不对呢?
baudrate=115200
ethaddr=0a:1b:2c:3d:4e:5f
mtdids=nand0=nandflash0
filesize=1063a40
filesize+1=1080000
fileaddr=30008000
netmask=255.255.255.0
ipaddr=192.168.1.230
serverip=192.168.1.100
bootargs=noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0 rootfstype=yaffs
bootdelay=3
bootcmd=nand read 30008000 100000 300000;bootm 30008000
mtdparts=nandflash0:512k@0(bios),128k(params),384k(toc),3m(kernel),-(root)
stdin=serial
stdout=serial
stderr=serial

Environment size: 455/131068 bytes

mtdparts 这个变量我改过,不晓得对不对,
 楼主| vip2009 发表于 2011-2-18 19:40:39 | 显示全部楼层
我说一下我的制作内核的过程:
进入解压后的目录(我的是linux-2.6.30)
make menuconfig->make zImage->cp arch/arm/boot/zImage ./ —>
mkimage -A arm -O linux -T kernel -C none -a 30008000 -e 30008040 -n linux-2.6.30 -d zImage uImage.img
->通过uboot的tftp下载uImage.img 到内存30008000处->bootm 30008000
然后就打印出(前面的打印信息略过):(文件系统已经在mtdblock2上)
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000100000 : "uboot"
0x000000100000-0x000000400000 : "kernel"
0x000000400000-0x000010000000 : "yaffs2"
mice: PS/2 mouse device common for all mice
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 673 is bad
block 674 is bad
block 1169 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 88K
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.
[<c00246fc>] (unwind_backtrace+0x0/0xdc) from [<c017a3e4>] (panic+0x40/0x110)
[<c017a3e4>] (panic+0x40/0x110) from [<c001e4c0>] (init_post+0xcc/0xf4)
[<c001e4c0>] (init_post+0xcc/0xf4) from [<c000859c>] (kernel_init+0xb8/0xe0)
[<c000859c>] (kernel_init+0xb8/0xe0) from [<c00400ec>] (do_exit+0x0/0x578)
[<c00400ec>] (do_exit+0x0/0x578) from [<00000000>] (0x0)
 楼主| vip2009 发表于 2011-2-20 01:41:17 | 显示全部楼层
先向各位版主问好。
这是挂载文件系统后的打印信息,里面增加的文件都是照手册上copy下来的,不晓得为什么会出现这样的错误。。。。
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
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
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
JFFS2 version 2.2. (NAND)
 楼主| vip2009 发表于 2011-2-20 17:43:33 | 显示全部楼层
弄好了!原来是要在dev目录下创建块设备的节点
brw-rw----    1 0        0         31,   0 Jan  1 00:00 mtdblock0                                                         
brw-rw----    1 0        0         31,   1 Jan  1 00:00 mtdblock1                                                         
brw-rw----    1 0        0         31,   2 Jan  1 00:00 mtdblock2

但是现在又有一个新问题:第次开机启动的时候都打印这个,而且一次比一次多!
Partially written block 116 detected                                                                                      
Partially written block 116 detected                                                                                      
Partially written block 116 detected                                                                                      
Partially written block 116 detected                                                                                      
Partially written block 116 detected
zengraoli 发表于 2011-2-21 07:54:41 | 显示全部楼层
我的也出现这个问题。。
我的串口是打印:
s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 129 is bad
block 821 is bad
block 1333 is bad
block 1981 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 188K
Kernel panic - not syncing: Attempted to kill init!
Backtrace:  
[<c003bfd4>] (dump_backtrace+0x0/0x10c) from [<c033fb0c>] (dump_stack+0x18/0x1c)
r7:c381a000 r6:c04aff80 r5:0000000b r4:0000000b
[<c033faf4>] (dump_stack+0x0/0x1c) from [<c033fb5c>] (panic+0x4c/0x124)
[<c033fb10>] (panic+0x0/0x124) from [<c004d450>] (do_exit+0x520/0x620)
r3:c047c798 r2:c381de10 r1:c381dce4 r0:c040b294
[<c004cf30>] (do_exit+0x0/0x620) from [<c004d594>] (do_group_exit+0x44/0xc4)
[<c004d550>] (do_group_exit+0x0/0xc4) from [<c0057a4c>] (get_signal_to_deliver+0x198/0x350)
r5:0000000b r4:c381c000
[<c00578b4>] (get_signal_to_deliver+0x0/0x350) from [<c003a788>] (do_signal+0x5c/0x4b0)
[<c003a72c>] (do_signal+0x0/0x4b0) from [<c003ac0c>] (do_notify_resume+0x30/0x34)
[<c003abdc>] (do_notify_resume+0x0/0x34) from [<c0037eac>] (work_pending+0x1c/0x20)
*** Warning - bad CRC or NAND, using default environment
zengraoli 发表于 2011-2-21 07:56:42 | 显示全部楼层
分区是这样的:
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "uboot"
0x000000200000-0x000000500000 : "kernel"
0x000000500000-0x000010000000 : "yaffs2"

dev目录下面我创建了 console字符设备和null设备。。
问一下我的有什么问题吗?

LZ你的是发现了坏块。。
 楼主| vip2009 发表于 2011-2-21 08:51:30 | 显示全部楼层
21# zengraoli


还要在dev目录下面创建nand的分区结点.
 楼主| vip2009 发表于 2011-2-21 08:55:06 | 显示全部楼层
创建三个块设备
zengraoli 发表于 2011-2-21 09:38:27 | 显示全部楼层
23# vip2009


好的 我试试。。不行再来问一下!
zengraoli 发表于 2011-2-21 11:01:37 | 显示全部楼层
我的还是不行啊。。
不知道我设备创建对不对?
我这样创建的。。
crw-r--r-- 1 root root 5, 1 02-16 00:40 console
brw-r--r-- 1 root root 0, 0 02-16 01:18 mtdblock0
brw-r--r-- 1 root root 0, 0 02-16 01:18 mtdblock1
brw-r--r-- 1 root root 0, 0 02-16 01:18 mtdblock2
crw-r--r-- 1 root root 1, 3 02-16 00:40 null

然后启动之后 串口还是会
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
s3c2440-sdi s3c2440-sdi: powered down.
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.18a.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 129 is bad
block 821 is bad
block 1333 is bad
block 1981 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 188K
Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c003bfd4>] (dump_backtrace+0x0/0x10c) from [<c033fb0c>] (dump_stack+0x18/0x1c)
r7:c381a000 r6:c04aff80 r5:0000000b r4:0000000b
[<c033faf4>] (dump_stack+0x0/0x1c) from [<c033fb5c>] (panic+0x4c/0x124)
[<c033fb10>] (panic+0x0/0x124) from [<c004d450>] (do_exit+0x520/0x620)
r3:c047c798 r2:c381de10 r1:c381dce4 r0:c040b294
[<c004cf30>] (do_exit+0x0/0x620) from [<c004d594>] (do_group_exit+0x44/0xc4)
[<c004d550>] (do_group_exit+0x0/0xc4) from [<c0057a4c>] (get_signal_to_deliver+0x198/0x350)
r5:0000000b r4:c381c000
[<c00578b4>] (get_signal_to_deliver+0x0/0x350) from [<c003a788>] (do_signal+0x5c/0x4b0)
[<c003a72c>] (do_signal+0x0/0x4b0) from [<c003ac0c>] (do_notify_resume+0x30/0x34)
[<c003abdc>] (do_notify_resume+0x0/0x34) from [<c0037eac>] (work_pending+0x1c/0x20)
shufexiu 发表于 2011-2-21 11:24:23 | 显示全部楼层
19# vip2009
设备节点的创建,自然有驱动来完成,如果你这些节点没有完成,我怀疑是nand的驱动方面的问题
zengraoli 发表于 2011-2-21 11:43:58 | 显示全部楼层
26# shufexiu


那我的又是怎么回事呢?怎么总是挂载不成功?我只是在制作文件系统啊?内核用的是光盘自带的,u-boot也是的。。
 楼主| vip2009 发表于 2011-2-21 12:16:16 | 显示全部楼层
27# zengraoli


你怎么烧的文件系统?
zengraoli 发表于 2011-2-21 12:18:16 | 显示全部楼层
28# vip2009


在U-boot按6 通过DNW烧啊?不对吗?
 楼主| vip2009 发表于 2011-2-21 12:25:31 | 显示全部楼层
我不知道那个6号键是将文件系统烧到什么地方去了,有可能没有在你的文件系统的分区里面,我个我是猜的哈,你可以用nand write试试;
我是在uboot启动后按两次"q"后通过tftp 把文件系统下载到内存,然后用nand erase擦除,nand write.yaffs 写到nand的第三个分区上的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-7-16 00:49 , Processed in 1.046875 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

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