2021-12-05 14:41:44 +01:00
|
|
|
1. Download and install toolchain
|
|
|
|
|
|
|
|
$ curl https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz
|
|
|
|
|
|
|
|
2. Build and install qemu
|
|
|
|
|
|
|
|
$ git clone https://github.com/qemu/qemu
|
|
|
|
$ cd qemu
|
2022-01-14 10:18:29 +01:00
|
|
|
$ ./configure --target-list=riscv32-softmmu,riscv64-softmmu
|
2021-12-05 14:41:44 +01:00
|
|
|
$ make
|
|
|
|
$ sudo make install
|
|
|
|
|
|
|
|
3. Configure and build NuttX
|
|
|
|
|
|
|
|
$ mkdir ./nuttx; cd ./nuttx
|
2022-06-05 08:04:46 +02:00
|
|
|
$ git clone https://github.com/apache/incubator-nuttx.git nuttx
|
|
|
|
$ git clone https://github.com/apache/incubator-nuttx-apps.git apps
|
2021-12-05 14:41:44 +01:00
|
|
|
$ cd nuttx
|
|
|
|
$ make distclean
|
2022-01-14 10:18:29 +01:00
|
|
|
$ ./tools/configure.sh rv-virt:nsh
|
2021-12-05 14:41:44 +01:00
|
|
|
$ make
|
|
|
|
|
|
|
|
4. Run the nuttx with qemu
|
|
|
|
|
2022-05-02 11:03:55 +02:00
|
|
|
$ qemu-system-riscv32 -semihosting -M virt -cpu rv32 -smp 8 -bios none -kernel nuttx -nographic
|
2021-12-05 14:41:44 +01:00
|
|
|
|
2022-01-14 10:18:29 +01:00
|
|
|
or
|
|
|
|
|
2022-05-02 11:03:55 +02:00
|
|
|
$ qemu-system-riscv64 -semihosting -M virt -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic
|
|
|
|
|
|
|
|
NuttShell (NSH) NuttX-10.3.0-RC1
|
|
|
|
nsh> mount -t hostfs -o fs=. /host
|
|
|
|
nsh> cat /host/AUTHORS
|
|
|
|
This is a list of all the contributors that have submitted ICLA, SGA
|
|
|
|
If you are not on this list and believe you should be, please inform us.
|
|
|
|
|
|
|
|
ICLA
|
|
|
|
====
|
|
|
|
...
|
|
|
|
nsh>
|
2022-01-14 10:18:29 +01:00
|
|
|
|
2021-12-05 14:41:44 +01:00
|
|
|
5. TODO
|
|
|
|
|
|
|
|
Support FPU
|
|
|
|
Support RISC-V User mode
|
|
|
|
Support Network
|