-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
When trying to build a minimal kernel from bcm2709_defconfig using allnoconfig the resulting configuration doesn't compile.
allnoconfig is the normal way to configure/build the most minimal working kernel. It's used in combination with a defconfig to provide the required defaults.
It can be executed in the following way to generate a minimal config based on bcm2709_defconfig:
make ARCH=arm KCONFIG_ALLCONFIG=arch/arm/configs/bcm2709_defconfig allnoconfig
Now when compiling the generated .config I ran into several of these errors:
/tmp/ccholjfv.s: Assembler messages:
/tmp/ccholjfv.s:67: Error: selected processor does not support requested special purpose register -- `mrs r3,cpsr'
/tmp/ccholjfv.s:75: Error: selected processor does not support requested special purpose register -- `msr cpsr_c,r3'
Doing a diffconfig of the configs generated by bcm2709_defconfig and allnoconfig showed that ARCH_BCM2835 was missing. Even though ARCH_BCM2835 is defined in bcm2709_defconfig it doesn't actually get activated because it's prerequisites are not met.
I was able to fix these issues by adding the following two config options to bcm2709_defconfig:
CONFIG_MMU=y
CONFIG_ARCH_MULTI_V7=y
Shall I create a PR to add them? Or is there a specific reason these two config option aren't included in bcm2709_defconfig?
Once that was fixed I ran into the following issue, for which I've not yet figured out how to fix it. Any and all suggestions are welcome :)
drivers/mmc/host/bcm2835-sdhost.c: In function 'bcm2835_sdhost_dma_complete':
drivers/mmc/host/bcm2835-sdhost.c:541:10: error: implicit declaration of function 'kmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]
page = kmap_atomic(host->drain_page);
^~~~~~~~~~~
in_atomic
drivers/mmc/host/bcm2835-sdhost.c:541:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
page = kmap_atomic(host->drain_page);
^
drivers/mmc/host/bcm2835-sdhost.c:552:3: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]
kunmap_atomic(page);
^~~~~~~~~~~~~
in_atomic
[edit] I managed to fix this issue by adding CONFIG_BLOCK=y. Seems like MMC_BCM2835_SDHOST is missing this as a dependency?
This then results in the next issue:
ERROR: "snd_rawmidi_set_ops" [sound/soc/bcm/snd-soc-pisound.ko] undefined!
ERROR: "snd_rawmidi_new" [sound/soc/bcm/snd-soc-pisound.ko] undefined!
ERROR: "snd_rawmidi_transmit_peek" [sound/soc/bcm/snd-soc-pisound.ko] undefined!
ERROR: "snd_rawmidi_transmit_ack" [sound/soc/bcm/snd-soc-pisound.ko] undefined!
ERROR: "snd_rawmidi_receive" [sound/soc/bcm/snd-soc-pisound.ko] undefined!
Fixed by enabling CONFIG_SND_DRIVERS which enables the required CONFIG_SND_RAWMIDI because then the following conditions are met:
|| SND_VIRMIDI [=m] && SOUND [=y] && !M68K && !UML && SND [=m] && SND_DRIVERS [=y] && SND_SEQUENCER [=m] ||
Seems to be a missing dependency for SND_PISOUND?