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

Ranjani Sridharan ranjani.sridharan at linux.intel.com
Sat Feb 24 01:22:37 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 | 90 +++++++++++++++++++++++++++------------------
 1 file changed, 54 insertions(+), 36 deletions(-)

diff --git a/scripts/xtensa-build-all.sh b/scripts/xtensa-build-all.sh
index dfee2d2..903750a 100755
--- a/scripts/xtensa-build-all.sh
+++ b/scripts/xtensa-build-all.sh
@@ -4,46 +4,64 @@ 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
-
-# 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 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
+SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl)
+
+# build all images for chosen targets
+if [ "$#" -eq 0 ]
+then
+	PLATFORMS=$SUPPORTED_PLATFORMS
+else
+	PLATFORMS=$@
+fi
+
+for i in ${PLATFORMS[@]}
+do
+	for j in ${SUPPORTED_PLATFORMS[@]}
+	do
+		if [ $j == $i ]
+		then
+			if [ $i == "byt" ]
+			then
+				PLATFORM="baytrail"
+				ROOT="xtensa-byt-elf"
+			fi
+			if [ $i == "cht" ]
+			then
+				PLATFORM="cherrytrail"
+				ROOT="xtensa-byt-elf"
+			fi
+			if [ $i == "bdw" ]
+			then
+				PLATFORM="broadwell"
+				ROOT="xtensa-hsw-elf"
+			fi
+			if [ $i == "hsw" ]
+			then
+				PLATFORM="haswell"
+				ROOT="xtensa-hsw-elf"
+			fi
+			if [ $i == "apl" ]
+			then
+				PLATFORM="apollolake"
+				ROOT="xtensa-bxt-elf"
+			fi
+			if [ $i == "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