Loading extract-files.sh +51 −7 Original line number Diff line number Diff line #!/bin/bash # # Copyright (C) 2017 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. # # Use tradition sort export LC_ALL=C set -e FP=$(cd ${0%/*} && pwd -P) export VENDOR=$(basename $(dirname $FP)) export DEVICE=$(basename $FP) export BOARDCONFIGVENDOR=false export VENDOR=$(basename $(dirname $FP)) # Load extractutils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi CM_ROOT="$MY_DIR"/../../.. HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh if [ ! -f "$HELPER" ]; then echo "Unable to find helper script at $HELPER" exit 1 fi . "$HELPER" if [ $# -eq 0 ]; then SRC=adb else if [ $# -eq 1 ]; then SRC=$1 else echo "$0: bad number of arguments" echo "" echo "usage: $0 [PATH_TO_EXPANDED_ROM]" echo "" echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" echo "the device using adb pull." exit 1 fi fi # Initialize the helper setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" ../common/extract-files.sh $@ extract "$MY_DIR"/proprietary-files.txt "$SRC" ../common/setup-makefiles.sh ./setup-makefiles.sh "$MY_DIR"/setup-makefiles.sh setup-makefiles.sh +29 −63 Original line number Diff line number Diff line #!/bin/bash OUTDIR=vendor/$VENDOR/$DEVICE MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk if [ $BOARDCONFIGVENDOR != "true" ]; then (cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk # Copyright (C) 2016 The CyanogenMod Project # # Copyright (C) 2017 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. Loading @@ -19,72 +13,44 @@ if [ $BOARDCONFIGVENDOR != "true" ]; then # 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. # # This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh set -e # Pick up overlay for features that depend on non-open-source files PRODUCT_PACKAGES += \\ TimeService \\ libtime_genoff \\ libta FP=$(cd ${0%/*} && pwd -P) export DEVICE=$(basename $FP) export VENDOR=$(basename $(dirname $FP)) \$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) EOF export INITIAL_COPYRIGHT_YEAR=2016 (cat << EOF) > ../../../$OUTDIR/Android.mk # Copyright (C) 2016 The CyanogenMod 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. # Load extractutils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi # This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh CM_ROOT="$MY_DIR"/../../.. LOCAL_PATH := \$(call my-dir) HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh if [ ! -f "$HELPER" ]; then echo "Unable to find helper script at $HELPER" exit 1 fi . "$HELPER" # Initialize the helper setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" ifeq (\$(TARGET_DEVICE),ivy) # Copyright headers and guards write_headers include \$(CLEAR_VARS) LOCAL_MODULE := libtime_genoff LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_OWNER := $VENDOR LOCAL_MODULE_PATH_64 := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES) LOCAL_MODULE_PATH_32 := \$(2ND_TARGET_OUT_VENDOR_SHARED_LIBRARIES) LOCAL_MODULE_SUFFIX := .so LOCAL_MODULE_TAGS := optional LOCAL_MULTILIB := both LOCAL_PROPRIETARY_MODULE := true LOCAL_SRC_FILES_64 := proprietary/vendor/lib64/libtime_genoff.so LOCAL_SRC_FILES_32 := proprietary/vendor/lib/libtime_genoff.so include \$(BUILD_PREBUILT) # The standard blobs write_makefiles "$MY_DIR"/proprietary-files.txt include \$(CLEAR_VARS) LOCAL_MODULE := libta LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_OWNER := $VENDOR LOCAL_MODULE_PATH_64 := \$(TARGET_OUT_SHARED_LIBRARIES) LOCAL_MODULE_PATH_32 := \$(2ND_TARGET_OUT_SHARED_LIBRARIES) LOCAL_MODULE_SUFFIX := .so LOCAL_MODULE_TAGS := optional LOCAL_MULTILIB := both LOCAL_PROPRIETARY_MODULE := true LOCAL_SRC_FILES_64 := proprietary/lib64/libta.so LOCAL_SRC_FILES_32 := proprietary/lib/libta.so include \$(BUILD_PREBUILT) cat << EOF >> "$ANDROIDMK" \$(shell mkdir -p \$(PRODUCT_OUT)/system/vendor/lib/egl && pushd \$(PRODUCT_OUT)/system/vendor/lib > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) \$(shell mkdir -p \$(PRODUCT_OUT)/system/vendor/lib64/egl && pushd \$(PRODUCT_OUT)/system/vendor/lib64 > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) endif EOF fi # We are done! write_footers Loading
extract-files.sh +51 −7 Original line number Diff line number Diff line #!/bin/bash # # Copyright (C) 2017 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. # # Use tradition sort export LC_ALL=C set -e FP=$(cd ${0%/*} && pwd -P) export VENDOR=$(basename $(dirname $FP)) export DEVICE=$(basename $FP) export BOARDCONFIGVENDOR=false export VENDOR=$(basename $(dirname $FP)) # Load extractutils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi CM_ROOT="$MY_DIR"/../../.. HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh if [ ! -f "$HELPER" ]; then echo "Unable to find helper script at $HELPER" exit 1 fi . "$HELPER" if [ $# -eq 0 ]; then SRC=adb else if [ $# -eq 1 ]; then SRC=$1 else echo "$0: bad number of arguments" echo "" echo "usage: $0 [PATH_TO_EXPANDED_ROM]" echo "" echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" echo "the device using adb pull." exit 1 fi fi # Initialize the helper setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" ../common/extract-files.sh $@ extract "$MY_DIR"/proprietary-files.txt "$SRC" ../common/setup-makefiles.sh ./setup-makefiles.sh "$MY_DIR"/setup-makefiles.sh
setup-makefiles.sh +29 −63 Original line number Diff line number Diff line #!/bin/bash OUTDIR=vendor/$VENDOR/$DEVICE MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk if [ $BOARDCONFIGVENDOR != "true" ]; then (cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk # Copyright (C) 2016 The CyanogenMod Project # # Copyright (C) 2017 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. Loading @@ -19,72 +13,44 @@ if [ $BOARDCONFIGVENDOR != "true" ]; then # 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. # # This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh set -e # Pick up overlay for features that depend on non-open-source files PRODUCT_PACKAGES += \\ TimeService \\ libtime_genoff \\ libta FP=$(cd ${0%/*} && pwd -P) export DEVICE=$(basename $FP) export VENDOR=$(basename $(dirname $FP)) \$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) EOF export INITIAL_COPYRIGHT_YEAR=2016 (cat << EOF) > ../../../$OUTDIR/Android.mk # Copyright (C) 2016 The CyanogenMod 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. # Load extractutils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi # This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh CM_ROOT="$MY_DIR"/../../.. LOCAL_PATH := \$(call my-dir) HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh if [ ! -f "$HELPER" ]; then echo "Unable to find helper script at $HELPER" exit 1 fi . "$HELPER" # Initialize the helper setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" ifeq (\$(TARGET_DEVICE),ivy) # Copyright headers and guards write_headers include \$(CLEAR_VARS) LOCAL_MODULE := libtime_genoff LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_OWNER := $VENDOR LOCAL_MODULE_PATH_64 := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES) LOCAL_MODULE_PATH_32 := \$(2ND_TARGET_OUT_VENDOR_SHARED_LIBRARIES) LOCAL_MODULE_SUFFIX := .so LOCAL_MODULE_TAGS := optional LOCAL_MULTILIB := both LOCAL_PROPRIETARY_MODULE := true LOCAL_SRC_FILES_64 := proprietary/vendor/lib64/libtime_genoff.so LOCAL_SRC_FILES_32 := proprietary/vendor/lib/libtime_genoff.so include \$(BUILD_PREBUILT) # The standard blobs write_makefiles "$MY_DIR"/proprietary-files.txt include \$(CLEAR_VARS) LOCAL_MODULE := libta LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE_OWNER := $VENDOR LOCAL_MODULE_PATH_64 := \$(TARGET_OUT_SHARED_LIBRARIES) LOCAL_MODULE_PATH_32 := \$(2ND_TARGET_OUT_SHARED_LIBRARIES) LOCAL_MODULE_SUFFIX := .so LOCAL_MODULE_TAGS := optional LOCAL_MULTILIB := both LOCAL_PROPRIETARY_MODULE := true LOCAL_SRC_FILES_64 := proprietary/lib64/libta.so LOCAL_SRC_FILES_32 := proprietary/lib/libta.so include \$(BUILD_PREBUILT) cat << EOF >> "$ANDROIDMK" \$(shell mkdir -p \$(PRODUCT_OUT)/system/vendor/lib/egl && pushd \$(PRODUCT_OUT)/system/vendor/lib > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) \$(shell mkdir -p \$(PRODUCT_OUT)/system/vendor/lib64/egl && pushd \$(PRODUCT_OUT)/system/vendor/lib64 > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) endif EOF fi # We are done! write_footers