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"
13
14IMAGE_FSTYPES_append = " ext4"
15
16MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
17
18EXTRA_IMAGEDEPENDS += "opensbi"
19RISCV_SBI_PLAT ?= "qemu/virt"
20RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
21
22UBOOT_ENTRYPOINT_riscv32 = "0x80400000"
23UBOOT_ENTRYPOINT_riscv64 = "0x80200000"
24
25# qemuboot options
26QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi"
27QB_MEM = "-m 512"
28QB_MACHINE = "-machine virt"
29QB_DEFAULT_KERNEL = "fw_jump.elf"
30QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
31QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
32QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
33QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
34QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
35# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
36QB_OPT_APPEND = " -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0"
37
38BAD_RECOMMENDATIONS += "\
39    libcxx-dev \
40    libcxx-staticdev \
41    compiler-rt-dev \
42    compiler-rt-staticdev \
43"
44
45ASSUME_PROVIDED += "\
46    libcxx-dev \
47    libcxx-staticdev \
48    compiler-rt-dev \
49    compiler-rt-staticdev \
50"
51