From 948f4ef224be717cbc2284962006560290dcb2c7 Mon Sep 17 00:00:00 2001 From: drebrez Date: Sat, 25 Nov 2017 03:57:58 +0100 Subject: [PATCH] Close #929: Add flash method "none" (#934) --- pmb/config/__init__.py | 2 +- pmb/flasher/frontend.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py index 11beb006..58c2001c 100644 --- a/pmb/config/__init__.py +++ b/pmb/config/__init__.py @@ -269,7 +269,7 @@ install_device_packages = [ # FLASH # -flash_methods = ["fastboot", "heimdall", "0xffff"] +flash_methods = ["fastboot", "heimdall", "0xffff", "none"] # These folders will be mounted at the same location into the native # chroot, before the flash programs get started. diff --git a/pmb/flasher/frontend.py b/pmb/flasher/frontend.py index ff2c225b..0f2fb97f 100644 --- a/pmb/flasher/frontend.py +++ b/pmb/flasher/frontend.py @@ -112,6 +112,12 @@ def sideload(args): def frontend(args): action = args.action_flasher + method = args.flash_method or args.deviceinfo["flash_methods"] + + if method == "none" and action in ["boot", "flash_kernel", "flash_system"]: + logging.info("This device doesn't support any flash method.") + return + if action in ["boot", "flash_kernel"]: kernel(args) if action == "flash_system":