aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
author이건호 <urpapa@gmail.com>2012-08-29 09:58:12 -0400
committerMichal Marek <mmarek@suse.cz>2012-08-31 11:37:54 -0400
commitef591a550644062af5106e35fac112dee8463312 (patch)
treeaee3e025574ff38accd587e89f3e4c2876d693bf /scripts
parent70cfe02682ff16bd8c1fec0d2374bd4dbceae54f (diff)
scripts/Makefile.modpost: error in finding modules from .mod files.
This error may happen when the user's id or path includes .ko string. For example, user's id is xxx.ko and building test.ko module, the test.mod file lists ko name and all object files. /home/xxx.ko/kernel_dev/device/drivers/test.ko /home/xxx.ko/kernel_dev/device/drivers/test_main.o /home/xxx.ko/kernel_dev/device/drivers/test_io.o ... Current Makefile.modpost and Makefile.modinst find and list up not only test.ko but also other object files. because all of object file's path includes .ko string. This is a patch to fix it. Signed-off-by: Gunho Lee <gunho.lee@lge.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.modinst2
-rw-r--r--scripts/Makefile.modpost2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index efa5d940e632..3d13d3a3edfe 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -9,7 +9,7 @@ include scripts/Kbuild.include
9 9
10# 10#
11 11
12__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) 12__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
13modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) 13modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))
14 14
15PHONY += $(modules) 15PHONY += $(modules)
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 08dce14f2dc8..a1cb0222ebe6 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -60,7 +60,7 @@ kernelsymfile := $(objtree)/Module.symvers
60modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers 60modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers
61 61
62# Step 1), find all modules listed in $(MODVERDIR)/ 62# Step 1), find all modules listed in $(MODVERDIR)/
63__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) 63__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
64modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o))) 64modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o)))
65 65
66# Stop after building .o files if NOFINAL is set. Makes compile tests quicker 66# Stop after building .o files if NOFINAL is set. Makes compile tests quicker