mirror of https://github.com/thesofproject/sof.git
scripts: xtensa-build-all: Add support for > 1 makefile job
Add -j option to allow setting Makefile jobs. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
e9f33e6482
commit
baf2806626
|
@ -3,6 +3,8 @@
|
||||||
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl sue icl skl kbl)
|
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl sue icl skl kbl)
|
||||||
BUILD_RIMAGE=0
|
BUILD_RIMAGE=0
|
||||||
BUILD_DEBUG=no
|
BUILD_DEBUG=no
|
||||||
|
BUILD_JOBS=1
|
||||||
|
BUILD_JOBS_NEXT=0
|
||||||
|
|
||||||
pwd=`pwd`
|
pwd=`pwd`
|
||||||
|
|
||||||
|
@ -12,6 +14,7 @@ then
|
||||||
echo " [-l] Build rimage locally"
|
echo " [-l] Build rimage locally"
|
||||||
echo " [-a] Build all platforms"
|
echo " [-a] Build all platforms"
|
||||||
echo " [-d] Enable debug build"
|
echo " [-d] Enable debug build"
|
||||||
|
echo " [-j [n]] Set number of make build jobs. Infinite jobs with no arg."
|
||||||
echo " Supported platforms ${SUPPORTED_PLATFORMS[@]}"
|
echo " Supported platforms ${SUPPORTED_PLATFORMS[@]}"
|
||||||
else
|
else
|
||||||
# parse the args
|
# parse the args
|
||||||
|
@ -28,18 +31,32 @@ else
|
||||||
then
|
then
|
||||||
BUILD_DEBUG=yes
|
BUILD_DEBUG=yes
|
||||||
|
|
||||||
|
elif [[ "$args" == "-j" ]]
|
||||||
|
then
|
||||||
|
BUILD_JOBS_NEXT=1
|
||||||
|
BUILD_JOBS=""
|
||||||
|
|
||||||
# Build all platforms
|
# Build all platforms
|
||||||
elif [[ "$args" == "-a" ]]
|
elif [[ "$args" == "-a" ]]
|
||||||
then
|
then
|
||||||
PLATFORMS=${SUPPORTED_PLATFORMS[@]}
|
PLATFORMS=${SUPPORTED_PLATFORMS[@]}
|
||||||
else
|
else
|
||||||
|
# check for plaform
|
||||||
for i in ${SUPPORTED_PLATFORMS[@]}
|
for i in ${SUPPORTED_PLATFORMS[@]}
|
||||||
do
|
do
|
||||||
if [ $i == $args ]
|
if [ $i == $args ]
|
||||||
then
|
then
|
||||||
PLATFORMS+=$i" "
|
PLATFORMS+=$i" "
|
||||||
|
BUILD_JOBS_NEXT=0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# check for jobs
|
||||||
|
if [ ${BUILD_JOBS_NEXT} == 1 ]
|
||||||
|
then
|
||||||
|
BUILD_JOBS=$args
|
||||||
|
BUILD_JOBS_NEXT=0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -63,13 +80,13 @@ then
|
||||||
if [[ "x$BUILD_LOCAL" == "x" ]]
|
if [[ "x$BUILD_LOCAL" == "x" ]]
|
||||||
then
|
then
|
||||||
./configure --enable-rimage
|
./configure --enable-rimage
|
||||||
make
|
make -j ${BUILD_JOBS}
|
||||||
sudo make install
|
sudo make install
|
||||||
else
|
else
|
||||||
echo "BUILD in local folder!"
|
echo "BUILD in local folder!"
|
||||||
rm -rf $pwd/local/
|
rm -rf $pwd/local/
|
||||||
./configure --enable-rimage --prefix=$pwd/local
|
./configure --enable-rimage --prefix=$pwd/local
|
||||||
make
|
make -j ${BUILD_JOBS}
|
||||||
make install
|
make install
|
||||||
PATH=$pwd/local/bin:$PATH
|
PATH=$pwd/local/bin:$PATH
|
||||||
fi
|
fi
|
||||||
|
@ -230,7 +247,7 @@ do
|
||||||
--with-dsp-core=$XTENSA_CORE
|
--with-dsp-core=$XTENSA_CORE
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
make
|
make -j ${BUILD_JOBS}
|
||||||
make bin
|
make bin
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue