硅天下科技

硅天下科技

1个粉丝

38

问答

0

专栏

9

资料

硅天下科技  发布于  2020-08-08 22:18:33
采纳率 0%
38个问答
4488

Hi3516DV300(二)

 
二、使用串口烧写映像1 准备工作

1)准备海思工具HiTool.exe,启动后切换Hi3516DV300芯片(菜单栏:芯片->切换芯片->Hi3516DV300);



2)准备串口板、海思3516DV300板、及串口线;

我的3516DV300海思板,内存是512MB,32MB的spi-nor flash;

3)配置PC串口,我用的是XShell



4)编好的映像文件(【海思篇】【Hi3516DV300】一、 逐步搭建开发环境)
-rw-r--r-- 1 developer developer 4.1M Mar 28 09:58 rootfs_hi3516dv300_64k.jffs2
-rwxr-xr-- 1 developer developer 299K Mar 28 09:50 u-boot-hi3516dv300.bin
-rw-rw-r-- 1 developer developer 3.5M Mar 27 18:33 uImage_hi3516dv300_smp


2 开始烧写



烧写步骤(用默认的按分区烧写):

1)选择传输方式:串口

2)选择与串口板连接的串口:COM1(每个人电脑各不相同)

3)打开分区xml文件;没有的自己创建或者下载我上传的附件,然后再根据自己的映像文件和器件类型修改;

4)勾选fastboot、kernel、rootfs

5)选择器件类型:spi nor(每个人的3516DV300海思板各不相同,根据实际配置);

6)可选步骤:没有分区xml文件的,手动添加方法参考上图的说明部分。配置好后,可以点<保存按钮>保存你的分区配置;

7)配置好串口后(参考准备部分),点击海思烧写工具<烧写>按钮,弹出进度条页面, 按下板上的串口升级按键,接通海思板的电源,然后海思烧写工具的进度条页面的进度条开始滚动。





3 配置启动参数

烧写完成后会进入uboot模式(有3s倒计时,3s内按回车会主动进入uboot)

Uncompress Ok!

U-Boot 2016.11 (Mar 28 2020 - 09:50:11 +0800)hi3516dv300

Relocation Offset is: 0f6c2000
Relocating to 8fec2000, new gd at 8fe21ef0, sp at 8fe21ed0
SPI Nor:  Check Flash Memory Controller v100 ... Found
SPI Nor ID Table Version 1.0
SPI Nor(cs 0) ID: 0xc2 0x20 0x19
Block:64KB Chip:32MB Name:"MX25L(256/257)XX"
SPI Nor total size: 32MB
NAND:  0 MiB
MMC:   
In:    serial
Out:   serial
Err:   serial
Net:   eth0
Warning: eth0 (eth0) using random MAC address - 32:f6:3b:2f:fc:6e

Hit any key to stop autoboot:  0
hisilicon #
hisilicon #
hisilicon # setenv bootargs 'mem=128M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 rw mtdparts=hi_sfc:1M(boot),5M(kernel),26M(rootfs)'
hisilicon # setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x500000;bootm 0x82000000'
hisilicon # save
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done
hisilicon #
hisilicon #
hisilicon # re
resetting ...
==> bootarg参数介绍

mem:内存大小,我的海思板是512MB,但是我分配128M给OS,384M给mmz

console:串口配置参数,ttyAMA0是串口的设备文件/dev/ttyAMA0,115200是串口的波特率(与PC的串口波特率一致)

root:rootfs文件系统的块文件路径(/dev/mtdblock0是uboot,/dev/mtdblock1是kernel,/dev/mtdblock2是rootfs)

rootfstype:rootfs文件系统类型为jffs2

rw: 文件系统具有读写权限

mtdparts=hi_sfc:1M(boot),5M(kernel),26M(rootfs)

mtdparts:flash上的映像文件分区,boot占1M,kernel占5M,rootfs占26M(我的flash是32M); mtdparts=hi_sfc指定了其flash类型为spi flash,如果是mtdparts=hinand, 则其flash类型为nand flash;

==> bootcmd解析

sf probe 0 #初始化flash,0是spi总线号

sf read 0x82000000 0x100000 0x500000 #将flash上偏移地址0x100000大小为0x500000的数据读取到内存地址为0x82000000

bootm 0x82000000 #内核从内存为0x82000000启动内核映像文件

#0x82000000是固定地址,不要随便改

#0x100000为kernel映像在flash上的地址,0~0x0FFFF在flash上分配给了uboot映像文件,该值可以根据mtdparts的boot大小修改

#0x500000是kernel映像文件的大小

最后记得save或者saveenv,保存配置,不然重启(reset)不会生效。
我来回答
回答3个
时间排序
认可量排序

硅天下科技

1个粉丝

38

问答

0

专栏

9

资料

硅天下科技 2020-08-08 22:19:17
认可0
4 结果
Uncompress Ok!

U-Boot 2016.11 (Mar 28 2020 - 09:50:11 +0800)hi3516dv300

Relocation Offset is: 0f6c2000
Relocating to 8fec2000, new gd at 8fe21ef0, sp at 8fe21ed0
SPI Nor:  Check Flash Memory Controller v100 ... Found
SPI Nor ID Table Version 1.0
SPI Nor(cs 0) ID: 0xc2 0x20 0x19
Block:64KB Chip:32MB Name:"MX25L(256/257)XX"
SPI Nor total size: 32MB
NAND:  0 MiB
MMC:   
In:    serial
Out:   serial
Err:   serial
Net:   eth0
Warning: eth0 (eth0) using random MAC address - 32:f6:3b:2f:fc:6e

Hit any key to stop autoboot:  0
hisilicon #
hisilicon #
hisilicon # setenv bootargs 'mem=128M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 rw mtdparts=hi_sfc:1M(boot),5M(kernel),26M(rootfs)'
hisilicon # setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x500000;bootm 0x82000000'
hisilicon # save
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done
hisilicon #
hisilicon #
hisilicon # re
resetting ...

Uncompress Ok!

U-Boot 2016.11 (Mar 28 2020 - 09:50:11 +0800)hi3516dv300

Relocation Offset is: 0f6c2000
Relocating to 8fec2000, new gd at 8fe21ef0, sp at 8fe21ed0
SPI Nor:  Check Flash Memory Controller v100 ... Found
SPI Nor ID Table Version 1.0
SPI Nor(cs 0) ID: 0xc2 0x20 0x19
Block:64KB Chip:32MB Name:"MX25L(256/257)XX"
SPI Nor total size: 32MB
NAND:  0 MiB
MMC:   
In:    serial
Out:   serial
Err:   serial
Net:   eth0
Warning: eth0 (eth0) using random MAC address - 32:f6:3b:2f:fc:6e

Hit any key to stop autoboot:  0
device 0 offset 0x100000, size 0x500000

