forked from Mirror/pmbootstrap
qemu: allow the user to specify the kernel flavor (#1256)
This commit is contained in:
parent
948b5af09b
commit
6b9e7ecf75
2 changed files with 6 additions and 1 deletions
|
@ -111,6 +111,8 @@ def arguments_qemu(subparser):
|
||||||
help="guest RAM (default: 1024)")
|
help="guest RAM (default: 1024)")
|
||||||
ret.add_argument("-p", "--port", type=int, default=2222,
|
ret.add_argument("-p", "--port", type=int, default=2222,
|
||||||
help="SSH port (default: 2222)")
|
help="SSH port (default: 2222)")
|
||||||
|
ret.add_argument("--flavor", help="name of the kernel flavor (run 'pmbootstrap flasher list_flavors'"
|
||||||
|
" to get a list of all installed flavors")
|
||||||
|
|
||||||
display = ret.add_mutually_exclusive_group()
|
display = ret.add_mutually_exclusive_group()
|
||||||
display.add_argument("--spice", dest="spice_port", const="8077",
|
display.add_argument("--spice", dest="spice_port", const="8077",
|
||||||
|
|
|
@ -114,7 +114,10 @@ def command_qemu(args, arch, device, img_path, spice_enabled):
|
||||||
|
|
||||||
suffix = "rootfs_" + device
|
suffix = "rootfs_" + device
|
||||||
rootfs = args.work + "/chroot_" + suffix
|
rootfs = args.work + "/chroot_" + suffix
|
||||||
flavor = pmb.chroot.other.kernel_flavor_autodetect(args, suffix)
|
if args.flavor:
|
||||||
|
flavor = args.flavor
|
||||||
|
else:
|
||||||
|
flavor = pmb.chroot.other.kernel_flavor_autodetect(args, suffix)
|
||||||
command = [qemu_bin]
|
command = [qemu_bin]
|
||||||
command += ["-kernel", rootfs + "/boot/vmlinuz-" + flavor]
|
command += ["-kernel", rootfs + "/boot/vmlinuz-" + flavor]
|
||||||
command += ["-initrd", rootfs + "/boot/initramfs-" + flavor]
|
command += ["-initrd", rootfs + "/boot/initramfs-" + flavor]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue