compile kernel

Mulyadi Santosa mulyadi.santosa at
Sat Sep 10 02:56:40 EDT 2011


On Fri, Sep 9, 2011 at 14:52, esmaeil mirzaee <esmaeil.debian at> wrote:
> Hi all
> I apologize for weak English and speaking ambiguously.
> I download Linux kernel and I love to learn about it.
> I try to compile a file like ~/kernel/acct.c but I've got error anyone
> can help me.
> $ gcc acct.c -o ac
> acct.c:46: fatal error: linux/mm.h: No such file or directory
> compilation terminated.

easier if you use the makefile, e,g:

make fs/ext2.ko

mind you, this is just an example, but bottomline is, instead of busy
with including all the neccessary headers via -I gcc options, it is
way easier to do that via "make" command.


Mulyadi Santosa
Freelance Linux trainer and consultant


More information about the Kernelnewbies mailing list