qemuriscv.inc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
  2. require conf/machine/include/qemu.inc
  3. require conf/machine/include/tune-riscv.inc
  4. MACHINE_FEATURES = "screen keyboard ext2 ext3 serial"
  5. KERNEL_IMAGETYPE = "Image"
  6. SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0"
  7. IMAGE_FSTYPES_append = " ext4"
  8. MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
  9. EXTRA_IMAGEDEPENDS += "opensbi"
  10. RISCV_SBI_PLAT ?= "qemu/virt"
  11. RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
  12. # qemuboot options
  13. QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi"
  14. QB_MEM = "-m 512"
  15. QB_MACHINE = "-machine virt"
  16. QB_DEFAULT_KERNEL = "fw_jump.elf"
  17. QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
  18. QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
  19. QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
  20. QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
  21. QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
  22. # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
  23. QB_OPT_APPEND = " -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0"
  24. BAD_RECOMMENDATIONS += "\
  25. libcxx-dev \
  26. libcxx-staticdev \
  27. compiler-rt-dev \
  28. compiler-rt-staticdev \
  29. "
  30. ASSUME_PROVIDED += "\
  31. libcxx-dev \
  32. libcxx-staticdev \
  33. compiler-rt-dev \
  34. compiler-rt-staticdev \
  35. "