On Fri, Jan 28, 2005 at 09:56:14PM -0600, Matt Domsch wrote: > On Wed, Jan 19, 2005 at 02:48:08AM -0600, [EMAIL PROTECTED] wrote: > > (cross posting this on kbuild-devel for some fresh light) > > The list of modules that Kbuild considers above appears to be limited to > > those built via the M= (or historically SUBDIRS=) argument, thus modpost > > doesn't know about the rest of the modules in the tree to consider for > > putting into depends:. This is generic to all out-of-tree-built modules > > as I can tell, not necessarily just DKMS cross-arch builds. > > As an example, if I do a 'make' from a top-level kernel directory, for > an in-tree build, modpost calls its read_symbols() with the whole list > of modules being built in-tree (debug printf added by me to demonstrate): > ... > modpost: read_symbols(drivers/scsi/sata_sx4.o) > modpost: read_symbols(drivers/scsi/sata_via.o) ...
> modpost: read_symbols(vmlinux) > modpost: read_symbols(/var/lib/dkms/kernel_ppp_mppe/0.0.5/build/ppp_generic.o) > modpost: read_symbols(/var/lib/dkms/kernel_ppp_mppe/0.0.5/build/ppp_mppe.o) > CC /var/lib/dkms/kernel_ppp_mppe/0.0.5/build/ppp_generic.mod.o > LD [M] /var/lib/dkms/kernel_ppp_mppe/0.0.5/build/ppp_generic.ko > CC /var/lib/dkms/kernel_ppp_mppe/0.0.5/build/ppp_mppe.mod.o > LD [M] /var/lib/dkms/kernel_ppp_mppe/0.0.5/build/ppp_mppe.ko > make: Leaving directory `/home/mdomsch/bk/modinfo/linux-2.6-modinfo' What is missing in the above is when kbuild read in symbols from Module.symvers I sideeffect of reading in Module.symvers is also that modpost gets enough dependency information to build the depends line correct. So if you make sure not to delete Module.symvers in the kernel you point at with -C ... then you should see dependency being generated correct. I'm about to merge a patch from Andreas G that add a warning if Module.symvers is missing when supposed to be present. Please let me know if this fixes this issue for you. Sam As an example I did: make defconfig make And copied drivers/scsi/ipr.* to a separate dir and did a make -C ... M=`pwd` The resulting ipr.mod.c: #include <linux/module.h> #include <linux/vermagic.h> #include <linux/compiler.h> MODULE_INFO(vermagic, VERMAGIC_STRING); #undef unix struct module __this_module __attribute__((section(".gnu.linkonce.this_module"))) = { .name = __stringify(KBUILD_MODNAME), .init = init_module, #ifdef CONFIG_MODULE_UNLOAD .exit = cleanup_module, #endif }; static const char __module_depends[] __attribute_used__ __attribute__((section(".modinfo"))) = "depends=firmware_class"; ^^^^^^^^^^^^^^ MODULE_ALIAS("pci:v00001069d0000B166sv00001014sd00000266bc*sc*i*"); MODULE_ALIAS("pci:v00001069d0000B166sv00001014sd000002D3bc*sc*i*"); MODULE_ALIAS("pci:v00001069d0000B166sv00001014sd00000278bc*sc*i*"); MODULE_ALIAS("pci:v00001069d0000B166sv00001014sd000002D4bc*sc*i*"); MODULE_ALIAS("pci:v00001014d0000028Csv00001014sd000002BEbc*sc*i*"); MODULE_ALIAS("pci:v00001014d00000180sv00001014sd00000264bc*sc*i*"); MODULE_ALIAS("pci:v00001014d00000180sv00001014sd000002BDbc*sc*i*"); MODULE_INFO(srcversion, "9E74903D4973AD412EEEE31"); ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ kbuild-devel mailing list kbuild-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kbuild-devel