I am using beaglebone, that contains Angstrom distribution. In that there is no build directory, so I have downloaded the kernel source from kernel.org, but the size of that is too much for my SD card (~430 MB). So I thought of removing some unwanted files or directories.
Which directories are not necessary to build a kernel module? And is there any other method to get those files only?
You can cross-compile kernel on your PC – it would be faster and much more comfortable.
All you have to do is to get cross-compiler. As i remember there were some prepared for beagleboard so you can try to use them. Of course you can build it by yourself – there are tools such as crosstool-ng or buildroot, which can help you a lot.