Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.25 KB

README.md

File metadata and controls

41 lines (26 loc) · 1.25 KB

zCore-user

Simple user programs for zCore OS (riscv64). This repo is mainly built upon rCore-user and lmbench.

Prepare for the environment

First, download prebuilt musl toolchain from musl.cc, for example riscv64-linux-musl-cross.tgz. Untar it into root directory.

After that, run the following command in your work shell:

export PATH=PATH_TO_YOUR_DIR/riscv64-linux-musl-cross/bin:$PATH

Write user programs

cd user

Then, you may write your own user programs in src directory. If you have any problems, please refer to several written ones.

After writing user programs, run the following command to build the executable ones:

cmake -DARCH=riscv64 .
make YOUR_PROGRAM_NAME

Finally, put the executable programs in riscv64 directory into your zCore rootfs.

Run lmbench

We modify the original lmbench code and Makefile to fit riscv64. If you want to make another testcase, please imitate our command in Makefile.

cd lmbench-3.0-a9/src
make lat_ctx

Finally, put the executable programs in bin/unknown directory (there already exist prebuilt ones) into your zCore rootfs.