[Sound-open-firmware] [PATCH v4] scripts: modified build-all script for xtensa platforms

Ranjani Sridharan ranjani.sridharan at linux.intel.com
Mon Feb 26 18:17:32 CET 2018


This patch modifies the build-all script for xtensa platforms
to make it easier to choose platforms

Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
 scripts/xtensa-build-all.sh | 85 +++++++++++++++++++++++++++------------------
 1 file changed, 51 insertions(+), 34 deletions(-)

diff --git a/scripts/xtensa-build-all.sh b/scripts/xtensa-build-all.sh
index dfee2d2..5111383 100755
--- a/scripts/xtensa-build-all.sh
+++ b/scripts/xtensa-build-all.sh
@@ -4,46 +4,63 @@ set -e
 # run autogen.sh
 ./autogen.sh
 
-# build all images for all targets.
 pwd=`pwd`
 
 rm -fr src/arch/xtensa/*.ri
 
-# Build for Baytrail
-./configure --with-arch=xtensa --with-platform=baytrail --with-root-dir=$pwd/../xtensa-root/xtensa-byt-elf --host=xtensa-byt-elf
-make clean
-make
-make bin
+SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl)
 
-# Build for Cherrytrail
-make clean
-./configure --with-arch=xtensa --with-platform=cherrytrail --with-root-dir=$pwd/../xtensa-root/xtensa-byt-elf --host=xtensa-byt-elf
-make
-make bin
+# build all images for chosen targets
+if [ "$#" -eq 0 ]
+then
+	PLATFORMS=${SUPPORTED_PLATFORMS[@]}
+else
+	PLATFORMS=$@
+fi
 
-# Build for Broadwell
-make clean
-./configure --with-arch=xtensa --with-platform=broadwell --with-root-dir=$pwd/../xtensa-root/xtensa-hsw-elf --host=xtensa-hsw-elf
-make
-make bin
-
-# Build for Haswell
-make clean
-./configure --with-arch=xtensa --with-platform=haswell --with-root-dir=$pwd/../xtensa-root/xtensa-hsw-elf --host=xtensa-hsw-elf
-make
-make bin
-
-# Build for Apollolake
-make clean
-./configure --with-arch=xtensa --with-platform=apollolake --with-root-dir=$pwd/../xtensa-root/xtensa-bxt-elf --host=xtensa-bxt-elf
-make
-make bin
-
-# Build for Cannonlake
-make clean
-./configure --with-arch=xtensa --with-platform=cannonlake --with-root-dir=$pwd/../xtensa-root/xtensa-cnl-elf --host=xtensa-cnl-elf
-make
-make bin
+for i in ${PLATFORMS[@]}
+do
+	for j in ${SUPPORTED_PLATFORMS[@]}
+	do
+		if [ $j == $i ]
+		then
+			if [ $j == "byt" ]
+			then
+				PLATFORM="baytrail"
+				ROOT="xtensa-byt-elf"
+			fi
+			if [ $j == "cht" ]
+			then
+				PLATFORM="cherrytrail"
+				ROOT="xtensa-byt-elf"
+			fi
+			if [ $j == "bdw" ]
+			then
+				PLATFORM="broadwell"
+				ROOT="xtensa-hsw-elf"
+			fi
+			if [ $j == "hsw" ]
+			then
+				PLATFORM="haswell"
+				ROOT="xtensa-hsw-elf"
+			fi
+			if [ $j == "apl" ]
+			then
+				PLATFORM="apollolake"
+				ROOT="xtensa-bxt-elf"
+			fi
+			if [ $j == "cnl" ]
+			then
+				PLATFORM="cannonlake"
+				ROOT="xtensa-cnl-elf"
+			fi
+			./configure --with-arch=xtensa --with-platform=$PLATFORM --with-root-dir=$pwd/../xtensa-root/$ROOT --host=$ROOT
+			make clean
+			make
+			make bin
+		fi
+	done
+done
 
 # list all the images
 ls -l src/arch/xtensa/*.ri
-- 
2.14.1



More information about the Sound-open-firmware mailing list