You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# StarFiveTech VisionFive2 SDK
2
2
3
-
This builds a complete RISC-V cross-compile toolchain for the `StarFiveTech``JH7110` SoC. It also builds U-boot SPL, U-boot and a flattened image tree (FIT) image with a Opensbi binary, linux kernel, device tree, ramdisk image and rootfs image for the `JH7110 VisionFive2` board.
3
+
This builds a complete RISC-V cross-compile toolchain for the `StarFiveTech``JH7110` SoC. It also builds U-boot SPL, U-boot and a flattened image tree (FIT) image with a Opensbi binary, linux kernel, device tree, ramdisk image and rootfs image for the `JH7110 VisionFive2` board. Note this SDK is built with the linux kernel version `5.15`.
4
4
5
5
## Prerequisites
6
6
@@ -32,7 +32,7 @@ Checkout this repository (e.g.: branch `JH7110_VisionFive2_devel`). Then checko
32
32
$ cd VisionFive2
33
33
$ git checkout JH7110_VisionFive2_devel
34
34
$ git submodule update --init --recursive
35
-
This will take some time and require around 5GB of disk space. Some modules may fail because certain dependencies don't have the best git hosting. The only solution is to wait and try again later (or ask someone for a copy of that source repository).
35
+
This will take some time and require around 9GB of disk space. Some modules may fail because certain dependencies don't have the best git hosting. The only solution is to wait and try again later (or ask someone for a copy of that source repository).
36
36
37
37
For user who build the release tag version, the above command is enough. For developer, need to switch the 5 submodules `buildroot`, `u-boot`, `linux`, `opensbi`, `soft_3rdpart` to correct branch manually, also could refer to `.gitmodule`
38
38
@@ -46,7 +46,7 @@ $ cd soft_3rdpart && git checkout JH7110_VisionFive2_devel && cd ..
46
46
47
47
## Quick Build Instructions
48
48
49
-
Below are the quick building for the initramfs image `image.fit` which could be translated to board through tftp and run on board. The completed toolchain, `u-boot-spl.bin.normal.out`, `visionfive2_fw_payload.img`, `image.fit` will be generated under `work/` directory. The completed build tree will consume about 16G of disk space.
49
+
Below are the quick building for the initramfs image `image.fit` which could be translated to board through tftp and run on board. The completed toolchain, `u-boot-spl.bin.normal.out`, `visionfive2_fw_payload.img`, `image.fit` will be generated under `work/` directory. The completed build tree will consume about 18G of disk space.
50
50
51
51
$ make -j$(nproc)
52
52
@@ -84,6 +84,7 @@ Additional command to build single package or module:
84
84
85
85
```
86
86
$ make vmlinux # build linux kernel
87
+
$ make uboot # build u-boot
87
88
$ make -C ./work/buildroot_rootfs/ O=./work/buildroot_rootfs busybox-rebuild # build busybox package
88
89
$ make -C ./work/buildroot_rootfs/ O=./work/buildroot_rootfs ffmpeg-rebuild # build ffmpeg package
89
90
```
@@ -186,10 +187,10 @@ Then press any key to stop and enter uboot terminal, there are two way to boot t
If you don't already use a local tftp server, then you probably want to make the TF card target; the default size is 16 GBs. **NOTE THIS WILL DESTROY ALL EXISTING DATA** on the target TF card; The `GPT` Partition Table for the TF card is recommended.
249
+
If you don't already use a local tftp server, then you probably want to make the TF card target; the default size is 16 GBs. **NOTE THIS WILL DESTROY ALL EXISTING DATA** on the target TF card; The `GPT` Partition Table for the TF card is recommended.
249
250
250
251
#### Generate SD Card Image File
251
252
252
-
We could generate a sdcard image file by the below command. The sdcard image file could be burned into sd card or tf card through `dd` command, or `rpi-imager` or `balenaEtcher` tool
253
+
We could generate a sdcard image file by the below command. The sdcard image file could be copied to sd card or tf card through `dd` command, or `rpi-imager` or `balenaEtcher` tool
253
254
254
255
```
255
256
$ make -j$(nproc)
@@ -259,21 +260,21 @@ $ make img
259
260
260
261
The output file `work/sdcard.img` will be generated.
261
262
262
-
#### Burn Image File to SD Card
263
+
#### Copy Image File to SD Card
263
264
264
-
The `sdcard.img` can be burn into a tf card. e.g. through `dd` command as below
265
+
The `sdcard.img` can be copied to a tf card. e.g. through `dd` command as below
265
266
266
267
```
267
268
$ sudo dd if=work/sdcard.img of=/dev/sdX bs=4096
268
269
$ sync
269
270
```
270
271
271
-
Then extend the tf card rootfs partition if needed. There are two ways to implement it.
272
+
Then extend the tf card rootfs partition if needed. There are two ways to implement it.
272
273
273
274
The first way could be done on Ubuntu host, need to install the below package:
274
275
275
276
```
276
-
$ sudo apt install cloud-guest-utils e2fsprogs
277
+
$ sudo apt install cloud-guest-utils e2fsprogs
277
278
```
278
279
279
280
Then insert the tf card to Ubuntu host, run the below, note `/dev/sdX` is the tf card device.
@@ -403,8 +404,8 @@ Prepare the tftp sever. e.g. `sudo apt install tftpd-hpa` for Ubuntu host.
403
404
StarFive # sf update ${loadaddr} 0x100000 $filesize
404
405
```
405
406
406
-
## APPENDIX IV: Recovering Bootloader
407
+
## APPENDIX IV: Recovering Bootloader
407
408
408
-
The SPL and U-Boot are stored inside the SPI flash on board. There may be situations where you accidentally emptied the flash or if the flash is damaged on your board. In these situations, it's better to recover the bootloader.
409
+
The SPL and U-Boot are stored inside the SPI flash on board. There may be situations where you accidentally emptied the flash or if the flash is damaged on your board. In these situations, it's better to recover the bootloader.
409
410
410
411
Please jump to https://github.com/starfive-tech/Tools for more details
0 commit comments