starfive: add new target for StarFive JH7100/7110 SoC
[openwrt/staging/981213.git] / target / linux / starfive / patches-6.1 / 0100-Add-readme.patch
1 From 13c570f2350f59a7994c26a51f749a50fa9b4726 Mon Sep 17 00:00:00 2001
2 From: Hal Feng <87058983+hal-feng@users.noreply.github.com>
3 Date: Tue, 20 Dec 2022 16:18:35 +0800
4 Subject: [PATCH 100/122] Add readme
5
6 ---
7 README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
8 1 file changed, 62 insertions(+)
9 create mode 100644 README.md
10
11 --- /dev/null
12 +++ b/README.md
13 @@ -0,0 +1,62 @@
14 +## JH7110 Upstream Status ##
15 +
16 +To get the latest status of each upstreaming patch series, please visit
17 +our RVspace.
18 +
19 +https://rvspace.org/en/project/JH7110_Upstream_Plan
20 +
21 +## Build Instructions ##
22 +
23 +1. Configure Kconfig options
24 +
25 +```shell
26 +# Use default selections
27 +make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig
28 +```
29 +
30 +or
31 +
32 +```shell
33 +# Select options manually
34 +make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- nconfig
35 +```
36 +
37 +To boot up the VisionFive 2 board, please make sure **SOC_STARFIVE**,
38 +**CLK_STARFIVE_JH7110_SYS**, **PINCTRL_STARFIVE_JH7110_SYS**,
39 +**SERIAL_8250_DW** are selected.
40 +> If you need MMC and GMAC drivers, you should also select
41 +**MMC_DW_STARFIVE** and **DWMAC_STARFIVE**.
42 +
43 +2. Build
44 +```shell
45 +make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-
46 +```
47 +
48 +## How to Run on VisionFive 2 Board via Network ##
49 +
50 +1. Power on, enter u-boot and set enviroment parameters
51 +```
52 +setenv fdt_high 0xffffffffffffffff; setenv initrd_high 0xffffffffffffffff;
53 +setenv scriptaddr 0x88100000; setenv script_offset_f 0x1fff000; setenv script_size_f 0x1000;
54 +setenv kernel_addr_r 0x84000000; setenv kernel_comp_addr_r 0x90000000; setenv kernel_comp_size 0x10000000;
55 +setenv fdt_addr_r 0x88000000; setenv ramdisk_addr_r 0x88300000;
56 +```
57 +2. Set IP addresses for the board and your tftp server
58 +```
59 +setenv serverip 192.168.w.x; setenv gatewayip 192.168.w.y; setenv ipaddr 192.168.w.z; setenv hostname starfive; setenv netdev eth0;
60 +```
61 +3. Upload dtb, image and file system to DDR from your tftp server
62 +```
63 +tftpboot ${fdt_addr_r} jh7110-starfive-visionfive-2-v1.3b.dtb; tftpboot ${kernel_addr_r} Image.gz; tftpboot ${ramdisk_addr_r} initramfs.cpio.gz;
64 +```
65 +> If your VisionFive 2 is v1.2A, you should upload jh7110-starfive-visionfive-2-v1.2a.dtb instead.
66 +4. Load and boot the kernel
67 +```
68 +booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
69 +```
70 +When you see the message "buildroot login:", the launch was successful.
71 +You can just input the following accout and password, then continue.
72 +```
73 +buildroot login: root
74 +Password: starfive
75 +```