免费注册 查看新帖 |

Chinaunix

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

[系统管理] nfs挂载yaffs2成功,但是将yaffs2文件系统烧写到nand中,启动失败 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-04-12 11:37 |只看该作者 |倒序浏览
我使用u-boot-2013.04-rc1,内核为linux3.8.3,内核的MTD分区为0-1M(uboot),1M-5M(kernel),6M-206M(file system),剩余空间为(user),板子为tiny6410,SDRAM为256M,NAND为k9GAG08U0D,yaffs2的源码是从官网上下载的,根文件系统是用busybox-1.20.2制作的,我用nfs挂载文件系统时,uboot的环境为参数为:set bootargs root=/dev/nfs console=ttySAC,115200 nfsroot=192.168.14.34:/home/wang/wang_test/rootfs ip=192.168.14.100:192.168.14.34:192.168.14.1:255.255.255.0::eth0ff  将linux内核烧写到对应的分区中,内核起来后,文件系统成功的起来了,但是我将文件系统烧写到nand对应的分区时,文件系统启动失败,这是uboot的环境参数为:set bootargs noinited root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrc console=ttySAC,115200
出现的错误信息如下:
U-Boot 2013.04-rc1 (Apr 01 2015 - 06:46:06) for SMDK6410


CPU:     S3C6410@533MHz
         Fclk = 533MHz, Hclk = 133MHz, Pclk = 66MHz (ASYNC Mode)
Board:   SMDK6410
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  2048 MiB
MMC:   Samsung Host Controller: 0
In:    serial
Out:   serial
Err:   serial
Net:   dm9000
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x500000
5242880 bytes read: OK
## Booting kernel from Legacy Image at 50008000 ...
   Image Name:   Linux-3.8.3
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2337656 Bytes = 2.2 MiB
   Load Address: 50008000
   Entry Point:  50008040
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.8.3 (wang@wang-ubuntu) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #4 Wed Apr 1 07:54:53 CST 2015
CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: TINY6410
Memory policy: ECC disabled, Data cache writeback
CPU S3C6410 (id 0x36410101)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C64XX: PLL settings, A=533000000, M=533000000, E=24000000
S3C64XX: HCLK2=266500000, HCLK=133250000, PCLK=66625000
mout_apll: source is fout_apll (1), rate is 533000000
mout_epll: source is epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 533000000
usb-bus-host: source is clk_48m (0), rate is 48000000
irda-bus: source is mout_epll (0), rate is 24000000
CPU: found DTCM0 8k @ 00000000, not enabled
CPU: moved DTCM0 8k to fffe8000, enabled
CPU: found DTCM1 8k @ 00000000, not enabled
CPU: moved DTCM1 8k to fffea000, enabled
CPU: found ITCM0 8k @ 00000000, not enabled
CPU: moved ITCM0 8k to fffe0000, enabled
CPU: found ITCM1 8k @ 00000000, not enabled
CPU: moved ITCM1 8k to fffe2000, enabled
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: noinited root=/dev/mtdblock2 rootfstype=yaffs2 rw init=/linuxrc console=ttySAC,115200
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
__ex_table already sorted, skipping sort
Memory: 256MB = 256MB total
Memory: 255256k/255256k available, 6888k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    DTCM    : 0xfffe8000 - 0xfffec000   (  16 kB)
    ITCM    : 0xfffe0000 - 0xfffe4000   (  16 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc03e0380   (3937 kB)
      .init : 0xc03e1000 - 0xc04023dc   ( 133 kB)
      .data : 0xc0404000 - 0xc0441160   ( 245 kB)
       .bss : 0xc0442000 - 0xc0477c40   ( 216 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:390
VIC @f6000000: id 0x00041192, vendor 0x41
VIC @f6010000: id 0x00041192, vendor 0x41
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
Calibrating delay loop... 353.89 BogoMIPS (lpj=1769472)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x502f29e8 - 0x502f2a44
devtmpfs: initialized
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
TINY6410: Option string tiny6410=0
TINY6410: selected LCD display is 480x272
s3c64xx_dma_init: Registering DMA channels
PL080: IRQ 73, at d0846000, channels 0..8
PL080: IRQ 74, at d0848000, channels 8..16
S3C6410: Initialising architecture
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 3, 40960 bytes)
TCP: Hash tables configured (established 2048 bind 204
TCP: reno registered
UDP hash table entries: 256 (order: 1, 12288 bytes)
UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
ROMFS MTD (C) 2007 Red Hat, Inc.
BeFS version: 0.9.3
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
s3c-fb s3c-fb: window 0: fb
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 69) is a S3C6400/10
console [ttySAC0] enabled
s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 70) is a S3C6400/10
s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 71) is a S3C6400/10
s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 72) is a S3C6400/10
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000a at d08de000,d08e0004 IRQ 108 MAC: 8a:5a:be:f1:f1:d6 (random)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
s3c2410-ohci s3c2410-ohci: init err (00000000 0000)
s3c2410-ohci s3c2410-ohci: can't start s3c24xx
s3c2410-ohci s3c2410-ohci: startup error -75
s3c2410-ohci s3c2410-ohci: USB bus 1 deregistered
s3c2410-ohci: probe of s3c2410-ohci failed with error -75
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: mmc_busclk.0 (133250000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_busclk.2 (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
s3c-sdhci s3c-sdhci.1: clock source 0: mmc_busclk.0 (133250000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_busclk.2 (24000000 Hz)
mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
mmc0: mmc_rescan_try_freq: trying to init card at 300000 Hz
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
mmc0: mmc_rescan_try_freq: trying to init card at 200000 Hz
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Cannot open root device "mtdblock2" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[<c0014960>] (unwind_backtrace+0x0/0xf4) from [<c02f0128>] (panic+0x8c/0x1dc)
[<c02f0128>] (panic+0x8c/0x1dc) from [<c03e1d68>] (mount_block_root+0x1a4/0x25c)
[<c03e1d68>] (mount_block_root+0x1a4/0x25c) from [<c03e1ef0>] (mount_root+0xd0/0xf4)
[<c03e1ef0>] (mount_root+0xd0/0xf4) from [<c03e2074>] (prepare_namespace+0x160/0x1c4)
[<c03e2074>] (prepare_namespace+0x160/0x1c4) from [<c02efae4>] (kernel_init+0x8/0xe4)
[<c02efae4>] (kernel_init+0x8/0xe4) from [<c000ea18>] (ret_from_fork+0x14/0x3c)
求高手指点

论坛徽章:
0
2 [报告]
发表于 2015-04-13 15:57 |只看该作者
上面出现的VFS: Cannot open root device "mtdblock2" or unknown-block(0,0): error -6问题我解决了,我修改了两个东西,一个是内核中的文件,一个busybox中的文件,先说内核:
有人说yaffs自带ecc校验方式,这个校验方式和nand本身ecc校验不是一样的,两者会产生冲突,在内核中去掉ecc校验,在linux3.8.3/drivers/mtd/nand/s3c_nand.c中将nand->ecc.mode=NAND_ECC_SOFT修改为nand->ecc.mode=NAND_ECC_NONE,然后配置内核,make menuconfig 在Device Drivers - > xxxxx -> [] S3C NAND Hareware ECC 这项选择为空,表示不使能硬件ecc;然后在busybody-1.20.2目录下执行make menuconfig, Busybox Setting -->Build Option -->[*]Build Busybox as a static binary.
将编译好的内核和文件系统烧写到nand之后,上面的问题就解决了,但是又出现了下面的问题,

我又不知道该怎么解决了

error.png (25.71 KB, 下载次数: 52)

error.png

求职 : Linux运维
论坛徽章:
203
拜羊年徽章
日期:2015-03-03 16:15:432015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:092015小元宵徽章
日期:2015-03-06 15:58:182015年亚洲杯之约旦
日期:2015-04-05 20:08:292015年亚洲杯之澳大利亚
日期:2015-04-09 09:25:552015年亚洲杯之约旦
日期:2015-04-10 17:34:102015年亚洲杯之巴勒斯坦
日期:2015-04-10 17:35:342015年亚洲杯之日本
日期:2015-04-16 16:28:552015年亚洲杯纪念徽章
日期:2015-04-27 23:29:17操作系统版块每日发帖之星
日期:2015-06-06 22:20:00操作系统版块每日发帖之星
日期:2015-06-09 22:20:00
3 [报告]
发表于 2015-04-16 12:04 |只看该作者
很复杂。。。                     

论坛徽章:
0
4 [报告]
发表于 2015-04-16 18:31 |只看该作者
您能说说出现这种情况,是uboot,内核,文件系统这三个那些可能没有配置好吗,

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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP