public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH] [KBUILD] fix external module install path
Date: Tue, 1 Jan 2008 13:45:54 +0100	[thread overview]
Message-ID: <20080101124554.GA29753@uranus.ravnborg.org> (raw)
In-Reply-To: <463F9C3B.4080004@sandeen.net>

On Mon, May 07, 2007 at 04:38:03PM -0500, Eric Sandeen wrote:
> Installing external modules is supposed to put them in some path
> under /lib/modules/<version>/extra/subdir/, but this change:
> http://linux.bkbits.net:8080/linux-2.6/?PAGE=cset&REV=1.1982.9.23
> makes them go under /lib/modules/<version>/extrasubdir
> 
> (for example, make M=fs/ext3 modules_install puts ext3.ko in 
> /lib/modules/<version>/extrafs/ext3.ko)
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> 
> Index: linux-2.6.21/scripts/Makefile.modinst
> ===================================================================
> --- linux-2.6.21.orig/scripts/Makefile.modinst
> +++ linux-2.6.21/scripts/Makefile.modinst
> @@ -21,7 +21,7 @@ quiet_cmd_modules_install = INSTALL $@
>  
>  # Modules built outside the kernel source tree go into extra by default
>  INSTALL_MOD_DIR ?= extra
> -ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(KBUILD_EXTMOD),,$(@D))
> +ext-mod-dir = $(INSTALL_MOD_DIR)/$(subst $(KBUILD_EXTMOD),,$(@D))
>  
>  modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))

Hi Eric.

Took a look at this now and fixed it like this.
Let me know if you see other issues.

[I know this is more than 6 months ago you reported it - sorry]

	Sam

>From 9af97c5f91e7dd4996b501a19b5a128b1600d511 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Tue, 1 Jan 2008 13:40:28 +0100
Subject: [PATCH] kbuild: fix installing external modules

Eric Sandeen <sandeen@redhat.com> reported:
  Installing external modules is supposed to put them in some path
  under /lib/modules/<version>/extra/subdir/, but this change:
  http://linux.bkbits.net:8080/linux-2.6/?PAGE=cset&REV=1.1982.9.23
  makes them go under /lib/modules/<version>/extrasubdir

 (for example, make M=fs/ext3 modules_install puts ext3.ko in
 /lib/modules/<version>/extrafs/ext3.ko)

This was the case only when specifying a trailing slash to M=..

Fixed by removing trailing slash if present so
we correctly match dir part of target.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Eric Sandeen <sandeen@redhat.com>
---
 scripts/Makefile.modinst |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index f0ff248..efa5d94 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -21,7 +21,7 @@ quiet_cmd_modules_install = INSTALL $@
 
 # Modules built outside the kernel source tree go into extra by default
 INSTALL_MOD_DIR ?= extra
-ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(KBUILD_EXTMOD),,$(@D))
+ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))
 
 modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))
 
-- 
1.5.3.7.1112.g9758e


  parent reply	other threads:[~2008-01-01 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07 21:38 [PATCH] [KBUILD] fix external module install path Eric Sandeen
2007-05-07 21:45 ` Eric Sandeen
2007-05-07 22:15   ` Eric Sandeen
2008-01-01 12:45 ` Sam Ravnborg [this message]
2008-01-01 17:10   ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080101124554.GA29753@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox