-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Kernel build error when disabling "Enable loadable module support" with bcm2711_defconfig #3873
Comments
It looks like we've gained a dodgy bit in the downstream patch
It shouldn't have
as that is now in cs42xx8.c 5e4cb7b "ASoC: cs42xx8: Setup of_match_table" looks to have been the upstream patch adding the usage of cs42xx8_of_match to cs42xx8-i2c.c |
Congrats, glad you figured out everything about this issue 👍 PS : I noticed that both cs42xx8.c and cs42xx8-i2c.c are different (using mainline cs42xx8-i2c.c implies using mainline cs42xx8.c (for being able to build with and without CONFIG_MODULES) Around line 520 of mainline cs42xx8.c
On raspberrypi kernel
|
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
I've pushed a fix to the 5.4 tree - if it works for you I'll replicate it across the other branches. The downstream patch you noticed is necessary to ensure that the correct module is loaded - without it, the kernel can load the core driver instead of the I2C shim, causing the I2C driver to never be instantiated. |
Thanks, Just tested running on RPi4 by building with "CONFIG_MODULES" option disabled : it builds fine (no build error), the big resulting kernel embedding every module works fine (with HDMI and audio jack working). In order to get it booting I had to disable "CONFIG_GAMEPORT" and Generic sound devices (CONFIG_SND_DRIVERS) which is located in menuconfig at Device Drivers -> Sound card support -> Advanced Linux Sound Architecture -> Generic sound devices. But this is probably unrelated. I'm going to test with standard build (with separated modules dynamically loaded by the OS) and keep you informed, just to be double sure that audio isn't broken for normal users ;) at least for RPi4 |
Double check completed, build and works fine with both CONFIG_MODULES enabled and disabled, using HDMI and audio jack (at least on Pi4 with using 64 bit kernel, downloaded few minutes ago with git clone --depth=1 --branch rpi-5.4.y https://github.com/raspberrypi/linux) 👍 |
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Thanks for the update - the fix has been replicated to rpi-5.8.y and rpi-5.9.y. Please close the issue if you're happy the matter has been resolved. |
Perfect! During this attempt, I didn't get the USB ports working, but I guess this is something else that is being worked in rpi-5.9.y |
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
kernel: overlays: Update display GPIO declarations kernel: Update hy28b-overlay.dts See: raspberrypi/linux#3880 kernel: net: bcmgenet: Reset RBUF on first open See: raspberrypi/linux#3850 kernel: ASoC: cs42xx8: Only define cs42xx8_of_match once See: raspberrypi/linux#3873 kernel: bcm2835-codec fixes See: raspberrypi/linux#3877 kernel: usb/dwc2: Set correct state on gadget disconnect kernel: USB: gadget: f_hid: avoid crashes and log spam See: raspberrypi/linux#3870 firmware: arm_loader: enable simple_fb iff there is a display See: raspberrypi/linux#3878 firmware: arm_loader: Mark V3D early boost as for the ARM See: #1469
kernel: overlays: Update display GPIO declarations kernel: Update hy28b-overlay.dts See: raspberrypi/linux#3880 kernel: net: bcmgenet: Reset RBUF on first open See: raspberrypi/linux#3850 kernel: ASoC: cs42xx8: Only define cs42xx8_of_match once See: raspberrypi/linux#3873 kernel: bcm2835-codec fixes See: raspberrypi/linux#3877 kernel: usb/dwc2: Set correct state on gadget disconnect kernel: USB: gadget: f_hid: avoid crashes and log spam See: raspberrypi/linux#3870 firmware: arm_loader: enable simple_fb iff there is a display See: raspberrypi/linux#3878 firmware: arm_loader: Mark V3D early boost as for the ARM See: raspberrypi/firmware#1469
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module support is disabled. It would be tidy to use the exported match table in cs42xx8.c's of_match_table member, but an imported symbol can't be used in a module's MODULE_DEVICE_TABLE declaration. Instead, rename the duplicated declarations so as not to clash. See: #3873 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Hi all
I'm working on some custom project which implies building very recent kernel versions (5.4 to 5.9), embedding required modules - without having the OS loading separated *.ko modules. So I'm using "Enable loadable module support" (which is "CONFIG_MODULES") option, setting it to disabled.
It is building and working on untouched kernel.org kernels, and also android kernel 5.4 from google, but not building using raspberrypi kernel (at least 5.4.y to 5.9.y included). This means the error has been introduced into raspberrypi/linux code somewhere
The error I get is :
To reproduce
From an x86_64 computer :
As a workaround - if no sound is needed
As the problem is about sound stuff, I can use menuconfig, go to Device Drivers, disabling "Sound card support" (which is CONFIG_SOUND) and the kernel successfully builds.
Hoping this feedback can help you to correct some issue and improve this work!
Best regards
The text was updated successfully, but these errors were encountered: