slice

slice

0个粉丝

2

问答

0

专栏

0

资料

slice  发布于  2016-03-04 22:33:53
采纳率 0%
2个问答
8755

板子启动找不到文件系统nand flash找不到

 
是这样,买的开发板,他们提供的bin文件打包了uboot kernel fs。
我按照sdk的说明文档,自己生成了uboot kernel fs,板子用的spi flash。

下面是启动的log,帮忙分析下大概什么原因呢,硬件肯定是没问题的。

[code]## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.4.35
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2942664 Bytes = 2.8 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.4.35 (root@debian) (gcc version 4.8.3 20131202 (prerelease) (Hisilicon_v400) ) #1 Fri Feb 5 14:45:59 CST 2016
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: hi3516a
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),3M(kernel),12M(rootfs)
PID hash table entries: 256 (order: -2, 1024 bytes)
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: 59152k/59152k available, 6384k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0536000   (5304 kB)
      .init : 0xc0536000 - 0xc0557ddc   ( 136 kB)
      .data : 0xc0558000 - 0xc0584b80   ( 179 kB)
       .bss : 0xc0584ba4 - 0xc05a3778   ( 123 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:128
sched_clock: 32 bits at 49MHz, resolution 20ns, wraps every 86767ms
Console: colour dummy device 80x30
Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8040d568 - 0x8040d5c0
dummy:
NET: Registered protocol family 16
Serial: AMBA PL011 UART driver
uart:0: ttyAMA0 at MMIO 0x20080000 (irq = 40) is a PL011 rev2
console [ttyAMA0] enabled
uart:1: ttyAMA1 at MMIO 0x20090000 (irq = 41) is a PL011 rev2
bio: create slab at 0
SCSI subsystem initialized
hi-spi-master hi-spi-master.0: with 1 chip select slaves attached
hi-spi-master hi-spi-master.1: with 3 chip select slaves attached
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timer0
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
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.
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
NFS: Registering the id_resolver key type
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.18)
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 115
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
brd: module loaded
Found SPI Nand Flash Controller v100.
SPI Nand ID Table Version 1.3
SPI Nand : Manufacturer ID[0x0]
No NAND device found
Higmac dma_sg_phy: 0x839c0000
higmac_mdio_bus: probed
ETH0: rgmii, phy_addr=1, mii_name=mdio0
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
hiusb-ehci hiusb-ehci.0: HIUSB EHCI
hiusb-ehci hiusb-ehci.0: new USB bus registered, assigned bus number 1
hiusb-ehci hiusb-ehci.0: irq 53, io mem 0x100b0000
hiusb-ehci hiusb-ehci.0: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
hiusb-ohci hiusb-ohci.0: HIUSB OHCI
hiusb-ohci hiusb-ohci.0: new USB bus registered, assigned bus number 2
hiusb-ohci hiusb-ohci.0: irq 54, io mem 0x100a0000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
hisi_i2c hisi_i2c.0: Hisilicon [i2c-0] probed!
hisi_i2c hisi_i2c.1: Hisilicon [i2c-1] probed!
hisi_i2c hisi_i2c.2: Hisilicon [i2c-2] probed!
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
List of all partitions:
No filesystem could mount root, tried:  jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)[/code]
我来回答
回答12个
时间排序
认可量排序

slice

0个粉丝

2

问答

0

专栏

0

资料

slice 2016-03-04 22:35:20
认可0
如果用开发板自带启动是这样的
[code]Spi id table Version 1.22
Spi(cs1) ID: 0xC2 0x20 0x18 0xC2 0x20 0x18
SPI nor flash boot mode is 3 Bytes
Spi(cs1):
Block:64KB
Chip:16MB
Name:"MX25L128XX"
spi size: 16MB
chip num: 1
3 cmdlinepart partitions found on MTD device hi_sfc
3 cmdlinepart partitions found on MTD device hi_sfc
Creating 3 MTD partitions on "hi_sfc":
0x000000000000-0x000000100000 : "boot"
0x000000100000-0x000000400000 : "kernel"
0x000000400000-0x000001000000 : "rootfs"
Found Nand Flash Controller V610.
Nand ID: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
No NAND device found[/code]

H伟伯爵H

0个粉丝

0

问答

0

专栏

0

资料

H伟伯爵H 2016-03-05 09:16:30
认可0
你的spi size: 16MB;
你的bootcmd :mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),3M(kernel),12M(rootfs);
分配了12M空间给了文件系统。
你文件系统多大?

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2016-03-05 15:57:33
认可0
1. 制作文件系统
    建一个rootfs目录, 在里面建好文件系统, 放上需要的东西, 简单的方法是用SDK中的解包,去掉一些不用的,加上些自己的
2. 制作映像
    mkfs.jffs2 -r rootfs -o rootfs.jffs2
