diff --git a/hb_internal/common/config.py b/hb_internal/common/config.py index 1901e9166af9a8bcf4ce821bae7c7cfa4e984976..8edaf66aa671b95922a6e377538b38f06eb36cfc 100644 --- a/hb_internal/common/config.py +++ b/hb_internal/common/config.py @@ -304,15 +304,6 @@ class Config(metaclass=Singleton): f'Invalid built-in product path: {_built_in_product_path}') return _built_in_product_path - @property - def built_in_device_path(self): - _built_in_device_path = os.path.join(self.root_path, - 'productdefine/common/device') - if not os.path.isdir(_built_in_device_path): - raise OHOSException( - f'Invalid built-in product path: {_built_in_device_path}') - return _built_in_device_path - @property def build_tools_path(self): try: diff --git a/hb_internal/common/product.py b/hb_internal/common/product.py index 9c3df67ae073c92d2a9fa2e2dba86b3151ab8cf6..bdcd7717dd0d0bdca7c5e6eee85b473177f08e18 100755 --- a/hb_internal/common/product.py +++ b/hb_internal/common/product.py @@ -131,20 +131,7 @@ class Product(): config = Config() version = info.get('version', '3.0') - if version == '2.0': - device_json = os.path.join(config.built_in_device_path, - f'{info["product_device"]}.json') - device_info = read_json_file(device_json) - return { - 'board': device_info.get('device_name'), - 'kernel': device_info.get('kernel_type', 'linux'), - 'kernel_version': device_info.get('kernel_version'), - 'company': device_info.get('device_company'), - 'board_path': device_info.get('device_build_path'), - 'target_cpu': device_info.get('target_cpu'), - 'target_os': device_info.get('target_os') - } - elif version == '3.0': + if version == '3.0': device_company = info.get('device_company') board = info.get('board') _board_path = info.get('board_path') diff --git a/hb_internal/preloader/preloader.py b/hb_internal/preloader/preloader.py index 6a4ff0d819e131b3feea4db58c71ff6180601375..da30aebd0e34604e3123aa9ef3489c31a3b5ea98 100755 --- a/hb_internal/preloader/preloader.py +++ b/hb_internal/preloader/preloader.py @@ -488,7 +488,6 @@ class Dirs: self.built_in_product_dir = config.built_in_product_path self.productdefine_dir = os.path.join(self.source_root_dir, 'productdefine/common') - self.built_in_device_dir = config.built_in_device_path self.built_in_base_dir = os.path.join(self.productdefine_dir, 'base') # Configs of vendor specified products are stored in