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:
1) Install kernel-BOOT and reboot in to it
2) Build the module as normal
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
-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=0 -D__BOOT_KERNEL_BOOT=1
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
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.
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.
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