blob: 51113835bfb6e9963e659101820703ab0bfeac0c [file] [log] [blame]
Liam Girdwood58a99d62017-06-06 10:45:07 +01001# fail on any errors
2set -e
3
4# run autogen.sh
5./autogen.sh
6
Liam Girdwood8855ce52016-10-18 17:18:16 +01007pwd=`pwd`
8
9rm -fr src/arch/xtensa/*.ri
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010010
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080011SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl)
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010012
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080013# build all images for chosen targets
14if [ "$#" -eq 0 ]
15then
16 PLATFORMS=${SUPPORTED_PLATFORMS[@]}
17else
18 PLATFORMS=$@
19fi
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010020
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080021for i in ${PLATFORMS[@]}
22do
23 for j in ${SUPPORTED_PLATFORMS[@]}
24 do
25 if [ $j == $i ]
26 then
27 if [ $j == "byt" ]
28 then
29 PLATFORM="baytrail"
30 ROOT="xtensa-byt-elf"
31 fi
32 if [ $j == "cht" ]
33 then
34 PLATFORM="cherrytrail"
35 ROOT="xtensa-byt-elf"
36 fi
37 if [ $j == "bdw" ]
38 then
39 PLATFORM="broadwell"
40 ROOT="xtensa-hsw-elf"
41 fi
42 if [ $j == "hsw" ]
43 then
44 PLATFORM="haswell"
45 ROOT="xtensa-hsw-elf"
46 fi
47 if [ $j == "apl" ]
48 then
49 PLATFORM="apollolake"
50 ROOT="xtensa-bxt-elf"
51 fi
52 if [ $j == "cnl" ]
53 then
54 PLATFORM="cannonlake"
55 ROOT="xtensa-cnl-elf"
56 fi
57 ./configure --with-arch=xtensa --with-platform=$PLATFORM --with-root-dir=$pwd/../xtensa-root/$ROOT --host=$ROOT
58 make clean
59 make
60 make bin
61 fi
62 done
63done
Liam Girdwoodf198ad92018-01-21 23:48:35 +000064
Liam Girdwood8855ce52016-10-18 17:18:16 +010065# list all the images
66ls -l src/arch/xtensa/*.ri