Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] Create a symbolic link to the target kernel directory.
@ 2012-11-01  0:17 Sagaert Johan
  2012-11-01  1:07 ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Sagaert Johan @ 2012-11-01  0:17 UTC (permalink / raw)
  To: buildroot


This symbolic link makes it easier when building kernel modules.
The makefile for a module no longer has to point to the full directory name of the kernel but can use this symbolic link instead.
You no longer need to edit the path to the kernel tree in the module's makefiles when changing your target kernel version.

Signed-off-by: Sagaert Johan <sagaert.johan@skynet.be>
---
 Makefile       | 1 +
 linux/linux.mk | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 0128839..8356aeb 100644
--- a/Makefile
+++ b/Makefile
@@ -668,6 +668,7 @@ ifeq ($(O),output)
 	rm -rf $(O)
 endif
 	rm -rf $(CONFIG_DIR)/.config $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps
+	rm -f targetkernel 
 
 cross: $(BASE_TARGETS)
 
diff --git a/linux/linux.mk b/linux/linux.mk
index c4bdf90..4541081 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -219,6 +219,8 @@ define LINUX_BUILD_CMDS
 	fi
 	$(LINUX_BUILD_DTB)
 	$(LINUX_APPEND_DTB)
+	rm -f targetkernel
+	ln -s $(LINUX_DIR) targetkernel
 endef
 
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-01 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01  0:17 [Buildroot] [PATCH 1/1] Create a symbolic link to the target kernel directory Sagaert Johan
2012-11-01  1:07 ` Arnout Vandecappelle
2012-11-01  1:14   ` Sagaert Johan
2012-11-01  9:19     ` Thomas Petazzoni
2012-11-01 19:10       ` [Buildroot] [PATCH 1/1] Create a symbolic link to the target kernel directory. example Sagaert Johan
2012-11-01 22:24         ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox