starfive-tech / VisionFive2

438 stars 78 forks source link

How to build it step by step? #97

Closed xiaguangbo closed 2 months ago

xiaguangbo commented 2 months ago

The current situation is that uboot cannot find extlinux.conf. I hope uboot can automatically start extlinux.conf. opensbi uboot use upstream.

opensbi

git clone https://github.com/riscv-software-src/opensbi.git
cd opensbi/
sudo apt install gcc-riscv64-linux-gnu
make PLATFORM=generic FW_TEXT_START=0x40000000 FW_OPTIONS=0 CROSS_COMPILE=riscv64-linux-gnu-

uboot

git clone https://github.com/u-boot/u-boot.git
cd u-boot/
sudo apt install swig
make CROSS_COMPILE=riscv64-linux-gnu- starfive_visionfive2_defconfig
make CROSS_COMPILE=riscv64-linux-gnu- OPENSBI=../opensbi/build/platform/generic/firmware/fw_dynamic.bin -j16

linux

git clone https://github.com/starfive-tech/linux.git
cd linux/
git checkout JH7110_VisionFive2_upstream
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- starfive_visionfive2_defconfig
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- -j16

sdcard

sudo sgdisk -z -og /dev/sdc
sudo sgdisk --clear \
  --set-alignment=2 \
  --new=1:4096:8191 --change-name=1:spl --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
  --new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 \
  --new=3:16384:1654784 --change-name=3:boot --typecode=3:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \
  /dev/sdc

sudo mkfs.ext4 /dev/sdc3

nano extlinux.conf extlinux.conf:

menu title Select Boot Target
timeout 3

default hhh

label hhh
    kernel /Image
    fdt /jh7110-starfive-visionfive-2-v1.3b.dtb
sudo dd if=u-boot/spl/u-boot-spl.bin.normal.out of=/dev/sdc1
sudo dd if=u-boot/u-boot.itb of=/dev/sdc2

sudo mount /dev/sdc3 /mnt/
sudo mkdir /mnt/extlinux
sudo cp extlinux.conf /mnt/extlinux/
sudo cp linux/arch/riscv/boot/Image.gz /mnt/
sudo cp linux/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb /mnt/
sudo umount /mnt

Log

U-Boot SPL 2024.04-00949-g1dd659fd62 (Apr 22 2024 - 23:11:53 +0800)                                                   
DDR version: dc2e84f0.                                                                                                
Trying to boot from MMC2                                                                                              

OpenSBI v1.4-81-gd4d2582                                                                                              
   ____                    _____ ____ _____                                                                           
  / __ \                  / ____|  _ \_   _|                                                                          
 | |  | |_ __   ___ _ __ | (___ | |_) || |                                                                            
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |                                                                            
 | |__| | |_) |  __/ | | |____) | |_) || |_                                                                           
  \____/| .__/ \___|_| |_|_____/|____/_____|                                                                          
        | |                                                                                                           
        |_|                                                                                                           

Platform Name             : StarFive VisionFive 2 v1.3B                                                               
Platform Features         : medeleg                                                                                   
Platform HART Count       : 5                                                                                         
Platform IPI Device       : aclint-mswi                                                                               
Platform Timer Device     : aclint-mtimer @ 4000000Hz                                                                 
Platform Console Device   : uart8250                                                                                  
Platform HSM Device       : ---                                                                                       
Platform PMU Device       : ---                                                                                       
Platform Reboot Device    : pm-reset                                                                                  
Platform Shutdown Device  : pm-reset                                                                                  
Platform Suspend Device   : ---                                                                                       
Platform CPPC Device      : ---                                                                                       
Firmware Base             : 0x40000000                                                                                
Firmware Size             : 367 KB                                                                                    
Firmware RW Offset        : 0x40000                                                                                   
Firmware RW Size          : 111 KB                                                                                    
Firmware Heap Offset      : 0x51000                                                                                   
Firmware Heap Size        : 43 KB (total), 2 KB (reserved), 11 KB (used), 29 KB (free)                                
Firmware Scratch Size     : 4096 B (total), 392 B (used), 3704 B (free)                                               
Runtime SBI Version       : 2.0                                                                                       

Domain0 Name              : root                                                                                      
Domain0 Boot HART         : 2                                                                                         
Domain0 HARTs             : 0*,1*,2*,3*,4*                                                                            
Domain0 Region00          : 0x0000000010000000-0x0000000010000fff M: (I,R,W) S/U: (R,W)                               
Domain0 Region01          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()                                  
Domain0 Region02          : 0x0000000040040000-0x000000004005ffff M: (R,W) S/U: ()                                    
Domain0 Region03          : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()                                    
Domain0 Region04          : 0x000000000c000000-0x000000000fffffff M: (I,R,W) S/U: (R,W)                               
Domain0 Region05          : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X)                                  
Domain0 Next Address      : 0x0000000040200000                                                                        
Domain0 Next Arg1         : 0x0000000040400000                                                                        
Domain0 Next Mode         : S-mode                                                                                    
Domain0 SysReset          : yes                                                                                       
Domain0 SysSuspend        : yes                                                                                       

Boot HART ID              : 2                                                                                         
Boot HART Domain          : root                                                                                      
Boot HART Priv Version    : v1.11                                                                                     
Boot HART Base ISA        : rv64imafdcbx                                                                              
Boot HART ISA Extensions  : zihpm,sdtrig                                                                              
Boot HART PMP Count       : 8                                                                                         
Boot HART PMP Granularity : 12 bits                                                                                   
Boot HART PMP Address Bits: 34                                                                                        
Boot HART MHPM Info       : 2 (0x00000018)                                                                            
Boot HART Debug Triggers  : 8 triggers                                                                                
Boot HART MIDELEG         : 0x0000000000000222                                                                        
Boot HART MEDELEG         : 0x000000000000b109                                                                        

U-Boot 2024.04-00949-g1dd659fd62-dirty (Apr 23 2024 - 17:55:35 +0800)                                                 

CPU:   sifive,u74-mc                                                                                                  
Model: StarFive VisionFive 2 v1.3B                                                                                    
DRAM:  4 GiB                                                                                                          
Core:  136 devices, 26 uclasses, devicetree: board                                                                    
WDT:   Not starting watchdog@13070000                                                                                 
MMC:   mmc@16010000: 0, mmc@16020000: 1                                                                               
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB  
*** Warning - bad CRC, using default environment                                                                      

StarFive EEPROM format v2                                                                                             

--------EEPROM INFO--------                                                                                           
Vendor : StarFive Technology Co., Ltd.                                                                                
Product full SN: VF7110B1-2253-D004E000-40000939                                                                      
data version: 0x2                                                                                                     
PCB revision: 0xb2                                                                                                    
BOM revision: A                                                                                                       
Ethernet MAC0 address: 6c:cf:39:00:6d:d6                                                                              
Ethernet MAC1 address: 6c:cf:39:00:6d:d7                                                                              
--------EEPROM INFO--------                                                                                           

starfive_7110_pcie pcie@2b000000: Starfive PCIe bus probed.                                                           
starfive_7110_pcie pcie@2c000000: Starfive PCIe bus probed.                                                           
In:    serial@10000000                                                                                                
Out:   serial@10000000                                                                                                
Err:   serial@10000000                                                                                                
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000                                                               
starting USB...                                                                                                       
Bus xhci_pci: Register 5000420 NbrPorts 5                                                                             
Starting the controller                                                                                               
USB XHCI 1.00                                                                                                         
scanning bus xhci_pci for devices... 2 USB Device(s) found                                                            
       scanning usb for storage devices... 0 Storage Device(s) found                                                  
