Pass extfs sparse image flag to the release tool.

Change-Id: Icb2a1c4fddb2b6153298ba1b849016aa3d792773
This commit is contained in:
Ying Wang
2010-11-17 17:45:36 -08:00
parent 7ca5c91389
commit c5a07ce038
2 changed files with 14 additions and 6 deletions

View File

@@ -1063,6 +1063,9 @@ endif
$(hide) echo "tool_extensions=$(tool_extensions)" >> $(zip_root)/META/misc_info.txt $(hide) echo "tool_extensions=$(tool_extensions)" >> $(zip_root)/META/misc_info.txt
ifdef mkyaffs2_extra_flags ifdef mkyaffs2_extra_flags
$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(zip_root)/META/misc_info.txt $(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(zip_root)/META/misc_info.txt
endif
ifdef INTERNAL_USERIMAGES_SPARSE_EXT_FLAG
$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(zip_root)/META/misc_info.txt
endif endif
@# Zip everything up, preserving symlinks @# Zip everything up, preserving symlinks
$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .) $(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)

View File

@@ -63,9 +63,11 @@ def AddUserdata(output_zip):
build_command = [] build_command = []
fstab = OPTIONS.info_dict["fstab"] fstab = OPTIONS.info_dict["fstab"]
if fstab and fstab["/data"].fs_type.startswith("ext"): if fstab and fstab["/data"].fs_type.startswith("ext"):
build_command = ["mkuserimg.sh", build_command = ["mkuserimg.sh"]
user_dir, img.name, if "extfs_sparse_flag" in OPTIONS.info_dict:
fstab["/data"].fs_type, "data"] build_command.append(OPTIONS.info_dict["extfs_sparse_flag"])
build_command.extend([user_dir, img.name,
fstab["/data"].fs_type, "data"])
if "userdata_size" in OPTIONS.info_dict: if "userdata_size" in OPTIONS.info_dict:
build_command.append(str(OPTIONS.info_dict["userdata_size"])) build_command.append(str(OPTIONS.info_dict["userdata_size"]))
else: else:
@@ -112,9 +114,12 @@ def AddSystem(output_zip):
build_command = [] build_command = []
fstab = OPTIONS.info_dict["fstab"] fstab = OPTIONS.info_dict["fstab"]
if fstab and fstab["/system"].fs_type.startswith("ext"): if fstab and fstab["/system"].fs_type.startswith("ext"):
build_command = ["mkuserimg.sh",
os.path.join(OPTIONS.input_tmp, "system"), img.name, build_command = ["mkuserimg.sh"]
fstab["/system"].fs_type, "system"] if "extfs_sparse_flag" in OPTIONS.info_dict:
build_command.append(OPTIONS.info_dict["extfs_sparse_flag"])
build_command.extend([os.path.join(OPTIONS.input_tmp, "system"), img.name,
fstab["/system"].fs_type, "system"])
if "system_size" in OPTIONS.info_dict: if "system_size" in OPTIONS.info_dict:
build_command.append(str(OPTIONS.info_dict["system_size"])) build_command.append(str(OPTIONS.info_dict["system_size"]))
else: else: