touch1986

touch1986

0个粉丝

5

问答

0

专栏

0

资料

touch1986  发布于  2017-05-31 11:27:59
采纳率 0%
5个问答
4905

hi3536烧写yaffs2文件系统

 
hi3536板子的库被弄坏了,想重新烧一下文件系统,结果擦除一直出错,好像是页对齐的问题,但具体不知道怎么计算。求了解的人帮忙一下

U-Boot 2010.06 (Mar 23 2015 - 18:05:17)

NAND:  Check nand flash controller v610. found
Special NAND id table Version 1.36
Nand ID: 0xEC 0xDA 0x10 0x95 0x44 0xEC 0xDA 0x10
Block:128KB Page:2KB Chip:256MB*1 OOB:64B ECC:4bit/512
256 MiB
Check spi flash controller v350... Found
Spi(cs1) ID: 0xC2 0x20 0x19 0xC2 0x20 0x19
Spi(cs1): Block:64KB Chip:32MB Name:"MX25L 256/257 35 E/F"
MMC:   
EMMC/MMC/SD controller initialization.
No EMMC/MMC/SD device found !
In:    serial
Out:   serial
Err:   serial
32768 KiB hi_sfc at 0:0 is now current device



WARNING! unknown slave_kernel.img format!
Hit any key to stop autoboot:  0
hisilicon #
hisilicon #
hisilicon # sf erase 0x500000 0x1a5a000
ERROR: erase length is not block aligned!
我来回答
回答8个
时间排序
认可量排序

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2017-05-31 11:41:18
认可0
"ERROR: erase length is not block aligned!"

说的很清楚了, 擦除得长度没有按块对齐

楼主的NAND的bloack是128K, 要求长度是0x20000对齐, nor的block是64k,要求0x10000对齐


touch1986

0个粉丝

5

问答

0

专栏

0

资料

touch1986 2017-05-31 15:48:21
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=50566&ptid=15377]zhuangweiye 发表于 2017-5-31 11:41[/url]
"ERROR: erase length is not block aligned!"

说的很清楚了, 擦除得长度没有按块对齐
[/quote]

谢谢,还有两个问题,就是Hi3536_SDK_V2.0.2.0没有给出从文件系统的烧写镜像,还用烧写从系统吗?另外一个,就是按照文档烧写好以后,启动到文件系统那就会出很乱的地址,也不知道是哪里的缘故

touch1986

0个粉丝

5

问答

0

专栏

0

资料

touch1986 2017-05-31 15:53:31
认可0
以下是同一批板子的正常启动配置,跟烧写文档上有些不一样,但我按这个设置启动参数后也会起不来。
hisilicon # print
bootdelay=1
baudrate=115200
ethaddr=00:00:23:34:45:66
bootfile="uImage"
filesize=661B180
fileaddr=42000000
netmask=255.255.254.0
ipaddr=192.168.1.10
serverip=192.168.1.77
bootargs=mem=128M console=ttyAMA0,115200 root=/dev/mtdblock3 rootfstype=yaffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),14M(norflash);hinand,256M(rootfs)
bootcmd=sf probe 0;sf read 0x42000000 0x100000 0x400000;bootm 0x42000000
slave_autostart=1
slave_bootcmd=sf probe 0;sf read 0x81000000 0x1300000 0x80000;sf read 0x82000000 0x1400000 0x400000;sf read 0x83000000 0x1800000 0x600000;bootm 0x81000000 0x82000000 0x83000000
slave_bootargs=mem=96M console=ttyAMA0,115200
stdin=serial
stdout=serial
stderr=serial
verify=n
ver=U-Boot 2010.06 (Mar 23 2015 - 18:05:17)

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2017-05-31 16:49:16
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=50584&ptid=15377]touch1986 发表于 2017-5-31 15:53[/url]
以下是同一批板子的正常启动配置,跟烧写文档上有些不一样,但我按这个设置启动参数后也会起不来。
hisili ...[/quote]