Working FDT set to ff7289b0                                                                                           
Hit any key to stop autoboot:  0                                                                                      
Scanning for bootflows in all bootdevs                                                                                
Seq  Method       State   Uclass    Part  Name                      Filename                                          
---  -----------  ------  --------  ----  ------------------------  ----------------                                  
Scanning global bootmeth 'efi_mgr':                                                                                   
Card did not respond to voltage select! : -110                                                                        
No EFI system partition                                                                                               
No EFI system partition                                                                                               
Failed to persist EFI variables                                                                                       
No EFI system partition                                                                                               
Failed to persist EFI variables                                                                                       
No EFI system partition                                                                                               
Failed to persist EFI variables                                                                                       
  0  efi_mgr      ready   (none)       0  <NULL>                                                                      
** Booting bootflow '<NULL>' with efi_mgr                                                                             
Loading Boot0000 'mmc 1' failed                                                                                       
EFI boot manager: Cannot load any image                                                                               
Boot failed (err=-14)                                                                                                 
Hunting with: mmc                                                                                                     
Scanning bootdev 'mmc@16010000.bootdev':                                                                              
Card did not respond to voltage select! : -110                                                                        
Scanning bootdev 'mmc@16020000.bootdev':                                                                              
Hunting with: nvme                                                                                                    
Hunting with: usb                                                                                                     
Hunting with: ethernet                                                                                                
ethernet@16030000 Waiting for PHY auto negotiation to complete......... TIMEOUT !                                     
phy_startup() failed: -110                                                                                            
FAILED: -110                                                                                                          
ethernet@16040000 Waiting for PHY auto negotiation to complete......... TIMEOUT !                                     
phy_startup() failed: -110                                                                                            
FAILED: -110                                                                                                          
No more bootdevs                                                                                                      
---  -----------  ------  --------  ----  ------------------------  ----------------                                  
(1 bootflow, 1 valid)                                                                                                 
StarFive #
StarFive # print                                                                                                      
arch=riscv                                                                                                            
baudrate=115200                                                                                                       
board=visionfive2                                                                                                     
board_name=visionfive2                                                                                                
bootargs=console=ttyS0,115200 debug rootwait earlycon=sbi                                                             
bootcmd=bootflow scan -lb                                                                                             
bootdelay=2                                                                                                           
cpu=jh7110                                                                                                            
eth1addr=6c:cf:39:00:6d:d7                                                                                            
ethact=ethernet@16030000                                                                                              
ethaddr=6c:cf:39:00:6d:d6                                                                                             
fdt_addr=ff7289b0                                                                                                     
fdt_addr_r=0x46000000                                                                                                 
fdtaddr=ff7289b0                                                                                                      
fdtcontroladdr=ff7289b0                                                                                               
fdtfile=starfive/jh7110-starfive-visionfive-2-v1.3b.dtb                                                               
fdtoverlay_addr_r=0x45800000                                                                                          
kernel_addr_r=0x40200000                                                                                              
kernel_comp_addr_r=0x88000000                                                                                         
kernel_comp_size=0x4000000                                                                                            
loadaddr=0x82000000                                                                                                   
partitions=name=spl,start=2M,size=2M,type=${type_guid_gpt_loader1};name=uboot,size=4MB,type=${type_guid_gpt_loader2};;
preboot=nvme scan; usb start; setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};                          
pxefile_addr_r=0x45900000                                                                                             
ramdisk_addr_r=0x46100000                                                                                             
scriptaddr=0x43900000                                                                                                 
serial#=VF7110B1-2253-D004E000-40000939                                                                               
stderr=serial@10000000                                                                                                
stdin=serial@10000000                                                                                                 
stdout=serial@10000000                                                                                                
type_guid_gpt_loader1=2E54B353-1271-4842-806F-E436D6AF6985                                                            
type_guid_gpt_loader2=BC13C2FF-59E6-4262-A352-B275FD6F7172                                                            
type_guid_gpt_system=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7                                                             
usb_ignorelist=0x1050:*,                                                                                              
vendor=starfive                                                                                                       

Environment size: 1189/65532 bytes                                                                                    
StarFive #
StarFive # part list mmc 1                                                                                            

Partition Map for mmc device 1  --   Partition Type: EFI                                                              

Part    Start LBA       End LBA         Name                                                                          
        Attributes                                                                                                    
        Type GUID                                                                                                     
        Partition GUID                                                                                                
  1     0x00001000      0x00001fff      "spl"                                                                         
        attrs:  0x0000000000000000                                                                                    
        type:   2e54b353-1271-4842-806f-e436d6af6985                                                                  
                (2e54b353-1271-4842-806f-e436d6af6985)                                                                
        guid:   0728123b-39fb-4f23-8635-0fd8f7e4f795                                                                  
  2     0x00002000      0x00003fff      "uboot"                                                                       
        attrs:  0x0000000000000000                                                                                    
        type:   bc13c2ff-59e6-4262-a352-b275fd6f7172                                                                  
                (bc13c2ff-59e6-4262-a352-b275fd6f7172)                                                                
        guid:   009c6fda-970d-4ae4-8d86-4c85d2c4741d                                                                  
  3     0x00004000      0x00194000      "boot"                                                                        
        attrs:  0x0000000000000000                                                                                    
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7                                                                  
                (data)                                                                                                
        guid:   03a46488-2ccb-47df-acf5-2bd28f635ef5                                                                  
StarFive # ls mmc 1:3                                                                                                 
<DIR>       4096 .                                                                                                    
<DIR>       4096 ..                                                                                                   
<DIR>      16384 lost+found                                                                                           
<DIR>       4096 extlinux                                                                                             
         6747597 Image.gz                                                                                             
           43142 jh7110-starfive-visionfive-2-v1.3b.dtb                                                               
StarFive # ls mmc 1:3 extlinux/                                                                                       
<DIR>       4096 .                                                                                                    
<DIR>       4096 ..                                                                                                   
             130 extlinux.conf                                                                                        
StarFive # 
StarFive # bootflow scan -la                                                                                          
Scanning for bootflows in all bootdevs                                                                                
Seq  Method       State   Uclass    Part  Name                      Filename                                          
---  -----------  ------  --------  ----  ------------------------  ----------------                                  
Scanning global bootmeth 'efi_mgr':                                                                                   
  0  efi_mgr      ready   (none)       0  <NULL>                                                                      
Scanning bootdev 'mmc@16010000.bootdev':                                                                              
Card did not respond to voltage select! : -110                                                                        
Scanning bootdev 'mmc@16020000.bootdev':                                                                              
  1  extlinux     media   mmc          0  mmc@16020000.bootdev.whol                                                   
  2  script       media   mmc          0  mmc@16020000.bootdev.whol                                                   
  3  efi          media   mmc          0  mmc@16020000.bootdev.whol                                                   
  4  pxe          base    mmc          0  mmc@16020000.bootdev.whol                                                   
  5  extlinux     part    mmc          1  mmc@16020000.bootdev.part                                                   
  6  script       part    mmc          1  mmc@16020000.bootdev.part                                                   
  7  efi          part    mmc          1  mmc@16020000.bootdev.part                                                   
  8  pxe          base    mmc          1  mmc@16020000.bootdev.part                                                   
  9  extlinux     media   mmc          2  mmc@16020000.bootdev.part                                                   
  a  script       media   mmc          2  mmc@16020000.bootdev.part                                                   
  b  efi          media   mmc          2  mmc@16020000.bootdev.part                                                   
  c  pxe          base    mmc          2  mmc@16020000.bootdev.part                                                   
  d  extlinux     media   mmc          3  mmc@16020000.bootdev.part                                                   
  e  script       media   mmc          3  mmc@16020000.bootdev.part                                                   
  f  efi          media   mmc          3  mmc@16020000.bootdev.part                                                   
 10  pxe          base    mmc          3  mmc@16020000.bootdev.part                                                   
 11  extlinux     media   mmc          4  mmc@16020000.bootdev.part                                                   
 12  script       media   mmc          4  mmc@16020000.bootdev.part                                                   
 13  efi          media   mmc          4  mmc@16020000.bootdev.part                                                   
 14  pxe          base    mmc          4  mmc@16020000.bootdev.part                                                   
 15  extlinux     media   mmc          5  mmc@16020000.bootdev.part                                                   
 16  script       media   mmc          5  mmc@16020000.bootdev.part                                                   
 17  efi          media   mmc          5  mmc@16020000.bootdev.part                                                   
 18  pxe          base    mmc          5  mmc@16020000.bootdev.part                                                   
 19  extlinux     media   mmc          6  mmc@16020000.bootdev.part                                                   
 1a  script       media   mmc          6  mmc@16020000.bootdev.part                                                   
 1b  efi          media   mmc          6  mmc@16020000.bootdev.part                                                   
 1c  pxe          base    mmc          6  mmc@16020000.bootdev.part                                                   
 1d  extlinux     media   mmc          7  mmc@16020000.bootdev.part                                                   
 1e  script       media   mmc          7  mmc@16020000.bootdev.part                                                   
 1f  efi          media   mmc          7  mmc@16020000.bootdev.part                                                   
 20  pxe          base    mmc          7  mmc@16020000.bootdev.part                                                   
 21  extlinux     media   mmc          8  mmc@16020000.bootdev.part                                                   
 22  script       media   mmc          8  mmc@16020000.bootdev.part                                                   
 23  efi          media   mmc          8  mmc@16020000.bootdev.part                                                   
 24  pxe          base    mmc          8  mmc@16020000.bootdev.part                                                   
 25  extlinux     media   mmc          9  mmc@16020000.bootdev.part                                                   
 26  script       media   mmc          9  mmc@16020000.bootdev.part                                                   
 27  efi          media   mmc          9  mmc@16020000.bootdev.part                                                   
 28  pxe          base    mmc          9  mmc@16020000.bootdev.part                                                   
 29  extlinux     media   mmc          a  mmc@16020000.bootdev.part                                                   
 2a  script       media   mmc          a  mmc@16020000.bootdev.part                                                   
 2b  efi          media   mmc          a  mmc@16020000.bootdev.part                                                   
 2c  pxe          base    mmc          a  mmc@16020000.bootdev.part                                                   
 2d  extlinux     media   mmc          b  mmc@16020000.bootdev.part                                                   
 2e  script       media   mmc          b  mmc@16020000.bootdev.part                                                   
 2f  efi          media   mmc          b  mmc@16020000.bootdev.part                                                   
 30  pxe          base    mmc          b  mmc@16020000.bootdev.part                                                   
 31  extlinux     media   mmc          c  mmc@16020000.bootdev.part                                                   
 32  script       media   mmc          c  mmc@16020000.bootdev.part                                                   
 33  efi          media   mmc          c  mmc@16020000.bootdev.part                                                   
 34  pxe          base    mmc          c  mmc@16020000.bootdev.part                                                   
 35  extlinux     media   mmc          d  mmc@16020000.bootdev.part                                                   
 36  script       media   mmc          d  mmc@16020000.bootdev.part                                                   
 37  efi          media   mmc          d  mmc@16020000.bootdev.part                                                   
 38  pxe          base    mmc          d  mmc@16020000.bootdev.part                                                   
 39  extlinux     media   mmc          e  mmc@16020000.bootdev.part                                                   
 3a  script       media   mmc          e  mmc@16020000.bootdev.part                                                   
 3b  efi          media   mmc          e  mmc@16020000.bootdev.part                                                   
 3c  pxe          base    mmc          e  mmc@16020000.bootdev.part                                                   
 3d  extlinux     media   mmc          f  mmc@16020000.bootdev.part                                                   
 3e  script       media   mmc          f  mmc@16020000.bootdev.part                                                   
 3f  efi          media   mmc          f  mmc@16020000.bootdev.part                                                   
 40  pxe          base    mmc          f  mmc@16020000.bootdev.part                                                   
 41  extlinux     media   mmc         10  mmc@16020000.bootdev.part                                                   
 42  script       media   mmc         10  mmc@16020000.bootdev.part                                                   
 43  efi          media   mmc         10  mmc@16020000.bootdev.part                                                   
 44  pxe          base    mmc         10  mmc@16020000.bootdev.part                                                   
 45  extlinux     media   mmc         11  mmc@16020000.bootdev.part                                                   
 46  script       media   mmc         11  mmc@16020000.bootdev.part                                                   
 47  efi          media   mmc         11  mmc@16020000.bootdev.part                                                   
 48  pxe          base    mmc         11  mmc@16020000.bootdev.part                                                   
 49  extlinux     media   mmc         12  mmc@16020000.bootdev.part                                                   
 4a  script       media   mmc         12  mmc@16020000.bootdev.part                                                   
 4b  efi          media   mmc         12  mmc@16020000.bootdev.part                                                   
 4c  pxe          base    mmc         12  mmc@16020000.bootdev.part                                                   
 4d  extlinux     media   mmc         13  mmc@16020000.bootdev.part                                                   
 4e  script       media   mmc         13  mmc@16020000.bootdev.part                                                   
 4f  efi          media   mmc         13  mmc@16020000.bootdev.part                                                   
 50  pxe          base    mmc         13  mmc@16020000.bootdev.part                                                   
 51  extlinux     media   mmc         14  mmc@16020000.bootdev.part                                                   
 52  script       media   mmc         14  mmc@16020000.bootdev.part                                                   
 53  efi          media   mmc         14  mmc@16020000.bootdev.part                                                   
 54  pxe          base    mmc         14  mmc@16020000.bootdev.part                                                   
 55  extlinux     media   mmc         15  mmc@16020000.bootdev.part                                                   
 56  script       media   mmc         15  mmc@16020000.bootdev.part                                                   
 57  efi          media   mmc         15  mmc@16020000.bootdev.part                                                   
 58  pxe          base    mmc         15  mmc@16020000.bootdev.part                                                   
 59  extlinux     media   mmc         16  mmc@16020000.bootdev.part                                                   
 5a  script       media   mmc         16  mmc@16020000.bootdev.part                                                   
 5b  efi          media   mmc         16  mmc@16020000.bootdev.part                                                   
 5c  pxe          base    mmc         16  mmc@16020000.bootdev.part                                                   
 5d  extlinux     media   mmc         17  mmc@16020000.bootdev.part                                                   
 5e  script       media   mmc         17  mmc@16020000.bootdev.part                                                   
 5f  efi          media   mmc         17  mmc@16020000.bootdev.part                                                   
 60  pxe          base    mmc         17  mmc@16020000.bootdev.part                                                   
 61  extlinux     media   mmc         18  mmc@16020000.bootdev.part                                                   
 62  script       media   mmc         18  mmc@16020000.bootdev.part                                                   
 63  efi          media   mmc         18  mmc@16020000.bootdev.part                                                   
 64  pxe          base    mmc         18  mmc@16020000.bootdev.part                                                   
 65  extlinux     media   mmc         19  mmc@16020000.bootdev.part                                                   
 66  script       media   mmc         19  mmc@16020000.bootdev.part                                                   
 67  efi          media   mmc         19  mmc@16020000.bootdev.part                                                   
 68  pxe          base    mmc         19  mmc@16020000.bootdev.part                                                   
 69  extlinux     media   mmc         1a  mmc@16020000.bootdev.part                                                   
 6a  script       media   mmc         1a  mmc@16020000.bootdev.part                                                   
 6b  efi          media   mmc         1a  mmc@16020000.bootdev.part                                                   
 6c  pxe          base    mmc         1a  mmc@16020000.bootdev.part                                                   
 6d  extlinux     media   mmc         1b  mmc@16020000.bootdev.part                                                   
 6e  script       media   mmc         1b  mmc@16020000.bootdev.part                                                   
 6f  efi          media   mmc         1b  mmc@16020000.bootdev.part                                                   
 70  pxe          base    mmc         1b  mmc@16020000.bootdev.part                                                   
 71  extlinux     media   mmc         1c  mmc@16020000.bootdev.part                                                   
 72  script       media   mmc         1c  mmc@16020000.bootdev.part                                                   
 73  efi          media   mmc         1c  mmc@16020000.bootdev.part                                                   
 74  pxe          base    mmc         1c  mmc@16020000.bootdev.part                                                   
 75  extlinux     media   mmc         1d  mmc@16020000.bootdev.part                                                   
 76  script       media   mmc         1d  mmc@16020000.bootdev.part                                                   
 77  efi          media   mmc         1d  mmc@16020000.bootdev.part                                                   
 78  pxe          base    mmc         1d  mmc@16020000.bootdev.part                                                   
