Files
rk35xx-android14/system/chre/run_sim.sh
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

34 lines
699 B
Bash
Executable File

#!/bin/bash
# Quit if any command produces an error.
set -e
# Check required paths
: ${ANDROID_BUILD_TOP:?"ERROR: Please run build/envsetup.sh and lunch first"}
BUILD_ONLY="false"
while getopts "b" opt; do
case ${opt} in
b)
BUILD_ONLY="true"
;;
esac
done
# Build and run the CHRE simulator.
CHRE_HOST_OS=`uname`
if [[ $CHRE_HOST_OS == 'Darwin' ]]; then
JOB_COUNT=`sysctl -n hw.ncpu`
else
JOB_COUNT=$((`grep -c ^processor /proc/cpuinfo`))
fi
# Export the variant Makefile.
export CHRE_VARIANT_MK_INCLUDES=variant/simulator/variant.mk
make clean && make google_x86_linux_debug -j$JOB_COUNT
if [ "$BUILD_ONLY" = "false" ]; then
./out/google_x86_linux_debug/libchre ${@:1}
fi