ginkgo: Switch to py extract utils

Change-Id: If53e93faec4f455542c9eb46ece28d355e5910e4
This commit is contained in:
basamaryan
2024-10-13 20:00:11 -04:00
committed by Skyblueborb
parent e5e2816d5a
commit 1a846c255c
4 changed files with 45 additions and 36 deletions

44
extract-files.py Executable file
View File

@@ -0,0 +1,44 @@
#!/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-caf/sm8150',
'vendor/qcom/opensource/display',
'vendor/xiaomi/sm6125-common',
]
lib_fixups: lib_fixups_user_type = {
**lib_fixups,
}
blob_fixups: blob_fixups_user_type = {
} # fmt: skip
module = ExtractUtilsModule(
'ginkgo',
'xiaomi',
blob_fixups=blob_fixups,
lib_fixups=lib_fixups,
namespace_imports=namespace_imports,
)
if __name__ == '__main__':
utils = ExtractUtils.device_with_common(
module, 'sm6125-common', module.vendor
)
utils.run()

View File

@@ -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=ginkgo
export DEVICE_COMMON=sm6125-common
export VENDOR=xiaomi
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"

1
setup-makefiles.py Executable file
View File

@@ -0,0 +1 @@
#!./extract-files.py --regenerate_makefiles

View File

@@ -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=ginkgo
export DEVICE_COMMON=sm6125-common
export VENDOR=xiaomi
"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"