Close #198: Add possibility to override the kernel commandline during boot (#217)

Usage example:
pmbootstrap flasher boot --cmdline "PMOS_NO_OUTPUT_REDIRECT"

Thanks, drebrez!
This commit is contained in:
drebrez 2017-07-22 23:16:51 +02:00 committed by Oliver Smith
parent c469e8eb72
commit 0e5808bed1
2 changed files with 5 additions and 1 deletions

View File

@ -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"],

View File

@ -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,"