1f3fd288eSBrad BishopPREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
2f3fd288eSBrad Bishop
3f3fd288eSBrad Bishoprequire conf/machine/include/qemu.inc
4f3fd288eSBrad Bishoprequire conf/machine/include/riscv/tune-riscv.inc
5f3fd288eSBrad Bishop
6f3fd288eSBrad BishopMACHINE_FEATURES = "screen keyboard ext2 ext3 serial"
7f3fd288eSBrad Bishop
8f3fd288eSBrad BishopKERNEL_IMAGETYPE = "Image"
9f3fd288eSBrad BishopKERNEL_IMAGETYPES += "uImage"
10f3fd288eSBrad BishopKEEPUIMAGE = "no"
11f3fd288eSBrad Bishop
12f3fd288eSBrad BishopSERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0"
13d1e89497SAndrew GeisslerSERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
14f3fd288eSBrad Bishop
1579641f25SBrad BishopIMAGE_FSTYPES += "ext4 wic.qcow2"
1679641f25SBrad Bishop
1779641f25SBrad BishopWKS_FILE ?= "qemuriscv.wks"
18f3fd288eSBrad Bishop
19f3fd288eSBrad BishopMACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
20f3fd288eSBrad Bishop
21f3fd288eSBrad BishopEXTRA_IMAGEDEPENDS += "opensbi"
22475cb72dSAndrew GeisslerRISCV_SBI_PLAT ?= "generic"
23f3fd288eSBrad BishopRISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
24f3fd288eSBrad Bishop
25213cb269SPatrick WilliamsUBOOT_ENTRYPOINT:riscv32 = "0x80400000"
26213cb269SPatrick WilliamsUBOOT_ENTRYPOINT:riscv64 = "0x80200000"
27f3fd288eSBrad Bishop
28f3fd288eSBrad Bishop# qemuboot options
290903674eSAndrew GeisslerQB_SMP = "-smp 4"
30f3fd288eSBrad BishopQB_KERNEL_CMDLINE_APPEND = "earlycon=sbi"
31f3fd288eSBrad BishopQB_MACHINE = "-machine virt"
32c68388fcSBrad BishopQB_DEFAULT_BIOS = "fw_jump.elf"
33f3fd288eSBrad BishopQB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
34f3fd288eSBrad BishopQB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
35f3fd288eSBrad BishopQB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
36f3fd288eSBrad BishopQB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
37f3fd288eSBrad BishopQB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
383b8a17c1SAndrew GeisslerQB_GRAPHICS = "-device bochs-display"
39*9aee5003SAndrew GeisslerQB_OPT_APPEND = "-device virtio-tablet-pci -device virtio-keyboard-pci"
40