Background information: I am testing on a Cortex-A9 panda board.
Thanks, Juan
-----Original Message----- From: Juan Gao Sent: 26 August 2011 14:23 To: 'linaro-dev@lists.linaro.org' Subject: Erro "make: *** /lib/modules/2.6.38-1003-linaro-omap/build: No such file or directory."
Dear Linaro team,
I have a problem when I try to make a module.
To make the module file xx.c, I have the following command line in my Makefile:
make -C /lib/modules/$(shell uname -r)/build M=$(pwd) modules
an error occured:
make: *** /lib/modules/2.6.38-1003-linaro-omap/build: No such file or directory.
I looked up the /lib/modules/ folder, there are two sub folders:
/lib/modules/2.6.38-1003-linaro-omap /lib/modules/2.6.38-1208-omap4
Under /lib/modules/2.6.38-1003-linaro-omap, there is not a 'build' folder, but under /lib/modules/2.6.38-1208-omap4, there is the 'build' folder that is needed for building the modules.
Please could you kindly let me know why this happens, and how to resolve this issue?
Many thanks, Juan
------------------------------------------------------------------ Juan Gao Software Applications Engineer--Compiler tools UK Support Team: +44(0)1223 400600 ARM Ltd. US Support Team: +1 512 381 2928 110 Fulbourn Road Direct Dial: +44(0)1223 406988 Cambridge CB1 9NJ Fax: +44(0)1223 400410 England E-Mail: Juan.Gao@arm.com ------------------------------------------------------------------
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Hi there,
On Fri, Aug 26, 2011 at 05:38:11PM +0100, Juan Gao wrote:
Dear Linaro team,
I have a problem when I try to make a module.
To make the module file xx.c, I have the following command line in my Makefile:
make -C /lib/modules/$(shell uname -r)/build M=$(pwd) modules
an error occured:
make: *** /lib/modules/2.6.38-1003-linaro-omap/build: No such file or directory.
I looked up the /lib/modules/ folder, there are two sub folders:
/lib/modules/2.6.38-1003-linaro-omap /lib/modules/2.6.38-1208-omap4
Under /lib/modules/2.6.38-1003-linaro-omap, there is not a 'build' folder, but under /lib/modules/2.6.38-1208-omap4, there is the 'build' folder that is needed for building the modules.
Please could you kindly let me know why this happens, and how to resolve this issue?
The /lib/modules/*/build link is not part of the kernel binary package, so by default it will often be absent from the filesystem.
To install the needed stuff for building new modules against an existing kernel, you'll need to install the relevant linux-headers package.
If you're using one of the linaro releases, then you should be able to do this:
sudo apt-get install linux-headers-`uname -r`
I think this will provide you with the configured build directory you need, unless you're using a post-release updated kernel which has been superseded (in which case you may need to upgrade to the latest kernel).
Cheers ---Dave