Makefile

hello all
Please anyone can give me the right Makefile for compiling module kernel for opensuse 11.2 or 12.2 , and thnx :slight_smile:

On Fri 01 Mar 2013 10:06:01 PM CST, wiss1990 wrote:

hello all
Please anyone can give me the right Makefile for compiling module
kernel for opensuse 11.2 or 12.2 , and thnx :slight_smile:

Hi
It’s easier to build as a kernel kmp via rpm… eg
https://build.opensuse.org/package/show?project=home%3Amalcolmlewis%3Arealtek_drivers&package=rts_pstor

If you download the source tarball, there is a makefile in there, I use
a patch to remove it all…

–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.28-2.20-desktop
up 4 days 19:22, 5 users, load average: 0.01, 0.02, 0.05
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

thnx for the reply! :slight_smile:
but i can just use that makefile without any patch or something ?

On Sat, 02 Mar 2013 19:06:01 +0000, wiss1990 wrote:

> thnx for the reply! :slight_smile:
> but i can just use that makefile without any patch or something ?

It would be impossible to say without knowing specifically what it is
you’re trying to build.

Jim

–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

i said it’s for module developpement

On Sat, 02 Mar 2013 21:16:01 +0000, wiss1990 wrote:

> i said it’s for module developpement

That is not specific enough. Are you building a new module for a new
piece of hardware, trying to build a module for hardware that’s nor part
of the stock kernel, or what?

What’s your experience in software development?

Jim

–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

it’s not a big deal , for exemple i will just insert a module in the kernel and dmsg a “hello world”

On Sat, 02 Mar 2013 23:06:01 +0000, wiss1990 wrote:

> it’s not a big deal , for exemple i will just insert a module in the
> kernel and dmsg a “hello world”

So are you just starting out with kernel module development?

If you are, then you’re going to want to read up on how kernel modules
are developed. It’s more involved than just creating a makefile, and a
good tutorial on building kernel modules will explain what you need to
know about how to build them, starting from the basics.

It’s not the same as writing regular programs.

So again, I ask: What’s your level of development experience?

Jim

–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun, 03 Mar 2013 00:13:10 +0000, Jim Henderson wrote:

> So are you just starting out with kernel module development?

A few seconds of using Google turned this up:

http://blog.markloiseau.com/2012/04/hello-world-loadable-kernel-module-
tutorial/

Maybe that’ll help.

Jim

–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

thnx for replies :slight_smile:
my experience : i did some simple modules for debian but when i switched to opensuse i had many problems …

this is a tutorial for ubento and i itried it but it dont work on opensuse

On Sun, 03 Mar 2013 11:26:03 +0000, wiss1990 wrote:

> this is a tutorial for ubento and i itried it but it dont work on
> opensuse

It should be enough to get you started, though. While the packages are
going to be different (you need source and development packages, on
openSUSE it’s “source” and “devel” that you want to search for for the
kernel.)

If you’re wanting to do Linux kernel module development, you have to be
willing to do more than have people spoon-feed you how to do it.

Are you doing this for a class? Your approach makes it sound like this
is a homework assignment.

Jim

–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun, 03 Mar 2013 11:26:01 +0000, wiss1990 wrote:

> thnx for replies :slight_smile:
> my experience : i did some simple modules for debian but when i switched
> to opensuse i had many problems …

OK, so you’re relatively new to kernel module development. The link that
I provided you is a starting point (as I said the package names will be
different), but there are also links on that page to basic/general
information about kernel module development.

Jim

–
Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun 03 Mar 2013 06:49:27 PM CST, Jim Henderson wrote:

On Sun, 03 Mar 2013 11:26:01 +0000, wiss1990 wrote:

> thnx for replies :slight_smile:
> my experience : i did some simple modules for debian but when i
> switched to opensuse i had many problems …

OK, so you’re relatively new to kernel module development. The link
that I provided you is a starting point (as I said the package names
will be different), but there are also links on that page to
basic/general information about kernel module development.

Jim

Hi
Works/builds fine for me…
https://build.opensuse.org/package/show?package=hello-world&project=home%3Amalcolmlewis%3ATESTING

–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.28-2.20-desktop
up 6 days 16:49, 4 users, load average: 0.12, 0.07, 0.08
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile