Jump to content

Generating a customized kernel module?


Guest gdr75fq
 Share

Recommended Posts

Guest gdr75fq

I installed a video card driver and for i to work I have to generate a customized kernel module. There are 6 parts to it. I can do the last 2 parts.

 

- get the matching Linux kernel source (where do I get this?)

- run "make distclean" (is this the Linux Kernel Source that I am using "make distclean" on)

- setup that kernel source with the config file matching your kernel (how do i set this up?)

- run "make dep" on the kernel source tree (what is this)

Link to comment
Share on other sites

are you compiling the module from source? all you should have to do is install kernel-source and go through the ./configure, make, make all - please try to be more specific, as you may not need to do all of these steps to get to where you want to be.

 

to get the kernel-source, doing:

urpmi kernel-source

as root should work.

Link to comment
Share on other sites

Guest gdr75fq

Hi,

Thanks for the help. I do not know if I am compiling the module from source or not.

 

-I installed the kernel source using "urpmi kernel-source" and it installed.

-I then went to the /usr/src/linux directory. Which was not there before I installed the source.

-When I entered the directory I ran the program "make distclean". It did something, I do not know if I did the right thing.

-I then started trying to figure out how to "setup the kernel source with config file matching your kernel". I could not find the ./configure file though.

-I also do not how to get to the kernel source tree.

 

-------------------------------------------------------------------------------------

Here are the directions for what I am trying to do.

 

2.4 Generating a customized kernel module

-----------------------------------------

 

The FireGL 8700/8800 uses the performance capacity of your workstation

intensively. A precisely tailored kernel module is needed to support some

features, for example, AGP support, busmaster DMA transfers, or memory

mapping. Such a module is loaded at boot time or when the x-server starts

up and remains present for usage with the driver all the time.

 

Note:

If the module is missing, you do not have hardware-accelerated

3D-support and the 2D driver might abort while loading. See

the console outputs of X11 and /var/log/XFree86.0.log for results.

 

You are in need to start the kernel module build manually

- if you spot having no hardware 3D support (run fglrxinfo to check)

- if you have done any important system changes, e.g. a changed kernel

- if you were adviced so whilst the driver installation

 

The binary package provides fully working kernel modules for a few

distributions and kernel versions. So, for some cases, you don't need

to build a kernel module yourself. The installer will notify you if

installation of provided modules did succeed.

 

The FireGL provided kernel modules will not fit your needs, for example,

- if you have a new or customized Linux kernel, or

- if you have kernel symbols versioning enabled.

 

In these cases you must build the configured sources of your kernel

at /usr/src/linux - this is allowed to be a symlink.

To build a customized kernel module you need administrator privileges.

You must manually start two shell scripts to build a customized kernel

module.

 

Perform the following steps:

- get the matching Linux kernel source

- run "make distclean"

- setup that kernel source with the config file matching your kernel

- run "make dep" on the kernel source tree

- go to "/lib/module/fglrx/build_mod" and enter "./make.sh"

- go to "/lib/module/fglrx" and enter "./make_install.sh"

 

Enter /lib/module/fglrx/build_mod and enter (as root) "./make.sh".

Thus you will create a new customer-specific kernel module.

If the creation fails, look up for the reason in the

shell and in the related logfile "make.log".

-------------------------------------------------------------------------------------

 

The things that I do not know how to do are.

 

-Where and how do I run "make distclean?" Do I run in the linux kernel source directory?

 

-How do I setup the kernel source with the config file matching the kernel? Where is the config file? I did not see it in the linux source directory.

 

-How do I get to the kernel source tree? Do I run "make dep" in the kernel source tree directory?

 

 

These are the only question that I have. The bottom three. The rest of the email is just to let you know the directions and all. I you will answer the bottom three questions, that is all that I need.

Link to comment
Share on other sites

the kernel source tree should reside in: /usr/src/linux

 

this is where you would want to run make distclean and make dep. the config file should be there and setup the way mandrake had it setup originally. at the moment I can't remember the name of the config file exactly (i'm not on a linux machine), but it should be there i believe.

Link to comment
Share on other sites

Guest gdr75fq

The config file is what I need to know. If I can find that then it will be setup right. I have looked and cannot find it though. Does anyone know what the name of the linux kernel config file is in the /usr/src/linux directory?

Link to comment
Share on other sites

try running: make menuconfig

 

and then exit out of it (should be a quit option at the very bottom). this should create a config file if you don't have one. otherwise, i would just ignore that step as i'm pretty sure the config file should already exist. besides, the worst that could happen is it won't compile :) and that won't hurt anything...

Link to comment
Share on other sites

Guest gdr75fq

When I am trying to configure the driver settings I

have to go to this directory "/lib/modules/glrx/build_mod"

and run the "./make.sh" file. When I run that file I am

getting an error that says:

 

 

ATI module generator V 2.0

---------------------------------------------------------

---------------------------------------------------------

Error:

kernel includes at /lib/modules/2.4.21-0.13mdk/build/include do not match

current kernel.

they are versioned as "2.4.21-0.13mdkcustom"

instead of "2.4.21-0.13mdk".

You might need to adjust your symlinks:

-/usr/include

-/usr/src/linux

 

 

 

So what I need to do to get Mandrake working is change the

kernel includes from "2.4.21-0.13mdkcustom" to

"2.4.21-0.13mdk". Would anyone tell me how to do that?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...