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
bsp: qemu-virt64-riscv: update README for booting with rootfs
Now lwext4 is ready, and qemu-virt64-riscv smart can boot with rootfs.
Updated README to introduce this.
This patch also replace qemu-nographic.sh with run.sh, which has a more
simple name and more robust to launch rootfs image binary.
TBD: qemu-nographic.bat is not touched, hope some guys from Windows can
give a hand.
Signed-off-by: Chen Wang <[email protected]>
**Note: This document is based on the kernel version git commit ID: ebe2926cd6.**
87
-
88
89
Enter the BSP directory where qemu-virt64-riscv is located. The following operations will not be introduced separately. By default, it is in this directory.
89
90
90
91
```shell
@@ -153,13 +154,15 @@ Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
153
154
The repository has provided a ready-made execution script, which can be executed directly:
154
155
155
156
```shell
156
-
$ ./qemu-nographic.sh
157
+
$ ./run.sh
157
158
```
158
159
159
-
The running results of the RT-Thread Standard version are as follows:
160
+
### 3.2.1. Running RT-Thread Standard Edition
161
+
162
+
The following is an example:
160
163
161
164
```shell
162
-
$ ./qemu-nographic.sh
165
+
$ ./run.sh
163
166
164
167
OpenSBI v0.9
165
168
____ _____ ____ _____
@@ -213,11 +216,12 @@ file system initialization done!
213
216
Hello RISC-V
214
217
msh />
215
218
```
219
+
### 3.2.2. Running RT-Thread Smart version
216
220
217
-
The running results of RT-Thread Smart version are as follows:
221
+
The following is an example:
218
222
219
223
```shell
220
-
$ ./qemu-nographic.sh
224
+
$ ./run.sh
221
225
222
226
OpenSBI v0.9
223
227
____ _____ ____ _____
@@ -273,6 +277,89 @@ Hello RISC-V
273
277
msh />
274
278
```
275
279
280
+
### 3.2.3. Running RT-Thread Smart version + Root file-system
281
+
282
+
For the Smart version of the kernel, you can also specify the path of the root file-system image file when executing the `run.sh` script to mount the root file-system during the startup process.
283
+
284
+
It should be noted that the kernel supports fat by default. If you want to mount the ext4 file-system, you need to install the lwext4 package additionally, i.e. to enable the `PKG_USING_LWEXT4` option (the specific menuconfig path is (Top) -> RT-Thread online packages -> system packages -> lwext4: an excellent choice of ext2/3/4 filesystem for microcontrollers.). If you can't find the item in the menu, you can exit menuconfig and execute `pkgs --upgrade` to update the package index and then try to enable the package.
285
+
286
+
After checking this option, you also need to perform the following operations to update the software and install the source code to the packages directory of bsp (this operation only needs to be performed once):
287
+
288
+
```shell
289
+
$ source~/.env/env.sh
290
+
$ pkgs --update
291
+
```
292
+
293
+
Save and recompile the kernel.
294
+
295
+
For how to make a root file-system, please refer to <https://github.com/RT-Thread/userapps/blob/main/README.md>, which will not be repeated here.
0 commit comments