SF: 5242880 bytes @ 0x100000 Read: OK
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-4.9.37
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3624226 Bytes = 3.5 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Loading Kernel Image ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.9.37 (developer@samsoft) (gcc version 6.3.0 (HC&C V100R002C00B035_20190218) ) #1 SMP Mon Mar 30 10:52:41 CST 2020
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Hisilicon HI3516DV300 DEMO Board
cmz zone is not set!
cma: Reserved 16 MiB at 0x87000000
Memory policy: Data cache writealloc
percpu: Embedded 13 pages/cpu @c6eca000 s21772 r8192 d23284 u53248
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: mem=128M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 rw mtdparts=hi_sfc:1M(boot),5M(kernel),26M(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: 104624K/131072K available (5120K kernel code, 183K rwdata, 1304K rodata, 1024K init, 317K bss, 10064K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0600000   (6112 kB)
      .init : 0xc0800000 - 0xc0900000   (1024 kB)
      .data : 0xc0900000 - 0xc092dc40   ( 184 kB)
       .bss : 0xc092f000 - 0xc097e4ac   ( 318 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
        Build-time adjustment of leaf fanout to 32.
NR_IRQS:16 nr_irqs:16 16
Gic dist init...
arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (phys).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
Switching to timer-based delay loop, resolution 20ns
clocksource: hisp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=500000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x80100000 - 0x80100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (200.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
120a0000.uart: ttyAMA0 at MMIO 0x120a0000 (irq = 21, base_baud = 0) is a PL011 rev2
console [ttyAMA0] enabled
SCSI subsystem initialized
ssp-pl022 120c0000.spi: ARM PL022 driver, device ID: 0x00800022
ssp-pl022 120c0000.spi: mapped registers from 0x120c0000 to c8834000
ssp-pl022 120c0000.spi: Failed to work in dma mode, work without dma!
ssp-pl022 120c1000.spi: ARM PL022 driver, device ID: 0x00800022
ssp-pl022 120c1000.spi: mapped registers from 0x120c1000 to c8838000
ssp-pl022 120c1000.spi: Failed to work in dma mode, work without dma!
ssp-pl022 120c2000.spi: ARM PL022 driver, device ID: 0x00800022
ssp-pl022 120c2000.spi: mapped registers from 0x120c2000 to c883a000
ssp-pl022 120c2000.spi: Failed to work in dma mode, work without dma!
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Linux video capture interface: v2.00
clocksource: Switched to clocksource hisp804
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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.
workingset: timestamp_bits=30 max_order=15 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
fuse init (API version 7.26)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pl061_gpio 120d0000.gpio_chip: PL061 GPIO chip @0x120d0000 registered
pl061_gpio 120d1000.gpio_chip: PL061 GPIO chip @0x120d1000 registered
pl061_gpio 120d2000.gpio_chip: PL061 GPIO chip @0x120d2000 registered
pl061_gpio 120d3000.gpio_chip: PL061 GPIO chip @0x120d3000 registered
pl061_gpio 120d4000.gpio_chip: PL061 GPIO chip @0x120d4000 registered
pl061_gpio 120d5000.gpio_chip: PL061 GPIO chip @0x120d5000 registered
pl061_gpio 120d6000.gpio_chip: PL061 GPIO chip @0x120d6000 registered
pl061_gpio 120d7000.gpio_chip: PL061 GPIO chip @0x120d7000 registered
pl061_gpio 120d8000.gpio_chip: PL061 GPIO chip @0x120d8000 registered
pl061_gpio 120d9000.gpio_chip: PL061 GPIO chip @0x120d9000 registered
pl061_gpio 120da000.gpio_chip: PL061 GPIO chip @0x120da000 registered
pl061_gpio 120db000.gpio_chip: PL061 GPIO chip @0x120db000 registered
brd: module loaded
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
hisi-sfc hisi_spi_nor.0: all blocks is unlocked.
hisi-sfc hisi_spi_nor.0: mx25l25635f (Chipsize 32 Mbytes, Blocksize 64KiB)
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-0x000000600000 : "kernel"
0x000000600000-0x000002000000 : "rootfs"
SPI Nand ID Table Version 2.7
Cannot found a valid SPI Nand Device
hisi_spi_nand_probe(170): Error: driver probe, result: -19
libphy: hisi_femac_mii_bus: probed
libphy: Fixed MDIO Bus: probed
hisi-femac 10010000.ethernet: connect to PHY failed!
usbcore: registered new interface driver r8152
xhci-hcd 100e0000.xhci_0: xHCI Host Controller
xhci-hcd 100e0000.xhci_0: new USB bus registered, assigned bus number 1
xhci-hcd 100e0000.xhci_0: hcc params 0x0220fe6c hci version 0x110 quirks 0x20010010
xhci-hcd 100e0000.xhci_0: irq 28, io mem 0x100e0000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
xhci-hcd 100e0000.xhci_0: xHCI Host Controller
xhci-hcd 100e0000.xhci_0: new USB bus registered, assigned bus number 2
usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
hub 2-0:1.0: USB hub found
hub 2-0:1.0: hub can't support USB3.0
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
usbcore: registered new interface driver xpad
hibvt_rtc 12080000.rtc: rtc core: registered 12080000.rtc as rtc0
hibvt_rtc 12080000.rtc: RTC driver for hibvt enabled
i2c /dev entries driver
hibvt-i2c 120b0000.i2c: hibvt-i2c0@100000hz registered
hibvt-i2c 120b1000.i2c: hibvt-i2c1@100000hz registered
hibvt-i2c 120b2000.i2c: hibvt-i2c2@100000hz registered
hibvt-i2c 120b3000.i2c: hibvt-i2c3@100000hz registered
hibvt-i2c 120b4000.i2c: hibvt-i2c4@100000hz registered
hibvt-i2c 120b5000.i2c: hibvt-i2c5@100000hz registered
hibvt-i2c 120b6000.i2c: hibvt-i2c6@100000hz registered
hibvt-i2c 120b7000.i2c: hibvt-i2c7@100000hz registered
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
himci: mmc host probe
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
hibvt_rtc 12080000.rtc: setting system clock to 1970-02-26 07:47:05 UTC (4866425)
uart-pl011 120a0000.uart: no DMA platform data
VFS: Mounted root (jffs2 filesystem) on device 31:2.
devtmpfs: mounted
Freeing unused kernel memory: 1024K (c0800000 - c0900000)
mmc0: new high speed SDHC card at address 0001
mmcblk0: mmc0:0001 SD 7.39 GiB
mmcblk0: p1

            _ _ _ _ _ _ _ _ _ _ _ _
            \  _  _   _  _ _ ___
            / /__/ \ |_/
           / __   /  -  _ ___
          / /  / /  / /
  _ _ _ _/ /  /  \_/  \_ ______
___________\___\__________________

[RCS]: /etc/init.d/S00devs
mknod: /dev/console: File exists
mknod: /dev/ttyAMA0: File exists
mknod: /dev/null: File exists
[RCS]: /etc/init.d/S01udev
udev[78]: starting version 167
[RCS]: /etc/init.d/S80network
Auto login as root ...
login[120]: root login on 'ttyS000'
Welcome to HiLinux.
None of nfsroot found in cmdline.
~ #
~ #

y2006142108

1个粉丝

13

问答

0

专栏

0

资料

y2006142108 2020-08-17 15:20:22
认可0
高质量的帖子 不错,HI3516DV300  有没有已经跑起来的量产后  的 参考图纸发出来?

kingofjaa1

0个粉丝

2

问答

0

专栏

1

资料

kingofjaa1 2020-08-31 11:47:45
认可0
非常不错,很详细
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

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

Markdown 语法

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

举报类型

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

详细说明

易百纳技术社区