LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Non-smp kernel not sane - problems with a compilation of the kernel modules (http://www.linuxquestions.org/questions/slackware-14/non-smp-kernel-not-sane-problems-with-a-compilation-of-the-kernel-modules-4175425830/)

igadoter 09-05-2012 03:55 PM

Non-smp kernel not sane - problems with a compilation of the kernel modules
 
Hi,
Yesterday I switched to the non-smp generic kernel on my Slackware 12.2 virtual machine (VirtualBoxv4.1.18). I've got troubles with the compilation of the GuestAdditions. I investigated the cause and I found such thing. Here is a part from the script which compiles GuestAddition kernel modules
Code:

KERN_VER=`uname -r`
KERN_DIR="/lib/modules/$KERN_VER/build"
echo $KERN_DIR
if [ -d "$KERN_DIR" ]; then
    KERN_REL=`make -sC $KERN_DIR --no-print-directory kernelrelease 2>/dev/null || true`
          if [ -z "$KERN_REL" -o "x$KERN_REL" = "x$KERN_VER" ]; then
            return 0
        fi
    fi
    printf "\nThe headers for the current running kernel were not found. If the
following\nmodule compilation fails then this could be the reason.\n"

This is the part called 'the sanity' check. The script for non-smp kernel returns the line after the 'printf' command. The problem is that the
'KERN_REL' always have the value with '-smp' postfix added. But for non-smp kernel there is no '-smp' postfix. On my machine
Code:

bash$ uname -r
2.6.27.7

but
Code:

echo $KERN_REL
2.6.27.7-smp

The problem is that compiled modules have inappropriate format and won't be loaded during the boot.

T3slider 09-05-2012 04:34 PM

I'm guessing you're running into this:
Quote:

Originally Posted by CHANGES_AND_HINTS.TXT
If you decide to use one of the non-SMP kernels, you will need to follow the
instructions in /extra/linux-2.6.27.7-nosmp-sdk/README.TXT to modify your
kernel sources for non-SMP usage. Note that this only applies if you are
using the Slackware-provided non-SMP kernel - if you build a custom kernel,
the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
correct kernel source so long as you don't (re)move it.

You should follow those instructions to prepare the kernel source for non-smp module compilation.

igadoter 09-05-2012 04:45 PM

Thanks. Nice hint I will follow this. Running -smp kernel on the virtual machine with one processor is rather pointless...


All times are GMT -5. The time now is 10:03 AM.