Pārlūkot izejas kodu

Update README.md

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
Jianlong Huang 1 gadu atpakaļ
vecāks
revīzija
2fdb0691b2
1 mainītis faili ar 121 papildinājumiem un 40 dzēšanām
  1. 121 40
      README.md

+ 121 - 40
README.md

@@ -31,7 +31,7 @@ Checkout this repository  (e.g.: branch `vf2-515-devel`). Then checkout all of t
 	$ git checkout --track origin/vf2-515-devel
 	$ git submodule update --init --recursive
 
-In case someone run `git clone git@gitlab.starfivetech.com:sdk/freelight-u-sdk.git`, recommend to add the below at the tail of the /etc/hosts to fix the network domain issue:
+In case someone run `git clone git@gitlab.starfivetech.com:sbc/visionfive.git`, recommend to add the below at the tail of the /etc/hosts to fix the network domain issue:
 
 ```
 192.168.110.45 gitlab.starfivetech.com
@@ -90,11 +90,9 @@ $ make -C ./work/buildroot_rootfs/ O=./work/buildroot_rootfs busybox-menuconfig
 Additional command to build single package or module:
 
 ```
-$ make vmlinu    # build linux kernel
-$ make uboot     # build u-boot
+$ make vmlinux   # build linux kernel
 $ make -C ./work/buildroot_rootfs/ O=./work/buildroot_rootfs busybox-rebuild   # build busybox package
 $ make -C ./work/buildroot_rootfs/ O=./work/buildroot_rootfs ffmpeg-rebuild    # build ffmpeg package
-$ make vpudriver-build # build wave511/wave420l/codaj12 driver
 ```
 
 ## Running on JH7110 VisionFive2 Board via Network
@@ -102,20 +100,91 @@ $ make vpudriver-build # build wave511/wave420l/codaj12 driver
 After the JH7110 VisionFive2 Board is properly connected to the serial port cable, network cable and power cord, turn on the power from the wall power socket to power and you will see the startup information as follows:
 
 ```
-U-Boot 2021.10 (Oct 10 2022 - 22:49:48 +0800)
+U-Boot SPL 2021.10 (Oct 31 2022 - 12:11:37 +0800)
+DDR version: dc2e84f0.
+Trying to boot from SPI
+
+OpenSBI v1.0
+   ____                    _____ ____ _____
+  / __ \                  / ____|  _ \_   _|
+ | |  | |_ __   ___ _ __ | (___ | |_) || |
+ | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
+ | |__| | |_) |  __/ | | |____) | |_) || |_
+  \____/| .__/ \___|_| |_|_____/|____/_____|
+        | |
+        |_|
+
+Platform Name             : StarFive VisionFive V2
+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 Reboot Device    : ---
+Platform Shutdown Device  : ---
+Firmware Base             : 0x40000000
+Firmware Size             : 360 KB
+Runtime SBI Version       : 0.3
+
+Domain0 Name              : root
+Domain0 Boot HART         : 3
+Domain0 HARTs             : 0*,1*,2*,3*,4*
+Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
+Domain0 Region01          : 0x0000000040000000-0x000000004007ffff ()
+Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
+Domain0 Next Address      : 0x0000000040200000
+Domain0 Next Arg1         : 0x0000000042200000
+Domain0 Next Mode         : S-mode
+Domain0 SysReset          : yes
+
+Boot HART ID              : 3
+Boot HART Domain          : root
+Boot HART Priv Version    : v1.11
+Boot HART Base ISA        : rv64imafdcbx
+Boot HART ISA Extensions  : none
+Boot HART PMP Count       : 8
+Boot HART PMP Granularity : 4096
+Boot HART PMP Address Bits: 34
+Boot HART MHPM Count      : 2
+Boot HART MIDELEG         : 0x0000000000000222
+Boot HART MEDELEG         : 0x000000000000b109
+
+
+U-Boot 2021.10 (Oct 31 2022 - 12:11:37 +0800), Build: jenkins-VF2_515_Branch_SDK_Release-10
 
 CPU:   rv64imacu
 Model: StarFive VisionFive V2
-DRAM:  4 GiB
-MMC:   sdio0@16010000: 0
+DRAM:  8 GiB
+MMC:   sdio0@16010000: 0, sdio1@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: VF7110A1-2243-D008E000-00000001
+data version: 0x2
+PCB revision: 0xa1
+BOM revision: A
+Ethernet MAC0 address: 6c:cf:39:00:14:5b
+Ethernet MAC1 address: 6c:cf:39:00:14:5c
+--------EEPROM INFO--------
+
 In:    serial@10000000
 Out:   serial@10000000
 Err:   serial@10000000
 Model: StarFive VisionFive V2
 Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
+switch to partitions #0, OK
+mmc1 is current device
+found device 1
+bootmode flash device 1
+Failed to load 'uEnv.txt'
+Can't set block device
 Hit any key to stop autoboot:  0 
-StarFive #
+StarFive # 
 ```
 
 Then press any key to stop and enter uboot terminal, there are two way to boot the board
@@ -127,7 +196,7 @@ transfer image.fit through TFTP:
 Step1: set enviroment parameter:
 
 ```
-setenv bootfile vmlinuz; setenv fdt_addr_r 0x48000000; setenv fdt_high 0xffffffffffffffff; setenv fdtcontroladdr 0xffffffffffffffff; setenv initrd_high 0xffffffffffffffff; setenv kernel_addr_r 0x44000000; setenv fileaddr a0000000; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
+setenv bootfile vmlinuz; setenv fdt_addr_r 0x48000000; setenv fdt_high 0xffffffffffffffff; setenv fdtcontroladdr 0xffffffffffffffff; setenv initrd_high 0xffffffffffffffff; setenv kernel_addr_r 0x44000000; setenv ramdisk_addr_r 0x48100000; setenv fileaddr a0000000; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
 ```
 
 Step2: upload image file to ddr:
@@ -138,11 +207,9 @@ tftpboot ${fileaddr} ${serverip}:image.fit;
 
 Step3: load and excute:
 
-	bootm start ${fileaddr};bootm loados ${fileaddr};run chipa_set_linux;booti 0x40200000 0x46100000:${filesize} 0x46000000
-	or:
-	bootm ${fileaddr}#config-1
-	or:
-	bootm ${fileaddr}
+```
+bootm start ${fileaddr};bootm loados ${fileaddr};run chipa_set_linux;booti 0x40200000 0x46100000:${filesize} 0x46000000
+```
 
 When you see the `buildroot login:` message, then congratulations, the launch was successful
 
@@ -158,7 +225,7 @@ If we want to loading the other dtb, e.g. `jh7110-visionfive-v2-wm8960.dtb`, fol
 Step1: set enviroment parameter:
 
 ```
-setenv bootfile vmlinuz; setenv fdt_addr_r 0x48000000; setenv fdt_high 0xffffffffffffffff; setenv fdtcontroladdr 0xffffffffffffffff; setenv initrd_high 0xffffffffffffffff; setenv kernel_addr_r 0x44000000; setenv fileaddr a0000000; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
+setenv bootfile vmlinuz; setenv fdt_addr_r 0x48000000; setenv fdt_high 0xffffffffffffffff; setenv fdtcontroladdr 0xffffffffffffffff; setenv initrd_high 0xffffffffffffffff; setenv kernel_addr_r 0x44000000; setenv ramdisk_addr_r 0x48100000; setenv fileaddr a0000000; setenv ipaddr 192.168.xxx.xxx; setenv serverip 192.168.xxx.xxx;
 setenv kernel_comp_addr_r 0xb0000000;setenv kernel_comp_size 0x10000000;
 ```
 
@@ -225,27 +292,44 @@ $ sudo resize2fs /dev/sdX4  # extend filesystem
 $ sudo fsck.ext4 /dev/sdX4
 ```
 
-The second way is when your system doesn't have `growpart` command, e.g. the buildroot on board. The tf card can be insert into the Ubuntu host or  just directly on JH7110 board. you can use fdisk instead:
-
-```bash
-#!bin/sh
-disk=/dev/mmcblk0
-part=p4
-sudo fdisk $disk << EOF
-p
-d
-4
-n
-
-
-
-NO
-w
-EOF
-
-sudo e2fsck -f ${disk}${part}
-sudo resize2fs ${disk}${part}
-sudo fsck.ext4 ${disk}${part}
+The second way could be done on VisionFive2 board, use fdisk and resize2fs command:
+
+```
+# fdisk /dev/mmcblk1
+Welcome to fdisk (util-linux 2.37.2).
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+This disk is currently in use - repartitioning is probably a bad idea.
+It's recommended to umount all file systems, and swapoff all swap
+partitions on this disk.
+Command (m for help): d
+Partition number (1-4, default 4): 4
+Partition 4 has been deleted.
+Command (m for help): n
+Partition number (4-128, default 4): 4
+First sector (614400-62333918, default 614400):
+): t sector, +/-sectors or +/-size{K,M,G,T,P} (614400-62333918, default 62333918)
+Created a new partition 4 of type 'Linux filesystem' and of size 29.4 GiB.
+Partition #4 contains a ext4 signature.
+Do you want to remove the signature? [Y]es/[N]o: N
+Command (m for help): w
+The partition table has been altered.
+Syncing disks.
+
+# resize2fs /dev/mmcblk1p4
+resize2fs 1.46.4 (18-Aug-2021)
+Filesystem at /d[
+111.756178] EXT4-fs (mmcblk1p4): resizing filesystem from 512000
+to 30859756 blocks
+ev/mmcblk1p4 is [
+111.765203] EXT4-fs (mmcblk1p4): resizing filesystem from 512000
+to 30859265 blocks
+mounted on /; on-line resizing required
+old_desc_blocks = 2, new_desc_blocks = 118
+[ 112.141953] random: crng init done
+[ 112.145369] random: 7 urandom warning(s) missed due to ratelimiting
+[ 115.474184] EXT4-fs (mmcblk1p4): resized filesystem to 30859265
+The filesystem on /dev/mmcblk1p4 is now 30859756 (1k) blocks long.
 ```
 
 ## APPENDIX II: Using DTB Overlay Dynamically
@@ -269,7 +353,7 @@ Additional, you could remove the dtbo feature:
 
 Prepare the tftp sever. e.g. `sudo apt install tftpd-hpa` for Ubuntu host.
 
-1. Power on the evaluation board and wait until enters the u-boot command line
+1. Power on the VisionFive2 board and wait until enters the u-boot command line
 
 2. Configure the environment variables by executing:
 
@@ -299,6 +383,3 @@ Prepare the tftp sever. e.g. `sudo apt install tftpd-hpa` for Ubuntu host.
    StarFive # sf update 0xa0000000 0x100000 $filesize
    ```
 
-## APPENDIX IV:  How to Switch to 4G DDR or 8G DDR
-
-The detail process will add it later