diff --git a/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json b/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json index f792a7e01dbda47bcc87cb5c76c34b869379efea..0a03e0995a55bf88940916fd20525adfa5e17d1d 100644 --- a/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json +++ b/tools/deps_guard/rules/ChipsetSDK/chipsetsdk_info.json @@ -671,5 +671,59 @@ "so_file_name": "libyuv.z.so", "path": "", "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_proxy_1.2", + "so_file_name": "libpower_proxy_1.2.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_hdi_impl_v1_1", + "so_file_name": "libdisplay_buffer_hdi_impl_v1_1.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libsensor_proxy_3.0", + "so_file_name": "libsensor_proxy_3.0.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_proxy_1.1", + "so_file_name": "libdisplay_buffer_proxy_1.1.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_proxy_1.3", + "so_file_name": "libpower_proxy_1.3.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libsensor_proxy_2.0", + "so_file_name": "libsensor_proxy_2.0.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_hdi_impl", + "so_file_name": "libdisplay_buffer_hdi_impl.z.so", + "path": "", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_hdi_impl_v1_2", + "so_file_name": "libdisplay_buffer_hdi_impl_v1_2.z.so", + "path": "", + "headers": [] + }, + { + "name": "thirdparty:turbojpeg", + "so_file_name": "libturbojpeg.z.so", + "path": "", + "headers": [] } ] diff --git a/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json b/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json index 4cbf06e296dc604d04998fe8421917c10fb87bb1..633e0cd98a278f7964fff7e02891350544f68fbd 100755 --- a/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json +++ b/tools/deps_guard/rules/ChipsetsdkSP/chipsetsdk_sp_info.json @@ -130,5 +130,71 @@ "so_file_name": "libc++.so", "path": "//build/common/musl:musl-libcxx.so", "headers": [] + }, + { + "name": "build_framework:libc++_shared.so", + "so_file_name": "libc++_shared.so", + "path": "//build/common/libcpp:libc++_shared.so", + "headers": [] + }, + { + "name": "hiviewdfx:libhitracechain", + "so_file_name": "libhitracechain.so", + "path": "//base/hiviewdfx/hitrace/interfaces/native/innerkits:libhitracechain", + "headers": [] + }, + { + "name": "systemabilitymgr:samgr_proxy", + "so_file_name": "libsamgr_proxy.z.so", + "path": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", + "headers": [] + }, + { + "name": "customization:configpolicy_util", + "so_file_name": "libconfigpolicy_util.z.so", + "path": "//base/customization/config_policy/frameworks/config_policy:configpolicy_util", + "headers": [] + }, + { + "name": "hiviewdfx:libhisysevent", + "so_file_name": "libhisysevent.z.so", + "path": "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent:libhisysevent", + "headers": [] + }, + { + "name": "startup:libbeget_proxy", + "so_file_name": "libbeget_proxy.z.so", + "path": "//base/startup/init/interfaces/innerkits:libbeget_proxy", + "headers": [] + }, + { + "name": "hdf_core:libhdf_ipc_adapter", + "so_file_name": "libhdf_ipc_adapter.z.so", + "path": "//drivers/hdf_core/adapter/uhdf2/ipc:libhdf_ipc_adapter", + "headers": [] + }, + { + "name": "thirdparty:jsoncpp", + "so_file_name": "libjsoncpp.z.so", + "path": "//third_party/jsoncpp:jsoncpp", + "headers": [] + }, + { + "name": "commonlibrary:libdmabufheap", + "so_file_name": "libdmabufheap.z.so", + "path": "//commonlibrary/memory_utils/libdmabufheap:libdmabufheap", + "headers": [] + }, + { + "name": "thirdparty:shared_libz", + "so_file_name": "libshared_libz.z.so", + "path": "//third_party/zlib:shared_libz", + "headers": [] + }, + { + "name": "thirdparty:libunwind", + "so_file_name": "libunwind.z.so", + "path": "//third_party/libunwind:libunwind", + "headers": [] } ] \ No newline at end of file diff --git a/tools/deps_guard/rules/Passthrough/passthrough_info.json b/tools/deps_guard/rules/Passthrough/passthrough_info.json index e6cd7097b19551990a87450ee4f67a63f1f6e4a8..14beb1a95109592c46bc2a00156f571e4dea2ed2 100755 --- a/tools/deps_guard/rules/Passthrough/passthrough_info.json +++ b/tools/deps_guard/rules/Passthrough/passthrough_info.json @@ -118,5 +118,29 @@ "so_file_name": "libmetadata_service_1.1.z.so", "path": "//drivers/peripheral/display/buffer/hdi_service:libmetadata_service_1.1", "headers": [] + }, + { + "name": "hdf:libinput_interfaces_service_1.0", + "so_file_name": "libinput_interfaces_service_1.0.z.so", + "path": "//drivers/peripheral/input/hdi_service:libinput_interfaces_service_1.0", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_vendor", + "so_file_name": "libdisplay_buffer_vendor.z.so", + "path": "//device/soc/rockchip/rk3568/hardware/display:libdisplay_buffer_vendor", + "headers": [] + }, + { + "name": "hdf:libcodec_component_manager_service_4.0", + "so_file_name": "libcodec_component_manager_service_4.0.z.so", + "path": "//drivers/peripheral/codec/hal/idl_service:libcodec_component_manager_service_4.0", + "headers": [] + }, + { + "name": "hdf:libdisplay_buffer_vdi_impl", + "so_file_name": "libdisplay_buffer_vdi_impl.z.so", + "path": "//device/soc/rockchip/rk3568/hardware/display:libdisplay_buffer_vdi_impl", + "headers": [] } ] \ No newline at end of file diff --git a/tools/deps_guard/rules_checker/base_innerapi_rule.py b/tools/deps_guard/rules_checker/base_innerapi_rule.py index a23bd704a0f620c3c186e832539538904c7a15cc..171e8261fec4f67900fc4e322135e5f58724487b 100644 --- a/tools/deps_guard/rules_checker/base_innerapi_rule.py +++ b/tools/deps_guard/rules_checker/base_innerapi_rule.py @@ -55,9 +55,9 @@ class BaseInnerapiRule(BaseRule): all(item in self.__valid_system_tags for item in callee_innerapi_tags): continue else: - self.warn("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" + self.error("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" %(mod["name"], callee["name"], mod["labelPath"], callee["path"])) - passed = True + passed = False # mod is vendor only scene elif self.is_only(self.__ignored_tags, mod) == "vendor" and \ all(item in self.__valid_vendor_tags for item in innerapi_tags): @@ -70,5 +70,5 @@ class BaseInnerapiRule(BaseRule): else: self.error("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" %(mod["name"], callee["name"], mod["labelPath"], callee["path"])) - passed = True + passed = False return passed \ No newline at end of file diff --git a/tools/deps_guard/rules_checker/base_rule.py b/tools/deps_guard/rules_checker/base_rule.py index e4ae0c662be9b989c17f29f9c088b52edd5501a8..5854559c8cc64fce6a371db034724c0a19513460 100755 --- a/tools/deps_guard/rules_checker/base_rule.py +++ b/tools/deps_guard/rules_checker/base_rule.py @@ -89,11 +89,11 @@ class BaseRule(object): passed = True wrong_tags = [item for item in dep_innerapi_tags if item not in valid_dep_tags] - self.warn("NEED MODIFY: %s's dep file %s with %s contains wrong dep innerapi_tags [%s] in innerapi_tags [%s]" - %(mod["name"], callee["name"], callee["labelPath"], ",".join(wrong_tags), ",".join(dep_innerapi_tags))) + self.warn("NEED MODIFY: %s with innerapi_tags [%s] has dep file %s with %s contains wrong dep innerapi_tags [%s] in innerapi_tags [%s]" + %(mod["name"], ",".join(innerapi_tags), callee["name"], callee["labelPath"], ",".join(wrong_tags), ",".join(dep_innerapi_tags))) else: wrong_tags = [item for item in innerapi_tags if item not in valid_mod_tags] - self.warn("NEED MODIFY: module %s with %s contains wrong mod innerapi_tags [%s] in innerapi_tags [%s]" + self.error("NEED MODIFY: module %s with %s contains wrong mod innerapi_tags [%s] in innerapi_tags [%s]" %(mod["name"], mod["labelPath"], ",".join(wrong_tags), ",".join(innerapi_tags))) return True diff --git a/tools/deps_guard/rules_checker/chipsetsdk.py b/tools/deps_guard/rules_checker/chipsetsdk.py index aac7edfef208eac091fa44c91a83a7f25277f11b..b4300b30cb192993b26f28306ab7df5440e06c24 100755 --- a/tools/deps_guard/rules_checker/chipsetsdk.py +++ b/tools/deps_guard/rules_checker/chipsetsdk.py @@ -210,8 +210,8 @@ class ChipsetSDKRule(BaseRule): continue # Not allowed - passed = True - self.warn("NEED MODIFY: chipset module %s in %s depends on non Chipset SDK module %s in %s" + passed = False + self.error("NEED MODIFY: chipset module %s in %s depends on non Chipset SDK module %s in %s" % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) return passed @@ -226,7 +226,7 @@ class ChipsetSDKRule(BaseRule): for mod in self.__modules_with_chipsetsdk_tag: if mod["name"] not in self.get_white_lists(): passed = True - self.warn('NEED MODIFY: non chipsetsdk module %s with innerapi_tags="chipsetsdk", %s' + self.error('NEED MODIFY: non chipsetsdk module %s with innerapi_tags="chipsetsdk", %s' % (mod["name"], mod["labelPath"])) for mod in self.__modules_with_chipsetsdk_indirect_tag: diff --git a/tools/deps_guard/rules_checker/chipsetsdk_sp.py b/tools/deps_guard/rules_checker/chipsetsdk_sp.py index aacff5cf0a7e05e9a9af0d536963fa3662b44652..a19a3324533b3b168d641a194e32308299901943 100644 --- a/tools/deps_guard/rules_checker/chipsetsdk_sp.py +++ b/tools/deps_guard/rules_checker/chipsetsdk_sp.py @@ -31,6 +31,8 @@ class ChipsetsdkSPRule(BaseRule): self.__white_lists = self.load_chipsetsdk_json("chipsetsdk_sp_info.json") self.__ignored_tags = ["platformsdk", "sasdk", "platformsdk_indirect", "ndk"] self.__valid_mod_tags = ["llndk", "chipsetsdk_sp", "chipsetsdk_sp_indirect"] + self.__ignored_tags + self.__valid_vendor_tags = ["chipsetsdk", "chipsetsdk_sp", "llndk", "passthrough", + "passthrougth_indirect"] + self.__ignored_tags def get_white_lists(self): return self.__white_lists @@ -174,6 +176,9 @@ class ChipsetsdkSPRule(BaseRule): if mod["path"].startswith("system"): continue + if not mod["name"].endswith(".so"): + continue + # Check chipset modules depends for dep in mod["deps"]: callee = dep["callee"] @@ -191,6 +196,12 @@ class ChipsetsdkSPRule(BaseRule): if callee["name"] in lists: continue + dep_innerapi_tags = callee["innerapi_tags"] + if dep_innerapi_tags and all(item in self.__valid_vendor_tags for item in dep_innerapi_tags): + continue + elif not dep_innerapi_tags: + continue + # If callee is asan library, it is OK if callee["name"].endswith(".asan.so"): continue @@ -200,9 +211,9 @@ class ChipsetsdkSPRule(BaseRule): continue # Not allowed - passed = True - self.warn("NEED MODIFY: chipset_sp module %s in %s depends on non ChipsetSDKSP module %s in %s" - % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) + passed = False + self.error("NEED MODIFY: chipset_sp module %s in %s depends on non ChipsetSDKSP module %s in %s" + % (mod["name"], mod["labelPath"], callee["name"], callee["labelPath"])) return passed @@ -212,11 +223,13 @@ class ChipsetsdkSPRule(BaseRule): if not self.__is_chipsetsdk_sp_tagged(mod): self.warn('ChipsetSDK module %s has no innerapi_tags with "chipsetsdk_sp", add it in %s' % (mod["name"], mod["labelPath"])) + + print(f"----------------white_list:{','.join(self.get_white_lists())}------------") for mod in self.__modules_with_chipsetsdk_sp_tag: if mod["name"] not in self.get_white_lists(): - passed = True - self.warn('NEED MODIFY: non chipsetsdk_sp module %s with innerapi_tags="chipsetsdk_sp", %s' + passed = False + self.error('NEED MODIFY: non chipsetsdk_sp module %s with innerapi_tags="chipsetsdk_sp", %s' % (mod["name"], mod["labelPath"])) for mod in self.__modules_with_chipsetsdk_sp_indirect_tag: diff --git a/tools/deps_guard/rules_checker/passthrough.py b/tools/deps_guard/rules_checker/passthrough.py index 3d9115c5538fc7b745888f89ef34c86112873f08..d249fc1e5a14c6c09a8620a26a7bc90a8fc5f923 100644 --- a/tools/deps_guard/rules_checker/passthrough.py +++ b/tools/deps_guard/rules_checker/passthrough.py @@ -205,7 +205,7 @@ class PassthroughRule(BaseRule): continue # Not allowed - passed = True + passed = False self.error("NEED MODIFY: passthrough module %s in %s depends on non passthrough module %s in %s" % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) @@ -220,7 +220,7 @@ class PassthroughRule(BaseRule): for mod in self.__modules_with_passthrough_tag: if mod["name"] not in self.get_white_lists(): - passed = True + passed = False self.error('NEED MODIFY: non passthrough %s with innerapi_tags="passthrough", %s' % (mod["name"], mod["labelPath"]))