1.启动log是什么?

2.从slave_bootcmd来看
slave的u-boot在flash的0x1300000,长度0x80000
slave的uImage在flash的0x1400000,长度0x400000
slave的rootfs在flash的0x1800000,长度0x600000

touch1986

0个粉丝

5

问答

0

专栏

0

资料

touch1986 2017-05-31 17:17:38
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=50593&ptid=15377]zhuangweiye 发表于 2017-5-31 16:49[/url]
1.启动log是什么?

2.从slave_bootcmd来看
[/quote]

这个是启动时打印的,SDK里有master、slave和single三种镜像,我不知道适用哪个。

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.10.0_hi3536 (pub@BVT-SDK-SERVER3) (gcc version 4.8.3 20131202 (prerelease) (Hisilicon_v400) ) #1 SMP Fri Jun 5 15:07:34 HKT 2015
CPU: ARMv7 Processor [411fc0e1] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: hi3536
Truncating memory at 0x40000000 to fit in 32-bit physical address space
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 8 pages/cpu @c0859000 s8448 r8192 d16128 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: mem=128M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=yaffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),14M(rootfs)
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: 122284k/122284k available, 8788k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc06c1a8c   (6887 kB)
      .init : 0xc06c2000 - 0xc06f1100   ( 189 kB)
      .data : 0xc06f2000 - 0xc072c880   ( 235 kB)
       .bss : 0xc072c880 - 0xc075580c   ( 164 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:160
sched_clock: 32 bits at 125MHz, resolution 8ns, wraps every 34359ms
Console: colour dummy device 80x30
Calibrating delay loop... 2786.91 BogoMIPS (lpj=13934592)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0xc052c9b0 - 0xc052ca08
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU2: Booted secondary processor
CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
CPU3: Booted secondary processor
CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Brought up 4 CPUs
SMP: Total of 4 processors activated (11167.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
slave boot addr is error!
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
Serial: AMBA PL011 UART driver
uart:0: ttyAMA0 at MMIO 0x12080000 (irq = 38) is a PL011 rev2
console [ttyAMA0] enabled
uart:1: ttyAMA1 at MMIO 0x12090000 (irq = 39) is a PL011 rev2
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource timer0
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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.
NetWinder Floating Point Emulator V0.97 (double precision)
CPU PMU: probing PMU on CPU 1
CPU PMU: failed to probe PMU!
CPU PMU: failed to register PMU devices!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
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.22)
SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
msgmni has been set to 238
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
hiahci: initializing
ahci ahci.0: can't get clock
ahci: SSS flag set, parallel bus scan disabled
ahci ahci.0: AHCI 0001.0300 32 slots 4 ports 6 Gbps 0xf impl platform mode
ahci ahci.0: flags: ncq sntf stag pm led clo only pmp fbs slum part ccc sxs boh
scsi0 : ahci_platform
scsi1 : ahci_platform
scsi2 : ahci_platform
scsi3 : ahci_platform
ata1: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x100 irq 59
ata2: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x180 irq 59
ata3: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x200 irq 59
ata4: SATA max UDMA/133 mmio [mem 0x11010000-0x1101ffff] port 0x280 irq 59
Spi id table Version 1.22
Spi(cs1) ID: 0xC2 0x20 0x19
0xC2 0x20 0x19
SPI nor flash boot mode is 3 Bytes
Spi(cs1):
Block:64KBChip:32MB
Name:"MX25L 256/257 35 E/F"
spi size: 32MB
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-0x000000500000 : "kernel"
0x000000500000-0x000001300000 : "rootfs"
Found Nand Flash Controller V610.
Nand ID: 0xEC 0xDA 0x10 0x95 0x44 0xEC 0xDA 0x10
Nand: Samsung NAND 256MiB 3,3V 8-bit
Nand(HW-Auto): Block:128KB Page:2KB OOB:64B ECC:4bit/512 Chip:256MB*1
NAND_ECC_NONE selected by board driver. This is not recommended!
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
before uhci_hcd and ohci_hcd, not after
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 0x10040000
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: 2 ports 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 52, io mem 0x10030000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ata1: SATA link down (SStatus 0 SControl 300)
hiusb-xhci hiusb-xhci.0: xHCI Host Controller
hiusb-xhci hiusb-xhci.0: new USB bus registered, assigned bus number 3
hiusb-xhci hiusb-xhci.0: irq 60, io mem 0x11040000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
hiusb-xhci hiusb-xhci.0: xHCI Host Controller
hiusb-xhci hiusb-xhci.0: new USB bus registered, assigned bus number 4
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
hisi_i2c hisi_i2c.0: Hisilicon [i2c-0] probed!
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
hi_iommu_probe:964: begin
hi_iommu_probe iores_start:131f0000
oprofile: no performance counters
oprofile: using timer interrupt.
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
NET: Registered protocol family 17
NET: Registered protocol family 15
VFP support v0.3: implementor 41 architecture 3 part 30 variant e rev 0
registered taskstats version 1
ata2: SATA link down (SStatus 0 SControl 300)
ata3: SATA link down (SStatus 0 SControl 300)
ata4: SATA link down (SStatus 0 SControl 300)
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
List of all partitions:
f000            1024 romblock0  (driver?)
1f00            1024 mtdblock0  (driver?)
f001            4096 romblock1  (driver?)
1f01            4096 mtdblock1  (driver?)
f002           14336 romblock2  (driver?)
1f02           14336 mtdblock2  (driver?)
f003          262144 romblock3  (driver?)
1f03          262144 mtdblock3  (driver?)
No filesystem could mount root, tried:  yaffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.10.0_hi3536 #1

zhuangweiye

8个粉丝

0

问答

0

专栏

0

资料

zhuangweiye 2017-05-31 17:25:11
认可0
本帖最后由 zhuangweiye 于 2017-5-31 17:27 编辑

[quote][url=forum.php?mod=redirect&goto=findpost&pid=50597&ptid=15377]touch1986 发表于 2017-5-31 17:17[/url]
这个是启动时打印的,SDK里有master、slave和single三种镜像,我不知道适用哪个。

Starting kernel .. ...[/quote]

这个...

yaff2是NAND flash的文件系统, 您把它烧到nor flash上?

上面, 您说正常的
bootargs=mem=128M console=ttyAMA0,115200 root=/dev/mtdblock3 rootfstype=yaffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),14M(norflash);hinand,256M(rootfs)

仔细看root=/dev/mtdblock3, 对应的是hinand,256M(rootfs)

而现在您的
Kernel command line: mem=128M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=yaffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),14M(rootfs)
root=/dev/mtdblock2 对应的是hi_sfc:1M(boot),4M(kernel),14M(rootfs)

touch1986

0个粉丝

5

问答

0

专栏

0

资料

touch1986 2017-05-31 17:38:20
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=50599&ptid=15377]zhuangweiye 发表于 2017-5-31 17:25[/url]
这个...

yaff2是NAND flash的文件系统, 您把它烧到nor flash上?
[/quote]

是的,我看好的板子启动时也有好多SPI flash的字眼,而且第一次烧到nand时也是不正常,就改到SPI Flash了:L,而且也尝试着改了一下启动参数。

touch1986

0个粉丝

5

问答

0

专栏

0

资料

touch1986 2017-05-31 18:27:58
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=50599&ptid=15377]zhuangweiye 发表于 2017-5-31 17:25[/url]
这个...

yaff2是NAND flash的文件系统, 您把它烧到nor flash上?
[/quote]

多谢了,现在起来了,bootargs和bootcmd差了好多,一个字符一个字符校对才正确了
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

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

Markdown 语法

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

举报类型

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

详细说明

易百纳技术社区