295 Star 1.8K Fork 235

GVP泰晓科技/Linux Lab

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Risc32 Virt Usage

Basic Usage

Works perfectly:

$ make boot V=1

$ make boot SHARE=1

$ make boot ROOTDEV=/dev/nfs

Buildroot provides rootfs config and toolchain, mainline linux provides the official kernel config, everything goes well. Qemu v4.0.0 has the risc32 board support.

BIOS

The only difference is riscv32 requires a proxy kernel to do some prepare before running the real linux kernel. and the proxy kernel currently is replaced by the opensbi project.

Newer qemu and kernel support works with the standard -bios option with opensbi.

We can build one in Linux Lab with these commands:

$ cd src/examples/
$ git clone https://github.com/riscv/opensbi
$ cd opensbi
// for riscv32
$ make all PLATFORM=generic LLVM=1 PLATFORM_RISCV_XLEN=32
// for riscv64
$ make all PLATFORM=generic LLVM=1 PLATFORM_RISCV_XLEN=64
$ ls build/platform/generic/firmware/fw_jump.elf

References

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/tinylab/linux-lab.git
git@gitee.com:tinylab/linux-lab.git
tinylab
linux-lab
Linux Lab
master

搜索帮助