mirror of
https://github.com/LineageOS/android_device_xiaomi_grus.git
synced 2025-02-05 15:36:43 +00:00
grus: Switch to py extract utils
Change-Id: I10a2bc3472ff3294823a4565f80b558c6c14d9ec
This commit is contained in:
parent
18cd11a5cb
commit
e67b2d58c8
45
extract-files.py
Executable file
45
extract-files.py
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2024 The LineageOS Project
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
from extract_utils.fixups_blob import (
|
||||||
|
blob_fixup,
|
||||||
|
blob_fixups_user_type,
|
||||||
|
)
|
||||||
|
|
||||||
|
from extract_utils.fixups_lib import (
|
||||||
|
lib_fixup_remove,
|
||||||
|
lib_fixups,
|
||||||
|
lib_fixups_user_type,
|
||||||
|
)
|
||||||
|
|
||||||
|
from extract_utils.main import (
|
||||||
|
ExtractUtils,
|
||||||
|
ExtractUtilsModule,
|
||||||
|
)
|
||||||
|
|
||||||
|
namespace_imports = [
|
||||||
|
'hardware/qcom/sdm845',
|
||||||
|
'hardware/xiaomi',
|
||||||
|
'vendor/xiaomi/sdm710-common',
|
||||||
|
]
|
||||||
|
|
||||||
|
def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs):
|
||||||
|
return f'{lib}_{partition}' if partition == 'vendor' else None
|
||||||
|
|
||||||
|
lib_fixups: lib_fixups_user_type = {
|
||||||
|
**lib_fixups,
|
||||||
|
}
|
||||||
|
|
||||||
|
module = ExtractUtilsModule(
|
||||||
|
'grus',
|
||||||
|
'xiaomi',
|
||||||
|
lib_fixups=lib_fixups,
|
||||||
|
namespace_imports=namespace_imports,
|
||||||
|
)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
utils = ExtractUtils.device_with_common(module, 'sdm710-common', module.vendor)
|
||||||
|
utils.run()
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (C) 2016 The CyanogenMod Project
|
|
||||||
# Copyright (C) 2017-2020 The LineageOS Project
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
# If we're being sourced by the common script that we called,
|
|
||||||
# stop right here. No need to go down the rabbit hole.
|
|
||||||
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export DEVICE=grus
|
|
||||||
export DEVICE_COMMON=sdm710-common
|
|
||||||
export VENDOR=xiaomi
|
|
||||||
|
|
||||||
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"
|
|
1
setup-makefiles.py
Executable file
1
setup-makefiles.py
Executable file
@ -0,0 +1 @@
|
|||||||
|
#!./extract-files.py --regenerate_makefiles
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (C) 2016 The CyanogenMod Project
|
|
||||||
# Copyright (C) 2017-2020 The LineageOS Project
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export DEVICE=grus
|
|
||||||
export DEVICE_COMMON=sdm710-common
|
|
||||||
export VENDOR=xiaomi
|
|
||||||
|
|
||||||
"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"
|
|
Loading…
x
Reference in New Issue
Block a user