免费注册 查看新帖 |

Chinaunix

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

[BootLoader] 根文件系统的烧写错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-07-09 15:29 |只看该作者 |倒序浏览
大家好!我是一名在校学生。最近自己在做根文件系统的移植时遇到了问题。想请教一下,还请大家请多多指教。

我遇到的问题:当我烧写cramfs文件系统的时候,可以成功挂载,但是运行我自己的应用程序时会出现错误(我的那个应用程序需要向系统中写文件,而cramfs是一个只读文件系统,我估计是这儿出的问题)。但是当我烧写yaffs2文件系统的时候,就挂载不上了,出现了如下的错误:
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs1
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem) on device 31:3.
Freeing init memory: 136K
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.
Backtrace:
[<c002e6d0>] (dump_backtrace+0x0/0x110) from [<c002e814>] (dump_stack+0x18/0x1c)

r6:00000000 r5:c002560c r4:c0409450
[<c002e7fc>] (dump_stack+0x0/0x1c) from [<c0040164>] (panic+0x54/0x124)
[<c0040110>] (panic+0x0/0x124) from [<c002a578>] (init_post+0xd4/0xfc)
r3:c6101f00 r2:c03e4520 r1:000000c0 r0:c03838ec
[<c002a4a4>] (init_post+0x0/0xfc) from [<c00087cc>] (kernel_init+0xe0/0x110)
r4:c0408d00
[<c00086ec>] (kernel_init+0x0/0x110) from [<c0043240>] (do_exit+0x0/0x654)
r5:00000000 r4:00000000
请问一下这是什么意思啊?刚刚接触这一块不久,还请大家指点指点。谢谢各位啦!

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:58:11
2 [报告]
发表于 2014-07-09 18:48 |只看该作者
内核启动完整的Log贴出来

论坛徽章:
22
丑牛
日期:2014-08-15 14:32:0015-16赛季CBA联赛之同曦
日期:2017-12-14 15:28:14黑曼巴
日期:2017-08-10 08:14:342017金鸡报晓
日期:2017-02-08 10:39:42黑曼巴
日期:2016-11-15 15:48:38CU十四周年纪念徽章
日期:2016-11-09 13:19:1015-16赛季CBA联赛之同曦
日期:2016-04-08 18:00:03平安夜徽章
日期:2015-12-26 00:06:30程序设计版块每日发帖之星
日期:2015-12-03 06:20:002015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-08-09 06:20:002015亚冠之吉达阿赫利
日期:2015-07-03 08:39:42
3 [报告]
发表于 2014-07-09 18:51 |只看该作者
看来你的rootfs已经挂载上了,估计你的busybox没弄好。 你在根目录下建立一个指向bin/busybox的软链接试试
ln -s bin/busybox init

论坛徽章:
0
4 [报告]
发表于 2014-07-10 11:31 |只看该作者
回复 3# amarant

我这个不是用busybox制作的根文件系统,而是直接根据TI自带的根文件系统裁剪之后得到的。
   

论坛徽章:
0
5 [报告]
发表于 2014-07-10 11:35 |只看该作者
回复 2# arm-linux-gcc
DM6467 EVM > boot

NAND read: device 0 offset 0x500000, size 0x220000
2228224 bytes read: OK
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.32-rc2-davinci1-g73dbf
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2043612 Bytes =  1.9 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
....................................................................... done, bo
oting the kernel.
Linux version 2.6.32-rc2-davinci1-g73dbf71-dirty (root@bbs) (gcc version 4.2.0 (
MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #16 PREEMPT Tue Jul 8 15:07:34 CST
2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DM646x EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci dm6467_rev3.x variant 0x1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: noinitrd root=/dev/mtdblock3 rw  rootfstype=yaffs2 init=/li
nuxrc console=ttyS0,115200,noblock
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125468KB available (3816K code, 329K data, 136K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 249.03 BogoMIPS (lpj=1245184)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 43 gpio irqs
NET: Registered protocol family 16
MUX: Setting register STSOMUX_DISABLE
           PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
MUX: Setting register STSIMUX_DISABLE
           PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
MUX: Setting register PTSOMUX_DISABLE
           PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
MUX: Setting register PTSIMUX_DISABLE
           PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
MUX: initialized CIR_UART2
MUX: Setting register CIR_UART2
           PINMUX1 (0x00000004) = 0x00000000 -> 0x00000020
MUX: initialized UART0_GPIO_36_37_38_8
MUX: Setting register UART0_GPIO_36_37_38_8
           PINMUX1 (0x00000004) = 0x00000020 -> 0x00000021
MUX: initialized UART1_GPIO_25_26
MUX: Setting register UART1_GPIO_25_26
           PINMUX1 (0x00000004) = 0x00000021 -> 0x00000025
MUX: initialized UART2_GPIO_39_40_41_42
MUX: Setting register UART2_GPIO_39_40_41_42
           PINMUX1 (0x00000004) = 0x00000025 -> 0x00000035
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
vpif vpif: vpif probe success
Switching to clocksource timer0_1
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 13
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
yaffs Jul  8 2014 15:05:01 Installing.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 245
io scheduler noop registered
io scheduler anticipatory registered (default)
DMA: DMA_devInit()
DMA:install success, major num = 252
CIR device registered successfully                        (Major = 251,  Minor =
0)
[XKL_GPIO_DRIVER]:dm6467_gpio initialized
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a ST16654
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x1c20400 (irq = 41) is a ST16650V2
serial8250 serial8250.0: unable to register port at index 2 (IO0 MEM1c20800 IRQ4
2): -22
brd: module loaded
loop: module loaded
at24 1-0050: 32768 byte 24c256 EEPROM (writable)
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
Scanning device for bad blocks
Bad eraseblock 252 at 0x0000003f0000
Bad eraseblock 256 at 0x000000400000
Bad eraseblock 260 at 0x000000410000
Creating 4 MTD partitions on "davinci_nand.0":
0x000000000000-0x000000020000 : "params"
mtd: Giving out device 0 to params
0x000000020000-0x000000160000 : "bootloader"
mtd: Giving out device 1 to bootloader
0x000000500000-0x000000900000 : "kernel"
mtd: Giving out device 2 to kernel
0x000000900000-0x000004000000 : "filesystem"
mtd: Giving out device 3 to filesystem
davinci_nand davinci_nand.0: controller rev. 2.2
spi_davinci spi_davinci.0: DaVinci SPI driver in EDMA mode
Using RX channel = 17 , TX channel = 16 and event queue = 3
at25 spi0.0: 32 KByte at25640a eeprom, pagesize 64
spi_davinci spi_davinci.0: Controller at 0xfec66800
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
dm9000 Ethernet Driver, V1.31
console [netcon0] enabled
netconsole: network logging started
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbtest
mice: PS/2 mouse device common for all mice
rtc-pcf8563 1-0051: chip found, driver version 0.4.3
rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
cs4954 1-0000: chip found @ 0x0 (DaVinci I2C adapter)
tvp5158 1-005e: [tvp5158 probe]: chip found @ 0xbc (DaVinci I2C adapter)
tvp5158_checkChip ok!
Patch is downloading...
Patch is downloaded.  Soft reset!
using default mode PAL!
tvp5158_initVideoMode successfully!
tvp5158_initAudioMode devId=0 successfully!
vpif_capture vpif_capture: registered sub device tvp5158-0
tvp5158 1-005f: [tvp5158 probe]: chip found @ 0xbe (DaVinci I2C adapter)
tvp5158_checkChip ok!
Patch is downloading...
Patch is downloaded.  Soft reset!
using default mode PAL!
tvp5158_initVideoMode successfully!
tvp5158_initAudioMode devId=1 successfully!
vpif_capture vpif_capture: registered sub device tvp5158-1
vpif_capture vpif_capture: DM646x VPIF Capture driver initialized
watchdog watchdog: heartbeat 60 sec
Advanced Linux Sound Architecture Driver Version 1.0.21.
[coolen_debug](cs4341_i2c_probe).
[coolen_debug](cs4341_register).
[coolen_debug](davinci_mcasp_probe):    txnumevt = 0.rxnumevt=0
[coolen_debug](davinci_mcasp_probe):    playbackCH = 6.
[coolen_debug](davinci_mcasp_probe):    captureCH = 9.
[coolen_debug](davinci_mcasp_probe):    txnumevt = 0.rxnumevt=0
[coolen_debug](davinci_mcasp_probe):    playbackCH = 12.
[coolen_debug](davinci_mcasp_probe):    captureCH = -1.
[coolen_debug](cs4341_probe).
[coolen_debug](cs4341_init):gpioRet = 0.gpio value 2
[coolen_debug](cs4341_init): cs4341 regList:

CS4341_REG_MODE:0
CS4341_REG_MCLKDIV:0
CS4341_REG_TMIX:8c
CS4341_REG_AVOLUME:0
CS4341_REG_BVOLUME:0
asoc: cs4341 <-> davinci-i2s mapping ok
[coolen_debug](evm_cs4341_init).
ALSA device list:
  #0: DaVinci DM6467 EVM (cs4341)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused emac
Clocks: disable unused timer1
davinci_emac_probe: using random MAC addr: 1e:11:2c:1c:96:62
emac-mii: probed
rtc-pcf8563 1-0051: low voltage detected, date/time is not reliable.
rtc-pcf8563 1-0051: retrieved date/time is not valid.
rtc-pcf8563 1-0051: hctosys: invalid date/time
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs1
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem) on device 31:3.
Freeing init memory: 136K
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.
Backtrace:
[<c002e6d0>] (dump_backtrace+0x0/0x110) from [<c002e814>] (dump_stack+0x18/0x1c)

r6:00000000 r5:c002560c r4:c040b490
[<c002e7fc>] (dump_stack+0x0/0x1c) from [<c0040164>] (panic+0x54/0x124)
[<c0040110>] (panic+0x0/0x124) from [<c002a578>] (init_post+0xd4/0xfc)
r3:c6102f00 r2:c03e6520 r1:000000c0 r0:c038550c
[<c002a4a4>] (init_post+0x0/0xfc) from [<c00087cc>] (kernel_init+0xe0/0x110)
r4:c040ad40
[<c00086ec>] (kernel_init+0x0/0x110) from [<c0043240>] (do_exit+0x0/0x654)
r5:00000000 r4:00000000


   

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:58:11
6 [报告]
发表于 2014-07-10 11:40 |只看该作者
本帖最后由 arm-linux-gcc 于 2014-07-10 12:51 编辑

没找到linuxrc

Kernel command line: noinitrd root=/dev/mtdblock3 rw  rootfstype=yaffs2 init=/li
nuxrc
console=ttyS0,115200,noblock

Failed to execute /linuxrc. Attempting defaults...

在/下创建一个软连接,ln -s  /sbin/init  /linuxrc


或者是个干脆删掉cmdline里的init=/linuxrc

评分

参与人数 1可用积分 +10 收起 理由
amarant + 10 赞一个!

查看全部评分

论坛徽章:
0
7 [报告]
发表于 2014-07-10 11:41 |只看该作者
这是我烧写内核的命令:
tftp 0x80700000 uImage

nand erase 500000 220000

nand write 0x80700000 500000  220000

setenv bootcmd 'nand read 0x80700000 0x500000 220000\;bootm 0x80700000'

saveenv

这是我烧写yaffs2文件系统的命令。都是按照书上所写的烧的,应该没错。
tftp 0x60000000  yaffs2_78(这是我通过mkyaffs2image命令制作的yaffs2文件系统映像文件)

nand erase 900000 0x3700000

nand write  0x60000000  900000 2f50000

setenv bootargs 'noinitrd root=/dev/mtdblock3 rw  rootfstype=yaffs2 init=/linuxrc console=ttyS0,115200,noblock'

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:58:11
8 [报告]
发表于 2014-07-10 14:45 |只看该作者
本帖最后由 arm-linux-gcc 于 2014-07-10 14:45 编辑

建议用initramfs启动到shell,然后mount yaffs2,然后看看yaffs2里面到底是不是你预想的那样
很多时候都是因为多了一个顶层目录导致的

论坛徽章:
0
9 [报告]
发表于 2014-07-10 15:37 |只看该作者
回复 6# arm-linux-gcc
我试过了你说的这两种方法:一是建立一个链接,二是直接删除掉。可是,今天下午我试了之后,问题还是一样的存在啊。


   

论坛徽章:
0
10 [报告]
发表于 2014-07-10 15:41 |只看该作者
回复 8# arm-linux-gcc
我明明写到开发板里的根文件系统是yaffs2的,可是内核输出:
yaffs: auto selecting yaffs1
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem) on device 31:3.

这是不是说明其实根文件系统没有烧写到开发板中呢?但是我用uboot烧写根文件系统的时候,提示烧写时正确的。这个问题卡了我一个多星期了,还没搞出来。麻烦您帮忙看看。谢谢!
   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP