为什么我的昉·星光单板计算机会自动重启?

问题描述

我使用TFTP网络启动方式启动昉·星光单板计算机。将image.fit加载到RAM中后,启动的时候,系统运行到starting kernel时会卡住或者重启。

启动日志如下:
bootloader version:211102-0b86f96
ddr 0x00000000, 1M test
ddr 0x00100000, 2M test
DDR clk 2133M,Version: 211102-d086aee
0 crc flash: 9347484d, crc ddr: 9347484d
crc check PASSED
 
bootloader.
 
OpenSBI v1.0
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|
 
fdt_reset_driver_init: gpio-restart init failed, -1001
Platform Name             : StarFive VisionFive V1
Platform Features         : medeleg
Platform HART Count       : 2
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 6250000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform Reboot Device    : ---
Platform Shutdown Device  : ---
Firmware Base             : 0x80000000
Firmware Size             : 300 KB
Runtime SBI Version       : 0.3
 
Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*,1*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008007ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x0000000082200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
 
Boot HART ID              : 0
Boot HART Domain          : root
Boot HART ISA             : rv64imafdcsux
Boot HART Features        : scounteren,mcounteren
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 36
Boot HART MHPM Count      : 2
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109
 
 
U-Boot 2022.04-rc2-VisionFive-SDK_v2.3.0-dirty (Apr 09 2022 - 12:35:02 +0800)StarFive
 
CPU:   rv64imafdc
Model: StarFive VisionFive V1
DRAM:  8 GiB
Core:  13 devices, 9 uclasses, devicetree: separate
MMC:   mmc@10000000: 0, mmc@10010000: 1
Loading Environment from SPIFlash... cadence_spi spi@11860000: Can't get reset: -524
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
 
StarFive EEPROM format v1
 
--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7100A1-2206-D008E000-0000027B
data version: 0x1
PCB revision: 0x1
BOM revision: A
Ethernet MAC address: 6c:cf:39:00:02:7a
--------EEPROM INFO--------
 
In:    serial@12440000
Out:   serial@12440000
Err:   serial@12440000
Net:   dwmac.10020000
MMC CD is 0x1, force to True.
MMC CD is 0x1, force to True.
Card did not respond to voltage select! : -110
MMC CD is 0x1, force to True.
MMC CD is 0x1, force to True.
Card did not respond to voltage select! : -110
VisionFive #setenv bootfile vmlinuz;setenv fdt_addr_r 0x88000000;setenv fdt_high 0xffffffffffffffff;setenv fdtcontroladdr 0xffffffffffffffff;setenv initrd_high 0xffffffffffffffff;setenv kernel_addr_r 0x84000000;setenv fileaddr a0000000;setenv ipaddr 192.168.92.43;setenv serverip 192.168.92.41
VisionFive #tftpboot ${fileaddr} ${serverip}:image.fit;
Speed: 1000, full duplex
Using dwmac.10020000 device
TFTP from server 192.168.92.41; our IP address is 192.168.92.43
Filename 'image.fit'.
Load address: 0xa0000000
Loading: ##################################################  73.4 MiB
         8 MiB/s
done
Bytes transferred = 76924590 (495c6ae hex)
VisionFive #bootm start ${fileaddr};bootm loados ${fileaddr};booti 0x80200000 0x86100000:${filesize} 0x86000000
## Loading kernel from FIT Image at a0000000 ...
   Using 'config-1' configuration
   Trying 'vmlinux' kernel subimage
     Description:  vmlinux
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0xa00000cc
     Data Size:    19742208 Bytes = 18.8 MiB
     Architecture: RISC-V
     OS:           Linux
     Load Address: 0x80200000
     Entry Point:  0x80200000
   Verifying Hash Integrity ...OK
## Loading fdt from FIT Image at a0000000 ...
   Using 'config-1' configuration
   Trying 'fdt' fdt subimage
     Description:  unavailable
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0xa49544cc
     Data Size:    31882 Bytes = 31.1 KiB
     Architecture: RISC-V
     Load Address: 0x86000000
     Hash algo:    sha256
     Hash value:   067723438c2c5d69c5b01ac02cc181d9f9c06e0ea7b7d02b5124f3b1cfce667c
   Verifying Hash Integrity ... sha256+ OK
   Loading fdt from 0xa49544cc to 0x86000000
   Booting using the fdt blob at 0x86000000
## Loading loadables from FIT Image at a0000000 ...
   Trying 'ramdisk' loadables subimage
     Description:  buildroot initramfs
     Type:         RAMDisk Image
     Compression:  uncompressed
     Data Start:   0xa12d3f80
     Data Size:    57148544 Bytes = 54.5 MiB
     Architecture: RISC-V
     OS:           Linux
     Load Address: 0x86100000
     Entry Point:  unavailable
     Hash algo:    sha256
     Hash value:   cdafd465c9e6a41462b9bfd83a039be47a7f962cabcf142d69dac3c1a1b5fd6d
   Verifying Hash Integrity ... sha256+ OK
   Loading loadables from 0xa12d3f80 to 0x86100000
   Loading Kernel Image
## Flattened Device Tree blob at 86000000
   Booting using the fdt blob at 0x86000000
   Using Device Tree in place at 0000000086000000, end 000000008600ac89
 
Starting kernel ...
 
 
bootloader version:211102-0b86f96
ddr 0x00000000, 1M test
ddr 0x00100000, 2M test
DDR clk 2133M,Version: 211102-d086aee
0 crc flash: 9347484d, crc ddr: 9347484d
crc check PASSED
 
bootloader.
 
OpenSBI v1.0
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|
 
fdt_reset_driver_init: gpio-restart init failed, -1001
Platform Name             : StarFive VisionFive V1
Platform Features         : medeleg
Platform HART Count       : 2
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 6250000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform Reboot Device    : ---
Platform Shutdown Device  : ---
Firmware Base             : 0x80000000
Firmware Size             : 300 KB
Runtime SBI Version       : 0.3

产品型号

昉·惊鸿7100

硬件版本

昉·星光单板计算机

软件版本

Buildroot (usdk_v2.3.0)

问题原因

电源适配器的功耗不足。

解决方法

请使用5 V/3 A的电源适配器。

解决步骤

  1. 检查您的开发板的环境变量设置。正确的环境变量为:
    setenv bootfile vmlinuz;setenv fdt_addr_r 0x88000000;setenv fdt_high 0xffffffffffffffff;
    setenv fdtcontroladdr 0xffffffffffffffff;setenv initrd_high 0xffffffffffffffff;setenv kernel_addr_r 0x84000000;
    setenv fileaddr a0000000;setenv ipaddr 192.168.xxx.xxx;setenv serverip 192.168.xxx.xxx.
    注: 开发板的IP地址和TFTP服务器的IP地址需要在同一个网段。开发板跟TFTP服务器最好用网线直连,并关闭服务器的防火墙。
  2. 检查加载的镜像文件和启动参数设置。正确的参数为:
    tftpboot ${fileaddr} ${serverip}:image.fit; bootm start ${fileaddr}; bootm loados ${fileaddr};
     booti 0x80200000 0x86100000:${filesize} 0x86000000
  3. 检查给开发板供电的电源适配器是否为5 V/3 A或带快充功能的5 V/2 A。