Linux Device Drivers tutorial make [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Hi I am very new to kernel development and am following this tutorial
.



When I try to make module:



 #include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)

printk(KERN_ALERT "Hello, worldn");
return 0;

static void hello_exit(void)

printk(KERN_ALERT "Goodbye, cruel worldn");

module_init(hello_init);
module_exit(hello_exit);


using "make" and the makefile as written in the book.



 obj-m := hello.o


I get error




make: *** no targets. stop.




Please help and Thank you in advance







share|improve this question














closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – Kusalananda, sebasth
If this question can be reworded to fit the rules in the help center, please edit the question.
















    up vote
    0
    down vote

    favorite












    Hi I am very new to kernel development and am following this tutorial
    .



    When I try to make module:



     #include <linux/init.h>
    #include <linux/module.h>
    MODULE_LICENSE("Dual BSD/GPL");
    static int hello_init(void)

    printk(KERN_ALERT "Hello, worldn");
    return 0;

    static void hello_exit(void)

    printk(KERN_ALERT "Goodbye, cruel worldn");

    module_init(hello_init);
    module_exit(hello_exit);


    using "make" and the makefile as written in the book.



     obj-m := hello.o


    I get error




    make: *** no targets. stop.




    Please help and Thank you in advance







    share|improve this question














    closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – Kusalananda, sebasth
    If this question can be reworded to fit the rules in the help center, please edit the question.














      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Hi I am very new to kernel development and am following this tutorial
      .



      When I try to make module:



       #include <linux/init.h>
      #include <linux/module.h>
      MODULE_LICENSE("Dual BSD/GPL");
      static int hello_init(void)

      printk(KERN_ALERT "Hello, worldn");
      return 0;

      static void hello_exit(void)

      printk(KERN_ALERT "Goodbye, cruel worldn");

      module_init(hello_init);
      module_exit(hello_exit);


      using "make" and the makefile as written in the book.



       obj-m := hello.o


      I get error




      make: *** no targets. stop.




      Please help and Thank you in advance







      share|improve this question














      Hi I am very new to kernel development and am following this tutorial
      .



      When I try to make module:



       #include <linux/init.h>
      #include <linux/module.h>
      MODULE_LICENSE("Dual BSD/GPL");
      static int hello_init(void)

      printk(KERN_ALERT "Hello, worldn");
      return 0;

      static void hello_exit(void)

      printk(KERN_ALERT "Goodbye, cruel worldn");

      module_init(hello_init);
      module_exit(hello_exit);


      using "make" and the makefile as written in the book.



       obj-m := hello.o


      I get error




      make: *** no targets. stop.




      Please help and Thank you in advance









      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 22 '17 at 17:24









      GAD3R

      22.7k154895




      22.7k154895










      asked Oct 22 '17 at 17:18









      muhammad shoaib

      41




      41




      closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – Kusalananda, sebasth
      If this question can be reworded to fit the rules in the help center, please edit the question.




      closed as off-topic by Jeff Schaller, Stephen Rauch, Kusalananda, G-Man, sebasth Oct 22 '17 at 21:08


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – Kusalananda, sebasth
      If this question can be reworded to fit the rules in the help center, please edit the question.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          a sample Makefile:



          obj-m += hello.o

          all:
          make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

          clean:
          make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


          The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.






          share|improve this answer





























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            a sample Makefile:



            obj-m += hello.o

            all:
            make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

            clean:
            make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


            The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.






            share|improve this answer


























              up vote
              1
              down vote













              a sample Makefile:



              obj-m += hello.o

              all:
              make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

              clean:
              make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


              The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.






              share|improve this answer
























                up vote
                1
                down vote










                up vote
                1
                down vote









                a sample Makefile:



                obj-m += hello.o

                all:
                make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

                clean:
                make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


                The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.






                share|improve this answer














                a sample Makefile:



                obj-m += hello.o

                all:
                make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

                clean:
                make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


                The linux-headers (kernel-headers) and the build-essential (development-tools) should be installed.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Oct 22 '17 at 20:06









                Jeff Schaller

                32.1k849109




                32.1k849109










                answered Oct 22 '17 at 18:17









                GAD3R

                22.7k154895




                22.7k154895












                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)