aboutsummaryrefslogtreecommitdiff
path: root/shim/sl/scripts/modify_aosp_libs.sh
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2022-02-10 13:14:03 +0000
committerKevin May <kevin.may@arm.com>2022-02-11 17:00:02 +0000
commit138a88cf568fbc420a310344903f7eb9dec8e1e3 (patch)
tree09dfc013e35ebbed461818e585c3a5611bda7f60 /shim/sl/scripts/modify_aosp_libs.sh
parentf414d999704e2d198aa3136bd556f33a9cc4945f (diff)
downloadarmnn-138a88cf568fbc420a310344903f7eb9dec8e1e3.tar.gz
IVGCVSW-6226 Arm NN Shim Service and Support Library
Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I542b4c4c7b0592f5153ab3d10141bed4e8f169cd
Diffstat (limited to 'shim/sl/scripts/modify_aosp_libs.sh')
-rwxr-xr-xshim/sl/scripts/modify_aosp_libs.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/shim/sl/scripts/modify_aosp_libs.sh b/shim/sl/scripts/modify_aosp_libs.sh
new file mode 100755
index 0000000000..c991678dd2
--- /dev/null
+++ b/shim/sl/scripts/modify_aosp_libs.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+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/"
+ echo "Applying libbase logging.cpp patch"
+ git apply "${SCRIPT_PATH}/libbase_logging_cpp.patch"
+popd
+
+pushd "${AOSP_DIR}/packages/modules/NeuralNetworks/"
+ echo "Applying NeuralNetworks.cpp patch"
+ git apply "${SCRIPT_PATH}/NeuralNetworks_cpp.patch"
+
+ echo " Checking out master version of SharedMemory.h/.cpp which includes convertRequestFromPointerToShared"
+ git checkout master -- common/SharedMemory.cpp
+ git checkout master -- common/include/nnapi/SharedMemory.h
+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