Bug 54051 - Module compilation for kernel-BOOT
Module compilation for kernel-BOOT
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-26 13:10 EDT by Peter Bowen
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-09-27 15:26:39 EDT
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 Peter Bowen 2001-09-26 13:10:45 EDT
When building a module for the BOOT kernel, a depmod reports a number of
unresolved symbols.  I tried two different procedures to compile the module:

Procedure 1:
1) Install kernel-BOOT and reboot in to it
2) Build the module as normal

Procedure 2:
1) Boot into a normal kernel (i686 SMP in this case)
2) When building the module, add the following flags to the compile to
override the default build options, as specified in /boot/kernel.h and
rhconfig.h:
-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=0 -D__BOOT_KERNEL_BOOT=1
-D__BOOT_KERNEL_BOOTSMP=0 -D__BOOT_KERNEL_ENTERPRISE=0

When using Procedure 2, I get this list of unresolved symbols from depmod:

depmod: *** Unresolved symbols in /lib/modules/2.4.7-10BOOT/monte/kmonte.o
depmod: 	rwsem_wake
depmod: 	rwsem_down_read_failed

In the past, using RH kernel RPMS for 2.2.x kernels, I haven't had a
problem using procedure 2.  But, using the 2.4.7-10 kernel RPMS, this
doesn't seem to work.  I also tried adding -D__MODULE_KERNEL_i386=1
-D__MODULE_KERNEL_i686=0, but this didn't help.

I hope that I am simply doing something wrong, but I suspect that something
in the Red Hat kernel header magic isn't working properly.
Comment 1 Peter Bowen 2001-09-27 15:26:35 EDT
This bug is caused by the fact that rhconfig.h only checks whether
__MODULE_KERNEL_<arch> is defined, rather than also checking whether it is set
to 1, as the checks for __BOOT_KERNEL_<type> do.
Comment 2 Peter Bowen 2001-09-28 11:24:36 EDT
Final notes:

1) it would be nice if the rhconfig.h was changed as noted above

2) the portable, proper defines are 

-D__BOOT_KERNEL_H_ -D__MODULE_KERNEL_i386=1 -D__BOOT_KERNEL_BOOT=1

if you add the __BOOT_KERNEL_H, then everything works correctly

As there are appropriate defines, I am going to close this as NOTABUG

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