1864cc43bSPatrick WilliamsPREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" 2864cc43bSPatrick Williams 3864cc43bSPatrick Williamsrequire conf/machine/include/qemu.inc 4864cc43bSPatrick Williamsrequire conf/machine/include/loongarch/tune-loongarch.inc 5864cc43bSPatrick Williams 6864cc43bSPatrick WilliamsMACHINE_FEATURES = "screen keyboard ext2 ext3 serial" 7864cc43bSPatrick Williams 8864cc43bSPatrick WilliamsKERNEL_IMAGETYPE = "vmlinuz" 9864cc43bSPatrick WilliamsKERNEL_IMAGETYPES += "vmlinuz" 10864cc43bSPatrick WilliamsKEEPUIMAGE = "no" 11864cc43bSPatrick Williams 12864cc43bSPatrick WilliamsSERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" 13864cc43bSPatrick Williams 14864cc43bSPatrick WilliamsIMAGE_FSTYPES += "ext4 wic.qcow2" 15864cc43bSPatrick Williams 16864cc43bSPatrick WilliamsWKS_FILE ?= "qemuloongarch.wks" 17864cc43bSPatrick Williams 18864cc43bSPatrick WilliamsMACHINE_EXTRA_RRECOMMENDS += " kernel-modules" 19864cc43bSPatrick Williams 20864cc43bSPatrick Williams#EXTRA_IMAGEDEPENDS += "opensbi" 21864cc43bSPatrick Williams 22864cc43bSPatrick WilliamsUBOOT_ENTRYPOINT_loongarch32 = "0x80400000" 23864cc43bSPatrick WilliamsUBOOT_ENTRYPOINT_loongarch64 = "0x80200000" 24864cc43bSPatrick Williams 25864cc43bSPatrick Williams# qemuboot options 26864cc43bSPatrick WilliamsQB_KERNEL_CMDLINE_APPEND = "earlycon=sbi" 27864cc43bSPatrick WilliamsQB_MACHINE = "-machine virt" 28864cc43bSPatrick WilliamsQB_DEFAULT_BIOS = "fw_jump.elf" 29864cc43bSPatrick WilliamsQB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" 30864cc43bSPatrick WilliamsQB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" 31864cc43bSPatrick WilliamsQB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" 325082cc7fSAndrew GeisslerQB_SERIAL_OPT = "-device virtio-serial-pci -chardev null,id=virtcon -device virtconsole,chardev=virtcon" 33*20137395SAndrew GeisslerQB_TCPSERIAL_OPT = " -device virtio-serial-pci -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1,nodelay=on -device virtconsole,chardev=virtcon" 34864cc43bSPatrick Williams# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy 35864cc43bSPatrick WilliamsQB_OPT_APPEND = " -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0" 36