scripts: build-qemu: Add a way to pass kernel and ramdisk
QEMU provides a special way to pass a kernel and a devicetree via the QFW interface. Add -K and -I options to provide these. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -52,9 +52,13 @@ def parse_args():
|
||||
help='Run UEFI Self-Certification Test (SCT)')
|
||||
parser.add_argument('-E', '--use-tianocore', action='store_true',
|
||||
help='Run Tianocore (OVMF) instead of U-Boot')
|
||||
parser.add_argument('-I', '--initrd',
|
||||
help='Initial ramdisk to run using -initrd')
|
||||
parser.add_argument(
|
||||
'-k', '--kvm', action='store_true',
|
||||
help='Use KVM (Kernel-based Virtual Machine) for acceleration')
|
||||
parser.add_argument('-K', '--kernel',
|
||||
help='Kernel to run using -kernel')
|
||||
parser.add_argument('-o', '--os', metavar='NAME', choices=['ubuntu'],
|
||||
help='Run a specified Operating System')
|
||||
parser.add_argument('-r', '--run', action='store_true',
|
||||
@@ -301,6 +305,11 @@ class BuildQemu:
|
||||
if not any(item.startswith('-serial') for item in self.qemu_extra):
|
||||
qemu_cmd.extend(['-serial', 'mon:stdio'])
|
||||
|
||||
if self.args.kernel:
|
||||
qemu_cmd.extend(['-kernel', self.args.kernel])
|
||||
if self.args.initrd:
|
||||
qemu_cmd.extend(['-initrd', self.args.initrd])
|
||||
|
||||
# Add other parameters gathered from options
|
||||
qemu_cmd.extend(self.qemu_extra)
|
||||
if self.os_path:
|
||||
|
||||
Reference in New Issue
Block a user