2010-09-17 07:32:26     make romfs problem after driver to module conversion

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-09-17 07:32:26     make romfs problem after driver to module conversion

Rob Maris (GERMANY)

Message: 93555   

 

Until recently, I had three modules with my build configuration. When I define my codec (ad73311&i2s) to be a module, make romfs apparently goes in an infite recursion. Output excerpt:

 

make[1]: Betrete Verzeichnis '/home/uClinux/uclinux-dist.git/linux-2.6.x'

Warning: you may need to install module-init-tools

See   www.codemonkey.org.uk/docs/post-halloween-2.6.txt

INSTALL drivers/i2c/i2c-dev.ko

INSTALL drivers/input/keyboard/gpio_keys.ko

INSTALL drivers/spi/spidev.ko

INSTALL sound/soc/blackfin/snd-ad73311.ko

INSTALL sound/soc/blackfin/snd-bf5xx-i2s.ko

INSTALL sound/soc/blackfin/snd-soc-bf5xx-i2s.ko

INSTALL sound/soc/blackfin/snd-soc-bf5xx-sport.ko

INSTALL sound/soc/codecs/snd-soc-ad73311.ko

DEPMOD 2.6.34.6-ADI-2010R1-pre

make[1]: Verlasse Verzeichnis '/home/uClinux/uclinux-dist.git/linux-2.6.x'

Guessed module directory as /home/uClinux/uclinux-dist.git/romfs/lib/modules/2.6.34.6-ADI-2010R1-pre

Deep recursion on subroutine "main::add_mod_deps" at /home/uClinux/uclinux-dist.git/user/busybox/depmod.pl line 178.

Deep recursion on subroutine "main::add_mod_deps" at /home/uClinux/uclinux-dist.git/user/busybox/depmod.pl line 178.

Deep recursion on subroutine "main::add_mod_deps" at /home/uClinux/uclinux-dist.git/user/busybox/depmod.pl line 178.

^Cmake: *** [modules_install] Interrupt

 

The warning on the second line is also present before I added the coded as a module. What could be the problem?

QuoteReplyEditDelete

 

 

2010-09-17 13:44:30     Re: make romfs problem after driver to module conversion

Mike Frysinger (UNITED STATES)

Message: 93563   

 

it probably depends on the modules you have installed

 

run this manually from the top level uclinux-dist:

NM=bfin-uclinux-nm user/busybox/depmod.pl -P _ -b $PWD/romfs/lib/modules/ -k $PWD/linux-2.6.x/vmlinux

 

if that still issues a warning, please tar up your vmlinux and lib/modules/ and attach it to your forum posting so i can reproduce the issue on my side

QuoteReplyEditDelete

 

 

2010-09-17 17:11:36     Re: make romfs problem after driver to module conversion

Rob Maris (GERMANY)

Message: 93567   

 

Mike, modules is attached as after make romfs

 

vmlinux is generated after issueing make image. However, its size is approx. 2/3rd of the proper size.

 

For your information: I have decided to let ad73311 within the kernel (due to change of circumstances with another topic)

 

-Rob

 

modules.tar.gz

vmlinux.tar.gz

QuoteReplyEditDelete

 

 

2010-09-18 03:54:36     Re: make romfs problem after driver to module conversion

Mike Frysinger (UNITED STATES)

Message: 93596   

 

your new ad73311 changes are causing a dependency loop

 

reducing module: /lib/modules/2.6.34.6-ADI-2010R1-pre/kernel/sound/soc/blackfin/snd-ad73311.ko

resolved symbol _ad73311_dai in file /lib/modules/2.6.34.6-ADI-2010R1-pre/kernel/sound/soc/codecs/snd-soc-ad73311.ko

 

reducing module: /lib/modules/2.6.34.6-ADI-2010R1-pre/kernel/sound/soc/codecs/snd-soc-ad73311.ko

resolved symbol _ad73311 in file /lib/modules/2.6.34.6-ADI-2010R1-pre/kernel/sound/soc/blackfin/snd-ad73311.ko

resolved symbol _ad73311_reg_config in file /lib/modules/2.6.34.6-ADI-2010R1-pre/kernel/sound/soc/blackfin/snd-ad73311.ko

QuoteReplyEditDelete

 

 

2010-09-20 03:40:50     Re: make romfs problem after driver to module conversion

Rob Maris (GERMANY)

Message: 93629   

 

Mike, I did some more checks, but I can't get it right, apart from the "extern" that is in a .c file and not a .h file.

 

I don't see C-violations (of course). I guess the violation is in the linux-specific stuff.

 

Here is a diff that documents what is missing.

 

--- uClinux/uclinux-dist.git/linux-2.6.x/sound/soc/blackfin/modules.builtin

+++ rob/tmp/test/blackfin/modules.builtin

@@ -1,5 +1,3 @@

kernel/sound/soc/blackfin/snd-bf5xx-i2s.ko

kernel/sound/soc/blackfin/snd-soc-bf5xx-sport.ko

-kernel/sound/soc/blackfin/snd-soc-bf5xx-i2s.ko

-kernel/sound/soc/blackfin/snd-ad73311.ko

 

 

 

QuoteReplyEditDelete

 

 

2010-09-20 03:55:19     Re: make romfs problem after driver to module conversion

Rob Maris (GERMANY)

Message: 93630   

 

Please forget the previous diff. First I found that only SND_BF5XX_SOC_AD73311 was declared as module, not SND_BF5XX_I2S, while I ticked both properties as modules upon checkout of a former version without ad73311 modifications. Second, the file modules.builtin refers to modules built into kernel. Nevertheless, I'm not able to locate the problem, while still prepared to help finding it.

QuoteReplyEditDelete

 

 

2010-09-20 13:32:08     Re: make romfs problem after driver to module conversion

Mike Frysinger (UNITED STATES)

Message: 93636   

 

the problem is in the code.  the two files will need to be changed so they dont depend on symbols of the other.  i'd refer to the previous ad73311 thread.

QuoteReplyEditDelete

 

 

2010-09-20 17:19:07     Re: make romfs problem after driver to module conversion

Rob Maris (GERMANY)

Message: 93638   

 

Mike, I treat the ad73311 project task as "closed" for my purpose. Of course I'm interested in contributing to further development, but not on the basis of quite vague hints. I already have lost a vast amount of time due to getting ad73311 codec running properly in trunk. I must be productive for getting my cash flow running (and, BTW, have always missed an opportunity of getting support for blackfin on a commercial level).

 

-Rob

QuoteReplyEditDelete

 

 

2010-09-21 01:28:37     Re: make romfs problem after driver to module conversion

Mike Frysinger (UNITED STATES)

Message: 93640   

 

i thought my 2nd comment was pretty clear (  blackfin.uclinux.org/gf/forummessage/93596): you cannot have the snd-ad73311 module (bf5xx-ad73311.c) exporting symbols which the snd-soc-ad73311 module (ad73311.c) needs while also having the snd-soc-ad73311 module exporting symbols which the snd-ad73311 module needs.

 

the linux kernel simply cannot support circular dependencies, nor will it likely ever support them.  the change proposed will have to be reworked to not incur this loop.  or you may build both modules into your kernel and not worry about the circular dependency.

Attachments

Outcomes