compile kernel

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


hi....

On Fri, Sep 9, 2011 at 14:52, esmaeil mirzaee <esmaeil.debian at gmail.com> 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.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list