Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 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 | KERNEL_IMAGETYPES += "uImage" |
| 10 | KEEPUIMAGE = "no" |
| 11 | |
| 12 | SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 13 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 14 | |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 15 | IMAGE_FSTYPES += "ext4 wic.qcow2" |
| 16 | |
| 17 | WKS_FILE ?= "qemuriscv.wks" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 18 | |
| 19 | MACHINE_EXTRA_RRECOMMENDS += " kernel-modules" |
| 20 | |
| 21 | EXTRA_IMAGEDEPENDS += "opensbi" |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 22 | RISCV_SBI_PLAT ?= "generic" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 23 | RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin" |
| 24 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 25 | UBOOT_ENTRYPOINT:riscv32 = "0x80400000" |
| 26 | UBOOT_ENTRYPOINT:riscv64 = "0x80200000" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 27 | |
| 28 | # qemuboot options |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 29 | QB_SMP = "-smp 4" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 30 | QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 31 | QB_MACHINE = "-machine virt" |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 32 | QB_DEFAULT_BIOS = "fw_jump.elf" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 33 | QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" |
| 34 | QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" |
| 35 | QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" |
| 36 | QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon" |
| 37 | QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 38 | QB_GRAPHICS = "-device bochs-display" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 39 | QB_OPT_APPEND = "-device virtio-tablet-pci -device virtio-keyboard-pci" |