Skip to content

Commit 173f4d2

Browse files
committed
scripts: add no riamge build options for build all script
Add -lr to let xtensa-build-all.sh do not build rimage. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
1 parent 96aa24c commit 173f4d2

1 file changed

Lines changed: 32 additions & 15 deletions

File tree

scripts/xtensa-build-all.sh

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22

33
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl sue icl)
4+
BUILD_RIMAGE=1
5+
6+
pwd=`pwd`
7+
48
if [ "$#" -eq 0 ]
59
then
610
PLATFORMS=${SUPPORTED_PLATFORMS[@]}
@@ -12,6 +16,19 @@ else
1216
then
1317
BUILD_LOCAL=1
1418

19+
# build all images for chosen targets
20+
if [ "$#" -eq 1 ]
21+
then
22+
PLATFORMS=${SUPPORTED_PLATFORMS[@]}
23+
break
24+
fi
25+
elif [[ "$args" == "-lr" ]]
26+
then
27+
BUILD_LOCAL=1
28+
BUILD_RIMAGE=0
29+
30+
PATH=$pwd/local/bin:$PATH
31+
1532
# build all images for chosen targets
1633
if [ "$#" -eq 1 ]
1734
then
@@ -40,22 +57,22 @@ set -e
4057
# run autogen.sh
4158
./autogen.sh
4259

43-
pwd=`pwd`
44-
45-
4660
# make sure rimage is built and aligned with code
47-
if [[ "x$BUILD_LOCAL" == "x" ]]
61+
if [[ "x$BUILD_RIMAGE" == "x1" ]]
4862
then
49-
./configure --enable-rimage
50-
make
51-
sudo make install
52-
else
53-
echo "BUILD in local folder!"
54-
rm -rf $pwd/local/
55-
./configure --enable-rimage --prefix=$pwd/local
56-
make
57-
make install
58-
PATH=$pwd/local/bin:$PATH
63+
if [[ "x$BUILD_LOCAL" == "x" ]]
64+
then
65+
./configure --enable-rimage
66+
make
67+
sudo make install
68+
else
69+
echo "BUILD in local folder!"
70+
rm -rf $pwd/local/
71+
./configure --enable-rimage --prefix=$pwd/local
72+
make
73+
make install
74+
PATH=$pwd/local/bin:$PATH
75+
fi
5976
fi
6077

6178
OLDPATH=$PATH
@@ -151,7 +168,7 @@ do
151168
fi
152169

153170
# update ROOT directory for xt-xcc
154-
if [ $XCC == "xt-xcc" ]
171+
if [ "$XCC" == "xt-xcc" ]
155172
then
156173
ROOT="$XTENSA_BUILDS_DIR/$XTENSA_CORE/xtensa-elf"
157174
export XTENSA_SYSTEM=$XTENSA_BUILDS_DIR/$XTENSA_CORE/config

0 commit comments

Comments
 (0)