2020-10-21 19:18:46 +08:00
|
|
|
# XV6-RISCV On K210
|
|
|
|
Run xv6-riscv on k210 board
|
2020-10-21 21:24:45 +08:00
|
|
|
![run-k210](./img/run-k210.png)
|
2020-10-19 00:53:22 +08:00
|
|
|
|
2020-10-21 19:18:46 +08:00
|
|
|
## Dependencies
|
|
|
|
+ k210 board
|
|
|
|
+ RISC-V Toolchain
|
2020-10-19 00:53:22 +08:00
|
|
|
|
2020-10-21 19:18:46 +08:00
|
|
|
## Installation
|
2020-11-07 03:13:59 +08:00
|
|
|
```bash
|
|
|
|
git clone https://github.com/SKTT1Ryze/xv6-k210
|
|
|
|
```
|
2020-10-19 00:53:22 +08:00
|
|
|
|
2020-10-21 19:18:46 +08:00
|
|
|
## Build
|
2020-10-22 03:54:05 +08:00
|
|
|
First you need to connect your k210 board to your PC.
|
|
|
|
And check the USB port:
|
2020-11-07 03:12:44 +08:00
|
|
|
```bash
|
|
|
|
ls /dev/ | grep USB
|
|
|
|
```
|
2020-11-04 06:43:08 +08:00
|
|
|
In my situation it will be `ttyUSB0`
|
2020-10-22 03:54:05 +08:00
|
|
|
|
2020-11-07 03:12:44 +08:00
|
|
|
```bash
|
|
|
|
cd xv6-k210
|
|
|
|
mkdir target
|
|
|
|
make build
|
|
|
|
```
|
2020-10-19 00:53:22 +08:00
|
|
|
|
2020-10-21 19:18:46 +08:00
|
|
|
## Run
|
2020-11-07 03:12:44 +08:00
|
|
|
```bash
|
|
|
|
make run-k210 k210-serialport=`Your-USB-port`(default by ttyUSB1)
|
|
|
|
```
|
2020-10-23 08:00:43 +08:00
|
|
|
Ps: Most of the k210-port in Linux is ttyUSB0, if you use Windows or Mac OS, this doc
|
|
|
|
may help you: [maixpy-doc](https://maixpy.sipeed.com/zh/get_started/env_install_driver.html#)
|
2020-10-19 00:53:22 +08:00
|
|
|
|
2020-11-07 03:12:44 +08:00
|
|
|
## Progress
|
|
|
|
- [x] Multicore boot
|
|
|
|
- [x] Bare-metal printf
|
|
|
|
- [x] Memory alloc
|
|
|
|
- [x] Page Table
|
|
|
|
- [x] Timer interrupt
|
|
|
|
- [x] S mode extern interrupt
|
|
|
|
- [x] Receive uarths message
|
|
|
|
- [x] SD card driver
|
|
|
|
- [ ] Process management
|
|
|
|
- [ ] File system
|
|
|
|
- [ ] User program
|
2020-11-02 20:20:31 +08:00
|
|
|
|
2020-10-21 19:18:46 +08:00
|
|
|
## TODO
|
|
|
|
The rest part of xv6-kernel and xv6-fs
|