a52q: Fully redo extract-files and setup-makesfiles scripts

So that they actually extract the common blobs too...

Change-Id: If2acdaec839dac94c40ef14ca4465d3370cec3d5
tirimbino
Simon1511 2 years ago committed by Jens Lody
parent 3f091a51d6
commit 3794962b72
  1. 64
      extract-files.sh
  2. 45
      setup-makefiles.sh

@ -1,63 +1,21 @@
#!/bin/bash
#
# Copyright (C) 2018-2020 The LineageOS Project
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
DEVICE_COMMON=a52q
VENDOR=samsung
# Load extractutils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"
# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR=true
KANG=
SECTION=
while [ "${#}" -gt 0 ]; do
case "${1}" in
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
-k | --kang )
KANG="--kang"
;;
-s | --section )
SECTION="${2}"; shift
CLEAN_VENDOR=false
;;
* )
SRC="${1}"
;;
esac
shift
done
if [ -z "${SRC}" ]; then
SRC="adb"
# 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
# Initialize the helper
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
set -e
# Fix proprietary blobs
BLOB_ROOT="$ANDROID_ROOT"/vendor/"$VENDOR"/"$DEVICE_COMMON"/proprietary
export DEVICE=a52q
export DEVICE_COMMON=sm7125-common
export VENDOR=samsung
"${MY_DIR}/setup-makefiles.sh"
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"

@ -1,44 +1,21 @@
#!/bin/bash
#
# Copyright (C) 2017-2021 The LineageOS Project
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
DEVICE_COMMON=a52q
VENDOR=samsung
# Load extractutils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
# 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
source "${HELPER}"
# Initialize the helper
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true
# Warning headers and guards
write_headers "a52q"
write_makefiles "${MY_DIR}/proprietary-files.txt" true
###################################################################################################
# CUSTOM PART START #
###################################################################################################
set -e
OUTDIR=vendor/$VENDOR/$DEVICE_COMMON
export DEVICE=a52q
export DEVICE_COMMON=sm7125-common
export VENDOR=samsung
###################################################################################################
# CUSTOM PART END #
###################################################################################################
# Done
write_footers
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"

Loading…
Cancel
Save