summaryrefslogtreecommitdiffstats
path: root/meta/conf/machine/include/loongarch/qemuloongarch.inc
blob: 77245ff85d18ec0af86f69e16de782b9ca51ace0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"

require conf/machine/include/qemu.inc
require conf/machine/include/loongarch/tune-loongarch.inc

MACHINE_FEATURES = "screen keyboard ext2 ext3 serial"

KERNEL_IMAGETYPE = "vmlinuz"
KERNEL_IMAGETYPES += "vmlinuz"
KEEPUIMAGE = "no"

SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0"

IMAGE_FSTYPES += "ext4 wic.qcow2"

WKS_FILE ?= "qemuloongarch.wks"

MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"

#EXTRA_IMAGEDEPENDS += "opensbi"

UBOOT_ENTRYPOINT_loongarch32 = "0x80400000"
UBOOT_ENTRYPOINT_loongarch64 = "0x80200000"

# qemuboot options
QB_KERNEL_CMDLINE_APPEND = "earlycon=sbi"
QB_MACHINE = "-machine virt"
QB_DEFAULT_BIOS = "fw_jump.elf"
QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
QB_OPT_APPEND = " -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0"