Results 1 to 6 of 6

Thread: Which packages are needed to compile a kernel module?

  1. #1
    Join Date
    Aug 2012
    Location
    Cradock
    Posts
    3

    Cool Which packages are needed to compile a kernel module?

    I have openSuse 12.1 after being a loyal ubuntu follower since 2007 (11.10 onward failed to recognize my Lexmark printer!)

    I want to compile a module from the source code - the "samsung-backlight driver"

    Which packages do I need installing?

    I have followed the instructions on comment #3

    http://forums.opensuse.org/english/g...0-gf-330m.html

    Yet when I "sudo make"

    I get the following error

    make -C /lib/modules/3.1.10-1.16-default/build M= modules
    make[1]: Entering directory `/usr/src/linux-3.1.10-1.16-obj/i386/default'
    Using /usr/src/linux-3.1.10-1.16 as source for kernel
    GEN /usr/src/linux-3.1.10-1.16-obj/i386/default/Makefile
    CHK include/linux/version.h
    CHK include/generated/utsrelease.h
    make[4]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'. Stop.
    make[3]: *** [prepare0] Error 2
    make[2]: *** [sub-make] Error 2
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/linux-3.1.10-1.16-obj/i386/default'
    make: *** [all] Error 2

    Do I need the full source for the kernel installed?
    Are there any packages that I am missing?

    Regards







  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,721

    Default Re: Which packages are needed to compile a kernel module?

    I guess you have installed the Basic developement pattern because you have make. I think that installiing the package kernel-source is a good idea.

    What is also a good idea is not running the make as root. Only installing must be done as root.

    Also please use CODE tags when posting computer text here: http://forums.opensuse.org/english/i...ags-guide.html And when yyou do that copy/paste including the prompt, the command, the output and the next prompt. Then there is no need to say
    Yet when I "sudo make"

    I get the following error
    because it is all there.
    Henk van Velden

  3. #3
    Join Date
    Nov 2009
    Location
    Uruguay
    Posts
    737

    Default Re: Which packages are needed to compile a kernel module?

    hcvv wrote:
    >
    > I guess you have installed the Basic developement pattern because you
    > have -make.- I think that installiing the package- kernel-source- is a
    > good idea.
    >
    > What is also a good idea is not running the -make- as root. Only
    > installing must be done as root.
    >
    > Also please use CODE tags when posting computer text here:
    > http://tinyurl.com/2wwx7l9 And when yyou do that copy/paste including
    > the prompt, the command, the output and the next prompt. Then there is
    > no need to say
    >> *Yet when I "sudo make"
    >>
    >> I get the following error*

    > because it is all there.
    >
    >

    You need to install the kernel devel pattern,

    Code:
    zypper in -t pattern devel_kernel
    and as hcvv say, NEVER make nothing as root

  4. #4

    Default Re: Which packages are needed to compile a kernel module?

    Quote Originally Posted by VampirD View Post
    You need to install the kernel devel pattern,

    Code:
    zypper in -t pattern devel_kernel
    No.

    Type:
    Code:
    $ zypper info -t pattern devel_kernel
    intead of zypper in ( = install) and you'll notice which packages you are missing.

    You need the kernel-devel package (not to be confused with the devel_kernel pattern) that matches the installed kernel - meaning if it is not alreading installed you MUST update your kernel first. See this post http://forums.opensuse.org/english/g...ml#post2481161. It's about the same story.

    @simonjames,
    If you followed the instructions in this post http://forums.opensuse.org/english/g...ml#post2337959 (which was meant for 11.4 btw), you already have the required packages. From which directory are you running the 'make' command?

  5. #5
    Join Date
    Aug 2012
    Location
    Cradock
    Posts
    3

    Default Re: Which packages are needed to compile a kernel module?

    Thanks for replies.

    Installed kernel-devel package

    I get the same error messages as before.

    will try the other suggestions.

  6. #6
    josephkk NNTP User

    Default Re: Which packages are needed to compile a kernel module?

    On Wed, 29 Aug 2012 21:16:03 GMT, simonjames
    <simonjames@no-mx.forums.opensuse.org> wrote:

    >
    >Thanks for replies.
    >
    >Installed kernel-devel package
    >
    >I get the same error messages as before.
    >
    >will try the other suggestions.


    When you use yast to install stuff, you can use what is called "patterns".
    Installing development software by patterns is really the best choice. It
    brings in a lot of related stuff that is not actual dependencies. Really
    worthwhile.

    ?-)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •