Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hi all, I am installed fc6 on my system. I have worked with fc4 earlier. I was quite familiar with kernel modules compilation.I have written one simple module on my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    14

    Problem compiling a kernel module on fedora core 6


    Hi all,
    I am installed fc6 on my system. I have worked with fc4 earlier. I was quite familiar with kernel modules compilation.I have written one simple module on my fc6 machine. Then i tried to compile that module. During compilation i got the following error

    Error: make -c /lib/modules/2.6.18.11.fc6xen/build M=/home/yugandhar/drivers/
    /lib/modules/2.6.18.11.fc6xen/build No such file or directory.

    But when i compile the same module on fc4 which uses 2.6.11 kernel with same Makefile everything is working fine. Can any one help how can i solve the problem.

    Regards,
    Yugandhar

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    Do you have the kernel-devel package that matches your kernel, installed on your system?

  3. #3
    Just Joined!
    Join Date
    Jun 2007
    Posts
    14

    Problem compiling a kernel module on fedora core 6

    Hi daark,
    what does kernel-dlevel package do. I don't think i am having it. Where can i download the package from.

  4. #4
    Just Joined! s13884's Avatar
    Join Date
    Apr 2007
    Posts
    28
    Quote Originally Posted by yugandhargv View Post
    Hi daark,
    what does kernel-dlevel package do. I don't think i am having it. Where can i download the package from.

    Kernel-devel Package is necessary for kernel module development.
    You need to build the kernel tree.

    go for system-config-package and search in package list for kernel development kit.

    Install the kernel development kit.

    After Let me know if you have any problem.

    Cheers
    -S

  5. #5
    Just Joined! dataplayer's Avatar
    Join Date
    Jun 2007
    Posts
    3
    I too am getting the following error when compiling a module in FC 6

    make: *** /lib/modules/2.6.18-1.2798.fc6xen/build: No such file or directory. Stop.

    I know that I need to install the kernel development kit which I did following the instructions at the following link

    Personal Fedora Core 6 Installation Guide.

    The error is quite odd since that directory does exist but its linked to
    another directory it looks like

    build -> ../../../usr/src/kernels/2.6.18-1.2798.fc6-xen-x86_64

    I guess the problem is that directory "kernels" does not exist.

    any other ideas would be greatly appreciated.
    thanks,
    \nic

  6. #6
    Just Joined! vijay_kernel's Avatar
    Join Date
    Apr 2007
    Posts
    77
    Error: make -c /lib/modules/2.6.18.11.fc6xen/build M=/home/yugandhar/drivers/
    /lib/modules/2.6.18.11.fc6xen/build No such file or directory.


    there is no directory called build, just check out that and and you need to have full source tree where in your case it is lacking...

  7. #7
    Just Joined! vijay_kernel's Avatar
    Join Date
    Apr 2007
    Posts
    77
    Error: make -c /lib/modules/2.6.18.11.fc6xen/build M=/home/yugandhar/drivers/
    /lib/modules/2.6.18.11.fc6xen/build No such file or directory.


    there is no directory called build, just check out that and and you need to have full source tree where in your case it is lacking...

  8. #8
    Just Joined! dataplayer's Avatar
    Join Date
    Jun 2007
    Posts
    3

    could you elaborate a little

    dear vijay_kernel,
    could you say a little more about your comment. I'm not quite sure what you mean. when i run the "make" command it looks for the build "directory" (since you say it doesn't exist) but it is linked to another directory that I know for sure no exists called "kernels". if you have a fix for this let me know I would really appreciate it.

    thanks,
    \nic

  9. #9
    Just Joined! vijay_kernel's Avatar
    Join Date
    Apr 2007
    Posts
    77
    Dataplayer,

    Please post your Makefile and check

    cd /lib/modules/`uname -r`/build/

    I know it is looking for the build directory and it should have to , it works only when ur " build " directory is there.

    Post your Makefile , let me check it.

  10. #10
    Just Joined! dataplayer's Avatar
    Join Date
    Jun 2007
    Posts
    3
    Dear Vijay,
    Here is my Makefile. I guess the problem might in that I did not install "kernel development" at install. Instead I installed it by hand after install. Maybe something went wrong there I will spend my day today trying to figure that out. Any advice on how to do this after install so that it works? Thank you for your help.

    \dataplayer

    ifneq ($(KERNELRELEASE),)
    obj-m := SerQT_PCI.o

    else
    KDIR := /lib/modules/$(shell uname -r)/build
    PWD := $(shell pwd)

    default:
    $(MAKE) -C$(KDIR) SUBDIRS=$(PWD) modules
    endif

    install:
    $(shell ./startup)

    clean:
    rm -f *.o *~ core *.ko

    uninstall:
    $(shell ./remove)

Page 1 of 2 1 2 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
  •