releasetools: Rename the ramdisk_dir in prop dict to root_dir.
This property indicates the path to the root directory (i.e.
TARGET_ROOT_OUT at build time, or ROOT/ in a target_files.zip).
build_image.py will only use this property when building a target using
system_root_image. Under such a configuration, files under this dir
never land into a ramdisk, but as part of system.img. This CL renames
the property name to avoid confusion.
Note that with this change releasetools keeps working with older
target_files zips that contain 'ramdisk_dir'. Because common.py doesn't
read the value of that property, but sets it to ROOT/ directly.
Test: `m dist` on aosp_marlin-userdebug.
Test: `m dist` on aosp_angler-userdebug.
Test: Run add_img_to_target_files.py with a new target_files.zip and an
old target_files.zip respectively.
Change-Id: Ie9e19dd17d8c2abb4c4a97449e436774d5dd2a36
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 0d8f065..59b526c 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -196,10 +196,10 @@
if fc_config:
d["selinux_fc"] = fc_config
- # Similarly we need to redirect "ramdisk_dir" and "ramdisk_fs_config".
+ # Similarly we need to redirect "root_dir" and "root_fs_config".
if d.get("system_root_image") == "true":
- d["ramdisk_dir"] = os.path.join(input_dir, "ROOT")
- d["ramdisk_fs_config"] = os.path.join(
+ d["root_dir"] = os.path.join(input_dir, "ROOT")
+ d["root_fs_config"] = os.path.join(
input_dir, "META", "root_filesystem_config.txt")
# Redirect {system,vendor}_base_fs_file.