-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Describe the bug
When we build SOF for some reason the initial call to cmake does not include any configs. You can see the travis log below that make *defconfig is not called till after the first call to cmake. This is causing problems with refactoring as some of the variables are resolving to null and causing bugs.
Assuming there is a reason for this initial no config call, then we are calling into areas without configs like arch/xtensa which need those configs to run properly, which means we should be returning. Maybe we are just missing a check at the top of arch/xtensa to return if a xtensa config is not set?
To Reproduce
run xtensa-build-all.sh with a message to long your platform config. notice empty line in first run.
Reproduction Rate
How often does the issue happen ? i.e. 1/10 (once in ten attempts), 1/1000 or all the time.
100%
Expected behavior
Cmake should not run without the config
Impact
Blocks refactoring for fuzzer
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: N/A
- SOF: e7a339b
- Name of the topology file
- Topology: N/A
- Name of the platform(s) on which the bug is observed.
- Platform: N/A
Screenshots or console output
$ ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -r $PLATFORM
Build in build_tgl_gcc
+ cmake -DTOOLCHAIN=xtensa-cnl-elf -DROOT_DIR=/home/sof/work/sof.git/../xtensa-root/xtensa-cnl-elf -DMEU_OPENSSL= '' -DRIMAGE_PRIVATE_KEY=/home/sof/work/sof.git/keys/otc_private_key_3k.pem ..
-- Preparing Xtensa toolchain
-- The C compiler identification is GNU 9.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/sof/work/xtensa-cnl-elf/bin/xtensa-cnl-elf-gcc
-- Linking git pre-commit hook
-- Linking git post-commit hook
-- Found Git: /usr/bin/git (found version "2.17.1")
-- GIT_TAG / GIT_LOG_HASH : v1.5-rc1-898-ge7a339bd4cc7 / e7a339bd4
-- Source content hash: f770dbfc
-- Generating /home/sof/work/sof.git/build_tgl_gcc/generated/include/version.h
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sof/work/sof.git/build_tgl_gcc
+ make tgplp_defconfig
Scanning dependencies of target tgplp_defconfig
Applying olddefconfig with tgplp_defconfig
Using existing configuration '.config' as base
Configuration written to '.config'
Built target tgplp_defconfig
-- Preparing Xtensa toolchain
-- GIT_TAG / GIT_LOG_HASH : v1.5-rc1-898-ge7a339bd4cc7 / e7a339bd4
-- Source content hash: f770dbfc
-- Up-to-date /home/sof/work/sof.git/build_tgl_gcc/generated/include/version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sof/work/sof.git/build_tgl_gcc
Scanning dependencies of target overrideconfig
Using existing configuration '.config' as base
Configuration written to '.config'
Built target overrideconfig
-- Preparing Xtensa toolchain
-- GIT_TAG / GIT_LOG_HASH : v1.5-rc1-898-ge7a339bd4cc7 / e7a339bd4
-- Source content hash: f770dbfc
-- Up-to-date /home/sof/work/sof.git/build_tgl_gcc/generated/include/version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sof/work/sof.git/build_tgl_gcc
Scanning dependencies of target genconfig