remove remaining refs to max_image_sizes
Change-Id: I7e4686bc06f9c3eab2df34d092021c549738b217
This commit is contained in:
parent
37974731fc
commit
1684d9c0cf
|
@ -35,7 +35,6 @@ if not hasattr(os, "SEEK_SET"):
|
||||||
class Options(object): pass
|
class Options(object): pass
|
||||||
OPTIONS = Options()
|
OPTIONS = Options()
|
||||||
OPTIONS.search_path = "out/host/linux-x86"
|
OPTIONS.search_path = "out/host/linux-x86"
|
||||||
OPTIONS.max_image_size = {}
|
|
||||||
OPTIONS.verbose = False
|
OPTIONS.verbose = False
|
||||||
OPTIONS.tempfiles = []
|
OPTIONS.tempfiles = []
|
||||||
OPTIONS.device_specific = None
|
OPTIONS.device_specific = None
|
||||||
|
@ -104,7 +103,8 @@ def LoadInfoDict(zip):
|
||||||
data = zip.read("META/imagesizes.txt")
|
data = zip.read("META/imagesizes.txt")
|
||||||
for line in data.split("\n"):
|
for line in data.split("\n"):
|
||||||
if not line: continue
|
if not line: continue
|
||||||
name, value = line.strip().split(None, 1)
|
name, value = line.split(" ", 1)
|
||||||
|
if not value: continue
|
||||||
if name == "blocksize":
|
if name == "blocksize":
|
||||||
d[name] = value
|
d[name] = value
|
||||||
else:
|
else:
|
||||||
|
@ -311,7 +311,8 @@ def CheckSize(data, target, info_dict):
|
||||||
fs_type = info_dict.get("fs_type", None)
|
fs_type = info_dict.get("fs_type", None)
|
||||||
if not fs_type: return
|
if not fs_type: return
|
||||||
|
|
||||||
limit = OPTIONS.max_image_size.get(target, None)
|
if target.endswith(".img"): target = target[:-4]
|
||||||
|
limit = info_dict.get(target + "_size", None)
|
||||||
if limit is None: return
|
if limit is None: return
|
||||||
|
|
||||||
if fs_type == "yaffs2":
|
if fs_type == "yaffs2":
|
||||||
|
|
|
@ -64,8 +64,8 @@ def AddUserdata(output_zip):
|
||||||
if OPTIONS.info_dict.get("fs_type", "").startswith("ext"):
|
if OPTIONS.info_dict.get("fs_type", "").startswith("ext"):
|
||||||
build_command = ["mkuserimg.sh",
|
build_command = ["mkuserimg.sh",
|
||||||
user_dir, img.name, OPTIONS.info_dict["fs_type"], "userdata"]
|
user_dir, img.name, OPTIONS.info_dict["fs_type"], "userdata"]
|
||||||
if "userdata.img" in OPTIONS.max_image_size:
|
if "userdata_size" in OPTIONS.info_dict:
|
||||||
build_command.append(str(OPTIONS.max_image_size["userdata.img"]))
|
build_command.append(str(OPTIONS.info_dict["userdata_size"]))
|
||||||
else:
|
else:
|
||||||
build_command = ["mkyaffs2image", "-f"]
|
build_command = ["mkyaffs2image", "-f"]
|
||||||
extra = OPTIONS.info_dict.get("mkyaffs2_extra_flags", None)
|
extra = OPTIONS.info_dict.get("mkyaffs2_extra_flags", None)
|
||||||
|
@ -112,8 +112,8 @@ def AddSystem(output_zip):
|
||||||
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["fs_type"], "system"]
|
OPTIONS.info_dict["fs_type"], "system"]
|
||||||
if "system.img" in OPTIONS.max_image_size:
|
if "system_img" in OPTIONS.info_dict:
|
||||||
build_command.append(str(OPTIONS.max_image_size["system.img"]))
|
build_command.append(str(OPTIONS.info_dict["system_size"]))
|
||||||
else:
|
else:
|
||||||
build_command = ["mkyaffs2image", "-f"]
|
build_command = ["mkyaffs2image", "-f"]
|
||||||
extra = OPTIONS.info_dict.get("mkyaffs2_extra_flags", None)
|
extra = OPTIONS.info_dict.get("mkyaffs2_extra_flags", None)
|
||||||
|
|
Loading…
Reference in New Issue