From ef591a550644062af5106e35fac112dee8463312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EA=B1=B4=ED=98=B8?= Date: Wed, 29 Aug 2012 22:58:12 +0900 Subject: 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 Signed-off-by: Michal Marek --- scripts/Makefile.modinst | 2 +- scripts/Makefile.modpost | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') 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 # -__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) +__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod))) modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) PHONY += $(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 modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers # Step 1), find all modules listed in $(MODVERDIR)/ -__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) +__modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod))) modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o))) # Stop after building .o files if NOFINAL is set. Makes compile tests quicker -- cgit v1.2.3 From b589c8ae095b3d4f4181a6aefb26df5e762d6499 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sat, 8 Sep 2012 12:47:59 -0700 Subject: Kbuild: use normal compression settings for tar*-pkg For large kernel configurations (like a distribution kernel) targz-pkg takes a quite long time to just do the compression. I clocked it at 15+mins for a SUSE kernel like config on a fast system. And tarxz and bzip2 are even slower. The main reason is that the script that is doing the taring sets the highest compression level (-9). When I change it to just use the defaults the gzip time for the same kernel goes down to ~3 mins. I haven't tested xz and bzip, but I expect those to be much faster too. I'm not willing to wait that long for a small compression gain. So just change the script to use the defaults. Signed-off-by: Andi Kleen Reviewed-by: Fengguang Wu Signed-off-by: Michal Marek --- scripts/package/buildtar | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/package/buildtar b/scripts/package/buildtar index 8a7b15598ea9..632377f9dd32 100644 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar @@ -28,15 +28,15 @@ case "${1}" in file_ext="" ;; targz-pkg) - compress="gzip -c9" + compress="gzip" file_ext=".gz" ;; tarbz2-pkg) - compress="bzip2 -c9" + compress="bzip2" file_ext=".bz2" ;; tarxz-pkg) - compress="xz -c9" + compress="xz" file_ext=".xz" ;; *) -- cgit v1.2.3 From 76b27645a5bba85bd26896811c7a25ecc37b3731 Mon Sep 17 00:00:00 2001 From: Jonathan Kliegman Date: Thu, 4 Oct 2012 16:32:19 -0400 Subject: modpost: Permit .GCC.command.line sections Allow .GCC.command.line sections in modules to prevent modpost warnings: WARNING: sound/usb/snd-usbmidi-lib.o (.GCC.command.line): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example contains section definitions for use in .S files. Signed-off-by: Jonathan Kliegman Signed-off-by: Michal Marek --- scripts/mod/modpost.c | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 68e9f5ed0a6f..cd5803c647fd 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -821,6 +821,7 @@ static const char *section_white_list[] = ".debug*", ".zdebug*", /* Compressed debug sections. */ ".GCC-command-line", /* mn10300 */ + ".GCC.command.line", /* record-gcc-switches, non mn10300 */ ".mdebug*", /* alpha, score, mips etc. */ ".pdr", /* alpha, score, mips etc. */ ".stab*", -- cgit v1.2.3