Messages in this thread Patch in this message | | | From | Andreas Gruenbacher <> | Subject | [PATCH] Symlinks for building external modules | Date | Thu, 3 Jun 2004 18:58:09 +0200 |
| |
Hi Sam,
modules not in the kernel source tree need to locate both the source tree and the object tree (O=). Currently, the /lib/modules/$(uname -r)/build symlink is the only reference we have; it historically points to the source tree from 2.4 times. The following patch changes this as follows (this is what we have in the current SUSE tree now):
/lib/modules/$(uname -r)/source ==> source tree /lib/modules/$(uname -r)/build ==> object tree
Both links are required for building external modules with:
make -C /lib/modules/$(uname -r)/source \ O=/lib/modules/$(uname -r)/build \ M=$(pwd)
Index: linux-2.6.7-rc2/Makefile =================================================================== --- linux-2.6.7-rc2.orig/Makefile +++ linux-2.6.7-rc2/Makefile @@ -732,9 +732,10 @@ _modinst_: sleep 1; \ fi @rm -rf $(MODLIB)/kernel - @rm -f $(MODLIB)/build + @rm -f $(MODLIB)/{source,build} @mkdir -p $(MODLIB)/kernel - @ln -s $(TOPDIR) $(MODLIB)/build + @ln -s $(srctree) $(MODLIB)/source + @ln -s $(objtree) $(MODLIB)/build $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst # If System.map exists, run depmod. This deliberately does not have a
Thanks, -- Andreas Gruenbacher <agruen@suse.de> SUSE Labs, SUSE LINUX AG - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |