diff options
| -rw-r--r-- | meta/classes/qemuboot.bbclass | 4 | ||||
| -rwxr-xr-x | scripts/runqemu | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass index 1f8012edc1..0fdd10099c 100644 --- a/meta/classes/qemuboot.bbclass +++ b/meta/classes/qemuboot.bbclass | |||
| @@ -19,6 +19,9 @@ | |||
| 19 | # QB_CPU_KVM: the similar to QB_CPU, but used when kvm, e.g., '-cpu kvm64', | 19 | # QB_CPU_KVM: the similar to QB_CPU, but used when kvm, e.g., '-cpu kvm64', |
| 20 | # set it when support kvm. | 20 | # set it when support kvm. |
| 21 | # | 21 | # |
| 22 | # QB_SMP: amount of CPU cores inside qemu guest, each mapped to a thread on the host, | ||
| 23 | # e.g. "-smp 8". | ||
| 24 | # | ||
| 22 | # QB_KERNEL_CMDLINE_APPEND: options to append to kernel's -append | 25 | # QB_KERNEL_CMDLINE_APPEND: options to append to kernel's -append |
| 23 | # option, e.g., "console=ttyS0 console=tty" | 26 | # option, e.g., "console=ttyS0 console=tty" |
| 24 | # | 27 | # |
| @@ -80,6 +83,7 @@ | |||
| 80 | # See "runqemu help" for more info | 83 | # See "runqemu help" for more info |
| 81 | 84 | ||
| 82 | QB_MEM ?= "-m 256" | 85 | QB_MEM ?= "-m 256" |
| 86 | QB_SMP ?= "-smp 4" | ||
| 83 | QB_SERIAL_OPT ?= "-serial mon:stdio -serial null" | 87 | QB_SERIAL_OPT ?= "-serial mon:stdio -serial null" |
| 84 | QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}" | 88 | QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}" |
| 85 | QB_DEFAULT_FSTYPE ?= "ext4" | 89 | QB_DEFAULT_FSTYPE ?= "ext4" |
diff --git a/scripts/runqemu b/scripts/runqemu index edd17d09c4..e2dc529baa 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -540,13 +540,13 @@ class BaseConfig(object): | |||
| 540 | def check_kvm(self): | 540 | def check_kvm(self): |
| 541 | """Check kvm and kvm-host""" | 541 | """Check kvm and kvm-host""" |
| 542 | if not (self.kvm_enabled or self.vhost_enabled): | 542 | if not (self.kvm_enabled or self.vhost_enabled): |
| 543 | self.qemu_opt_script += ' %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU')) | 543 | self.qemu_opt_script += ' %s %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU'), self.get('QB_SMP')) |
| 544 | return | 544 | return |
| 545 | 545 | ||
| 546 | if not self.get('QB_CPU_KVM'): | 546 | if not self.get('QB_CPU_KVM'): |
| 547 | raise RunQemuError("QB_CPU_KVM is NULL, this board doesn't support kvm") | 547 | raise RunQemuError("QB_CPU_KVM is NULL, this board doesn't support kvm") |
| 548 | 548 | ||
| 549 | self.qemu_opt_script += ' %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU_KVM')) | 549 | self.qemu_opt_script += ' %s %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU_KVM'), self.get('QB_SMP')) |
| 550 | yocto_kvm_wiki = "https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu" | 550 | yocto_kvm_wiki = "https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu" |
| 551 | yocto_paravirt_kvm_wiki = "https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM" | 551 | yocto_paravirt_kvm_wiki = "https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM" |
| 552 | dev_kvm = '/dev/kvm' | 552 | dev_kvm = '/dev/kvm' |
