Hi Chetan
 
'CONFIG_KERNEL_STACK_ORDER'  is a UML configuration option to set the size of the kernel stack. I believe the default is 2. If 2 the kernel stack is 4 pages. if 3 then it is 8 pages and so on.
I think your kenel is not configured for UML. Make sure it has a .config for UML otherwise you can not compile a module for UML on that tree.
In your kernel src:
make mrproper 
make ARCH=um xconfig /*or other method to make sure your config is UML*/
 
David

On Sat, Oct 4, 2008 at 10:10 PM, arshad hussain <arshad.super@gmail.com> wrote:
On Thu, Oct 2, 2008 at 9:20 PM, Chetan Nanda <chetannanda@gmail.com> wrote:
>
>
> On Tue, Sep 30, 2008 at 11:50 PM, arshad hussain <arshad.super@gmail.com>
> wrote:
>>
>> On Tue, Sep 30, 2008 at 11:12 PM, Chetan Nanda <chetannanda@gmail.com>
>> 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 ?

In case you have not got answers from user-mode-linux-user@lists.sourceforge.net
Try this... I use Makefile different from yours. Copied the simplest
when i first started
and stuck with it's style.

/* Sample make file , assuming your driver code is
 named driver.c */
obj-m += driver.o
all:
       make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules ARCH=um
clean:
       make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean ARCH=um
/* end sample make file */

See to it that "/lib/modules/$(shell uname -r)/build" points to the
kernel source.

[root@_UMLKERNEL_@localhost dd]# ls -l /lib/modules/$(uname -r)/build
lrwxrwxrwx 1 root root 35 Dec 20  2007 /lib/modules/2.6.23.11/build ->
../../../umlkernel/linux-2.6.23.11/
[root@_UMLKERNEL_@localhost dd]#

My huch is there is something with your makefile, do we still need to
pass-D_KERNEL_ (etc)
in 2.6. This was done with 2.4.

Hope this help you in narrowing down the problem.

>
> Thanks,
> Chetan Nanda
>
>>
>>
>>
>> >
>> > Please point me into right direction.
>> >
>> > Thanks,
>> > Chetan Nanda
>> >
>> >
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user