This patch modifies the build-all script for xtensa platforms to make it easier to choose platforms
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- scripts/xtensa-build-all.sh | 82 +++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 36 deletions(-)
diff --git a/scripts/xtensa-build-all.sh b/scripts/xtensa-build-all.sh index dfee2d2..598af02 100755 --- a/scripts/xtensa-build-all.sh +++ b/scripts/xtensa-build-all.sh @@ -4,46 +4,56 @@ 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 +# build all images for chosen targets +if [ "$#" -eq 0 ] +then + PLATFORMS=(byt cht bdw hsw apl cnl) +else + PLATFORMS=$@ +fi + +for i in ${PLATFORMS[@]} +do + 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 +done
# list all the images ls -l src/arch/xtensa/*.ri