2017-06-06 17:45:07 +08:00
|
|
|
# fail on any errors
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# run autogen.sh
|
|
|
|
./autogen.sh
|
|
|
|
|
2016-10-19 00:18:16 +08:00
|
|
|
pwd=`pwd`
|
|
|
|
|
|
|
|
rm -fr src/arch/xtensa/*.ri
|
2016-09-21 22:57:22 +08:00
|
|
|
|
2018-02-27 01:17:32 +08:00
|
|
|
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl)
|
2016-09-21 22:57:22 +08:00
|
|
|
|
2018-02-27 01:17:32 +08:00
|
|
|
# build all images for chosen targets
|
|
|
|
if [ "$#" -eq 0 ]
|
|
|
|
then
|
|
|
|
PLATFORMS=${SUPPORTED_PLATFORMS[@]}
|
|
|
|
else
|
|
|
|
PLATFORMS=$@
|
|
|
|
fi
|
2016-09-21 22:57:22 +08:00
|
|
|
|
2018-02-27 01:17:32 +08:00
|
|
|
for i in ${PLATFORMS[@]}
|
|
|
|
do
|
|
|
|
for j in ${SUPPORTED_PLATFORMS[@]}
|
|
|
|
do
|
|
|
|
if [ $j == $i ]
|
|
|
|
then
|
|
|
|
if [ $j == "byt" ]
|
|
|
|
then
|
|
|
|
PLATFORM="baytrail"
|
|
|
|
ROOT="xtensa-byt-elf"
|
|
|
|
fi
|
|
|
|
if [ $j == "cht" ]
|
|
|
|
then
|
|
|
|
PLATFORM="cherrytrail"
|
|
|
|
ROOT="xtensa-byt-elf"
|
|
|
|
fi
|
|
|
|
if [ $j == "bdw" ]
|
|
|
|
then
|
|
|
|
PLATFORM="broadwell"
|
|
|
|
ROOT="xtensa-hsw-elf"
|
|
|
|
fi
|
|
|
|
if [ $j == "hsw" ]
|
|
|
|
then
|
|
|
|
PLATFORM="haswell"
|
|
|
|
ROOT="xtensa-hsw-elf"
|
|
|
|
fi
|
|
|
|
if [ $j == "apl" ]
|
|
|
|
then
|
|
|
|
PLATFORM="apollolake"
|
|
|
|
ROOT="xtensa-bxt-elf"
|
|
|
|
fi
|
|
|
|
if [ $j == "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
|
2018-01-22 07:48:35 +08:00
|
|
|
|
2016-10-19 00:18:16 +08:00
|
|
|
# list all the images
|
|
|
|
ls -l src/arch/xtensa/*.ri
|