On 11/11/20 8:31 AM, jrun wrote: > hello, > > why things under drivers/gpu/drm get built despite CONFIG_DRM not being set? > > i'm cross compiling for armv7a and pass this as KCONFIG_ALLCONFIG to > allnoconfig: > https://gist.github.com/257/d69a5e95bd42cd7db5f1012703113fd1 > > if i take drm-y as an example; it seems to me that drm-y should only be built if > CONFIG_DRM=y|m according to this line in drivers/gpu/drm/Makefile: > > obj-$(CONFIG_DRM)+= drm.o > > final .config has this: > > # > # Graphics support > # > # CONFIG_IMX_IPUV3_CORE is not set > # CONFIG_DRM is not set > > > thanks in advance for help > -- jrun > Hi, Is this a speed of build issue? Yes, make is descending into multiple directories that are not strictly needed in this kernel config: AR drivers/gpu/drm/arm/built-in.a AR drivers/gpu/drm/rcar-du/built-in.a AR drivers/gpu/drm/omapdrm/dss/built-in.a AR drivers/gpu/drm/omapdrm/displays/built-in.a AR drivers/gpu/drm/omapdrm/built-in.a AR drivers/gpu/drm/tilcdc/built-in.a AR drivers/gpu/drm/imx/built-in.a AR drivers/gpu/drm/i2c/built-in.a AR drivers/gpu/drm/panel/built-in.a AR drivers/gpu/drm/bridge/analogix/built-in.a AR drivers/gpu/drm/bridge/cadence/built-in.a AR drivers/gpu/drm/bridge/synopsys/built-in.a AR drivers/gpu/drm/bridge/built-in.a AR drivers/gpu/drm/hisilicon/built-in.a AR drivers/gpu/drm/tiny/built-in.a AR drivers/gpu/drm/xlnx/built-in.a AR drivers/gpu/drm/built-in.a The built-in.a files that I see being built are all of size 8 bytes. Also, since kconfig still applies normal dependency checks to whatever is in the KCONFIG_ALLCONFIG file [1], I had to modify that file like this: (note that BCM_63XX was misspelled) # CONFIG_VM_EVENT_COUNTERS is not set # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB_MERGE_DEFAULT is not set +CONFIG_MMU=y +CONFIG_ARCH_MULTIPLATFORM=y +# CONFIG_ARCH_MULTI_V5 is not set +# CONFIG_ARCH_MULTI_V4_V5 is not set +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_MULTI_V6_V7=y CONFIG_ARCH_BCM=y -CONFIG_ARCH_BCM63XX=y +CONFIG_ARCH_BCM_63XX=y # CONFIG_ATAGS is not set # CONFIG_SUSPEND is not set # CONFIG_STACKPROTECTOR is not set [1] from Documentation/kbuild/kconfig.rst: This 'KCONFIG_ALLCONFIG' file is a config file which contains (usually a subset of all) preset config symbols. These variable settings are still subject to normal dependency checks. -- ~Randy