Hunting with: ethernet                                                                                                
EQOS_DMA_MODE_SWR stuck                                                                                               
FAILED: -110                                                                                                          
EQOS_DMA_MODE_SWR stuck                                                                                               
FAILED: -110                                                                                                          
No more bootdevs                                                                                                      
---  -----------  ------  --------  ----  ------------------------  ----------------                                  
(121 bootflows, 1 valid)                                                                                              
StarFive #
StarFive # help                                                                                                       
?         - alias for 'help'                                                                                          
base      - print or set address offset                                                                               
bdinfo    - print Board Info structure                                                                                
blkcache  - block cache diagnostics and control                                                                       
boot      - boot default, i.e., run 'bootcmd'                                                                         
bootd     - boot default, i.e., run 'bootcmd'                                                                         
bootdev   - Boot devices                                                                                              
bootefi   - Boots an EFI payload from memory                                                                          
bootelf   - Boot from an ELF image in memory                                                                          
bootflow  - Boot flows                                                                                                
booti     - boot Linux kernel 'Image' format from memory                                                              
bootm     - boot application image from memory                                                                        
bootmeth  - Boot methods                                                                                              
bootp     - boot image via network using BOOTP/TFTP protocol                                                          
bootstage - Boot stage command                                                                                        
bootvx    - Boot vxWorks from an ELF image                                                                            
cmp       - memory compare                                                                                            
coninfo   - print console devices and information                                                                     
cp        - memory copy                                                                                               
cpu       - display information about CPUs                                                                            
crc32     - checksum calculation                                                                                      
cyclic    - Cyclic                                                                                                    
dhcp      - boot image via network using DHCP/TFTP protocol                                                           
dm        - Driver model low level access                                                                             
echo      - echo args to console                                                                                      
editenv   - edit environment variable                                                                                 
eeprom    - EEPROM sub-system                                                                                         
eficonfig - provide menu-driven UEFI variable maintenance interface                                                   
env       - environment handling commands                                                                             
exit      - exit script                                                                                               
ext2load  - load binary file from a Ext2 filesystem                                                                   
ext2ls    - list files in a directory (default /)                                                                     
ext4load  - load binary file from a Ext4 filesystem                                                                   
ext4ls    - list files in a directory (default /)                                                                     
ext4size  - determine a file's size                                                                                   
false     - do nothing, unsuccessfully                                                                                
fatinfo   - print information about filesystem                                                                        
fatload   - load binary file from a dos filesystem                                                                    
fatls     - list files in a directory (default /)                                                                     
fatmkdir  - create a directory                                                                                        
fatrm     - delete a file                                                                                             
fatsize   - determine a file's size                                                                                   
fatwrite  - write file into a dos filesystem                                                                          
fdt       - flattened device tree utility commands                                                                    
fstype    - Look up a filesystem type                                                                                 
fstypes   - List supported filesystem types                                                                           
go        - start application at address 'addr'                                                                       
gpio      - query and control gpio pins                                                                               
gpt       - GUID Partition Table                                                                                      
gzwrite   - unzip and write memory to block device                                                                    
help      - print command description/usage                                                                           
i2c       - I2C sub-system                                                                                            
iminfo    - print header information for application image                                                            
imxtract  - extract a part of a multi-image                                                                           
itest     - return true/false on integer compare                                                                      
ln        - Create a symbolic link                                                                                    
load      - load binary file from a filesystem                                                                        
loadb     - load binary file over serial line (kermit mode)                                                           
loads     - load S-Record file over serial line                                                                       
loadx     - load binary file over serial line (xmodem mode)                                                           
loady     - load binary file over serial line (ymodem mode)                                                           
loop      - infinite loop on address range                                                                            
ls        - list files in a directory (default /)                                                                     
lzmadec   - lzma uncompress a memory region                                                                           
mac       - display and program the board revision and MAC address in EEPROM                                          
md        - memory display                                                                                            
mdio      - MDIO utility commands                                                                                     
meminfo   - display memory information                                                                                
mii       - MII utility commands                                                                                      
mm        - memory modify (auto-incrementing address)                                                                 
mmc       - MMC sub system                                                                                            
mmcinfo   - display MMC info                                                                                          
mw        - memory write (fill)                                                                                       
net       - NET sub-system                                                                                            
nm        - memory modify (constant address)                                                                          
nvme      - NVM Express sub-system                                                                                    
panic     - Panic with optional message                                                                               
part      - disk partition related commands                                                                           
pci       - list and access PCI Configuration Space                                                                   
ping      - send ICMP ECHO_REQUEST to network host                                                                    
pinmux    - show pin-controller muxing                                                                                
printenv  - print environment variables                                                                               
pxe       - get and boot from pxe files                                                                               
random    - fill memory with random pattern                                                                           
reset     - Perform RESET of the CPU                                                                                  
run       - run commands in an environment variable                                                                   
save      - save file to a filesystem                                                                                 
saveenv   - save environment variables to persistent storage                                                          
setenv    - set environment variables                                                                                 
setexpr   - set environment variable as the result of eval expression                                                 
sf        - SPI flash sub-system                                                                                      
showvar   - print local hushshell variables                                                                           
size      - determine a file's size                                                                                   
sleep     - delay execution for some time                                                                             
source    - run script from memory                                                                                    
test      - minimal test like /bin/sh                                                                                 
tftpboot  - load file via network using TFTP protocol                                                                 
tftpput   - TFTP put command, for uploading files to a server                                                         
true      - do nothing, successfully                                                                                  
unlz4     - lz4 uncompress a memory region                                                                            
unzip     - unzip a memory region                                                                                     
usb       - USB sub-system                                                                                            
usbboot   - boot from USB device                                                                                      
vbe       - Verified Boot for Embedded                                                                                
version   - print monitor, compiler and linker version                                                                
wdt       - Watchdog sub-system                                                                                       
StarFive # 
xiaguangbo commented 2 months ago

