Skip to content

Commit

Permalink
scripts: add kernel command-line options to run.py
Browse files Browse the repository at this point in the history
Thia adds the --mount-fs, --ip and --bootchart options.

Signed-off-by: Fotis Xenakis <[email protected]>
Message-Id: <VI1PR03MB3773A99749BE701DE2E6DB02A6959@VI1PR03MB3773.eurprd03.prod.outlook.com>
  • Loading branch information
foxeng authored and wkozaczuk committed Mar 13, 2021
1 parent a6ec0cd commit 999c876
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ def set_imgargs(options):
if options.hypervisor == 'qemu_microvm':
execute = '--nopci ' + execute

if options.mount_fs:
execute = ' '.join('--mount-fs=%s' % m for m in options.mount_fs) + ' ' + execute

if options.ip:
execute = ' '.join('--ip=%s' % i for i in options.ip) + ' ' + execute

if options.bootchart:
execute = '--bootchart ' + execute

options.osv_cmdline = execute
if options.kernel or options.hypervisor == 'qemu_microvm' or options.arch == 'aarch64':
return
Expand Down Expand Up @@ -576,6 +585,12 @@ def main(options):
help="virtio-fs device tag")
parser.add_argument("--virtio-fs-dir", action="store",
help="path to the directory exposed via virtio-fs mount")
parser.add_argument("--mount-fs", default=[], action="append",
help="extra mounts (forwarded to respective kernel command line option)")
parser.add_argument("--ip", default=[], action="append",
help="static ip addresses (forwarded to respective kernel command line option)")
parser.add_argument("--bootchart", action="store_true",
help="bootchart mode (forwarded to respective kernel command line option")
cmdargs = parser.parse_args()

cmdargs.opt_path = "debug" if cmdargs.debug else "release" if cmdargs.release else "last"
Expand Down

0 comments on commit 999c876

Please sign in to comment.