summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaekyun Seok2017-11-27 21:10:10 -0600
committerJaekyun Seok2018-01-24 18:37:20 -0600
commitdff165d3a2db868689bae12db1ed8b3c74fa7d60 (patch)
tree6237fc0bf1607237788962972b1b47ed4170f003
parentccb9960bebe4e8ec7d674d8d1b778e5cd9669b48 (diff)
downloadplatform-system-core-dff165d3a2db868689bae12db1ed8b3c74fa7d60.tar.gz
platform-system-core-dff165d3a2db868689bae12db1ed8b3c74fa7d60.tar.xz
platform-system-core-dff165d3a2db868689bae12db1ed8b3c74fa7d60.zip
Support /product partition
This CL will enable reading /product/build.prop and add product paths into ld.config.txt.in. Bug: 64195575 Test: tested with 'PRODUCT_PRODUCT_PROPERTIES := ro.product.abc=abc' on sailfish Change-Id: Ie996def20e25dc1afe0c74af2096af844934b2dc
-rw-r--r--init/init.cpp7
-rw-r--r--init/property_service.cpp1
-rw-r--r--libcutils/fs_config.cpp1
-rw-r--r--rootdir/Android.mk5
-rw-r--r--rootdir/etc/ld.config.txt.in6
5 files changed, 18 insertions, 2 deletions
diff --git a/init/init.cpp b/init/init.cpp
index 95f272b8d..79623c333 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -110,12 +110,15 @@ static void LoadBootScripts(ActionManager& action_manager, ServiceList& service_
110 if (!parser.ParseConfig("/system/etc/init")) { 110 if (!parser.ParseConfig("/system/etc/init")) {
111 late_import_paths.emplace_back("/system/etc/init"); 111 late_import_paths.emplace_back("/system/etc/init");
112 } 112 }
113 if (!parser.ParseConfig("/vendor/etc/init")) { 113 if (!parser.ParseConfig("/product/etc/init")) {
114 late_import_paths.emplace_back("/vendor/etc/init"); 114 late_import_paths.emplace_back("/product/etc/init");
115 } 115 }
116 if (!parser.ParseConfig("/odm/etc/init")) { 116 if (!parser.ParseConfig("/odm/etc/init")) {
117 late_import_paths.emplace_back("/odm/etc/init"); 117 late_import_paths.emplace_back("/odm/etc/init");
118 } 118 }
119 if (!parser.ParseConfig("/vendor/etc/init")) {
120 late_import_paths.emplace_back("/vendor/etc/init");
121 }
119 } else { 122 } else {
120 parser.ParseConfig(bootscript); 123 parser.ParseConfig(bootscript);
121 } 124 }
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 0cb9e63b4..fa28fa33b 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -641,6 +641,7 @@ void property_load_boot_defaults() {
641 load_properties_from_file("/default.prop", NULL); 641 load_properties_from_file("/default.prop", NULL);
642 } 642 }
643 } 643 }
644 load_properties_from_file("/product/build.prop", NULL);
644 load_properties_from_file("/odm/default.prop", NULL); 645 load_properties_from_file("/odm/default.prop", NULL);
645 load_properties_from_file("/vendor/default.prop", NULL); 646 load_properties_from_file("/vendor/default.prop", NULL);
646 647
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index f45472e7e..a993d411c 100644
--- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp
@@ -141,6 +141,7 @@ static const struct fs_path_config android_files[] = {
141 { 00444, AID_ROOT, AID_ROOT, 0, odm_conf_file + 1 }, 141 { 00444, AID_ROOT, AID_ROOT, 0, odm_conf_file + 1 },
142 { 00444, AID_ROOT, AID_ROOT, 0, oem_conf_dir + 1 }, 142 { 00444, AID_ROOT, AID_ROOT, 0, oem_conf_dir + 1 },
143 { 00444, AID_ROOT, AID_ROOT, 0, oem_conf_file + 1 }, 143 { 00444, AID_ROOT, AID_ROOT, 0, oem_conf_file + 1 },
144 { 00600, AID_ROOT, AID_ROOT, 0, "product/build.prop" },
144 { 00750, AID_ROOT, AID_SHELL, 0, "sbin/fs_mgr" }, 145 { 00750, AID_ROOT, AID_SHELL, 0, "sbin/fs_mgr" },
145 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump32" }, 146 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump32" },
146 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" }, 147 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/crash_dump64" },
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index ca992d6ed..d8163abd3 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -88,6 +88,11 @@ ifdef BOARD_USES_VENDORIMAGE
88else 88else
89 LOCAL_POST_INSTALL_CMD += ; ln -sf /system/vendor $(TARGET_ROOT_OUT)/vendor 89 LOCAL_POST_INSTALL_CMD += ; ln -sf /system/vendor $(TARGET_ROOT_OUT)/vendor
90endif 90endif
91ifdef BOARD_USES_PRODUCTIMAGE
92 LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/product
93else
94 LOCAL_POST_INSTALL_CMD += ; ln -sf /system/product $(TARGET_ROOT_OUT)/product
95endif
91ifdef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE 96ifdef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
92 LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/cache 97 LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/cache
93else 98else
diff --git a/rootdir/etc/ld.config.txt.in b/rootdir/etc/ld.config.txt.in
index 2a801fad8..00d3379f9 100644
--- a/rootdir/etc/ld.config.txt.in
+++ b/rootdir/etc/ld.config.txt.in
@@ -55,6 +55,9 @@ namespace.default.permitted.paths += /vendor/framework
55namespace.default.permitted.paths += /vendor/app 55namespace.default.permitted.paths += /vendor/app
56namespace.default.permitted.paths += /vendor/priv-app 56namespace.default.permitted.paths += /vendor/priv-app
57namespace.default.permitted.paths += /oem/app 57namespace.default.permitted.paths += /oem/app
58namespace.default.permitted.paths += /product/framework
59namespace.default.permitted.paths += /product/app
60namespace.default.permitted.paths += /product/priv-app
58namespace.default.permitted.paths += /data 61namespace.default.permitted.paths += /data
59namespace.default.permitted.paths += /mnt/expand 62namespace.default.permitted.paths += /mnt/expand
60 63
@@ -72,6 +75,9 @@ namespace.default.asan.permitted.paths += /vendor/framework
72namespace.default.asan.permitted.paths += /vendor/app 75namespace.default.asan.permitted.paths += /vendor/app
73namespace.default.asan.permitted.paths += /vendor/priv-app 76namespace.default.asan.permitted.paths += /vendor/priv-app
74namespace.default.asan.permitted.paths += /oem/app 77namespace.default.asan.permitted.paths += /oem/app
78namespace.default.asan.permitted.paths += /product/framework
79namespace.default.asan.permitted.paths += /product/app
80namespace.default.asan.permitted.paths += /product/priv-app
75namespace.default.asan.permitted.paths += /mnt/expand 81namespace.default.asan.permitted.paths += /mnt/expand
76 82
77############################################################################### 83###############################################################################