3. 烧到板子上
    在uboot下
    #mw.b 0x82000000 0xff 0xc00000
    #tftp 0x82000000 rootfs.jffs2
    #sf probe 0
    #sf erase 0x400000 0xc00000
    #sf write 0x82000000 0x400000 0xc00000
    以上是对应楼主使用的bootarg
mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),3M(kernel),12M(rootfs)

slice

0个粉丝

2

问答

0

专栏

0

资料

slice 2016-03-05 18:01:10
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=26077&ptid=10264]H伟伯爵H 发表于 2016-3-5 09:16[/url]
你的spi size: 16MB;
你的bootcmd :mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs ...[/quote]

多谢指点,仔细看了下,应该就是大小问题。
用mkfs.jffs2生成的文件已经15M大小了。
看了卖家给的bin文件,整个包的大小正好是16M。
怎么把kernel fs uboot打包成一个文件呢,如果打成一个包,是不是要事先配置好uboot的启动参数再编译的。我是小白,刚开始用就碰到问题了,多谢两位指点

slice

0个粉丝

2

问答

0

专栏

0

资料

slice 2016-03-05 18:07:15
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=26085&ptid=10264]zhuangweiye 发表于 2016-3-5 15:57[/url]
1. 制作文件系统
    建一个rootfs目录, 在里面建好文件系统, 放上需要的东西, 简单的方法是用SDK中的解包 ...[/quote]

我先来把文件系统搞小一点试试。

slice

0个粉丝

2

问答

0

专栏

0

资料

slice 2016-03-06 14:30:40
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=26085&ptid=10264]zhuangweiye 发表于 2016-3-5 15:57[/url]
1. 制作文件系统
    建一个rootfs目录, 在里面建好文件系统, 放上需要的东西, 简单的方法是用SDK中的解包 ...[/quote]

还是不行,文件系统的操作步骤如下
解压缩SDK自带的文件系统后,
osdrv/pub/bin/pc/mkfs.jffs2 -d osdrv/pub/rootfs_glibc/ -l -e 0x100 -o osdrv/pub/rootfs_glibc_64k.jffs200
生成11.5M的文件。
然后
4)烧写文件系统
        mw.b 82000000 ff C00000
        tftp 0x82000000 rootfs_glibc_64k.jffs2
        sf probe 0
        sf erase 400000 C00000
        sf write 82000000 400000 C00000
    5)设置启动参数
        setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),3M(kernel),12M(rootfs)'
        setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x300000;bootm 0x82000000'
        sa

依旧是上面的错误,看log貌似是内核没有找到spi nand flash?
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
应该是没有识别?

slice

0个粉丝

2

问答

0

专栏

0

资料

slice 2016-03-06 14:42:42
认可0
“Journalling Flash File System v2 (JFFS2) support”选项 已经勾选了

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2016-03-07 08:54:42
认可0
建议楼主调试时不要一下全用自己做的uIamge+rootfs,可以用开发板上的来调试
比如先用开发板上的bin烧好,然后在上面再烧自己编的uImage,看看能不能正常起来,如果不行那就基本是内核编译的问题,如果ok,那再去搞文件系统

H伟伯爵H

0个粉丝

0

问答

0

专栏

0

资料

H伟伯爵H 2016-03-07 10:28:06
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=26096&ptid=10264]slice 发表于 2016-3-6 14:30[/url]
还是不行,文件系统的操作步骤如下
解压缩SDK自带的文件系统后,
osdrv/pub/bin/pc/mkfs.jffs2 -d osdr ...[/quote]

./mkfs.jffs2 -d ./rootfs -l -e  0x10000 -o jffs2-root.img
改成这个

slice

0个粉丝

2

问答

0

专栏

0

资料

slice 2016-03-08 14:57:10
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=26113&ptid=10264]zhuangweiye 发表于 2016-3-7 08:54[/url]
建议楼主调试时不要一下全用自己做的uIamge+rootfs,可以用开发板上的来调试
比如先用开发板上的bin烧好,然 ...[/quote]

多谢指点,搞定了,可能是内核哪里配置问题
cp arch/arm/configs/hi3516a_full_defconfig .config,用了这个配置编译出来就可以用了。

另外再请教一下,uboot kernel fs这三个文件大伙一般是怎么打包的啊?

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2016-03-08 15:52:58
认可0
简单的办法: dd命令

bingbing

0个粉丝

12

问答

0

专栏

0

资料

bingbing 2017-02-06 12:06:38
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=26194&ptid=10264]slice 发表于 2016-3-8 14:57[/url]
多谢指点,搞定了,可能是内核哪里配置问题
cp arch/arm/configs/hi3516a_full_defconfig .config,用了 ...[/quote]

楼主能加一下你qq吗,3516a我也是刚接触,我qq892432203
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区