From patchwork Wed Aug 29 13:58:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 1385081 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ED7993FC71 for ; Wed, 29 Aug 2012 13:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753731Ab2H2N6O (ORCPT ); Wed, 29 Aug 2012 09:58:14 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:47225 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753686Ab2H2N6N (ORCPT ); Wed, 29 Aug 2012 09:58:13 -0400 Received: by vbbff1 with SMTP id ff1so605684vbb.19 for ; Wed, 29 Aug 2012 06:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=vyqmkEjTBQ+h1GhQhtSQea5gzJ/ZHuvZ0D36SEXlj3w=; b=EaXQOM1BTCIya55Gi0rbB+qbSrqbzFGKwCdS/hQV/DcfkfgNSYztdPsss0KtW7F4Vl PetZI4me/6ajn9GLMhyrlcKFAXyXf4gWzCcIo4AXllnevAdGISLAt0+LUtJG4LGVmTgv UinMYxseflVqOwXrD5i/TAJtUO3l9lr5LhMWbHqANNRVE6vaLNNwgQ+4QKpUKRsuFcz0 tgehBM6jwVv2397JJLObd0EIpA0MMaN5ZtazFsMjLHrXGUD7tscBD6qJ3VoA3HZR8PO6 IXitOIij9886y3MwrBJLsyBitp+BJgdK1NX+To3NnFTIXwvaX/t7eFIocLaho/vI+zWA QrNQ== MIME-Version: 1.0 Received: by 10.52.20.138 with SMTP id n10mr929850vde.129.1346248692427; Wed, 29 Aug 2012 06:58:12 -0700 (PDT) Received: by 10.58.23.2 with HTTP; Wed, 29 Aug 2012 06:58:12 -0700 (PDT) Date: Wed, 29 Aug 2012 22:58:12 +0900 Message-ID: Subject: [PATCH] scripts/Makefile.modpost: error in finding modules from .mod files. From: =?EUC-KR?B?wMywx8ij?= To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 --- scripts/Makefile.modinst | 2 +- scripts/Makefile.modpost | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) # Stop after building .o files if NOFINAL is set. Makes compile tests quicker diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index efa5d94..3d13d3a 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 08dce14..a1cb022 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)))