compiling kernel files with gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dear all!
  i want to compile my "/usr/src/inux/kernel/sched.c" with gcc -E .i
want to do this because i want to study and understand the "sched.c" .
when i was studying it i came to know that in linux many MACRO name
are used in multiple files. so ; it is very tough to know that which
value of MACRO my "sched.c" is actually using. for this purpose one of
my friend has suggested to use gcc -E option. but when i run it i have
following problem:--


[root@localhost root]# gcc -E /usr/src/linux/kernel/sched.c -isystem
/usr/src/linux/include >> backup.out

In file included from /usr/src/linux/include/linux/sched.h:6,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/kernel/sched.c:20:
/usr/src/linux/include/linux/config.h:6:2: #error including kernel
header in userspace; use the glibc headers instead!
In file included from /usr/src/linux/include/linux/signal.h:4,
                 from /usr/src/linux/include/linux/sched.h:25,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/kernel/sched.c:20:
/usr/src/linux/include/linux/list.h:682:2: warning: #warning "don't
include kernel headers in userspace"
In file included from /usr/src/linux/include/linux/nmi.h:7,
                 from /usr/src/linux/kernel/sched.c:22:
/usr/src/linux/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory

i.e. it is n't correctly compiled and n't able to include some header
files and it gives some
"#warning "don't include kernel headers in userspace". please suggest
me what i should do for getting out of my problem.


If all of you have any link about some materials or tutorials to learn
about 2.6 kernel (specially it's process scheduling code and method )
please suggest me. i 've "understanding Linux kernel - o R'eily " and
"Linux Kernel Programming" both for kernel 2.4.it is n't helping me
(or perhaps i do n't know how to use it).

Thanking You 
Abhijit


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux