From: Fotis Xenakis <fo...@windowslive.com>
Committer: Waldemar Kozaczuk <jwkozac...@gmail.com>
Branch: master

scripts: add kernel command-line options to run.py

Thia adds the --mount-fs, --ip and --bootchart options.

Signed-off-by: Fotis Xenakis <fo...@windowslive.com>
Message-Id: 
<vi1pr03mb3773a99749be701de2e6db02a6...@vi1pr03mb3773.eurprd03.prod.outlook.com>

---
diff --git a/scripts/run.py b/scripts/run.py
--- a/scripts/run.py
+++ b/scripts/run.py
@@ -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
@@ -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"

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/00000000000076750705bd6d6f92%40google.com.

Reply via email to