Kernel package build module dependency failures (despite existing!) after manual kernel config tweaks: Reasons, how to track down?

Ahoj,

I am observing some strange-for-me-to-understand behaviour.

I have made some custom settings to my the kernel config, and now
make -j1 V=sc package/kernel/linux/compile
fails on several kmod-*-packages with failures like

make[2]: Entering directory '/[...]/package/kernel/linux'
Package kmod-fs-afs is missing dependencies for the following libraries:
dns_resolver.ko
rxrpc.ko

(I have it also with NFS and with some netfilter packages, so also with not so exotic stuff like AFS.)

However, those *.ko-files got build:

find -name 'dns_resolver\.ko' -or -name 'rxrpc\.ko' shows

./staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/lib/modules/5.10.134/dns_resolver.ko
./staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/lib/modules/5.10.134/rxrpc.ko
./build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/linux-5.10.134/net/dns_resolver/dns_resolver.ko
./build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/linux-5.10.134/net/rxrpc/rxrpc.ko

and package/kernel/linux/modules/netfilter.mk contains dependency definitions for kmod-rxrpc and kmod-dnsresolver:

define KernelPackage/fs-afs
  SUBMENU:=$(FS_MENU)
  TITLE:=Andrew FileSystem client
  DEFAULT:=n
  DEPENDS:=+kmod-rxrpc +kmod-dnsresolver +kmod-fs-fscache
  KCONFIG:=\
        CONFIG_AFS_FS=m \
        CONFIG_AFS_DEBUG=n \
        CONFIG_AFS_FSCACHE=y
  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
  AUTOLOAD:=$(call AutoLoad,30,kafs)
endef

What might go wrong here, why is it missing out the files that got build and their dependencies are declared?

How I built:

After configuring my kernel by manually editing target/linux/sunxi/config-5.10 and target/linux/sunxi/cortexa7/config-5.10, I made

  • make target/linux/clean
  • make package/kernel/linux/clean
  • make -j1 V=sc target/linux/compile

which all run through well (the last one did ask me some questions from the linux make oldconfig, though, but then kernel compilation finished without failures). This did also build the *.ko-modules.

make -j1 V=sc package/kernel/linux/compile then fails with the kind of errors mentioned in the beginning.

When I revert my changes it works again. (So I know that I tinkered in a "should not do it"-way, but I don't understand the kind of error that comes out of it. Can anyone explain why this kind of error happens? I don't know about the internals of the OpenWrt build system.)

If anyone wants to dig deeper, my current configs:

  • OpenWrt .config (did build fine before my kernel tunings): → .config
  • git diff -U0 target/linux:
    "*click* to see the listing:
    diff --git a/target/linux/sunxi/config-5.10 b/target/linux/sunxi/config-5.10
    index fa43fa248d..e908b99e68 100644
    --- a/target/linux/sunxi/config-5.10
    +++ b/target/linux/sunxi/config-5.10
    @@ -28,0 +29 @@ CONFIG_ARM_CCI400_PORT_CTRL=y
    +CONFIG_ARM_CPUIDLE=y
    @@ -34,0 +36 @@ CONFIG_ARM_HEAVY_MB=y
    +# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
    @@ -37,0 +40 @@ CONFIG_ARM_LPAE=y
    +CONFIG_ARM_MODULE_PLTS=y
    @@ -49,0 +53,2 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y
    +CONFIG_BACKLIGHT_GPIO=y
    +CONFIG_BACKLIGHT_LED=y
    @@ -50,0 +56,2 @@ CONFIG_BACKLIGHT_PWM=y
    +CONFIG_BINFMT_ELF_FDPIC=y
    +CONFIG_BINFMT_FLAT=y
    @@ -51,0 +59,4 @@ CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
    +CONFIG_BINFMT_FLAT_OLD=y
    +CONFIG_BINFMT_MISC=y
    +CONFIG_BINFMT_SHARED_FLAT=y
    +CONFIG_BINFMT_ZFLAT=y
    @@ -55,0 +67 @@ CONFIG_BLK_SCSI_REQUEST=y
    +CONFIG_BOOT_CONFIG=y
    @@ -58,0 +71 @@ CONFIG_CAN=y
    +# CONFIG_CEC_CH7322 is not set
    @@ -66,0 +80 @@ CONFIG_CLONE_BACKWARDS=y
    +CONFIG_CMDLINE_PARTITION=y
    @@ -85 +99 @@ CONFIG_CPU_FREQ=y
    -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
    +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
    @@ -91,0 +106 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
    +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
    @@ -94,0 +110,5 @@ CONFIG_CPU_HAS_ASID=y
    +CONFIG_CPU_IDLE=y
    +CONFIG_CPU_IDLE_GOV_LADDER=yes
    +CONFIG_CPU_IDLE_GOV_MENU=y
    +CONFIG_CPU_IDLE_GOV_TEO=y
    +CONFIG_CPU_ISOLATION=y
    @@ -104,0 +125,2 @@ CONFIG_CRC_T10DIF=y
    +CONFIG_CROSS_MEMORY_ATTACH=y
    +CONFIG_CRYPTO_AES_ARM=y
    @@ -106,0 +129 @@ CONFIG_CRYPTO_CRC32C=y
    +CONFIG_CRYPTO_CRC32_ARM_CE=y
    @@ -113 +136,5 @@ CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y
    -# CONFIG_CRYPTO_DEV_SUN8I_CE is not set
    +CONFIG_CRYPTO_DEV_SUN8I_CE=y
    +CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG=y
    +CONFIG_CRYPTO_DEV_SUN8I_CE_HASH=y
    +CONFIG_CRYPTO_DEV_SUN8I_CE_PRNG=y
    +CONFIG_CRYPTO_DEV_SUN8I_CE_TRNG=y
    @@ -117,0 +145 @@ CONFIG_CRYPTO_MD5=y
    +CONFIG_CRYPTO_POLY1305_ARM=y
    @@ -120,0 +149,3 @@ CONFIG_CRYPTO_SHA1=y
    +CONFIG_CRYPTO_SHA1_ARM=y
    +CONFIG_CRYPTO_SHA256_ARM=y
    +CONFIG_CRYPTO_SHA512_ARM=y
    @@ -124,0 +156,2 @@ CONFIG_DEBUG_MEMORY_INIT=y
    +CONFIG_DEBUG_USER=y
    +CONFIG_DEVMEM=y
    @@ -133,0 +167 @@ CONFIG_DNOTIFY=y
    +# CONFIG_DPM_WATCHDOG is not set
    @@ -138 +172 @@ CONFIG_DWMAC_GENERIC=y
    -# CONFIG_DWMAC_SUN8I is not set
    +CONFIG_DWMAC_SUN8I=y
    @@ -144,0 +179 @@ CONFIG_ENABLE_MUST_CHECK=y
    +CONFIG_ENERGY_MODEL=y
    @@ -157,0 +193,3 @@ CONFIG_FB_SIMPLE=y
    +CONFIG_FB_TFT_ILI9340=y
    +CONFIG_FB_TFT_ILI9341=y
    +CONFIG_FB_TFT_ILI9481=y
    @@ -158,0 +197,3 @@ CONFIG_FB_TILEBLITTING=y
    +CONFIG_FB_UDL=y
    +CONFIG_FIRMWARE_EDID=y
    +CONFIG_FIRMWARE_MEMMAP=y
    @@ -161,2 +202,13 @@ CONFIG_FIX_EARLYCON_MEM=y
    -CONFIG_FONT_8x16=y
    -CONFIG_FONT_8x8=y
    +CONFIG_FONTS=y
    +# CONFIG_FONT_10x18 is not set
    +# CONFIG_FONT_6x10 is not set
    +# CONFIG_FONT_6x11 is not set
    +CONFIG_FONT_6x8=y
    +# CONFIG_FONT_7x14 is not set
    +# CONFIG_FONT_8x16 is not set
    +# CONFIG_FONT_8x8 is not set
    +# CONFIG_FONT_ACORN_8x8 is not set
    +CONFIG_FONT_MINI_4x6=y
    +# CONFIG_FONT_PEARL_8x8 is not set
    +# CONFIG_FONT_SUN12x22 is not set
    +# CONFIG_FONT_SUN8x16 is not set
    @@ -164,0 +217 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
    +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y
    @@ -165,0 +219 @@ CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
    +CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION=y
    @@ -172,0 +227 @@ CONFIG_FW_CACHE=y
    +CONFIG_FW_LOADER_COMPRESS=y
    @@ -173,0 +229 @@ CONFIG_FW_LOADER_PAGED_BUF=y
    +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
    @@ -183,0 +240 @@ CONFIG_GENERIC_IRQ_CHIP=y
    +CONFIG_GENERIC_IRQ_DEBUGFS=y
    @@ -208,0 +266,3 @@ CONFIG_HAVE_SMP=y
    +CONFIG_HIBERNATION=y
    +CONFIG_HIBERNATION_SNAPSHOT_DEV=y
    +CONFIG_HID_WACOM=m
    @@ -224,0 +285,3 @@ CONFIG_IIO=y
    +CONFIG_IKCONFIG=y
    +CONFIG_IKCONFIG_PROC=y
    +CONFIG_IKHEADERS=y
    @@ -232,0 +296 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
    +CONFIG_INPUT_PWM_BEEPER=y
    @@ -233,0 +298 @@ CONFIG_INPUT_TOUCHSCREEN=y
    +CONFIG_IPC_NS=y
    @@ -239,0 +305 @@ CONFIG_JBD2=y
    +CONFIG_JUMP_LABEL=y
    @@ -240,0 +307,2 @@ CONFIG_KALLSYMS=y
    +CONFIG_KCMP=y
    +CONFIG_KEXEC=y
    @@ -241,0 +310 @@ CONFIG_KEYBOARD_SUN4I_LRADC=y
    +CONFIG_KEY_NOTIFICATIONS=y
    @@ -245,0 +315,8 @@ CONFIG_LEDS_GPIO=y
    +CONFIG_LEDS_TRIGGER_AUDIO=y
    +CONFIG_LEDS_TRIGGER_BACKLIGHT=y
    +CONFIG_LEDS_TRIGGER_CAMERA=y
    +CONFIG_LEDS_TRIGGER_CPU=y
    +CONFIG_LEDS_TRIGGER_DISK=y
    +CONFIG_LEDS_TRIGGER_MTD=y
    +CONFIG_LEDS_TRIGGER_PANIC=y
    +CONFIG_LEDS_TRIGGER_PATTERN=y
    @@ -249 +325,0 @@ CONFIG_LOCK_SPIN_ON_OWNER=y
    -CONFIG_LOGO=y
    @@ -252,0 +329 @@ CONFIG_LOGO_LINUX_VGA16=y
    +CONFIG_LOG_BUF_SHIFT=22
    @@ -259,0 +337 @@ CONFIG_MAGIC_SYSRQ=y
    +CONFIG_MAX_RAW_DEVS=256
    @@ -266,0 +345,2 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y
    +CONFIG_MEDIA_CEC_SUPPORT=y
    +# CONFIG_MEDIA_CONTROLLER_DVB is not set
    @@ -274,0 +355 @@ CONFIG_MEMFD_CREATE=y
    +CONFIG_MEMTEST=y
    @@ -286,0 +368,5 @@ CONFIG_MODULES_USE_ELF_REL=y
    +CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
    +CONFIG_MODULE_FORCE_LOAD=y
    +CONFIG_MODULE_FORCE_UNLOAD=y
    +# CONFIG_MODULE_STRIPPED is not set
    +CONFIG_MODVERSIONS=y
    @@ -290,0 +377 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y
    +CONFIG_NAMESPACES=y
    @@ -293,0 +381 @@ CONFIG_NET_FLOW_LIMIT=y
    +CONFIG_NET_NS=y
    @@ -320,0 +409 @@ CONFIG_PAGE_POOL=y
    +CONFIG_PANIC_TIMEOUT=10
    @@ -330,0 +420 @@ CONFIG_PHY_SUN9I_USB=y
    +CONFIG_PID_NS=y
    @@ -355,0 +446,2 @@ CONFIG_PM=y
    +CONFIG_PM_ADVANCED_DEBUG=y
    +CONFIG_PM_AUTOSLEEP=y
    @@ -356,0 +449 @@ CONFIG_PM_CLK=y
    +CONFIG_PM_DEBUG=y
    @@ -359,0 +453,5 @@ CONFIG_PM_SLEEP_SMP=y
    +# CONFIG_PM_TEST_SUSPEND is not set
    +CONFIG_PM_WAKELOCKS=y
    +CONFIG_PM_WAKELOCKS_GC=y
    +CONFIG_PM_WAKELOCKS_LIMIT=512
    +CONFIG_POSIX_MQUEUE=y
    @@ -362,0 +461 @@ CONFIG_PPS=y
    +CONFIG_PRINTK_CALLER=y
    @@ -370,0 +470,8 @@ CONFIG_RATIONAL=y
    +CONFIG_RAW_DRIVER=y
    +CONFIG_RD_BZIP2=y
    +CONFIG_RD_GZIP=y
    +CONFIG_RD_LZ4=y
    +CONFIG_RD_LZMA=y
    +CONFIG_RD_LZO=y
    +CONFIG_RD_XZ=y
    +CONFIG_RD_ZSTD=y
    @@ -387,0 +495 @@ CONFIG_RPS=y
    +CONFIG_RSEQ=y
    @@ -390,0 +499 @@ CONFIG_SATA_PMP=y
    +CONFIG_SCHED_MC=y
    @@ -392,0 +502 @@ CONFIG_SDIO_UART=y
    +CONFIG_SECCOMP=y
    @@ -402,0 +513,2 @@ CONFIG_SERIO=y
    +CONFIG_SERIO_GPIO_PS2=y
    +CONFIG_SERIO_RAW=y
    @@ -407,0 +520,3 @@ CONFIG_SND=y
    +CONFIG_SND_ALOOP=y
    +CONFIG_SND_ARM=y
    +CONFIG_SND_AUDIO_GRAPH_CARD=y
    @@ -408,0 +524,2 @@ CONFIG_SND_COMPRESS_OFFLOAD=y
    +CONFIG_SND_HRTIMER=y
    +CONFIG_SND_HWDEP=y
    @@ -410,0 +528 @@ CONFIG_SND_JACK_INPUT_DEV=y
    +CONFIG_SND_MIXER_OSS=y
    @@ -411,0 +530,6 @@ CONFIG_SND_PCM=y
    +CONFIG_SND_PCM_OSS=y
    +CONFIG_SND_PCM_TIMER=y
    +CONFIG_SND_SEQUENCER=y
    +CONFIG_SND_SEQUENCER_OSS=y
    +CONFIG_SND_SEQ_DUMMY=y
    +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
    @@ -416,4 +540,5 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
    -# CONFIG_SND_SUN4I_I2S is not set
    -# CONFIG_SND_SUN4I_SPDIF is not set
    -# CONFIG_SND_SUN8I_CODEC is not set
    -# CONFIG_SND_SUN8I_CODEC_ANALOG is not set
    +CONFIG_SND_SUN4I_CODEC=y
    +CONFIG_SND_SUN4I_I2S=y
    +CONFIG_SND_SUN4I_SPDIF=y
    +CONFIG_SND_SUN8I_CODEC=y
    +CONFIG_SND_SUN8I_CODEC_ANALOG=y
    @@ -428,0 +554,2 @@ CONFIG_SRCU=y
    +CONFIG_STACKPROTECTOR=y
    +CONFIG_STAGING_MEDIA=y
    @@ -433 +560 @@ CONFIG_SUN4I_A10_CCU=y
    -# CONFIG_SUN4I_EMAC is not set
    +CONFIG_SUN4I_EMAC=y
    @@ -468,0 +596 @@ CONFIG_TIMER_PROBE=y
    +CONFIG_TINYDRM_ILI9341=y
    @@ -471,0 +600,19 @@ CONFIG_TOUCHSCREEN_SUN4I=y
    +CONFIG_TOUCHSCREEN_USB_3M=y
    +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
    +CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
    +CONFIG_TOUCHSCREEN_USB_E2I=y
    +CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y
    +CONFIG_TOUCHSCREEN_USB_EGALAX=y
    +CONFIG_TOUCHSCREEN_USB_ELO=y
    +CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y
    +CONFIG_TOUCHSCREEN_USB_ETURBO=y
    +CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
    +CONFIG_TOUCHSCREEN_USB_GOTOP=y
    +CONFIG_TOUCHSCREEN_USB_GUNZE=y
    +CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
    +CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
    +CONFIG_TOUCHSCREEN_USB_ITM=y
    +CONFIG_TOUCHSCREEN_USB_JASTEC=y
    +CONFIG_TOUCHSCREEN_USB_NEXIO=y
    +CONFIG_TOUCHSCREEN_USB_PANJIT=y
    +CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y
    @@ -473,0 +621,3 @@ CONFIG_TREE_SRCU=y
    +CONFIG_UCLAMP_BUCKETS_COUNT=5
    +CONFIG_UCLAMP_TASK=y
    +# CONFIG_UCLAMP_TASK_GROUP is not set
    @@ -474,0 +625 @@ CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
    +CONFIG_UNUSED_SYMBOLS=y
    @@ -478 +628,0 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
    -# CONFIG_USB_AUDIO is not set
    @@ -487,0 +638,2 @@ CONFIG_USB_OHCI_HCD_PLATFORM=y
    +# CONFIG_USB_PULSE8_CEC is not set
    +# CONFIG_USB_RAINSHADOW_CEC is not set
    @@ -490,0 +643,2 @@ CONFIG_USB_SUPPORT=y
    +CONFIG_USELIB=y
    +CONFIG_USERFAULTFD=y
    @@ -491,0 +646 @@ CONFIG_USERIO=y
    +CONFIG_USER_NS=y
    @@ -492,0 +648,2 @@ CONFIG_USE_OF=y
    +CONFIG_UTS_NS=y
    +CONFIG_V4L_MEM2MEM_DRIVERS=y
    @@ -499,2 +656,7 @@ CONFIG_VHOST_NET=y
    -# CONFIG_VIDEO_SUN4I_CSI is not set
    -# CONFIG_VIDEO_SUN6I_CSI is not set
    +CONFIG_VIDEO_MEM2MEM_DEINTERLACE=y
    +CONFIG_VIDEO_SUN4I_CSI=y
    +CONFIG_VIDEO_SUN6I_CSI=y
    +CONFIG_VIDEO_SUN8I_DEINTERLACE=y
    +CONFIG_VIDEO_SUN8I_ROTATE=y
    +CONFIG_VIDEO_SUNXI=y
    +CONFIG_VIDEO_SUNXI_CEDRUS=m
    @@ -505,0 +668 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
    +CONFIG_WARN_ALL_UNSEEDED_RANDOM=y
    @@ -506,0 +670 @@ CONFIG_WATCHDOG_CORE=y
    +CONFIG_WATCH_QUEUE=y
    @@ -510,0 +675 @@ CONFIG_XZ_DEC_BCJ=y
    +CONFIG_Z3FOLD=y
    @@ -512,0 +678,4 @@ CONFIG_ZBOOT_ROM_TEXT=0
    +CONFIG_ZBUD=y
    +CONFIG_ZPOOL=y
    +CONFIG_ZSMALLOC=y
    +CONFIG_ZSMALLOC_STAT=y
    diff --git a/target/linux/sunxi/cortexa7/config-5.10 b/target/linux/sunxi/cortexa7/config-5.10
    index 90e977b566..3d03dad767 100644
    --- a/target/linux/sunxi/cortexa7/config-5.10
    +++ b/target/linux/sunxi/cortexa7/config-5.10
    @@ -2,0 +3,8 @@ CONFIG_B53_MDIO_DRIVER=y
    +CONFIG_CFG80211_CERTIFICATION_ONUS=y
    +CONFIG_CFG80211_CRDA_SUPPORT=y
    +CONFIG_CFG80211_DEBUGFS=y
    +CONFIG_CFG80211_REG_CELLULAR_HINTS=y
    +CONFIG_CFG80211_REG_RELAX_NO_IR=y
    +CONFIG_CFG80211_WEXT=y
    +CONFIG_CFG80211_WEXT_EXPORT=y
    +CONFIG_CRYPTO_AES_ARM_BS=y
    @@ -3,0 +12,3 @@ CONFIG_CRYPTO_BLAKE2S=y
    +CONFIG_CRYPTO_CHACHA20_NEON=y
    +CONFIG_CRYPTO_CURVE25519_NEON=y
    +CONFIG_CRYPTO_GHASH_ARM_CE=y
    @@ -4,0 +16,2 @@ CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
    +CONFIG_CRYPTO_NHPOLY1305_NEON=y
    +CONFIG_CRYPTO_SHA1_ARM_NEON=y
    @@ -6,0 +20,3 @@ CONFIG_GRO_CELLS=y
    +CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
    +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
    +CONFIG_KERNEL_MODE_NEON=y
    @@ -8,0 +25,4 @@ CONFIG_GRO_CELLS=y
    +# CONFIG_MACH_SUN6I is not set
    +# CONFIG_MACH_SUN7I is not set
    +# CONFIG_MACH_SUN5I is not set
    +# CONFIG_MACH_SUN9I is not set
    @@ -11,0 +32 @@ CONFIG_MUSB_PIO_ONLY=y
    +CONFIG_NEON=y
    @@ -19,0 +41 @@ CONFIG_NOP_USB_XCEIV=y
    +CONFIG_R8188EU=y
    @@ -20,0 +43,6 @@ CONFIG_RTC_DRV_SUN6I=y
    +CONFIG_RTLLIB=m
    +CONFIG_RTLLIB_CRYPTO_CCMP=m
    +CONFIG_RTLLIB_CRYPTO_TKIP=m
    +CONFIG_RTLLIB_CRYPTO_WEP=m
    +CONFIG_RTL8XXXU=y
    +CONFIG_RTL8XXXU_UNTESTED=y
    @@ -26,0 +55 @@ CONFIG_USB_PHY=y
    +CONFIG_NEON=y
    

Regards!