[Sound-open-firmware] Linux build for arm64

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Thu Jul 18 21:57:37 CEST 2019



On 7/18/19 2:27 PM, Daniel Baluta wrote:
> Hi Liam  / Pierre,
> 
> Could we add a build for arm64 too in CI? With recent patches that
> add support for i.MX8 SOF Linux driver it would be handy to also
> have the build for arm64.
> 
> I can help you with the cross-compilers and build instructions.
> 
> Currently we are only building for x86_64.
> 
> https://travis-ci.org/thesofproject/linux/builds/560509972

Sure, I see no issue, as long as it's just compilation it's almost free. 
hardware-tests are probably out-of-scope as discussed some time back.

the main point will be to agree on which kernel config you want to use. 
To speed things up, we use a minimal kernel based on defconfig and 
Kconfig fragments, so that changes are automatically applied. see 
https://github.com/thesofproject/kconfig. if we have a imx-defconfig 
fragment file then we can add support very quickly.

I use this for my own 'maintainer' tests where I compile locally with 
make.cross for multiple architectures, see script attached.

-------------- next part --------------
#!/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"


More information about the Sound-open-firmware mailing list