forked from Mirror/pmbootstrap
pmb.qemu: use current device instead of requiring --arch (!1886)
When using pmbootstrap, you usually select the device you want to work on using 'pmbootstrap init', generate the rootfs and can then run more commands in the context of the device. The same needs to be done before using QEMU (to generate the rootfs). But for some reason 'pmbootstrap qemu' requires setting the --arch parameter when running QEMU for a foreign architecture, even when the device is still selected in pmbootstrap. Even more confusing is that setting "--arch arm" always selects device-qemu-vexpress, but this is not immediately clear from the name. Let's make this a lot more intuitive by making sure there is a QEMU device selected when running 'pmbootstrap qemu'. We can then use the device information to infer the architecture automatically.
This commit is contained in:
parent
32dca18eb6
commit
f536fd9cb9
3 changed files with 19 additions and 71 deletions
|
@ -114,11 +114,8 @@ def arguments_initfs(subparser):
|
|||
|
||||
def arguments_qemu(subparser):
|
||||
ret = subparser.add_parser("qemu")
|
||||
ret.add_argument("--arch", choices=["aarch64", "arm", "x86_64"],
|
||||
help="emulate a different architecture")
|
||||
ret.add_argument("--cmdline", help="override kernel commandline")
|
||||
ret.add_argument(
|
||||
"--image-size", help="set rootfs size (e.g. 2048M or 2G)")
|
||||
ret.add_argument("--image-size", help="set rootfs size (e.g. 2048M or 2G)")
|
||||
ret.add_argument("-m", "--memory", type=int, default=1024,
|
||||
help="guest RAM (default: 1024)")
|
||||
ret.add_argument("-p", "--port", type=int, default=2222,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue