mirror of
https://github.com/oplus-giulia-dev/android_device_oneplus_giulia
synced 2025-11-05 22:45:43 +08:00
salami: Adopt Python extract utils
Change-Id: Ie9d629ab91bae60a1b9a60e62477de60ea2973f6
This commit is contained in:
38
extract-files.py
Executable file
38
extract-files.py
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/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.main import (
|
||||||
|
ExtractUtils,
|
||||||
|
ExtractUtilsModule,
|
||||||
|
)
|
||||||
|
|
||||||
|
namespace_imports = [
|
||||||
|
'vendor/oneplus/sm8550-common',
|
||||||
|
]
|
||||||
|
|
||||||
|
blob_fixups: blob_fixups_user_type = {
|
||||||
|
'odm/etc/camera/CameraHWConfiguration.config': blob_fixup()
|
||||||
|
.regex_replace('SystemCamera = 0; 0; 0; 1; 0; 1;', 'SystemCamera = 0; 0; 0; 0; 0; 0;')
|
||||||
|
} # fmt: skip
|
||||||
|
|
||||||
|
module = ExtractUtilsModule(
|
||||||
|
'salami',
|
||||||
|
'oneplus',
|
||||||
|
namespace_imports=namespace_imports,
|
||||||
|
blob_fixups=blob_fixups,
|
||||||
|
check_elf=True,
|
||||||
|
add_firmware_proprietary_file=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
utils = ExtractUtils.device_with_common(
|
||||||
|
module, 'sm8550-common', module.vendor
|
||||||
|
)
|
||||||
|
utils.run()
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
|
||||||
# SPDX-FileCopyrightText: 2017-2024 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=salami
|
|
||||||
export DEVICE_COMMON=sm8550-common
|
|
||||||
export VENDOR=oneplus
|
|
||||||
export VENDOR_COMMON=${VENDOR}
|
|
||||||
|
|
||||||
"./../../${VENDOR_COMMON}/${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,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
|
||||||
# SPDX-FileCopyrightText: 2017-2024 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=salami
|
|
||||||
export DEVICE_COMMON=sm8550-common
|
|
||||||
export VENDOR=oneplus
|
|
||||||
export VENDOR_COMMON=${VENDOR}
|
|
||||||
|
|
||||||
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"
|
|
||||||
Reference in New Issue
Block a user