summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Martins <bgcngm@gmail.com>2021-01-01 23:46:17 +0000
committerJulian Veit <Claymore1298@gmail.com>2021-01-03 18:30:26 +0100
commita469dd035e7c1b2dba4fd380860caf21a7933a6d (patch)
tree8aa6fd3ccca716493e412a01377a5f64fb3d502a
parentfc757cdf8c230d4394ddfb8eef1b1e533ae333e0 (diff)
m8-common: Rewrite integration with scripts in msm8974-common
Change-Id: I22b9589ebf089d678168e6f167d96799172e45a5
-rwxr-xr-xextract-files.sh51
-rwxr-xr-xsetup-makefiles.sh40
2 files changed, 7 insertions, 84 deletions
diff --git a/extract-files.sh b/extract-files.sh
index feec6b7..fe6936c 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -18,40 +18,6 @@
set -e
-# Load extract_utils and do some sanity checks
-MY_DIR="${BASH_SOURCE%/*}"
-if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
-
-LINEAGE_ROOT="$MY_DIR"/../../..
-
-HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
-if [ ! -f "$HELPER" ]; then
- echo "Unable to find helper script at $HELPER"
- exit 1
-fi
-. "$HELPER"
-
-# Default to sanitizing the vendor folder before extraction
-CLEAN_VENDOR=true
-
-while [ "$1" != "" ]; do
- case $1 in
- -n | --no-cleanup ) CLEAN_VENDOR=false
- ;;
- -s | --section ) shift
- SECTION=$1
- CLEAN_VENDOR=false
- ;;
- * ) SRC=$1
- ;;
- esac
- shift
-done
-
-if [ -z "$SRC" ]; then
- SRC=adb
-fi
-
function blob_fixup() {
case "${1}" in
vendor/lib/hw/camera.vendor.msm8974.so)
@@ -60,17 +26,8 @@ function blob_fixup() {
esac
}
-# Initialize the helper for common device
-setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true "$CLEAN_VENDOR"
-
-extract "$MY_DIR"/common-proprietary-files.txt "$SRC" "$SECTION"
-
-# Reinitialize the helper for device
-setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false "$CLEAN_VENDOR"
-
-extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"
-extract "$MY_DIR"/../$DEVICE/device-proprietary-files.txt "$SRC" "$SECTION"
-
-./../msm8974-common/extract-files.sh $@
+export BOARD_COMMON=msm8974-common
+export DEVICE_COMMON=m8-common
+export DEVICE_SPECIFIED_COMMON_DEVICE="m8 m8d"
-"$MY_DIR"/setup-makefiles.sh
+./../$BOARD_COMMON/extract-files.sh $@
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
index 22f65ab..38bdd9a 100755
--- a/setup-makefiles.sh
+++ b/setup-makefiles.sh
@@ -18,41 +18,7 @@
set -e
-INITIAL_COPYRIGHT_YEAR=2014
+export BOARD_COMMON=msm8974-common
+export DEVICE_COMMON_GUARDS="m8 m8d"
-# Load extract_utils and do some sanity checks
-MY_DIR="${BASH_SOURCE%/*}"
-if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
-
-LINEAGE_ROOT="$MY_DIR"/../../..
-
-HELPER="$LINEAGE_ROOT"/vendor/aicp/build/tools/extract_utils.sh
-if [ ! -f "$HELPER" ]; then
- echo "Unable to find helper script at $HELPER"
- exit 1
-fi
-. "$HELPER"
-
-# Initialize the helper for common device
-setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true
-
-# Copyright headers and common guards
-write_headers "m8 m8d"
-
-write_makefiles "$MY_DIR"/common-proprietary-files.txt
-
-write_footers
-
-# Reinitialize the helper for device
-INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR"
-setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT"
-
-# Copyright headers and guards
-write_headers
-
-write_makefiles "$MY_DIR"/../$DEVICE/device-proprietary-files.txt
-write_makefiles "$MY_DIR"/proprietary-files.txt
-
-write_footers
-
-./../msm8974-common/setup-makefiles.sh $@
+./../$BOARD_COMMON/setup-makefiles.sh $@