forked from openkylin/platform_build
fall back to MTD if no recovery.fstab is present
Needed for non-device builds (like for the emulator) to work. Change-Id: I5fdbfb3af34821811744e8ce5bf1eff8df344c73
This commit is contained in:
parent
9ce0fb6e59
commit
33a4b08b15
|
@ -61,10 +61,11 @@ def AddUserdata(output_zip):
|
||||||
img = tempfile.NamedTemporaryFile()
|
img = tempfile.NamedTemporaryFile()
|
||||||
|
|
||||||
build_command = []
|
build_command = []
|
||||||
if OPTIONS.info_dict["fstab"]["/data"].fs_type.startswith("ext"):
|
fstab = OPTIONS.info_dict["fstab"]
|
||||||
|
if fstab and fstab["/data"].fs_type.startswith("ext"):
|
||||||
build_command = ["mkuserimg.sh",
|
build_command = ["mkuserimg.sh",
|
||||||
user_dir, img.name,
|
user_dir, img.name,
|
||||||
OPTIONS.info_dict["fstab"]["/data"].fs_type, "userdata"]
|
fstab["/data"].fs_type, "userdata"]
|
||||||
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:
|
||||||
|
@ -109,10 +110,11 @@ def AddSystem(output_zip):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
build_command = []
|
build_command = []
|
||||||
if OPTIONS.info_dict["fstab"]["/system"].fs_type.startswith("ext"):
|
fstab = OPTIONS.info_dict["fstab"]
|
||||||
|
if fstab and fstab["/system"].fs_type.startswith("ext"):
|
||||||
build_command = ["mkuserimg.sh",
|
build_command = ["mkuserimg.sh",
|
||||||
os.path.join(OPTIONS.input_tmp, "system"), img.name,
|
os.path.join(OPTIONS.input_tmp, "system"), img.name,
|
||||||
OPTIONS.info_dict["fstab"]["/system"].fs_type, "system"]
|
fstab["/system"].fs_type, "system"]
|
||||||
if "system_img" in OPTIONS.info_dict:
|
if "system_img" in OPTIONS.info_dict:
|
||||||
build_command.append(str(OPTIONS.info_dict["system_size"]))
|
build_command.append(str(OPTIONS.info_dict["system_size"]))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue