1PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
2
3require conf/machine/include/qemu.inc
4require conf/machine/include/riscv/tune-riscv.inc
5
6MACHINE_FEATURES = "screen keyboard ext2 ext3 serial"
7
8KERNEL_IMAGETYPE = "Image"
9KERNEL_IMAGETYPES += "uImage"
10KEEPUIMAGE = "no"
11
12SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0"
13SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
14
15IMAGE_FSTYPES += "ext4 wic.qcow2"
16
17WKS_FILE ?= "qemuriscv.wks"
18
19MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
20
21EXTRA_IMAGEDEPENDS += "opensbi"
22RISCV_SBI_PLAT ?= "generic"
23RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
24
25UBOOT_ENTRYPOINT_riscv32 = "0x80400000"
26UBOOT_ENTRYPOINT_riscv64 = "0x80200000"
27
28# qemuboot options
29QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi"
30QB_MACHINE = "-machine virt"
31QB_DEFAULT_BIOS = "fw_jump.elf"
32QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
33QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
34QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
35QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
36QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
37QB_GRAPHICS = "-device bochs-display"
38QB_OPT_APPEND = "-device virtio-mouse-pci -device virtio-keyboard-pci"
39