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

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)

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.

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,

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.

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)

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,

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)

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.

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

On 2011-02-22 16:36, chief sealth wrote:

>> 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.

Absolutely. Experimenting is fine, but you don’t learn car mechanics by
starting with replacing the crankshafts…

He made a question that implies he doesn’t know what a linked file is, so
he needs a good read about Linux first.


Cheers / Saludos,

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