{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/2366","repository_url":"https://api.github.com/repos/raspberrypi/linux","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/2366/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/2366/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/2366/events","html_url":"https://github.com/raspberrypi/linux/issues/2366","id":294192949,"number":2366,"title":"Minimal kernel config created from bcm2709_defconfig using allnoconfig fails to compile","user":{"login":"simonvanderveldt","id":204286,"avatar_url":"https://avatars0.githubusercontent.com/u/204286?v=4","gravatar_id":"","url":"https://api.github.com/users/simonvanderveldt","html_url":"https://github.com/simonvanderveldt","followers_url":"https://api.github.com/users/simonvanderveldt/followers","following_url":"https://api.github.com/users/simonvanderveldt/following{/other_user}","gists_url":"https://api.github.com/users/simonvanderveldt/gists{/gist_id}","starred_url":"https://api.github.com/users/simonvanderveldt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonvanderveldt/subscriptions","organizations_url":"https://api.github.com/users/simonvanderveldt/orgs","repos_url":"https://api.github.com/users/simonvanderveldt/repos","events_url":"https://api.github.com/users/simonvanderveldt/events{/privacy}","received_events_url":"https://api.github.com/users/simonvanderveldt/received_events","type":"User","site_admin":false},"labels":[{"id":607830384,"url":"https://api.github.com/repos/raspberrypi/linux/labels/Waiting%20for%20internal%20comment","name":"Waiting for internal comment","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2018-02-04T12:20:29Z","updated_at":"2018-04-23T09:45:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When trying to build a minimal kernel from `bcm2709_defconfig` using `allnoconfig` the resulting configuration doesn't compile.\r\n\r\n[`allnoconfig`](https://github.com/raspberrypi/linux/blob/rpi-4.9.y/Documentation/kbuild/kconfig.txt#L75) 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.\r\nIt can be executed in the following way to generate a minimal config based on `bcm2709_defconfig`:\r\n```\r\nmake ARCH=arm KCONFIG_ALLCONFIG=arch/arm/configs/bcm2709_defconfig allnoconfig\r\n```\r\nNow when compiling the generated `.config` I ran into several of these errors:\r\n```\r\n/tmp/ccholjfv.s: Assembler messages:\r\n/tmp/ccholjfv.s:67: Error: selected processor does not support requested special purpose register -- `mrs r3,cpsr'\r\n/tmp/ccholjfv.s:75: Error: selected processor does not support requested special purpose register -- `msr cpsr_c,r3'\r\n```\r\n\r\nDoing 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`](https://github.com/raspberrypi/linux/blob/a29fe9d2366b1700bf1015044e561108a5fa29df/arch/arm/configs/bcm2709_defconfig#L41) it doesn't actually get activated because it's prerequisites are not met.\r\n\r\nI was able to fix these issues by adding the following two config options to `bcm2709_defconfig`:\r\n```\r\nCONFIG_MMU=y\r\nCONFIG_ARCH_MULTI_V7=y\r\n```\r\nShall I create a PR to add them? Or is there a specific reason these two config option aren't included in `bcm2709_defconfig`?\r\n\r\nOnce 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 :)\r\n```\r\ndrivers/mmc/host/bcm2835-sdhost.c: In function 'bcm2835_sdhost_dma_complete':\r\ndrivers/mmc/host/bcm2835-sdhost.c:541:10: error: implicit declaration of function 'kmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]\r\n   page = kmap_atomic(host->drain_page);\r\n          ^~~~~~~~~~~\r\n          in_atomic\r\ndrivers/mmc/host/bcm2835-sdhost.c:541:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]\r\n   page = kmap_atomic(host->drain_page);\r\n        ^\r\ndrivers/mmc/host/bcm2835-sdhost.c:552:3: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]\r\n   kunmap_atomic(page);\r\n   ^~~~~~~~~~~~~\r\n   in_atomic\r\n```\r\n[edit] I managed to fix this issue by adding `CONFIG_BLOCK=y`. Seems like [`MMC_BCM2835_SDHOST`](https://github.com/raspberrypi/linux/blob/rpi-4.9.y/drivers/mmc/host/Kconfig#L36) is missing this as a dependency?\r\n\r\nThis then results in the next issue:\r\n```\r\nERROR: \"snd_rawmidi_set_ops\" [sound/soc/bcm/snd-soc-pisound.ko] undefined!\r\nERROR: \"snd_rawmidi_new\" [sound/soc/bcm/snd-soc-pisound.ko] undefined!\r\nERROR: \"snd_rawmidi_transmit_peek\" [sound/soc/bcm/snd-soc-pisound.ko] undefined!\r\nERROR: \"snd_rawmidi_transmit_ack\" [sound/soc/bcm/snd-soc-pisound.ko] undefined!\r\nERROR: \"snd_rawmidi_receive\" [sound/soc/bcm/snd-soc-pisound.ko] undefined!\r\n```\r\nFixed by enabling `CONFIG_SND_DRIVERS` which enables the required `CONFIG_SND_RAWMIDI` because then the following conditions are met:\r\n```\r\n|| SND_VIRMIDI [=m] && SOUND [=y] && !M68K && !UML && SND [=m] && SND_DRIVERS [=y] && SND_SEQUENCER [=m] ||\r\n```\r\nSeems to be a missing dependency for [`SND_PISOUND`](https://github.com/raspberrypi/linux/blob/rpi-4.9.y/sound/soc/bcm/Kconfig#L192)?"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/383517619","html_url":"https://github.com/raspberrypi/linux/issues/2366#issuecomment-383517619","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/2366","id":383517619,"user":{"login":"pelwell","id":8911409,"avatar_url":"https://avatars3.githubusercontent.com/u/8911409?v=4","gravatar_id":"","url":"https://api.github.com/users/pelwell","html_url":"https://github.com/pelwell","followers_url":"https://api.github.com/users/pelwell/followers","following_url":"https://api.github.com/users/pelwell/following{/other_user}","gists_url":"https://api.github.com/users/pelwell/gists{/gist_id}","starred_url":"https://api.github.com/users/pelwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelwell/subscriptions","organizations_url":"https://api.github.com/users/pelwell/orgs","repos_url":"https://api.github.com/users/pelwell/repos","events_url":"https://api.github.com/users/pelwell/events{/privacy}","received_events_url":"https://api.github.com/users/pelwell/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T09:45:13Z","updated_at":"2018-04-23T09:45:13Z","author_association":"CONTRIBUTOR","body":"We'll consider all Pull Requests, but we're generally reluctant to take on maintenance of files - drivers, configurations etc. - that we don't use and therefore don't get tested. A clear statement of what constitutes a minimal configuration would help to persuade me, as would an offer of assistance when bringing up new kernels."}}
{"actor":{"display_login":"pelwell"}}