blob: 35ff9d94838f7c058eaa600e28c8ab7a72473526 [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
Pierre-Louis Bossartb9880a52018-04-03 12:57:53 -05009# make sure rimage is built and aligned with code
10./configure --enable-rimage
11make
12sudo make install
13
14# now build the firmware (depends on rimage)
Liam Girdwood8855ce52016-10-18 17:18:16 +010015rm -fr src/arch/xtensa/*.ri
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010016
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080017SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl)
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010018
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080019# build all images for chosen targets
20if [ "$#" -eq 0 ]
21then
22 PLATFORMS=${SUPPORTED_PLATFORMS[@]}
23else
24 PLATFORMS=$@
25fi
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010026
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080027for i in ${PLATFORMS[@]}
28do
29 for j in ${SUPPORTED_PLATFORMS[@]}
30 do
31 if [ $j == $i ]
32 then
33 if [ $j == "byt" ]
34 then
35 PLATFORM="baytrail"
36 ROOT="xtensa-byt-elf"
37 fi
38 if [ $j == "cht" ]
39 then
40 PLATFORM="cherrytrail"
41 ROOT="xtensa-byt-elf"
42 fi
43 if [ $j == "bdw" ]
44 then
45 PLATFORM="broadwell"
46 ROOT="xtensa-hsw-elf"
47 fi
48 if [ $j == "hsw" ]
49 then
50 PLATFORM="haswell"
51 ROOT="xtensa-hsw-elf"
52 fi
53 if [ $j == "apl" ]
54 then
55 PLATFORM="apollolake"
56 ROOT="xtensa-bxt-elf"
57 fi
58 if [ $j == "cnl" ]
59 then
60 PLATFORM="cannonlake"
61 ROOT="xtensa-cnl-elf"
62 fi
Pierre-Louis Bossartf7471ab2018-04-03 08:57:16 -050063 PATH=$pwd/../xtensa-root/$ROOT/bin:$PATH
Ranjani Sridharanb5ca5c42018-02-26 09:17:32 -080064 ./configure --with-arch=xtensa --with-platform=$PLATFORM --with-root-dir=$pwd/../xtensa-root/$ROOT --host=$ROOT
65 make clean
66 make
67 make bin
68 fi
69 done
70done
Liam Girdwoodf198ad92018-01-21 23:48:35 +000071
Liam Girdwood8855ce52016-10-18 17:18:16 +010072# list all the images
73ls -l src/arch/xtensa/*.ri