diff options
Diffstat (limited to 'shim/sl/scripts/modify_aosp_libs.sh')
-rwxr-xr-x | shim/sl/scripts/modify_aosp_libs.sh | 25 |
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 |