Skip to content

Commit 999c876

Browse files
foxengwkozaczuk
authored andcommitted
scripts: add kernel command-line options to run.py
Thia adds the --mount-fs, --ip and --bootchart options. Signed-off-by: Fotis Xenakis <[email protected]> Message-Id: <VI1PR03MB3773A99749BE701DE2E6DB02A6959@VI1PR03MB3773.eurprd03.prod.outlook.com>
1 parent a6ec0cd commit 999c876

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/run.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ def set_imgargs(options):
7373
if options.hypervisor == 'qemu_microvm':
7474
execute = '--nopci ' + execute
7575

76+
if options.mount_fs:
77+
execute = ' '.join('--mount-fs=%s' % m for m in options.mount_fs) + ' ' + execute
78+
79+
if options.ip:
80+
execute = ' '.join('--ip=%s' % i for i in options.ip) + ' ' + execute
81+
82+
if options.bootchart:
83+
execute = '--bootchart ' + execute
84+
7685
options.osv_cmdline = execute
7786
if options.kernel or options.hypervisor == 'qemu_microvm' or options.arch == 'aarch64':
7887
return
@@ -576,6 +585,12 @@ def main(options):
576585
help="virtio-fs device tag")
577586
parser.add_argument("--virtio-fs-dir", action="store",
578587
help="path to the directory exposed via virtio-fs mount")
588+
parser.add_argument("--mount-fs", default=[], action="append",
589+
help="extra mounts (forwarded to respective kernel command line option)")
590+
parser.add_argument("--ip", default=[], action="append",
591+
help="static ip addresses (forwarded to respective kernel command line option)")
592+
parser.add_argument("--bootchart", action="store_true",
593+
help="bootchart mode (forwarded to respective kernel command line option")
579594
cmdargs = parser.parse_args()
580595

581596
cmdargs.opt_path = "debug" if cmdargs.debug else "release" if cmdargs.release else "last"

0 commit comments

Comments
 (0)