Skip to content

Commit d8131c2

Browse files
committed
kbuild: remove $(MODLIB)/source symlink
This reverts the old commit "kbuild: Introduce source symlink in /lib/modules/.../". [1] The current Kbuild does not require $(MODLIB)/source. If the kernel was built in a separate output directory, $(MODLIB)/build/Makefile wraps the Makefile in the source tree. It is enough for building external modules. [1] https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=e09e58867154b8aae0a3ac26a9b1c05962f5a355 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
1 parent 79b96c3 commit d8131c2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,14 +1486,10 @@ modules_install: $(modinst_pre)
14861486
PHONY += __modinst_pre
14871487
__modinst_pre:
14881488
@rm -rf $(MODLIB)/kernel
1489-
@rm -f $(MODLIB)/source
1489+
@rm -f $(MODLIB)/build
14901490
@mkdir -p $(MODLIB)
14911491
ifdef CONFIG_MODULES
1492-
@ln -s $(abspath $(srctree)) $(MODLIB)/source
1493-
@if [ ! $(objtree) -ef $(MODLIB)/build ]; then \
1494-
rm -f $(MODLIB)/build ; \
1495-
ln -s $(CURDIR) $(MODLIB)/build ; \
1496-
fi
1492+
@ln -s $(CURDIR) $(MODLIB)/build
14971493
@sed 's:^\(.*\)\.o$$:kernel/\1.ko:' modules.order > $(MODLIB)/modules.order
14981494
endif
14991495
@cp -f modules.builtin $(MODLIB)/

0 commit comments

Comments
 (0)