On Thu, Oct 2, 2008 at 9:20 PM, Chetan Nanda <
chetannanda@xxxxxxxxx> wrote:
>
>
> On Tue, Sep 30, 2008 at 11:50 PM, arshad hussain <
arshad.super@xxxxxxxxx>
> wrote:
>>
>> On Tue, Sep 30, 2008 at 11:12 PM, Chetan Nanda <
chetannanda@xxxxxxxxx>
>> wrote:
>> > Hi All,
>> >
>> > I am trying my hands with User mode Linux.
>> > I am able to configure and kernel 2.6.24 under UML.
>> >
>> > Next It am trying to compile kernel module (so that modules can be
>> > insmod
>> > into running UML).
>> > But not able to compile my kernel module for UML.
>>
>> Hoping you are not missing "ARCH=um" in your "Makefile".
>> You also need the linux source.
>
> My Make file look like this:
> ##############
> CC=gcc
> ARCH=um
> KERNELDIR=/root/Work/linux_src/linux-source-2.6.24
> ARCHDIR=$(KERNELDIR)/arch/um
> TTDIR=$(ARCHDIR)/kernel/tt
> SKASDIR=$(ARCHDIR)/kernel/skas
> CFLAGS= -DDEBUG -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include
> -I$(ARCHDIR)/include -I$(TTDIR)/include -I$(SKASDIR)/include -Wall -Wunused
> -Wuninitialized -g -O
> ALL = hello_1.o
>
> all: $(ALL)
> ################
>
> But on compiling module using 'make' make command gives me following error:
> from hello_1.c:7:
> /root/Work/linux_src/linux-source-2.6.24/include/asm/thread_info.h: In
> function 'current_thread_info':
> /root/Work/linux_src/linux-source-2.6.24/include/asm/thread_info.h:50:
> error: 'CONFIG_KERNEL_STACK_ORDER' undeclared (first use in this function)
> /root/Work/linux_src/linux-source-2.6.24/include/asm/thread_info.h:50:
> error: (Each undeclared identifier is reported only once
> /root/Work/linux_src/linux-source-2.6.24/include/asm/thread_info.h:50:
> error: for each function it appears in.)
>
> Do I still missing something ?