All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruen@suse.de>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@osdl.net>, linux-kernel@vger.kernel.org
Subject: [PATCH] Symlinks for building external modules
Date: Thu, 3 Jun 2004 18:58:09 +0200	[thread overview]
Message-ID: <200406031858.09178.agruen@suse.de> (raw)

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

             reply	other threads:[~2004-06-03 16:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03 16:58 Andreas Gruenbacher [this message]
2004-06-03 17:09 ` [PATCH] Symlinks for building external modules Måns Rullgård
2004-06-03 17:36   ` Sam Ravnborg
2004-06-03 17:55     ` Måns Rullgård
2004-06-04 17:15     ` Jari Ruusu
2004-06-04 19:23       ` Sam Ravnborg
2004-06-04 19:45         ` Måns Rullgård
2004-06-05 13:45           ` Andreas Gruenbacher
2004-06-05 13:20         ` Jari Ruusu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200406031858.09178.agruen@suse.de \
    --to=agruen@suse.de \
    --cc=akpm@osdl.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.