[BUG] Module name conflict: wave511 downstream driver and upstream wave5

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[BUG] Module name conflict: wave511 downstream driver and upstream wave5

327 Views
matheus_barbosa_tdx
Contributor II

Hello,

The NXP Wave511 VPU driver in the lf-6.18.20-2.0.0 kernel (6.18.y) builds a module with the same name as the mainline Chips&Media Wave5 driver. Any config that enables both, such as allmodconfig or allyesconfig, fails the build.

 

Details:

- Upstream driver (in mainline since v6.8):

drivers/media/platform/chips-media/wave5/
   obj-$(CONFIG_VIDEO_WAVE_VPU) += wave5.o


- NXP driver:

drivers/mxc/vpu/wave511/
   obj-$(CONFIG_MXC_VIDEO_WAVE511) += wave5.o
   obj-$(CONFIG_MXC_VIDEO_WAVE511_CTRL) += wave5-ctrl.o

 

The two Kconfig symbols are independent, so both modules can be enabled together. Kbuild then stops with:

error: the following would cause module name conflict:
drivers/media/platform/chips-media/wave5/wave5.ko
drivers/mxc/vpu/wave511/wave5.ko

Even where the check isn't hit, modules_install would overwrite one wave5.ko with the other.

The drivers bind different compatibles (ti,j721s2-wave521c and nxp,wave511-vpu), so only the module name collides.

Steps to reproduce:

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- allmodconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) modules

 

Could that be fixed in an upcoming Linux IMX release?

 

Thank you in advance for your support,

Matheus Barbosa

Toradex

0 Kudos
Reply
4 Replies

293 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

This issue have not been reported before and there are no plans to implement a solution yet.

Which processor are you using?

Did you try to disabling one Kconfig option or locally renaming the module?

Best regards.

0 Kudos
Reply

283 Views
matheus_barbosa_tdx
Contributor II

Hello,

I'm adding the Wave511 driver to support i.MX952 at Toradex BSP, although the processor in use is not relevant for the bug reported in the downstream kernel.

We build the kernel with a shared config for all ARM64 SoCs that are supported by our BSP, its a super set that enables many modules. That includes CONFIG_VIDEO_WAVE_VPU.

This is the kernel driver present at mainline that installs "wave5.ko" to modules directory.

 

I've created a workaround 

Since it is not possible to enable WAVE511 driver in that common config, I've done that just for i.MX SoCs and disabled CONFIG_VIDEO_WAVE_VPU for them as well.

 

I've disabled CONFIG_VIDEO_WAVE_VPU at our OE layer for the i.MX processors to allow enabling CONFIG_MXC_VIDEO_WAVE511 as a module for now.

 

It is expected that allmodconfig build cleanly, and the current downstream driver breaks this. That is the reason I'm reporting it.

0 Kudos
Reply

23 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Please check the update from internal team:

I reproduced this on a clean checkout of lf-6.18.20-2.0.0 (nxp-imx/linux-imx) and confirmed the root cause matches the ticket exactly:

Upstream drivers/media/platform/chips-media/wave5/Makefile: obj-$(CONFIG_VIDEO_WAVE_VPU) += wave5.o
NXP drivers/mxc/vpu/wave511/Makefile: obj-$(CONFIG_MXC_VIDEO_WAVE511) += wave5.o

Both Kconfig symbols are independent, so allmodconfig/allyesconfig selects both and scripts/modules-check.sh aborts with the reported error. I reproduced the exact error text by feeding the script a modules.order containing the two real module paths – byte-identical to what's quoted in the ticket. Also checked the newer lf-6.18.37-2.1.0 tag: the collision is still present there.

Recommended fix: rename the NXP module's build target in drivers/mxc/vpu/wave511/Makefile from wave5.o/wave5-ctrl.o to wave511.o/wave511-ctrl.o. Source filenames are untouched – this is a one-file Makefile change with no functional/behavioral impact on the driver. I verified it builds cleanly and that scripts/modules-check.sh no longer flags a conflict with this change in place.

I considered the alternative of adding depends on !VIDEO_WAVE_VPU to the NXP Kconfig instead, but a module rename is the more durable fix long-term: it resolves the actual naming collision rather than relying on mutual exclusion (which would silently drop one driver under allmodconfig/allyesconfig and could mask real build issues), and it stays correct even if a future board combines both IP blocks.

Only downstream impact: anything that hardcodes modprobe wave5 / wave5.ko for the NXP Wave511 driver (e.g. a yocto recipe or rootfs module-load config) would need to reference wave511.ko instead. I did not find any such reference inside this kernel tree.

Patch will be provided internally for review.

Best regards.

0 Kudos
Reply

264 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Thank you for the details, I reported this with internal team.

I will update you further actions in our side as soon as possible.

Best regards.

%3CLINGO-SUB%20id%3D%22lingo-sub-2421070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EThe%20NXP%20Wave511%20VPU%20driver%20in%20the%20lf-6.18.20-2.0.0%20kernel%20(6.18.y)%20builds%20a%20module%20with%20the%20same%20name%20as%20the%20mainline%20Chips%26amp%3BMedia%20Wave5%20driver.%20Any%20config%20that%20enables%20both%2C%20such%20as%20%3CEM%3Eallmodconfig%3C%2FEM%3E%20or%20%3CEM%3Eallyesconfig%3C%2FEM%3E%2C%20fails%20the%20build.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EDetails%3A%3C%2FP%3E%3CP%3E-%20Upstream%20driver%20(in%20mainline%20since%20v6.8)%3A%3C%2FP%3E%3CPRE%3Edrivers%2Fmedia%2Fplatform%2Fchips-media%2Fwave5%2F%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3Bobj-%24(CONFIG_VIDEO_WAVE_VPU)%20%2B%3D%20wave5.o%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3E-%20NXP%20driver%3A%3C%2FP%3E%3CPRE%3Edrivers%2Fmxc%2Fvpu%2Fwave511%2F%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3Bobj-%24(CONFIG_MXC_VIDEO_WAVE511)%20%2B%3D%20wave5.o%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3Bobj-%24(CONFIG_MXC_VIDEO_WAVE511_CTRL)%20%2B%3D%20wave5-ctrl.o%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EThe%20two%20Kconfig%20symbols%20are%20independent%2C%20so%20both%20modules%20can%20be%20enabled%20together.%20Kbuild%20then%20stops%20with%3A%3C%2FP%3E%3CPRE%3Eerror%3A%20the%20following%20would%20cause%20module%20name%20conflict%3A%3CBR%20%2F%3E%20%20%20drivers%2Fmedia%2Fplatform%2Fchips-media%2Fwave5%2Fwave5.ko%3CBR%20%2F%3E%20%20%20drivers%2Fmxc%2Fvpu%2Fwave511%2Fwave5.ko%3C%2FPRE%3E%3CP%3EEven%20where%20the%20check%20isn't%20hit%2C%20%3CEM%3Emodules_install%3C%2FEM%3E%20would%20overwrite%20one%20%3CEM%3Ewave5.ko%3C%2FEM%3E%20with%20the%20other.%3C%2FP%3E%3CP%3EThe%20drivers%20bind%20different%20compatibles%20(%3CEM%3Eti%2Cj721s2-wave521c%3C%2FEM%3E%20and%20%3CEM%3Enxp%2Cwave511-vpu%3C%2FEM%3E)%2C%20so%20only%20the%20module%20name%20collides.%3C%2FP%3E%3CP%3ESteps%20to%20reproduce%3A%3C%2FP%3E%3CPRE%3Emake%20ARCH%3Darm64%20CROSS_COMPILE%3Daarch64-linux-gnu-%20allmodconfig%3CBR%20%2F%3Emake%20ARCH%3Darm64%20CROSS_COMPILE%3Daarch64-linux-gnu-%20-j%24(nproc)%20modules%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3ECould%20that%20be%20fixed%20in%20an%20upcoming%20Linux%20IMX%20release%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThank%20you%20in%20advance%20for%20your%20support%2C%3C%2FP%3E%3CP%3EMatheus%20Barbosa%3C%2FP%3E%3CP%3EToradex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2421070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208%20Family%20%7C%20i.MX%208QuadMax%20(8QM)%20%7C%208QuadPlus%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6%20All%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2421246%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421246%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20adding%20the%20Wave511%20driver%20to%20support%20i.MX952%20at%20Toradex%20BSP%2C%20although%20the%20processor%20in%20use%20is%20not%20relevant%20for%20the%20bug%20reported%20in%20the%20downstream%20kernel.%3C%2FP%3E%3CP%3EWe%20build%20the%20kernel%20with%20a%20shared%20config%20for%20all%20ARM64%20SoCs%20that%20are%20supported%20by%20our%20BSP%2C%20its%20a%20super%20set%20that%20enables%20many%20modules.%20That%20includes%26nbsp%3BCONFIG_VIDEO_WAVE_VPU.%3C%2FP%3E%3CP%3EThis%20is%20the%20kernel%20driver%20present%20at%20mainline%20that%20installs%20%22wave5.ko%22%20to%20modules%20directory.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI've%20created%20a%20workaround%26nbsp%3B%3C%2FP%3E%3CP%3ESince%20it%20is%20not%20possible%20to%20enable%20WAVE511%20driver%20in%20that%20common%20config%2C%20I've%20done%20that%20just%20for%20i.MX%20SoCs%20and%20disabled%26nbsp%3BCONFIG_VIDEO_WAVE_VPU%20for%20them%20as%20well.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI've%20disabled%26nbsp%3BCONFIG_VIDEO_WAVE_VPU%20at%20our%20OE%20layer%20for%20the%20i.MX%20processors%20to%20allow%20enabling%26nbsp%3BCONFIG_MXC_VIDEO_WAVE511%20as%20a%20module%20for%20now.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIt%20is%20expected%20that%26nbsp%3B%3CEM%3Eallmodconfig%3C%2FEM%3E%26nbsp%3Bbuild%20cleanly%2C%20and%20the%20current%20downstream%20driver%20breaks%20this.%20That%20is%20the%20reason%20I'm%20reporting%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2421189%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421189%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThis%20issue%20have%20not%20been%20reported%20before%20and%20there%20are%20no%20plans%20to%20implement%20a%20solution%20yet.%3C%2FP%3E%0A%3CP%3EWhich%20processor%20are%20you%20using%3F%3C%2FP%3E%0A%3CP%3EDid%20you%20try%20to%26nbsp%3Bdisabling%20one%20Kconfig%20option%20or%20locally%20renaming%20the%20module%3F%3C%2FP%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2421476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20the%20details%2C%20I%20reported%20this%20with%20internal%20team.%3C%2FP%3E%0A%3CP%3EI%20will%20update%20you%20further%20actions%20in%20our%20side%20as%20soon%20as%20possible.%3C%2FP%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2424035%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2424035%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EPlease%20check%20the%20update%20from%20internal%20team%3A%3C%2FP%3E%0A%3CP%3EI%20reproduced%20this%20on%20a%20clean%20checkout%20of%20lf-6.18.20-2.0.0%20(nxp-imx%2Flinux-imx)%20and%20confirmed%20the%20root%20cause%20matches%20the%20ticket%20exactly%3A%3C%2FP%3E%0A%3CP%3EUpstream%20drivers%2Fmedia%2Fplatform%2Fchips-media%2Fwave5%2FMakefile%3A%20obj-%24(CONFIG_VIDEO_WAVE_VPU)%20%2B%3D%20wave5.o%3CBR%20%2F%3ENXP%20drivers%2Fmxc%2Fvpu%2Fwave511%2FMakefile%3A%20obj-%24(CONFIG_MXC_VIDEO_WAVE511)%20%2B%3D%20wave5.o%3C%2FP%3E%0A%3CP%3EBoth%20Kconfig%20symbols%20are%20independent%2C%20so%20allmodconfig%2Fallyesconfig%20selects%20both%20and%20scripts%2Fmodules-check.sh%20aborts%20with%20the%20reported%20error.%20I%20reproduced%20the%20exact%20error%20text%20by%20feeding%20the%20script%20a%20modules.order%20containing%20the%20two%20real%20module%20paths%20%E2%80%93%20byte-identical%20to%20what's%20quoted%20in%20the%20ticket.%20Also%20checked%20the%20newer%20lf-6.18.37-2.1.0%20tag%3A%20the%20collision%20is%20still%20present%20there.%3C%2FP%3E%0A%3CP%3ERecommended%20fix%3A%20rename%20the%20NXP%20module's%20build%20target%20in%20drivers%2Fmxc%2Fvpu%2Fwave511%2FMakefile%20from%20wave5.o%2Fwave5-ctrl.o%20to%20wave511.o%2Fwave511-ctrl.o.%20Source%20filenames%20are%20untouched%20%E2%80%93%20this%20is%20a%20one-file%20Makefile%20change%20with%20no%20functional%2Fbehavioral%20impact%20on%20the%20driver.%20I%20verified%20it%20builds%20cleanly%20and%20that%20scripts%2Fmodules-check.sh%20no%20longer%20flags%20a%20conflict%20with%20this%20change%20in%20place.%3C%2FP%3E%0A%3CP%3EI%20considered%20the%20alternative%20of%20adding%20depends%20on%20!VIDEO_WAVE_VPU%20to%20the%20NXP%20Kconfig%20instead%2C%20but%20a%20module%20rename%20is%20the%20more%20durable%20fix%20long-term%3A%20it%20resolves%20the%20actual%20naming%20collision%20rather%20than%20relying%20on%20mutual%20exclusion%20(which%20would%20silently%20drop%20one%20driver%20under%20allmodconfig%2Fallyesconfig%20and%20could%20mask%20real%20build%20issues)%2C%20and%20it%20stays%20correct%20even%20if%20a%20future%20board%20combines%20both%20IP%20blocks.%3C%2FP%3E%0A%3CP%3EOnly%20downstream%20impact%3A%20anything%20that%20hardcodes%20modprobe%20wave5%20%2F%20wave5.ko%20for%20the%20NXP%20Wave511%20driver%20(e.g.%20a%20yocto%20recipe%20or%20rootfs%20module-load%20config)%20would%20need%20to%20reference%20wave511.ko%20instead.%20I%20did%20not%20find%20any%20such%20reference%20inside%20this%20kernel%20tree.%3C%2FP%3E%0A%3CP%3EPatch%20will%20be%20provided%20internally%20for%20review.%3C%2FP%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E