-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
whyred: Switch to standalone extract utils
Align with templates while we are at it Change-Id: I3cd279191c7bd3582f1c1f80c588eb26cf9da933
- Loading branch information
1 parent
9d73660
commit 6283d16
Showing
2 changed files
with
27 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,32 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (C) 2018-2019 The LineageOS Project | ||
# Copyright (C) 2016 The CyanogenMod Project | ||
# Copyright (C) 2017-2020 The LineageOS Project | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
function blob_fixup() { | ||
case "${1}" in | ||
vendor/lib/hw/camera.sdm660.so) | ||
"${PATCHELF}" --add-needed "libcamera_sdm660_shim.so" "${2}" | ||
;; | ||
vendor/lib64/libgf_ca.so) | ||
sed -i 's|/system/etc/firmware|/vendor/firmware\x0\x0\x0\x0|g' "${2}" | ||
;; | ||
esac | ||
} | ||
|
||
# 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=whyred | ||
export VENDOR=xiaomi | ||
export DEVICE_BRINGUP_YEAR=2019 | ||
export DEVICE_COMMON=sdm660-common | ||
export VENDOR=xiaomi | ||
|
||
./../../$VENDOR/$DEVICE_COMMON/extract-files.sh "$@" | ||
|
||
MY_DIR="${BASH_SOURCE%/*}" | ||
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi | ||
|
||
LINEAGE_ROOT="$MY_DIR"/../../.. | ||
DEVICE_BLOB_ROOT="$LINEAGE_ROOT"/vendor/"$VENDOR"/"$DEVICE"/proprietary | ||
|
||
patchelf --add-needed libcamera_sdm660_shim.so "$DEVICE_BLOB_ROOT"/vendor/lib/hw/camera.sdm660.so | ||
|
||
sed -i 's|/system/etc/firmware|/vendor/firmware\x0\x0\x0\x0|g' "$DEVICE_BLOB_ROOT"/vendor/lib64/libgf_ca.so | ||
|
||
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,15 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (C) 2018-2019 The LineageOS Project | ||
# Copyright (C) 2016 The CyanogenMod Project | ||
# Copyright (C) 2017-2020 The LineageOS Project | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
set -e | ||
|
||
export DEVICE=whyred | ||
export VENDOR=xiaomi | ||
export DEVICE_BRINGUP_YEAR=2020 | ||
export DEVICE_COMMON=sdm660-common | ||
export VENDOR=xiaomi | ||
|
||
./../../$VENDOR/$DEVICE_COMMON/setup-makefiles.sh $@ | ||
"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@" |