pmbootstrap qemu: fix on systems with more than 8 CPUs (MR 2045)
Fix error when CPU count is more than 8 while emulating a non-native platform: qemu-system-aarch64: Number of SMP CPUs requested (12) exceeds max CPUs supported by machine 'mach-virt' (8) Signed-off-by: Mark Hargreaves <clashclanacc2602@gmail.coM>
This commit is contained in:
parent
a440556a0a
commit
f758812f64
|
@ -99,6 +99,11 @@ def command_qemu(args, arch, img_path, img_path_2nd=None):
|
|||
flavor = pmb.chroot.other.kernel_flavors_installed(args, suffix)[0]
|
||||
ncpus = os.cpu_count()
|
||||
|
||||
# QEMU mach-virt's max CPU count is 8, limit it so it will work correctly
|
||||
# on systems with more than 8 CPUs
|
||||
if arch != args.arch_native and ncpus > 8:
|
||||
ncpus = 8
|
||||
|
||||
if args.host_qemu:
|
||||
qemu_bin = which_qemu(args, arch)
|
||||
env = {}
|
||||
|
|
Loading…
Reference in New Issue