Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c643cb3 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Automerger Merge Worker
Browse files

Merge "Add build property to enable fscompression" am: bea50725

Original change: https://android-review.googlesource.com/c/platform/build/+/1462547

Change-Id: I68c3a77dc9ebf4296ea10c47c56449cf2b700143
parents c2c28f99 bea50725
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1335,6 +1335,7 @@ $(if $(filter $(2),userdata),\
    $(if $(BOARD_USERDATAIMAGE_PARTITION_SIZE),$(hide) echo "userdata_size=$(BOARD_USERDATAIMAGE_PARTITION_SIZE)" >> $(1))
    $(if $(PRODUCT_FS_CASEFOLD),$(hide) echo "needs_casefold=$(PRODUCT_FS_CASEFOLD)" >> $(1))
    $(if $(PRODUCT_QUOTA_PROJID),$(hide) echo "needs_projid=$(PRODUCT_QUOTA_PROJID)" >> $(1))
    $(if $(PRODUCT_FS_COMPRESSION),$(hide) echo "needs_compress=$(PRODUCT_FS_COMPRESSION)" >> $(1))
    $(hide) echo "userdata_selinux_fc=$(SELINUX_FC)" >> $(1)
    $(hide) echo "building_userdata_image=$(BUILDING_USERDATA_IMAGE)" >> $(1)
)
+4 −0
Original line number Diff line number Diff line
@@ -250,6 +250,7 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
  run_e2fsck = False
  needs_projid = prop_dict.get("needs_projid", 0)
  needs_casefold = prop_dict.get("needs_casefold", 0)
  needs_compress = prop_dict.get("needs_compress", 0)

  if fs_type.startswith("ext"):
    build_command = [prop_dict["ext_mkuserimg"]]
@@ -337,6 +338,8 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
      build_command.append("--prjquota")
    if (needs_casefold):
      build_command.append("--casefold")
    if (needs_compress):
      build_command.append("--compression")
  else:
    raise BuildImageError(
        "Error: unknown filesystem type: {}".format(fs_type))
@@ -610,6 +613,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
    copy_prop("userdata_selinux_fc", "selinux_fc")
    copy_prop("needs_casefold", "needs_casefold")
    copy_prop("needs_projid", "needs_projid")
    copy_prop("needs_compress", "needs_compress")
  elif mount_point == "cache":
    copy_prop("cache_fs_type", "fs_type")
    copy_prop("cache_size", "partition_size")