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 _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev