# 2.2 for ubuntu 16.04, we should build gcc-musl for newest musl-1.1.21, please see build-gcc-musl.md for instructions
# 2.3 for riscv musl toolchain, please install [musl-riscv-toolchain](https://github.com/jiegec/musl-riscv-toolchain)
```
Then, build userspace programs for rCore:
```bash
$ make {ucore,biscuit,rust,nginx,redis,all} arch={x86_64,aarch64,riscv32,riscv64}
$ make alpine arch={x86_64,aarch64} # if you want to use alpine rootfs
$ make sfsimg arch={x86_64,aarch64,riscv32,riscv64}
```
Output to `build/$(arch)`
A rootfs is created at `build/$(arch)` and converted to `qcow2`.
## Support matrix
@ -43,18 +45,21 @@ Output to `build/$(arch)`
| nginx (linux only) | ✅ | ✅ | ❌ | ✅ |
| redis (linux only) | ✅ | ✅ | ✅ | ❌ |
| busybox | ✅ | ✅ | ❌ | ✅ |
| alpine rootfs | ✅ | ✅ | ❌ | ❌ |
## How to use Redis
After running commands above, you should be able to run redis-server in rCore. Then, start `redis-server` in rCore:
If redis is dynamically linked to musl (default if you use commands above), you might need to copy `ld-musl-$(arch).so.1` to rootfs `/lib` . Alpine rootfs includes one as well.
After building redis, you should be able to run redis-server in rCore. Then, start `redis-server` in rCore:
```bash
/> redis-server redis.conf
```
Then you should be able to connect to it using `redis-cli`:
Then you should be able to connect to it using `redis-cli` over the network: