Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Why cannot the module be compiled?

  1. #1

    Default Why cannot the module be compiled?

    Hi,

    I installed the kernel source on Linux 11.3 with Yast2/pattern/kernel development. The tutorial gaves the command:


    $ make -C /usr/src/kernel-source-2.6.8 M=pwd modules


    But that command does not work. Linux complaints: no such file.

    I check the path and find they like:


    /usr/src/linux/
    /usr/src/linux-2.6.34.7-0.7/
    /usr/src/linux-2.6.34.7-0.7-obj/

    The first path:
    /usr/src/linux/
    displayed in italic style. Why it in italic?

    What is the difference between the second and third directory?

    I am new to Linux. Thanks.



    ..............................................
    Just want to try device driver compiling on OPENSUSE 11.3 with the web tutorial:

    Writing device drivers in Linux: A brief tutorial


    Unfortunately, the response of "make" command is:

    no rule

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Why cannot the module be compiled?

    On 2011-02-22 02:06, freerjw wrote:

    > What is the difference between the second and third directory?


    Search for a linux tutorial, subject "links".

    >
    > I am new to Linux. Thanks.


    Then don't try compiling the kernel. Seriously.


    If you insist, read the suse readme file on this.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  3. #3

    Default Re: Why cannot the module be compiled?

    Thanks. I wanted to compile a device driver module. I read the tutorial. It says:

    "Since the release of kernel version 2.6.x, compiling modules has become slightly more complicated. First, you need to have a complete, compiled kernel source-code-tree. If you have a Debian Sarge system, you can follow the steps in Appendix B (towards the end of this article). In the following, I’ll assume that a kernel version 2.6.8 is being used."

    What is the source-code-tree? That kernel source folder is not? Please explain it to me. I have very limited knowledge on Linux now. Thanks.

  4. #4
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Why cannot the module be compiled?

    I found a better example here for you to look at:

    Howto: Build Linux Kernel Module Against Installed Kernel w/o Full Kernel Source Tree

    I must say that without knowing more about you, this is not were I would start using openSUSE. Do you have some sort of goal in mind here?

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  5. #5

    Default Re: Why cannot the module be compiled?

    Thanks. I just want to begin from the simple 'Hello world" test. The end goal is a real-time Linux. Any thoughts on real-time kernel?

    For my Linux installed laptop, I suppose that I can insert a module (a driver). For the rt source within the rpm of OPENSUSE 11.3, what board can run on it? It is still my laptop? I do not find the information on what machine the rt source (kernel) supports.

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Why cannot the module be compiled?

    On 2011-02-22 03:06, freerjw wrote:
    >
    > Thanks. I wanted to compile a device driver module. I read the tutorial.
    > It says:
    >
    > "Since the release of kernel version 2.6.x, compiling modules has
    > become slightly more complicated. First, you need to have a complete,
    > compiled kernel source-code-tree. If you have a Debian Sarge system,


    You are not reading the suse readme...

    /usr/src/linux/README.SUSE


    > What is the source-code-tree? That kernel source folder is not? Please
    > explain it to me. I have very limited knowledge on Linux now. Thanks.


    It is not possible to explain, you need to learn a lot of things first. You
    do not know, for example, what a link is, why the listing had names in
    italic...

    I can explain doubts, but not the entire book.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  7. #7
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Why cannot the module be compiled?

    freerjw
    Thanks. I just want to begin from the simple 'Hello world" test. The end goal is a real-time Linux. Any thoughts on real-time kernel?

    For my Linux installed laptop, I suppose that I can insert a module (a driver). For the rt source within the rpm of OPENSUSE 11.3, what board can run on it? It is still my laptop? I do not find the information on what machine the rt source (kernel) supports.
    freerjw, I am thinking that having a kernel module say hello world would be very odd indeed. Perhaps start more simply with BASH.

    Unix / Linux Bourne / Bash Shell Scripting Tutorial [ steve-parker.org ]

    Also, I would suggest you figure out how to even compile a kernel. There are lots of example in this very forum if you search on it. The most common need to compile and add a module on your own is to do so with wireless modules such as those for Broadcom. I might even get something that required this, download the source code and compile/add one per their instructions. It is more likely to work that what you were doing before.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Why cannot the module be compiled?

    On 2011-02-22 12:06, freerjw wrote:
    >
    > Thanks. I just want to begin from the simple 'Hello world" test. The end
    > goal is a real-time Linux. Any thoughts on real-time kernel?


    For "hello world" you do not need a kernel module. There are thousands of
    things you should learn first...

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  9. #9
    Join Date
    Aug 2008
    Location
    Seattle, WA
    Posts
    1,376

    Default Re: Why cannot the module be compiled?

    Quote Originally Posted by robin_listas View Post
    On 2011-02-22 12:06, freerjw wrote:
    >
    > Thanks. I just want to begin from the simple 'Hello world" test. The end
    > goal is a real-time Linux. Any thoughts on real-time kernel?

    For "hello world" you do not need a kernel module. There are thousands of
    things you should learn first...
    I think the OP is experimenting. Not a bad way to dive into Linux, but you're right, there are other things to learn first.

  10. #10
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,586

    Default Re: Why cannot the module be compiled?

    For real time install the RT kernel. It is available in Yast.

Page 1 of 2 12 LastLast

Posting Permissions

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