Skip to content
Snippets Groups Projects

Merge dev into main

Merged Mattijs Korpershoek requested to merge dev into main
1 file
+ 14
5
Compare changes
  • Side-by-side
  • Inline
+ 14
5
@@ -14,7 +14,7 @@ Usage: build_aosp.sh <options>
--help Show this message and exit
--target: entry in lunch menu
--build-args: give specific arg to build
--out-dir: custom out dir for android, wille be created next in ${PWD}
--out-dir (optional): custom out dir for android, will be created next in ${PWD}
--aosp-path: android source tree root folder
--ncores: to specific number of CPU used to build
DELIM__
@@ -33,8 +33,10 @@ function build_aosp {
fi
cmdline+=${buildargs}
outdir=$(realpath ${outdir})
export OUT_DIR=${outdir}
if [ ! -z ${outdir} ]; then
outdir=$(realpath ${outdir})
export OUT_DIR=${outdir}
fi
pushd ${aosppath}
@@ -53,6 +55,7 @@ function main {
local target=""
local buildargs=""
local outdir=""
local log_path=""
local opts_args="ncores:,aosp-path:,target:,build-args:,out-dir:,help"
local opts=$(getopt -o '' -l "${opts_args}" -- "$@")
@@ -74,8 +77,14 @@ function main {
[ -z "${target}" ] && error_usage_exit "Not lunch target provided"
[ -z "${aosppath}" ] && error_usage_exit "Not aosp env path provided"
echo "Build logs will be stored at: [ ${outdir}/${target}.log ]"
exec >${outdir}/${target}.log 2>&1
if [ -z ${outdir} ]; then
log_path="${aosppath}/out/${target}.log"
else
log_path="${outdir}/${target}.log"
fi
echo "Build logs will be stored at: [ $log_path ]"
exec >${log_path} 2>&1
build_aosp "${target}" "${outdir}" "${buildargs}" "${aosppath}" "${ncores}"
exit 0
Loading