Skip to content

Commit 2c6d963

Browse files
committed
Revert "Makefile: install modules.builtin even if CONFIG_MODULES=n"
This reverts commit e0b250b, which broke build systems that need to install files to a certain path, but do not set INSTALL_MOD_PATH when invoking 'make install'. $ make INSTALL_PATH=/tmp/destdir install mkdir: cannot create directory ‘/lib/modules/5.8.0-rc1+/’: Permission denied Makefile:1342: recipe for target '_builtin_inst_' failed make: *** [_builtin_inst_] Error 1 While modules.builtin is useful also for CONFIG_MODULES=n, this change in the behavior is quite unexpected. Maybe "make modules_install" can install modules.builtin irrespective of CONFIG_MODULES as Jonas originally suggested. Anyway, that commit should be reverted ASAP. Reported-by: Douglas Anderson <[email protected]> Reported-by: Guenter Roeck <[email protected]> Cc: Jonas Karlman <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Tested-by: Guenter Roeck <[email protected]>
1 parent 0f50d21 commit 2c6d963

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

Makefile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,16 +1336,6 @@ dt_binding_check: scripts_dtc
13361336
# ---------------------------------------------------------------------------
13371337
# Modules
13381338

1339-
# install modules.builtin regardless of CONFIG_MODULES
1340-
PHONY += _builtin_inst_
1341-
_builtin_inst_:
1342-
@mkdir -p $(MODLIB)/
1343-
@cp -f modules.builtin $(MODLIB)/
1344-
@cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/
1345-
1346-
PHONY += install
1347-
install: _builtin_inst_
1348-
13491339
ifdef CONFIG_MODULES
13501340

13511341
# By default, build modules as well
@@ -1389,7 +1379,7 @@ PHONY += modules_install
13891379
modules_install: _modinst_ _modinst_post
13901380

13911381
PHONY += _modinst_
1392-
_modinst_: _builtin_inst_
1382+
_modinst_:
13931383
@rm -rf $(MODLIB)/kernel
13941384
@rm -f $(MODLIB)/source
13951385
@mkdir -p $(MODLIB)/kernel
@@ -1399,6 +1389,8 @@ _modinst_: _builtin_inst_
13991389
ln -s $(CURDIR) $(MODLIB)/build ; \
14001390
fi
14011391
@sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order
1392+
@cp -f modules.builtin $(MODLIB)/
1393+
@cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/
14021394
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
14031395

14041396
# This depmod is only for convenience to give the initial

0 commit comments

Comments
 (0)