| Nahhk | 0b0b2e9 | 2025-03-19 06:23:56 -0500 | [diff] [blame] | 1 | #!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3 |
| 2 | # |
| 3 | # SPDX-FileCopyrightText: 2024 The LineageOS Project |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | |
| 7 | from extract_utils.fixups_blob import ( |
| 8 | blob_fixup, |
| 9 | blob_fixups_user_type, |
| 10 | ) |
| 11 | from extract_utils.fixups_lib import ( |
| 12 | lib_fixup_remove, |
| 13 | lib_fixups, |
| 14 | lib_fixups_user_type, |
| 15 | ) |
| 16 | from extract_utils.main import ( |
| 17 | ExtractUtils, |
| 18 | ExtractUtilsModule, |
| 19 | ) |
| 20 | |
| 21 | namespace_imports = [ |
| 22 | 'device/xiaomi/sm6225-common', |
| 23 | ] |
| 24 | |
| 25 | |
| 26 | def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs): |
| 27 | return f'{lib}_{partition}' if partition == 'vendor' else None |
| 28 | |
| 29 | |
| 30 | lib_fixups: lib_fixups_user_type = { |
| 31 | **lib_fixups, |
| 32 | } |
| 33 | |
| 34 | blob_fixups: blob_fixups_user_type = { |
| 35 | } # fmt: skip |
| 36 | |
| 37 | module = ExtractUtilsModule( |
| 38 | 'sm6225-common', |
| 39 | 'xiaomi', |
| 40 | blob_fixups=blob_fixups, |
| 41 | lib_fixups=lib_fixups, |
| 42 | namespace_imports=namespace_imports, |
| 43 | ) |
| 44 | |
| 45 | if __name__ == '__main__': |
| 46 | utils = ExtractUtils.device(module) |
| 47 | utils.run() |