Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all! I would like to compile my own module acording to manual described at: cyberciti.biz/tips/compiling-linux-kernel-module.html I prepared files for my new module: - module.c and - makefile I can ...
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    2

    I can not compile linux module

    Hi all!

    I would like to compile my own module acording to manual described at:

    cyberciti.biz/tips/compiling-linux-kernel-module.html

    I prepared files for my new module:
    - module.c and
    - makefile
    I can not compile this module (no any file with .ko extention is created). I have linux (UBUNTU) sources at /usr/src and I have kernel headers isntalled.

    After enter the "make" command I received:

    "make: there is nothing to do in `all'.".

    PS: Do I need some more packages to start "make" command work properly?

    Rafal

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    Hi,

    Post the contents of your Makefile.

  3. #3
    Just Joined!
    Join Date
    Jan 2012
    Posts
    2
    obj-m = module.o
    KVERSION = $(shell uname -r)
    all:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
    clean:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

  4. #4
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    do you have a TAB character before the two make lines, versus 8 spaces? make is finicky...

Posting Permissions

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