@@ -575,12 +575,16 @@ def do_qemu(args):
575575
576576 qemu_args = [
577577 "-s" ,
578- "-m" ,
579- "2048" ,
580578 ]
581579
580+ if args .memory is not None :
581+ qemu_args += ["-m" , args .memory ]
582+
582583 qemu_args += ["-name" , f"Managarm { args .arch } " ]
583- qemu_args += ["-display" , "gtk,zoom-to-fit=off" ]
584+ if args .sdl :
585+ qemu_args += ["-display" , "sdl" ]
586+ else :
587+ qemu_args += ["-display" , "gtk,zoom-to-fit=off" ]
584588
585589 have_kvm = False
586590 if not args .no_kvm :
@@ -942,6 +946,7 @@ def do_qemu(args):
942946qemu_parser = main_subparsers .add_parser ("qemu" )
943947qemu_parser .set_defaults (_fn = do_qemu )
944948qemu_parser .add_argument ("--arch" , choices = ["x86_64" , "aarch64" , "riscv64" ], default = "x86_64" )
949+ qemu_parser .add_argument ("--memory" , type = str , default = "2G" )
945950qemu_parser .add_argument ("--no-kvm" , action = "store_true" )
946951qemu_parser .add_argument ("--virtual-cpu" , action = "store_true" )
947952qemu_parser .add_argument ("--no-smp" , action = "store_true" )
@@ -955,6 +960,7 @@ def do_qemu(args):
955960qemu_parser .add_argument ("--gfx" , choices = ["bga" , "virtio" , "vmware" , "none" ], default = "default" )
956961qemu_parser .add_argument ("--ps2" , action = "store_true" )
957962qemu_parser .add_argument ("--mouse" , action = "store_true" )
963+ qemu_parser .add_argument ("--sdl" , action = "store_true" )
958964qemu_parser .add_argument ("--init-launch" , type = str , default = "weston" )
959965qemu_parser .add_argument ("--device-spec" , type = argparse .FileType ('r' ))
960966qemu_parser .add_argument ("--pci-passthrough" , type = str )
0 commit comments