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:
Doug Zongker 2010-09-21 16:12:55 -07:00
parent 9ce0fb6e59
commit 33a4b08b15
1 changed files with 6 additions and 4 deletions

View File

@ -61,10 +61,11 @@ def AddUserdata(output_zip):
img = tempfile.NamedTemporaryFile()
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",
user_dir, img.name,
OPTIONS.info_dict["fstab"]["/data"].fs_type, "userdata"]
fstab["/data"].fs_type, "userdata"]
if "userdata_size" in OPTIONS.info_dict:
build_command.append(str(OPTIONS.info_dict["userdata_size"]))
else:
@ -109,10 +110,11 @@ def AddSystem(output_zip):
pass
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",
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:
build_command.append(str(OPTIONS.info_dict["system_size"]))
else: