aboutsummaryrefslogtreecommitdiff
path: root/shim/sl/scripts/modify_aosp_libs.sh
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2022-06-10 12:41:40 +0100
committerKevin May <kevin.may@arm.com>2022-06-14 09:51:12 +0100
commitb693be549eb0f2f113ec8cdff3c50e9336b57c7e (patch)
tree3d1fb9fbbbd0ae23bccbd09c302e4a278bd67ddd /shim/sl/scripts/modify_aosp_libs.sh
parentf98421efb1ab438dc02b0cf7abc670f8a29750f4 (diff)
downloadarmnn-b693be549eb0f2f113ec8cdff3c50e9336b57c7e.tar.gz
IVGCVSW-6966 Add build folder vars for SL build process
* Use cmake flags to indicate armnn build and aosp modules folders Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I8afa94734823ba3f855941d4462be45677d41f46
Diffstat (limited to 'shim/sl/scripts/modify_aosp_libs.sh')
-rwxr-xr-xshim/sl/scripts/modify_aosp_libs.sh28
1 files changed, 19 insertions, 9 deletions
diff --git a/shim/sl/scripts/modify_aosp_libs.sh b/shim/sl/scripts/modify_aosp_libs.sh
index 104e99105e..f2fc5c1937 100755
--- a/shim/sl/scripts/modify_aosp_libs.sh
+++ b/shim/sl/scripts/modify_aosp_libs.sh
@@ -1,21 +1,31 @@
#!/usr/bin/env bash
+AOSP_WORKING_DIR=$1
+
+if [ "$#" -ne 1 ]; then
+
+ echo "Usage: This script must be passed a single parameter which is a path "
+ echo " to an existing directory where the AOSP repo's have been cloned."
+ echo "Error: No working directory path parameter provided."
+ exit 1
+fi
+if [ ! -d "$1" ]; then
+
+ echo "Usage: This script must be passed a single parameter which is a path "
+ echo " to an existing directory where the AOSP repo's have been cloned."
+ echo "Error: Working directory path provided is not a directory."
+ exit 1
+fi
+
SCRIPT_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo "SCRIPT_PATH= ${SCRIPT_PATH}"
-AOSP_DIR="${SCRIPT_PATH}/../aosp/"
-echo "AOSP_DIR= ${AOSP_DIR}"
-pushd "${AOSP_DIR}/system/libbase/"
+pushd "${AOSP_WORKING_DIR}/system/libbase/"
echo "Applying libbase logging.cpp patch"
git apply "${SCRIPT_PATH}/libbase_logging_cpp.patch"
popd
-pushd "${AOSP_DIR}/packages/modules/NeuralNetworks/"
+pushd "${AOSP_WORKING_DIR}/packages/modules/NeuralNetworks/"
echo "Applying NeuralNetworks patch"
git apply "${SCRIPT_PATH}/NeuralNetworks.patch"
popd
-
-pushd "${SCRIPT_PATH}/.."
- echo "Renaming Android.mk and Android.bp to .DISABLED for NDK build only"
- find ./aosp -name "*.bp" -exec bash -c 'mv "$1" "${1%.bp}".bp.DISABLED' - '{}' \;
-popd