diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2019-06-18 17:55:41 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-19 22:13:39 +0100 |
commit | aad42285930da69b316b305acfa164cffd1504c4 (patch) | |
tree | 16ea683efbd046caff79dd90feab36c766b8ce06 /meta/conf/machine/include/riscv/qemuriscv.inc | |
parent | ef82d0230e2286a22500aeb544277bef4c9dca15 (diff) | |
download | poky-aad42285930da69b316b305acfa164cffd1504c4.tar.gz |
qemuriscv64: Add the QEMU RISC-V 64-bit machine
The include is split ready to add the 32-bit RISC-V machine as soon as
glibc supports 32-bit RISC-V.
This is based on the work in the meta-riscv layer, thanks to Khem for
starting this.
(From OE-Core rev: 11b6020dff4550fc3a42e04bc1e86baf37942c62)
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/machine/include/riscv/qemuriscv.inc')
-rw-r--r-- | meta/conf/machine/include/riscv/qemuriscv.inc | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/conf/machine/include/riscv/qemuriscv.inc b/meta/conf/machine/include/riscv/qemuriscv.inc new file mode 100644 index 0000000000..aa1eba77da --- /dev/null +++ b/meta/conf/machine/include/riscv/qemuriscv.inc | |||
@@ -0,0 +1,45 @@ | |||
1 | PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" | ||
2 | |||
3 | require conf/machine/include/qemu.inc | ||
4 | require conf/machine/include/riscv/tune-riscv.inc | ||
5 | |||
6 | MACHINE_FEATURES = "screen keyboard ext2 ext3 serial" | ||
7 | |||
8 | KERNEL_IMAGETYPE = "Image" | ||
9 | |||
10 | SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" | ||
11 | |||
12 | IMAGE_FSTYPES_append = " ext4" | ||
13 | |||
14 | MACHINE_EXTRA_RRECOMMENDS += " kernel-modules" | ||
15 | |||
16 | EXTRA_IMAGEDEPENDS += "opensbi" | ||
17 | RISCV_SBI_PLAT ?= "qemu/virt" | ||
18 | RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin" | ||
19 | |||
20 | # qemuboot options | ||
21 | QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi" | ||
22 | QB_MEM = "-m 512" | ||
23 | QB_MACHINE = "-machine virt" | ||
24 | QB_DEFAULT_KERNEL = "fw_jump.elf" | ||
25 | QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" | ||
26 | QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" | ||
27 | QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" | ||
28 | QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon" | ||
29 | QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" | ||
30 | # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy | ||
31 | QB_OPT_APPEND = " -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0" | ||
32 | |||
33 | BAD_RECOMMENDATIONS += "\ | ||
34 | libcxx-dev \ | ||
35 | libcxx-staticdev \ | ||
36 | compiler-rt-dev \ | ||
37 | compiler-rt-staticdev \ | ||
38 | " | ||
39 | |||
40 | ASSUME_PROVIDED += "\ | ||
41 | libcxx-dev \ | ||
42 | libcxx-staticdev \ | ||
43 | compiler-rt-dev \ | ||
44 | compiler-rt-staticdev \ | ||
45 | " | ||