Pass partition size to mkuserimg.sh
Change-Id: Id6a53d8d552e8ce1bdf83fbb756724454e05e5c8
This commit is contained in:
parent
513d7a4021
commit
ee81cd931c
|
@ -93,7 +93,7 @@ def LoadMaxSizes(info):
|
|||
except IOError, e:
|
||||
if e.errno == errno.ENOENT:
|
||||
def copy(x, y):
|
||||
if x in info: OPTIONS.max_image_size[x+".img"] = int(info[x+y])
|
||||
if x+y in info: OPTIONS.max_image_size[x+".img"] = int(info[x+y])
|
||||
copy("blocksize", "")
|
||||
copy("boot", "_size")
|
||||
copy("recovery", "_size")
|
||||
|
|
|
@ -74,6 +74,8 @@ def AddUserdata(output_zip):
|
|||
if USERIMAGE_OPTIONS.fs_type is not None and USERIMAGE_OPTIONS.fs_type.startswith("ext"):
|
||||
build_command = ["mkuserimg.sh",
|
||||
user_dir, img.name, USERIMAGE_OPTIONS.fs_type, "userdata"]
|
||||
if "userdata.img" in OPTIONS.max_image_size:
|
||||
build_command.append(str(OPTIONS.max_image_size["userdata.img"]))
|
||||
else:
|
||||
build_command = ["mkyaffs2image", "-f",
|
||||
user_dir, img.name]
|
||||
|
@ -116,6 +118,8 @@ def AddSystem(output_zip):
|
|||
build_command = ["mkuserimg.sh",
|
||||
os.path.join(OPTIONS.input_tmp, "system"), img.name,
|
||||
USERIMAGE_OPTIONS.fs_type, "system"]
|
||||
if "system.img" in OPTIONS.max_image_size:
|
||||
build_command.append(str(OPTIONS.max_image_size["system.img"]))
|
||||
else:
|
||||
build_command = ["mkyaffs2image", "-f",
|
||||
os.path.join(OPTIONS.input_tmp, "system"), img.name]
|
||||
|
|
Loading…
Reference in New Issue