#!/bin/bash set -e gen_sof_config() { PLATFORM="$1" ../make.cross defconfig ARCH=$PLATFORM ./scripts/kconfig/merge_config.sh .config /data/pbossart/GIT/kconfig/base-defconfig /data/pbossart/GIT/kconfig/sof-defconfig /data/pbossart/GIT/kconfig/hdaudio-codecs-defconfig ../make.cross olddefconfig ARCH=$PLATFORM } test_fast() { PLATFORM="$1" make mrproper ../make.cross allmodconfig ARCH=$PLATFORM ../make.cross olddefconfig ARCH=$PLATFORM ../make.cross ARCH=$PLATFORM modules_prepare ../make.cross ARCH=$PLATFORM SUBDIRS=sound/soc/sof W=1 # ../make.cross ARCH=$PLATFORM SUBDIRS=sound/soc/intel # ../make.cross ARCH=$PLATFORM SUBDIRS=sound/pci/hda } test_compile() { PLATFORM="$1" make mrproper gen_sof_config $PLATFORM if [ "$PLATFORM" = "x86_64" ]; then make modules_prepare echo "Sparse" make SUBDIRS=sound/soc/sof C=2 echo "Coccinelle" make coccicheck MODE="report" M=sound/soc/sof fi echo "modules first" ../make.cross ARCH=$PLATFORM if [ "$PLATFORM" = "x86_64" ]; then ../make.cross bindeb-pkg ARCH=$PLATFORM fi echo "all yes second" perl -pi.bak -e 's/=m/=y/g' .config ../make.cross olddefconfig ARCH=$PLATFORM ../make.cross ARCH=$PLATFORM if [ "$PLATFORM" = "x86_64" ]; then ../make.cross bindeb-pkg ARCH=$PLATFORM fi } test_platform() { PLATFORM="$1" test_fast $PLATFORM test_compile $PLATFORM } test_platform x86_64 test_platform i386 test_platform ia64 test_platform arm test_platform arm64 test_platform sh test_platform mips test_platform s390 test_platform openrisc test_platform sparc test_platform sparc64 test_platform m68k echo "X-compilation check PASS"