Bug 198965

Summary: Missing depmod is not treated as an error?
Product: Tools Reporter: Chih-Wei Huang (cwhuang)
Component: OtherAssignee: Tools.Other (tools_other)
Status: NEW ---    
Severity: low CC: rdunlap
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: all Tree: Mainline
Regression: No
Attachments: A simple fix

Description Chih-Wei Huang 2018-03-02 03:26:10 UTC
Created attachment 274499 [details]
A simple fix

Distribution: any
Hardware Environment: any
Software Environment: any
Problem Description:

We have a report that kernel modules are not automatically loaded.
We found the root cause is modules.dep was not generated since
the build host doesn't have depmod.

I was surprised because I thought missing depmod should be treated as an error.
However, checking scripts/depmod.sh, it's not.
Missing depmod is silently ignored:

if ! test -r System.map -a -x "$DEPMOD"; then
        exit 0

I don't think that's a good idea.

I tried to contact Michal Marek, the author of scripts/depmod.sh.
But the email was bounced. Maybe he is not in charge of it now.

Anyway, I decide to file a bug and propose a simple fix.
Comment 1 Randy Dunlap 2018-03-12 01:42:49 UTC
Please send your patch to linux-kbuild@vger.kernel.org mailing list.
Also please add
Signed-off-by: your name <email address>

to the patch. Otherwise we cannot accept it.