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 riscv64 board support.
The only difference is riscv64 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
The cpu, memory and external devices configuration in dts must match the setting from the QEMU options, otherwise, it may not boot.
If want to change the QEMU options, please make sure update the dts
configurations too, or, simply reset DTB
variable like this to use the
default dtb transferred by QEMU:
$ make boot DTB=
The default dtb is dumped out of QEMU:
$ make boot DUMPDTB=1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。