Bug 12736 - linux Makefile uses 'depmod -r'
Summary: linux Makefile uses 'depmod -r'
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Modules (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_modules
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 00:49 UTC by Natanael Copa
Modified: 2009-03-26 16:06 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.28.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
linux-makefile-depmod.patch (506 bytes, patch)
2009-02-18 00:53 UTC, Natanael Copa
Details | Diff

Description Natanael Copa 2009-02-18 00:49:33 UTC
Latest working kernel version:
Earliest failing kernel version:
Distribution: Alpine Linux
Hardware Environment:
Software Environment:
Problem Description:

During 'make modules_install' depmod is called with the -r option. module-init-tools does nothing with this option and its not mentioned in the manpage.

The busybox-1.13.2 version of depmod does not support this option at all.

Steps to reproduce:
* Install busybox-1.13.2 or later. Make sure depmod is enabled
* symlink /sbin/depmod -> /bin/busybox
* run make modules_install

it will fail on depmod.
Comment 1 Natanael Copa 2009-02-18 00:53:30 UTC
Created attachment 20295 [details]
linux-makefile-depmod.patch

Proposed patch to use depmod without -r option.
Comment 2 Travis Hein 2009-02-20 19:51:45 UTC
Yes, this is a deficiency of busybox implementation of module init tools.

The standard module init tools from kernel.org projects area does indeed support the use of -r command line option to depmod. Classically this -r (or --root) command line parameter had meaning to consider all modules from the root of the module tree. Now the modern default of -a parameter if no parameter specified is sufficient, 

So the current implementations of depmod (in the kernel.org module init tools project) simply ignores the -r command line parameter in order to not break backwards compatibility.

Perhaps a just as relevant suggestion would be to have the busybox implementation of depmod extended to also accept (and also not do anything with) the -r parameter.

I guess the larger issue for discussion is at what point in time should the depmod utility be updated to not accept -r anymore. Until such time, it is technically not wrong for the kernel make system to do depmod -r
Comment 3 Natanael Copa 2009-02-20 23:49:10 UTC
(In reply to comment #2)

> Perhaps a just as relevant suggestion would be to have the busybox
> implementation of depmod extended to also accept (and also not do anything
> with) the -r parameter.

My first move was sending a patch to busybox which didn't really want make busybox bigger without any good reason. They are doing a pretty good job keeping their code small - gotta respect them for that. They asked me to bring this to attention to linux dev.

> I guess the larger issue for discussion is at what point in time should the
> depmod utility be updated to not accept -r anymore. Until such time, it is
> technically not wrong for the kernel make system to do depmod -r

It's technically not wrong to remove the -r either.
Comment 4 Alan 2009-03-26 11:49:06 UTC
Seems a good candidate . Please submit it (with a signed-off-by line) to linux-kernel@vger.kernel.org as per Documentation/SubmittingPatches. You don't need to be a list member to do that.

Note You need to log in before you can comment on or make changes to this bug.