Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09849498 authored by Jianxun Zhang's avatar Jianxun Zhang Committed by Andrew Boie
Browse files

Fix parsing string parameters in BOARD_MKBOOTIMG_ARGS



The existing logic in common.py breaks string arguments incorrectly:
e.g. --para1 val1 --para2 "val2 is a string" will be output as:

'--para', 'val1, '--para2', 'val2' 'is' 'a' 'string'

This will cause mkbootimg command fails due to the invalid arguments
generated from the wrong parsing.

The patch fixes this issue to get:

'--para', 'val1, '--para2', 'val2 is a string'

Change-Id: Ia34ec357550f11ae9d6adc719d86a0c6a9099fbc
Signed-off-by: default avatarJianxun Zhang <jianxun.zhang@intel.com>
parent d7a9f708
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1233,7 +1233,7 @@ endif
ifdef PRODUCT_EXTRA_RECOVERY_KEYS
	$(hide) echo "extra_recovery_keys=$(PRODUCT_EXTRA_RECOVERY_KEYS)" >> $(zip_root)/META/misc_info.txt
endif
	$(hide) echo "mkbootimg_args=$(BOARD_MKBOOTIMG_ARGS)" >> $(zip_root)/META/misc_info.txt
	$(hide) echo 'mkbootimg_args=$(BOARD_MKBOOTIMG_ARGS)' >> $(zip_root)/META/misc_info.txt
	$(call generate-userimage-prop-dictionary, $(zip_root)/META/misc_info.txt)
	@# Zip everything up, preserving symlinks
	$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)
+1 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None):

  args = info_dict.get("mkbootimg_args", None)
  if args and args.strip():
    cmd.extend(args.split())
    cmd.extend(shlex.split(args))

  cmd.extend(["--ramdisk", ramdisk_img.name,
              "--output", img.name])