device_motorola_berlin/extract-files.py
LuK1337 124a62c62e berlin: Use common lib_fixups
Change-Id: I862e547f3375184729eb1a909bb7d6f676d45dfe
2024-11-22 20:50:15 -07:00

49 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
#
# SPDX-FileCopyrightText: 2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
from extract_utils.extract import extract_fns_user_type
from extract_utils.extract_star import extract_star_firmware
from extract_utils.fixups_lib import (
lib_fixups,
lib_fixups_user_type,
)
from extract_utils.main import (
ExtractUtils,
ExtractUtilsModule,
)
namespace_imports = [
'vendor/motorola/sm7325-common',
'hardware/qcom-caf/sm8350',
'hardware/qcom-caf/wlan',
'vendor/qcom/opensource/commonsys-intf/display',
'vendor/qcom/opensource/commonsys/display',
'vendor/qcom/opensource/dataservices',
'vendor/qcom/opensource/display',
]
lib_fixups: lib_fixups_user_type = {
**lib_fixups,
}
extract_fns: extract_fns_user_type = {
r'(bootloader|radio)\.img': extract_star_firmware,
}
module = ExtractUtilsModule(
'berlin',
'motorola',
lib_fixups=lib_fixups,
namespace_imports=namespace_imports,
extract_fns=extract_fns,
add_firmware_proprietary_file=True,
)
if __name__ == '__main__':
utils = ExtractUtils.device_with_common(module, 'sm7325-common', module.vendor)
utils.run()