kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mnm.kernel@gmail.com (Manavendra Nath Manav)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Building modules: missing scripts/basic/Makefile
Date: Mon, 6 Jun 2016 09:02:27 +0530	[thread overview]
Message-ID: <CAJKgH8CpN7jFhycHWcuxMdP_ww3nfpBA2TZEyio2DRNpC89+gg@mail.gmail.com> (raw)
In-Reply-To: <20160605184415.GB4147@StevensLaptop.attlocal.net>

Hi Steven,

On Mon, Jun 6, 2016 at 12:14 AM, Steven Laabs <swlaabs@gmail.com> wrote:
> Hi,
>
> I'm trying to build my first kernel module but when running the makefile, make tries to use a file at /usr/src/linux-headers-3.16.0-4-common/scripts/basic/Makefile which gives me the "No such file or directory" error. I've looked into the folder it is referencing and it  does not have any Makefile, the only file in that location is the fixdep executable. The scripts folder itself is linked to ../../lib/linux-kbuild-3.16/scripts.
>
> The Makefile I am using (located in a folder in my home directory):
>
> obj-m = hello.o
> KDIR ?= /lib/modules/$(shell uname -r)/build
>
> all:
>     make -C $(KDIR) M=$(PWD) modules
>
> clean:
>     make -C $(KDIR) M=$(PWD) clean
>
> I'm not quite sure where to look for this Makefile as I believe I have all of the proper headers installed, and I am running everything with the proper permission level.
>
> Any ideas on what I may be missing here?
>
> Thanks,
> Steven
>

You should use "+=" and not "="
-- obj-m = hello.o
++ obj-m += hello.o

  reply	other threads:[~2016-06-06  3:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-05 18:44 Building modules: missing scripts/basic/Makefile Steven Laabs
2016-06-06  3:32 ` Manavendra Nath Manav [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-06 16:47 Steven Laabs
2016-06-06 18:08 ` Aruna Hewapathirane
2016-06-06 19:55 Steven Laabs
2016-06-06 20:08 ` Aruna Hewapathirane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJKgH8CpN7jFhycHWcuxMdP_ww3nfpBA2TZEyio2DRNpC89+gg@mail.gmail.com \
    --to=mnm.kernel@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).