uboot

starfive_visionfive2_defconfig add CONFIG_CMD_SYSBOOT=y

or

make menuconfig
CMD interface...
  -> Misc...
    -> sysboot

extlinux.conf:

menu title Select Boot Target
timeout 3

default hhh

label hhh
    kernel /Image.gz
    fdt /jh7110-starfive-visionfive-2-v1.3b.dtb

board

sysboot mmc 1:3 any b0000000 /extlinux/extlinux.conf

The kernel is ready to load.

xiaguangbo commented 2 months ago

end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,4)

rootfs

mkdir rvrootfs
sudo apt install mmdebstrap qemu-user-static binfmt-support
sudo mmdebstrap --architectures=riscv64 sid rvrootfs "deb https://mirrors.ustc.edu.cn/debian sid main"

sudo chroot rvrootfs
passwd root
...

exit
dd if=/dev/zero of=rootfs.img bs=1G count=1
sudo mkfs.ext4 rootfs.img
mkdir rootfs_mount
sudo mount rootfs.img rootfs_mount
sudo cp -rfp rvrootfs/* rootfs_mount
sudo umount rootfs_mount
rm -r rootfs_mount
sudo e2fsck -f rootfs.img
sudo resize2fs -M rootfs.img # 调整镜像为实际大小

extlinux.conf:

menu title Select Boot Target
timeout 3

default hhh

label hhh
    kernel /Image.gz
    fdt /jh7110-starfive-visionfive-2-v1.3b.dtb
    append rw root=/dev/mmcblk1p4

sdcard

sudo sgdisk -z -og /dev/sdc
sudo sgdisk --clear \
--set-alignment=2 \
--new=1:4096:8191 --change-name=1:spl --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
--new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 \
--new=3:16384:1654784 --change-name=3:boot --typecode=3:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \
--new=4:1654785: --change-name=4:rootfs \
/dev/sdc

sudo mkfs.ext4 /dev/sdc3
sudo dd if=u-boot/spl/u-boot-spl.bin.normal.out of=/dev/sdc1
sudo dd if=u-boot/u-boot.itb of=/dev/sdc2
sudo dd if=rootfs.img of=/dev/sdc4
sync

sudo mount /dev/sdc3 /mnt/
sudo mkdir /mnt/extlinux
sudo cp extlinux.conf /mnt/extlinux/
sudo cp linux/arch/riscv/boot/Image.gz /mnt/
sudo cp linux/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb /mnt/
sudo umount /mnt

log

StarFive # sysboot mmc 1:3 any b0000000 /extlinux/extlinux.conf                                                                                               
Retrieving file: /extlinux/extlinux.conf                                                                                                                      
1:      hhh                                                                                                                                                   
Retrieving file: /Image.gz                                                                                                                                    
append: rw root=/dev/mmcblk1p4                                                                                                                                
Retrieving file: /jh7110-starfive-visionfive-2-v1.3b.dtb                                                                                                      
   Uncompressing Kernel Image to 0                                                                                                                            
## Flattened Device Tree blob at 46000000                                                                                                                     
   Booting using the fdt blob at 0x46000000                                                                                                                   
Working FDT set to 46000000                                                                                                                                   
   Loading Device Tree to 00000000fe70c000, end 00000000fe719885 ... OK                                                                                       
Working FDT set to fe70c000                                                                                                                                   

Starting kernel ...                                                                                                                                           

Linux version 6.6.0-g076ede06c00a (xiaguangbo@debian) (riscv64-linux-gnu-gcc (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP Tue Apr4
Machine model: StarFive VisionFive 2 v1.3B                                                                                                                    
SBI specification v2.0 detected                                                                                                                               
SBI implementation ID=0x1 Version=0x10004                                                                                                                     
SBI TIME extension detected                                                                                                                                   
SBI IPI extension detected                                                                                                                                    
SBI RFENCE extension detected                                                                                                                                 
SBI SRST extension detected                                                                                                                                   
efi: UEFI not found.                                                                                                                                          
Reserved memory: created CMA memory pool at 0x0000000070000000, size 512 MiB                                                                                  
OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool                                                                                   
OF: reserved mem: 0x0000000070000000..0x000000008fffffff (524288 KiB) map reusable linux,cma                                                                  
OF: reserved mem: 0x0000000040000000..0x000000004003ffff (256 KiB) nomap non-reusable mmode_resv1@40000000                                                    
OF: reserved mem: 0x0000000040040000..0x000000004005ffff (128 KiB) nomap non-reusable mmode_resv0@40040000                                                    
Zone ranges:                                                                                                                                                  
  DMA32    [mem 0x0000000040000000-0x00000000ffffffff]                                                                                                        
  Normal   [mem 0x0000000100000000-0x000000013fffffff]                                                                                                        
Movable zone start for each node                                                                                                                              
Early memory node ranges                                                                                                                                      
  node   0: [mem 0x0000000040000000-0x000000004005ffff]                                                                                                       
  node   0: [mem 0x0000000040060000-0x000000013fffffff]                                                                                                       
Initmem setup node 0 [mem 0x0000000040000000-0x000000013fffffff]                                                                                              
SBI HSM extension detected                                                                                                                                    
CPU with hartid=0 is not available                                                                                                                            
Falling back to deprecated "riscv,isa"                                                                                                                        
riscv: base ISA extensions acdfim                                                                                                                             
riscv: ELF capabilities acdfim                                                                                                                                
percpu: Embedded 18 pages/cpu s34472 r8192 d31064 u73728                                                                                                      
Kernel command line: rw root=/dev/mmcblk1p4                                                                                                                   
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)                                                                                    
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)                                                                                      
Built 1 zonelists, mobility grouping on.  Total pages: 1034240                                                                                                
mem auto-init: stack:all(zero), heap alloc:off, heap free:off                                                                                                 
software IO TLB: area num 4.                                                                                                                                  
software IO TLB: mapped [mem 0x00000000fa70c000-0x00000000fe70c000] (64MB)                                                                                    
Memory: 3516748K/4194304K available (8490K kernel code, 4798K rwdata, 4096K rodata, 2190K init, 333K bss, 153268K reserved, 524288K cma-reserved)             
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1                                                                                                    
rcu: Hierarchical RCU implementation.                                                                                                                         
rcu:    RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.                                                                                                 
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.                                                                                        
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4                                                                                                  
NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0                                                                                                                
riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller                                                                                       
riscv-intc: 64 local interrupts mapped                                                                                                                        
plic: interrupt-controller@c000000: mapped 136 interrupts with 4 handlers for 9 contexts.                                                                     
riscv: providing IPIs using SBI IPI extension                                                                                                                 
rcu: srcu_init: Setting srcu_struct sizes based on contention.                                                                                                
clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 881590404240 ns                                                
sched_clock: 64 bits at 4MHz, resolution 250ns, wraps every 2199023255500ns                                                                                   
Calibrating delay loop (skipped), value calculated using timer frequency.. 8.00 BogoMIPS (lpj=16000)                                                          
pid_max: default: 32768 minimum: 301                                                                                                                          
Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)                                                                                          
Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)                                                                                     
CPU node for /cpus/cpu@0 exist but the possible cpu range is :0-3                                                                                             
ASID allocator disabled (0 bits)                                                                                                                              
rcu: Hierarchical SRCU implementation.                                                                                                                        
rcu:    Max phase no-delay instances is 1000.                                                                                                                 
EFI services will not be available.                                                                                                                           
smp: Bringing up secondary CPUs ...                                                                                                                           
cpu1: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow                                                                 
cpu2: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow                                                                 
cpu3: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow                                                                 
smp: Brought up 1 node, 4 CPUs                                                                                                                                
devtmpfs: initialized                                                                                                                                         
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns                                                               
futex hash table entries: 1024 (order: 4, 65536 bytes, linear)                                                                                                
pinctrl core: initialized pinctrl subsystem                                                                                                                   
NET: Registered PF_NETLINK/PF_ROUTE protocol family                                                                                                           
DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations                                                                                              
DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations                                                                                    
thermal_sys: Registered thermal governor 'step_wise'                                                                                                          
cpuidle: using governor menu                                                                                                                                  
cpu0: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow                                                                 
platform soc: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000                                                                                
platform 19840000.isp: Fixed dependency cycle(s) with /soc/csi@19800000/ports/port@1/endpoint                                                                 
platform 29400000.lcd-controller: Fixed dependency cycle(s) with /dsi_encoder/ports/port@0/endpoint@0                                                         
platform 29590000.hdmi: Fixed dependency cycle(s) with /soc/lcd-controller@29400000/ports/port@0/endpoint@0                                                   
raid6: skipped pq benchmark and selected int64x8                                                                                                              
raid6: using intx1 recovery algorithm                                                                                                                         
SCSI subsystem initialized                                                                                                                                    
usbcore: registered new interface driver usbfs                                                                                                                
usbcore: registered new interface driver hub                                                                                                                  
usbcore: registered new device driver usb                                                                                                                     
mc: Linux media interface: v0.10                                                                                                                              
videodev: Linux video capture interface: v2.00                                                                                                                
Advanced Linux Sound Architecture Driver Initialized.                                                                                                         
vgaarb: loaded                                                                                                                                                
clocksource: Switched to clocksource riscv_clocksource                                                                                                        
NET: Registered PF_INET protocol family                                                                                                                       
IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)                                                                                          
tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)                                                                             
Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)                                                                                      
TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)                                                                                    
TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)                                                                                          
TCP: Hash tables configured (established 32768 bind 32768)                                                                                                    
UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)                                                                                                  
UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)                                                                                             
NET: Registered PF_UNIX/PF_LOCAL protocol family                                                                                                              
RPC: Registered named UNIX socket transport module.                                                                                                           
RPC: Registered udp transport module.                                                                                                                         
RPC: Registered tcp transport module.                                                                                                                         
RPC: Registered tcp-with-tls transport module.                                                                                                                
RPC: Registered tcp NFSv4.1 backchannel transport module.                                                                                                     
PCI: CLS 0 bytes, default 64                                                                                                                                  
workingset: timestamp_bits=62 max_order=20 bucket_order=0                                                                                                     
NFS: Registering the id_resolver key type                                                                                                                     
Key type id_resolver registered                                                                                                                               
Key type id_legacy registered                                                                                                                                 
nfs4filelayout_init: NFSv4 File Layout Driver Registering...                                                                                                  
nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...                                                                                          
ntfs: driver 2.1.32 [Flags: R/W].                                                                                                                             
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.                                                                                                          
xor: measuring software checksum speed                                                                                                                        
   8regs           :  2345 MB/sec                                                                                                                             
   8regs_prefetch  :  2338 MB/sec                                                                                                                             
   32regs          :  2343 MB/sec                                                                                                                             
   32regs_prefetch :  2338 MB/sec                                                                                                                             
xor: using function: 8regs (2345 MB/sec)                                                                                                                      
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)                                                                                          
io scheduler bfq registered                                                                                                                                   
CCACHE: DataError @ 0x00000000.08022DF8                                                                                                                       
CCACHE: DataFail @ 0x00000000.08022DF4                                                                                                                        
CCACHE: 8 banks, 16 ways, sets/bank=256, bytes/block=64                                                                                                       
CCACHE: Index of the largest way enabled: 15                                                                                                                  
Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled                                                                                                      
random: crng init done                                                                                                                                        
loop: module loaded                                                                                                                                           
zram: Added device: zram0                                                                                                                                     
spi-nor spi0.0: gd25lq128d (16384 Kbytes)                                                                                                                     
4 fixed-partitions partitions found on MTD device 13010000.spi.0                                                                                              
Creating 4 MTD partitions on "13010000.spi.0":                                                                                                                
0x000000000000-0x000000080000 : "spl"                                                                                                                         
0x0000000f0000-0x000000100000 : "uboot-env"                                                                                                                   
0x000000100000-0x000000500000 : "uboot"                                                                                                                       
0x000000600000-0x000001000000 : "reserved-data"                                                                                                               
starfive-dwmac 16030000.ethernet: User ID: 0x41, Synopsys ID: 0x52                                                                                            
starfive-dwmac 16030000.ethernet:       DWMAC4/5                                                                                                              
starfive-dwmac 16030000.ethernet: DMA HW capability register supported                                                                                        
starfive-dwmac 16030000.ethernet: RX Checksum Offload Engine supported                                                                                        
starfive-dwmac 16030000.ethernet: Wake-Up On Lan supported                                                                                                    
starfive-dwmac 16030000.ethernet: TSO supported                                                                                                               
starfive-dwmac 16030000.ethernet: Enable RX Mitigation via HW Watchdog Timer                                                                                  
starfive-dwmac 16030000.ethernet: Enabled L3L4 Flow TC (entries=1)                                                                                            
starfive-dwmac 16030000.ethernet: Enabled RFS Flow TC (entries=10)                                                                                            
starfive-dwmac 16030000.ethernet: TSO feature enabled                                                                                                         
starfive-dwmac 16030000.ethernet: Using 40/40 bits DMA host/device width                                                                                      
starfive-dwmac 16040000.ethernet: User ID: 0x41, Synopsys ID: 0x52                                                                                            
starfive-dwmac 16040000.ethernet:       DWMAC4/5                                                                                                              
starfive-dwmac 16040000.ethernet: DMA HW capability register supported                                                                                        
starfive-dwmac 16040000.ethernet: RX Checksum Offload Engine supported                                                                                        
starfive-dwmac 16040000.ethernet: Wake-Up On Lan supported                                                                                                    
starfive-dwmac 16040000.ethernet: TSO supported                                                                                                               
starfive-dwmac 16040000.ethernet: Enable RX Mitigation via HW Watchdog Timer                                                                                  
starfive-dwmac 16040000.ethernet: Enabled L3L4 Flow TC (entries=1)                                                                                            
starfive-dwmac 16040000.ethernet: Enabled RFS Flow TC (entries=10)                                                                                            
starfive-dwmac 16040000.ethernet: TSO feature enabled                                                                                                         
starfive-dwmac 16040000.ethernet: Using 40/40 bits DMA host/device width                                                                                      
usbcore: registered new interface driver uas                                                                                                                  
usbcore: registered new interface driver usb-storage                                                                                                          
i2c_dev: i2c /dev entries driver                                                                                                                              
sdhci: Secure Digital Host Controller Interface driver                                                                                                        
sdhci: Copyright(c) Pierre Ossman                                                                                                                             
Synopsys Designware Multimedia Card Interface Driver                                                                                                          
sdhci-pltfm: SDHCI platform and OF driver helper                                                                                                              
clocksource: jh7110-timer.ch0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns                                                           
clocksource: jh7110-timer.ch1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns                                                           
clocksource: jh7110-timer.ch2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns                                                           
clocksource: jh7110-timer.ch3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns                                                           
usbcore: registered new interface driver usbhid                                                                                                               
usbhid: USB HID core driver                                                                                                                                   
riscv-pmu-sbi: SBI PMU extension is available                                                                                                                 
riscv-pmu-sbi: 16 firmware and 4 hardware counters                                                                                                            
riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available                                                                   
NET: Registered PF_INET6 protocol family                                                                                                                      
Segment Routing with IPv6                                                                                                                                     
In-situ OAM (IOAM) with IPv6                                                                                                                                  
NET: Registered PF_PACKET protocol family                                                                                                                     
Key type dns_resolver registered                                                                                                                              
Btrfs loaded, zoned=no, fsverity=no                                                                                                                           
pl08xdmac 16008000.dma-controller: initialized 8 virtual memcpy channels                                                                                      
pl08xdmac 16008000.dma-controller: initialized 16 virtual slave channels                                                                                      
debugfs: Directory '16008000.dma-controller' with parent 'dmaengine' already present!                                                                         
pl08xdmac 16008000.dma-controller: DMA: PL080 rev0 at 0x16008000 irq 30                                                                                       
gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.                                                                         
starfive-jh7110-sys-pinctrl 13040000.pinctrl: StarFive GPIO chip registered 64 GPIOs                                                                          
gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.                                                                         
starfive-jh7110-aon-pinctrl 17020000.pinctrl: StarFive GPIO chip registered 4 GPIOs                                                                           
pcie-starfive 940000000.pcie: host bridge /soc/pcie@940000000 ranges:                                                                                         
pcie-starfive 940000000.pcie:      MEM 0x0030000000..0x0037ffffff -> 0x0030000000                                                                             
pcie-starfive 940000000.pcie:      MEM 0x0900000000..0x093fffffff -> 0x0900000000                                                                             
pcie-starfive 940000000.pcie: port link up                                                                                                                    
pcie-starfive 940000000.pcie: PCI host bridge to bus 0000:00                                                                                                  
pci_bus 0000:00: root bus resource [bus 00-ff]                                                                                                                
pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]                                                                                                
pci_bus 0000:00: root bus resource [mem 0x900000000-0x93fffffff pref]                                                                                         
pci 0000:00:00.0: [1556:1111] type 01 class 0x060400                                                                                                          
pci 0000:00:00.0: supports D1 D2                                                                                                                              
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot D3cold                                                                                                   
pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330                                                                                                          
pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]                                                                                                 
pci 0000:01:00.0: PME# supported from D0 D3cold                                                                                                               
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01                                                                                                   
pci 0000:00:00.0: BAR 8: assigned [mem 0x30000000-0x300fffff]                                                                                                 
pci 0000:01:00.0: BAR 0: assigned [mem 0x30000000-0x30000fff 64bit]                                                                                           
pci 0000:00:00.0: PCI bridge to [bus 01]                                                                                                                      
pci 0000:00:00.0:   bridge window [mem 0x30000000-0x300fffff]                                                                                                 
pcieport 0000:00:00.0: PME: Signaling with IRQ 46                                                                                                             
pci 0000:01:00.0: enabling device (0000 -> 0002)                                                                                                              
xhci_hcd 0000:01:00.0: xHCI Host Controller                                                                                                                   
xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1                                                                                          
xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000000000000890                                                                      
xhci_hcd 0000:01:00.0: xHCI Host Controller                                                                                                                   
xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2                                                                                          
xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed                                                                                                       
hub 1-0:1.0: USB hub found                                                                                                                                    
hub 1-0:1.0: 1 port detected                                                                                                                                  
hub 2-0:1.0: USB hub found                                                                                                                                    
hub 2-0:1.0: 4 ports detected                                                                                                                                 
pcie-starfive 9c0000000.pcie: host bridge /soc/pcie@9c0000000 ranges:                                                                                         
pcie-starfive 9c0000000.pcie:      MEM 0x0038000000..0x003fffffff -> 0x0038000000                                                                             
pcie-starfive 9c0000000.pcie:      MEM 0x0980000000..0x09bfffffff -> 0x0980000000                                                                             
usb 1-1: new high-speed USB device number 2 using xhci_hcd                                                                                                    
hub 1-1:1.0: USB hub found                                                                                                                                    
hub 1-1:1.0: 4 ports detected                                                                                                                                 
usb 1-1.1: new high-speed USB device number 3 using xhci_hcd                                                                                                  
hub 1-1.1:1.0: USB hub found                                                                                                                                  
hub 1-1.1:1.0: 4 ports detected                                                                                                                               
usb 1-1.1.2: new full-speed USB device number 4 using xhci_hcd                                                                                                
pcie-starfive 9c0000000.pcie: port link down                                                                                                                  
pcie-starfive 9c0000000.pcie: PCI host bridge to bus 0001:00                                                                                                  
pci_bus 0001:00: root bus resource [bus 00-ff]                                                                                                                
pci_bus 0001:00: root bus resource [mem 0x38000000-0x3fffffff]                                                                                                
pci_bus 0001:00: root bus resource [mem 0x980000000-0x9bfffffff pref]                                                                                         
pci 0001:00:00.0: [1556:1111] type 01 class 0x060400                                                                                                          
pci 0001:00:00.0: supports D1 D2                                                                                                                              
pci 0001:00:00.0: PME# supported from D0 D1 D2 D3hot D3cold                                                                                                   
pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01                                                                                                   
pci 0001:00:00.0: PCI bridge to [bus 01]                                                                                                                      
pcieport 0001:00:00.0: PME: Signaling with IRQ 61                                                                                                             
dw_axi_dmac_platform 16050000.dma-controller: DesignWare AXI DMA Controller, 4 channels                                                                       
printk: console [ttyS0] disabled                                                                                                                              
10000000.serial: ttyS0 at MMIO 0x10000000 (irq = 62, base_baud = 1500000) is a 16550A                                                                         
printk: console [ttyS0] enabled                                                                                                                               
input: WingCool Inc. TouchScreen Stylus as /devices/platform/soc/940000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:0
input: WingCool Inc. TouchScreen Touchscreen as /devices/platform/soc/940000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/1
hid-generic 0003:056A:0529.0001: input: USB HID v1.10 Device [WingCool Inc. TouchScreen] on usb-0000:01:00.0-1.1.2/input0                                     
hid-generic 0003:056A:0529.0002: device has no listeners, quitting                                                                                            
input: WingCool Inc. TouchScreen as /devices/platform/soc/940000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.2/0003:056A:052
hid-generic 0003:056A:0529.0003: input: USB HID v1.10 Mouse [WingCool Inc. TouchScreen] on usb-0000:01:00.0-1.1.2/input2                                      
designware-i2s: probe of 100e0000.i2s failed with error -110                                                                                                  
dwmmc_starfive 16020000.mmc: IDMAC supports 32-bit address mode.                                                                                              
dwmmc_starfive 16020000.mmc: Using internal DMA controller.                                                                                                   
dwmmc_starfive 16020000.mmc: Version ID is 290a                                                                                                               
dwmmc_starfive 16020000.mmc: DW MMC controller at irq 69,32 bit host data width,32 deep fifo                                                                  
mmc_host mmc1: card is polling.                                                                                                                               
usb 1-1.1.3: new full-speed USB device number 5 using xhci_hcd                                                                                                
mmc_host mmc1: Bus speed (slot 0) = 49500000Hz (slot req 400000Hz, actual 399193HZ div = 62)                                                                  
hid-generic 0003:05AC:0265.0004: device has no listeners, quitting                                                                                            
input: Apple Inc. Magic Trackpad 2 Mouse as /devices/platform/soc/940000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.1/00033
hid-generic 0003:05AC:0265.0005: input: USB HID v1.10 Mouse [Apple Inc. Magic Trackpad 2] on usb-0000:01:00.0-1.1.3/input1                                    
hid-generic 0003:05AC:0265.0006: device has no listeners, quitting                                                                                            
hid-generic 0003:05AC:0265.0007: device has no listeners, quitting                                                                                            
usb 1-1.1.2: USB disconnect, device number 4                                                                                                                  
designware-i2s: probe of 120b0000.i2s failed with error -110                                                                                                  
mmc_host mmc1: Bus speed (slot 0) = 49500000Hz (slot req 50000000Hz, actual 49500000HZ div = 0)                                                               
mmc1: new high speed SDXC card at address b36b                                                                                                                
mmcblk1: mmc1:b36b CBADS 58.6 GiB                                                                                                                             
 mmcblk1: p1 p2 p3 p4                                                                                                                                         
usb 1-1.1.2: new full-speed USB device number 6 using xhci_hcd                                                                                                
input: WingCool Inc. TouchScreen Stylus as /devices/platform/soc/940000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:6
input: WingCool Inc. TouchScreen Touchscreen as /devices/platform/soc/940000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/7
hid-generic 0003:056A:0529.0008: input: USB HID v1.10 Device [WingCool Inc. TouchScreen] on usb-0000:01:00.0-1.1.2/input0                                     
hid-generic 0003:056A:0529.0009: device has no listeners, quitting                                                                                            
input: WingCool Inc. TouchScreen as /devices/platform/soc/940000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.2/0003:056A:058
hid-generic 0003:056A:0529.000A: input: USB HID v1.10 Mouse [WingCool Inc. TouchScreen] on usb-0000:01:00.0-1.1.2/input2                                      
designware-i2s: probe of 120c0000.i2s failed with error -110                                                                                                  
ssp-pl022 10060000.spi: ARM PL022 driver, device ID: 0x00041022                                                                                               
ssp-pl022 10060000.spi: mapped registers from 0x0000000010060000 to 000000009af7b5ff                                                                          
axp20x-i2c 5-0036: AXP20x variant AXP15060 found                                                                                                              
axp20x-i2c 5-0036: AXP20X driver loaded                                                                                                                       
i2c 6-0010: Fixed dependency cycle(s) with /soc/csi@19800000/ports/port@0/endpoint                                                                            
imx219 6-0010: failed to read chip id 219                                                                                                                     
imx219: probe of 6-0010 failed with error -5                                                                                                                  
starfive-dphy-rx 19820000.phy: supply mipi_0p9 not found, using dummy regulator                                                                               
cdns-csi2rx 19800000.csi: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY                                                                             
dwmmc_starfive 16010000.mmc: IDMAC supports 32-bit address mode.                                                                                              
clk: Disabling unused clocks                                                                                                                                  
dwmmc_starfive 16010000.mmc: Using internal DMA controller.                                                                                                   
starfive-hdmi 29590000.hdmi: [drm:starfive_hdmi_probe] registered Starfive HDMI I2C bus driver success                                                        
dwmmc_starfive 16010000.mmc: Version ID is 290a                                                                                                               
verisilicon display-subsystem: bound 29400000.lcd-controller (ops 0xffffffff80e85418)                                                                         
dwmmc_starfive 16010000.mmc: DW MMC controller at irq 91,32 bit host data width,32 deep fifo                                                                  
verisilicon display-subsystem: bound 29590000.hdmi (ops 0xffffffff80e861f8)                                                                                   
mmc_host mmc0: card is non-removable.                                                                                                                         
verisilicon display-subsystem: bound dsi_encoder (ops 0xffffffff80e85ff0)                                                                                     
[drm] Initialized verisilicon 1.0.0 20230516 for display-subsystem on minor 0                                                                                 
ALSA device list:                                                                                                                                             
  #0: StarFive-PWMDAC-Sound-Card                                                                                                                              
mmc_host mmc0: Bus speed (slot 0) = 49500000Hz (slot req 400000Hz, actual 399193HZ div = 62)                                                                  
exFAT-fs (mmcblk1p4): invalid boot record signature                                                                                                           
exFAT-fs (mmcblk1p4): failed to read boot sector                                                                                                              
exFAT-fs (mmcblk1p4): failed to recognize exfat type                                                                                                          
exFAT-fs (mmcblk1p4): invalid boot record signature                                                                                                           
exFAT-fs (mmcblk1p4): failed to read boot sector                                                                                                              
exFAT-fs (mmcblk1p4): failed to recognize exfat type                                                                                                          
List of all partitions:                                                                                                                                       
b300        61454848 mmcblk1                                                                                                                                  
 driver: mmcblk                                                                                                                                               
  b301            2048 mmcblk1p1 8ef4f4f8-a7ab-49e3-9fe4-3123d7cde862                                                                                         

  b302            4096 mmcblk1p2 a215f419-9d9c-4305-8549-4c04ee4db100                                                                                         

  b303          819200 mmcblk1p3 87f49afa-5364-472f-878a-0c69f169cf92                                                                                         

  b304        60627438 mmcblk1p4 30c7fadd-fd0e-49fd-add0-aad9ac693c49                                                                                         

No filesystem could mount root, tried:                                                                                                                        
 ext3                                                                                                                                                         
 ext2                                                                                                                                                         
 ext4                                                                                                                                                         
 vfat                                                                                                                                                         
 msdos                                                                                                                                                        
 exfat                                                                                                                                                        
 ntfs                                                                                                                                                         
 btrfs                                                                                                                                                        

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,4)                                                                              
CPU: 2 PID: 1 Comm: swapper/0 Not tainted 6.6.0-g076ede06c00a #1                                                                                              
Hardware name: StarFive VisionFive 2 v1.3B (DT)                                                                                                               
Call Trace:                                                                                                                                                   
[<ffffffff8000542c>] dump_backtrace+0x1c/0x24                                                                                                                 
[<ffffffff808303aa>] show_stack+0x2c/0x38                                                                                                                     
[<ffffffff8084473e>] dump_stack_lvl+0x3c/0x54                                                                                                                 
[<ffffffff8084476a>] dump_stack+0x14/0x1c                                                                                                                     
[<ffffffff80830666>] panic+0xf2/0x28a                                                                                                                         
[<ffffffff80a0150c>] mount_root+0x0/0x204                                                                                                                     
[<ffffffff80a016f4>] mount_root+0x1e8/0x204                                                                                                                   
[<ffffffff80a01904>] prepare_namespace+0x1f4/0x23a                                                                                                            
[<ffffffff80a00f32>] kernel_init_freeable+0x1ea/0x204                                                                                                         
[<ffffffff80845e72>] kernel_init+0x1e/0x112                                                                                                                   
[<ffffffff8000347e>] ret_from_fork+0xa/0x1c                                                                                                                   
SMP: stopping secondary CPUs                                                                                                                                  
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,4) ]---                                                                
xiaguangbo commented 2 months ago

There is a problem with burning. I didn't burn the file to SD.

xiaguangbo commented 2 months ago

https://blog.csdn.net/qq_41544116/article/details/138169362?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22138169362%22%2C%22source%22%3A%22qq_41544116%22%7D