Bug 152130 - kernel needs /lib/modules/`uname -r`/build subdirectory
kernel needs /lib/modules/`uname -r`/build subdirectory
Status: CLOSED DUPLICATE of bug 152129
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-24 23:24 EST by David Kewley
Modified: 2015-01-04 17:18 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-25 20:33:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Kewley 2005-03-24 23:24:44 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux)

Description of problem:
For every `uname -r`, there should exist a /lib/modules/`uname -r`/build 
directory pointing to the kernel files necessary for building modules.  This 
seems to work well in Fedora Core 3.  RHEL 4, on the other hand, has a new 
package kernel-devel that installs source in /usr/src/kernels/<kernel name>, 
and makes a symlink to that source directory from /lib/modules/`uname 
-r`/build. 
 
This obscures things when you're building a modules for UP and SMP kernels.  
Best I can tell, I'm supposed to do this: 
 
For UP kernel: 
1) cd /usr/src/kernels/<UP kernel name> 
2) cp /boot/config-<UP kernel name> ./.config 
3) make oldconfig 
4) make 
5) cd <my module dir> 
6) make SRC=/usr/src/kernels/<UP kernel name> 
7) cp <my module>.ko /lib/modules/<UP kernel name>/updates 
 
Then for SMP kernel: 
1) cd /usr/src/kernels/<SMP kernel name> 
2) cp /boot/config-<SMP kernel name> ./.config 
3) make oldconfig 
4) make 
5) cd <my module dir> 
6) make SRC=/usr/src/kernels/<SMP kernel name> 
7) cp <my module>.ko /lib/modules/<SMP kernel name>/updates 
 
Shouldn't I instead be able to do this instead?: 
 
For UP kernel: 
1) cd <my module dir> 
2) make SRC=/lib/modules/<UP kernel name>/build 
3) cp <my module>.ko /lib/modules/<UP kernel name>/updates 
 
Then for SMP kernel: 
1) cd <my module dir> 
2) make SRC=/lib/modules/<SMP kernel name>/build 
3) cp <my module>.ko /lib/modules/<SMP kernel name>/updates 
 
Fedora Core 3 allows me to do it the latter, faster, easier way.  Why don't we 
use FC3's scheme instead of the one currently in RHEL4? 
 
I'm treading on new ground here, so please correct any misstatements I've 
made. 
 

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. ls -ald /lib/modules/`uname -r`/build 
2. rpm -ql kernel-devel | grep -v /usr/src 
3. Notice that we have a build symlink for UP kernels but not for SMP 
4. Notice that there is no kernel-devel-smp or some such. 
5. Notice that we have to 'make' the kernel for UP and SMP separately, rather 
than taking advantage of pre-built trees for building external modules. 
   

Actual Results:  We notice that kernel-devel is the package that provides the 
/lib/modules/`uname -r`/build symlinks, but it only provides symlinks for UP 
kernels, not for SMP kernels.  We notice that it takes too many steps to build 
external modules. 

Expected Results:  kernel should have a full external module build tree under /lib/modules/`uname 
-r`/build, rather than a symlink.  This would enable us to build external 
modules more easily. 
 

Additional info:
Comment 1 David Kewley 2005-03-25 20:33:24 EST
Accidental verbatim duplicate of bug 152129.

*** This bug has been marked as a duplicate of 152129 ***

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