blob: 227254fcc03b478b0830e1b2249a1cc6c81cda66 [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
Pierre-Louis Bossartf7471ab2018-04-03 08:57:16 -050057 PATH=$pwd/../xtensa-root/$ROOT/bin:$PATH
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080058 ./configure --with-arch=xtensa --with-platform=$PLATFORM --with-root-dir=$pwd/../xtensa-root/$ROOT --host=$ROOT
59 make clean
60 make
61 make bin
62 fi
63 done
64done
Liam Girdwoodf198ad92018-01-21 23:48:35 +000065
Liam Girdwood8855ce52016-10-18 17:18:16 +010066# list all the images
67ls -l src/arch/xtensa/*.ri