* Building modules: missing scripts/basic/Makefile
@ 2016-06-05 18:44 Steven Laabs
2016-06-06 3:32 ` Manavendra Nath Manav
0 siblings, 1 reply; 6+ messages in thread
From: Steven Laabs @ 2016-06-05 18:44 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Building modules: missing scripts/basic/Makefile
2016-06-05 18:44 Building modules: missing scripts/basic/Makefile Steven Laabs
@ 2016-06-06 3:32 ` Manavendra Nath Manav
0 siblings, 0 replies; 6+ messages in thread
From: Manavendra Nath Manav @ 2016-06-06 3:32 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Building modules: missing scripts/basic/Makefile
@ 2016-06-06 16:47 Steven Laabs
2016-06-06 18:08 ` Aruna Hewapathirane
0 siblings, 1 reply; 6+ messages in thread
From: Steven Laabs @ 2016-06-06 16:47 UTC (permalink / raw)
To: kernelnewbies
>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
Thanks for pointing that out, I've made that correction. Still missing the Makefile as previously mentioned unfortunately so I am unable to build.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Building modules: missing scripts/basic/Makefile
2016-06-06 16:47 Steven Laabs
@ 2016-06-06 18:08 ` Aruna Hewapathirane
0 siblings, 0 replies; 6+ messages in thread
From: Aruna Hewapathirane @ 2016-06-06 18:08 UTC (permalink / raw)
To: kernelnewbies
> Thanks for pointing that out, I've made that correction. Still missing the Makefile as previously mentioned unfortunately so I > am unable to build.
Hi Steven, please verify the headers are correctly installed by running:
dpkg -s linux-headers-$(uname -r) .
If they are not properly installed please run:
apt-get install kernel-headers-$(uname -r)
You should be able to build :)
Good luck - Aruna
^ permalink raw reply [flat|nested] 6+ messages in thread
* Building modules: missing scripts/basic/Makefile
@ 2016-06-06 19:55 Steven Laabs
2016-06-06 20:08 ` Aruna Hewapathirane
0 siblings, 1 reply; 6+ messages in thread
From: Steven Laabs @ 2016-06-06 19:55 UTC (permalink / raw)
To: kernelnewbies
> Hi Steven, please verify the headers are correctly installed by running:
> dpkg -s linux-headers-$(uname -r) .
>
> If they are not properly installed please run:
> apt-get install kernel-headers-$(uname -r)
>
> You should be able to build :)
>
> Good luck - Aruna
Hi Aruna,
I ran dpkg -s linux-headers-$(uname -r) and the status indicated it was all installed ok. Just to be sure I reinstalled it as well as the dependencies (linux-headers-3.16.0-4-common and linux-kbuild-3.16). Reinstalling them seems to have not made any difference as my Makefile is still looking for a Makefile that does not seem to exist (which ultimately should be located in /usr/src/linux-kbuild-3.16/scripts/basic/).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Building modules: missing scripts/basic/Makefile
2016-06-06 19:55 Steven Laabs
@ 2016-06-06 20:08 ` Aruna Hewapathirane
0 siblings, 0 replies; 6+ messages in thread
From: Aruna Hewapathirane @ 2016-06-06 20:08 UTC (permalink / raw)
To: kernelnewbies
<snip>
> Hi Aruna,
>
> I ran dpkg -s linux-headers-$(uname -r) and the status indicated it was all installed ok. Just to be sure I reinstalled it as well > as the dependencies (linux-headers-3.16.0-4-common and linux-kbuild-3.16). Reinstalling them seems to have not made
> any difference as my Makefile is still looking for a Makefile that does not seem to exist (which ultimately should be located
> in /usr/src/linux-kbuild-3.16/scripts/basic/).
Hi Steven,
Could you please post the output of make when you run it please ? And
what does ls -alh /lib/modules show you ? And what does ls -alh
/usr/src show you ?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-06 20:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-05 18:44 Building modules: missing scripts/basic/Makefile Steven Laabs
2016-06-06 3:32 ` Manavendra Nath Manav
-- 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
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).