Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build doesn't verify that setting config options worked #137

Closed
broonie opened this issue Aug 7, 2019 · 4 comments
Closed

Build doesn't verify that setting config options worked #137

broonie opened this issue Aug 7, 2019 · 4 comments

Comments

@broonie
Copy link
Member

broonie commented Aug 7, 2019

Nothing in the build code verifies that a .config that is generated from a config with additional options set actually sets those options, resulting in silent failures like those we see with clang and defconfig+CPU_BIG_ENDIAN. It would cost very little to grep the resulting config for these options and save a bunch of pain when things go wrong.

@gctucker
Copy link
Contributor

Actually, merge_config.sh does check each config after merging. What it doesn't is propagate the error when there's a problem, but there's already a fix for that from you ;)

Here's an example output of when it fails to set CPU_BIG_ENDIAN:

Using build/.config as base
Merging build/frag.config
Value of CONFIG_CPU_BIG_ENDIAN is redefined by fragment build/frag.config:
Previous value: # CONFIG_CPU_BIG_ENDIAN is not set
New value: CONFIG_CPU_BIG_ENDIAN=y

make[1]: Entering directory '/home/buildslave/staging/workspace/gtucker/kernel-build/linux/build'
  HOSTCC  scripts/basic/fixdep
  GEN     Makefile
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --alldefconfig Kconfig
scripts/Kconfig.include:35: compiler 'aarch64-linux-gnu-gcc' not found
make[2]: *** [../scripts/kconfig/Makefile:73: alldefconfig] Error 1
make[1]: *** [/home/buildslave/staging/workspace/gtucker/kernel-build/linux/Makefile:562: alldefconfig] Error 2
make[1]: Leaving directory '/home/buildslave/staging/workspace/gtucker/kernel-build/linux/build'
make: *** [Makefile:179: sub-make] Error 2
Value requested for CONFIG_CPU_BIG_ENDIAN not in final .config
Requested value:  CONFIG_CPU_BIG_ENDIAN=y
Actual value:     # CONFIG_CPU_BIG_ENDIAN is not set

@broonie
Copy link
Member Author

broonie commented Aug 20, 2019

Right, I'm aware that it complains but thought that this was a warning not an error. I see it is an error now but I suspect that's going to get changed for usability, we might get an option to turn it back into an error though.

@gctucker
Copy link
Contributor

OK - in any case doing the check in merge_config.sh is what makes most sense to me, rather than in kci_build or some other tool outside of the kernel tree.

@gctucker
Copy link
Contributor

Replaced with an issue in my kernel fork.

@gctucker gctucker removed their assignment Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants