Commit dd820501 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Revert depmod and hierarchy changes

module-init-tools 0.9 and newer supply a replacement depmod, so
it's safe to run again.

Also, some external programs like PCMCIA and mkinitrd really want the
directory hierarchy in /lib/modules back again: it makes no difference
to the tools (since 0.9), so revert it.
parent 6c3b56e8
...@@ -157,6 +157,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy ...@@ -157,6 +157,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump OBJDUMP = $(CROSS_COMPILE)objdump
AWK = awk AWK = awk
GENKSYMS = /sbin/genksyms GENKSYMS = /sbin/genksyms
DEPMOD = /sbin/depmod
KALLSYMS = scripts/kallsyms KALLSYMS = scripts/kallsyms
PERL = perl PERL = perl
MODFLAGS = -DMODULE MODFLAGS = -DMODULE
...@@ -534,7 +535,7 @@ modules: $(SUBDIRS) ...@@ -534,7 +535,7 @@ modules: $(SUBDIRS)
# Install modules # Install modules
.PHONY: modules_install .PHONY: modules_install
modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
.PHONY: _modinst_ .PHONY: _modinst_
_modinst_: _modinst_:
...@@ -543,6 +544,20 @@ _modinst_: ...@@ -543,6 +544,20 @@ _modinst_:
@mkdir -p $(MODLIB)/kernel @mkdir -p $(MODLIB)/kernel
@ln -s $(TOPDIR) $(MODLIB)/build @ln -s $(TOPDIR) $(MODLIB)/build
# If System.map exists, run depmod. This deliberately does not have a
# dependency on System.map since that would run the dependency tree on
# vmlinux. This depmod is only for convenience to give the initial
# boot a modules.dep even before / is mounted read-write. However the
# boot script depmod is the master version.
ifeq "$(strip $(INSTALL_MOD_PATH))" ""
depmod_opts :=
else
depmod_opts := -b $(INSTALL_MOD_PATH) -r
endif
.PHONY: _modinst_post
_modinst_post:
if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS)) .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
$(patsubst %, _modinst_%, $(SUBDIRS)) : $(patsubst %, _modinst_%, $(SUBDIRS)) :
$(Q)$(MAKE) -rR -f scripts/Makefile.modinst obj=$(patsubst _modinst_%,%,$@) $(Q)$(MAKE) -rR -f scripts/Makefile.modinst obj=$(patsubst _modinst_%,%,$@)
......
...@@ -16,8 +16,8 @@ include scripts/Makefile.lib ...@@ -16,8 +16,8 @@ include scripts/Makefile.lib
# ========================================================================== # ==========================================================================
quiet_cmd_modules_install = INSTALL $(obj-m:.o=.ko) quiet_cmd_modules_install = INSTALL $(obj-m:.o=.ko)
cmd_modules_install = mkdir -p $(MODLIB)/kernel && \ cmd_modules_install = mkdir -p $(MODLIB)/kernel/$(obj); \
cp $(obj-m:.o=.ko) $(MODLIB)/kernel/ cp $(obj-m:.o=.ko) $(MODLIB)/kernel/$(obj)
modules_install: $(subdir-ym) modules_install: $(subdir-ym)
ifneq ($(obj-m:.o=.ko),) ifneq ($(obj-m:.o=.ko),)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment