diff --git a/pmb/flasher/run.py b/pmb/flasher/run.py index f3ecfe70..5da8ada5 100644 --- a/pmb/flasher/run.py +++ b/pmb/flasher/run.py @@ -30,6 +30,9 @@ def run(args, action, flavor=None): raise RuntimeError("action " + action + " is not" " configured for method " + method + "!") + _cmdline = args.deviceinfo["kernel_cmdline"] + if args.cmdline: + _cmdline = args.cmdline _base = args.deviceinfo["flash_offset_base"] if _base == "": _base = "0x10000000" @@ -39,7 +42,7 @@ def run(args, action, flavor=None): "$BOOT": "/mnt/rootfs_" + args.device + "/boot", "$FLAVOR": flavor if flavor is not None else "", "$IMAGE": "/home/user/rootfs/" + args.device + ".img", - "$KERNEL_CMDLINE": args.deviceinfo["kernel_cmdline"], + "$KERNEL_CMDLINE": _cmdline, "$OFFSET_BASE": _base, "$OFFSET_KERNEL": args.deviceinfo["flash_offset_kernel"], "$OFFSET_RAMDISK": args.deviceinfo["flash_offset_ramdisk"], diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index 89659fd3..f420b15c 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -35,6 +35,7 @@ def arguments_flasher(subparser): # Boot, flash kernel, export boot = sub.add_parser("boot", help="boot a kernel once") + boot.add_argument("--cmdline", help="override kernel commandline") flash_kernel = sub.add_parser("flash_kernel", help="flash a kernel") export = sub.add_parser("export", help="create convenience symlinks to the" " generated image files (system,"