* User mode linux- kernel module @ 2010-07-17 16:43 ratheesh k 2010-07-18 15:54 ` ratheesh k 0 siblings, 1 reply; 3+ messages in thread From: ratheesh k @ 2010-07-17 16:43 UTC (permalink / raw) To: linux-c-programming, linux-newbie Hi , i have ubuntu linux on my 64 bit machine . I have successully built and up an instance of UML which is 32 bit . I am able to establish networking also . I would like to build a simple hello world kernel module on host 64 bit machine , which should be loaded in UML . How do i build the same ? Thanks, Ratheesh ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: User mode linux- kernel module 2010-07-17 16:43 User mode linux- kernel module ratheesh k @ 2010-07-18 15:54 ` ratheesh k 2010-07-19 3:42 ` ratheesh k 0 siblings, 1 reply; 3+ messages in thread From: ratheesh k @ 2010-07-18 15:54 UTC (permalink / raw) To: linux-c-programming, linux-newbie root@dasaradham-laptop:/home/fox/workspace# root@dasaradham-laptop:/home/fox/workspace# make -C /home/fox/workspace3/linux-2.6.32/ M=`pwd` modules ARCH=um make: Entering directory `/home/fox/workspace3/linux-2.6.32' CC [M] /home/fox/workspace/hello.o In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:43:1: warning: "HOST_DS" redefined In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:25:1: warning: this is the location of the previous definition In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:44:1: warning: "HOST_ES" redefined In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:27:1: warning: this is the location of the previous definition In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:45:1: warning: "HOST_FS" redefined In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:26:1: warning: this is the location of the previous definition In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:46:1: warning: "HOST_GS" redefined In file included from /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, from /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, from /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /home/fox/workspace/hello.c:2: /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:28:1: warning: this is the location of the previous definition In file included from include/linux/bitmap.h:8, from include/linux/nodemask.h:95, from include/linux/mmzone.h:16, from include/linux/gfp.h:4, from include/linux/kmod.h:22, from include/linux/module.h:13, from /home/fox/workspace/hello.c:2: include/linux/string.h:101: warning: conflicting types for built-in function ‘__builtin_memcmp’ In file included from include/net/sock.h:60, from include/linux/tcp.h:177, from /home/fox/workspace/hello.c:9: include/net/dst.h: In function ‘dst_hold’: include/net/dst.h:157: error: negative width in bit-field ‘<anonymous>’ make[1]: *** [/home/fox/workspace/hello.o] Error 1 make: *** [_module_/home/fox/workspace] Error 2 make: Leaving directory `/home/fox/workspace3/linux-2.6.32' root@dasaradham-laptop:/home/fox/workspace# On Sat, Jul 17, 2010 at 10:13 PM, ratheesh k <ratheesh.ksz@gmail.com> wrote: > Hi , > > i have ubuntu linux on my 64 bit machine . I have successully built > and up an instance of UML which is 32 bit . I am able to establish > networking also . >m > I would like to build a simple hello world kernel module on host 64 > bit machine , which should be loaded in UML . How do i build the same > ? > > Thanks, > Ratheesh > -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: User mode linux- kernel module 2010-07-18 15:54 ` ratheesh k @ 2010-07-19 3:42 ` ratheesh k 0 siblings, 0 replies; 3+ messages in thread From: ratheesh k @ 2010-07-19 3:42 UTC (permalink / raw) To: linux-c-programming, linux-newbie Below command works fine . make -C /home/fox/workspace3/linux-2.6.32/ M=`pwd` modules ARCH=um SUBARCH=i386 On Sun, Jul 18, 2010 at 9:24 PM, ratheesh k <ratheesh.ksz@gmail.com> wrote: > root@dasaradham-laptop:/home/fox/workspace# > root@dasaradham-laptop:/home/fox/workspace# make -C > /home/fox/workspace3/linux-2.6.32/ M=`pwd` modules ARCH=um > make: Entering directory `/home/fox/workspace3/linux-2.6.32' > CC [M] /home/fox/workspace/hello.o > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:43:1: > warning: "HOST_DS" redefined > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:25:1: > warning: this is the location of the previous definition > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:44:1: > warning: "HOST_ES" redefined > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:27:1: > warning: this is the location of the previous definition > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:45:1: > warning: "HOST_FS" redefined > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:26:1: > warning: this is the location of the previous definition > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:46:1: > warning: "HOST_GS" redefined > In file included from > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/skas_ptregs.h:4, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/shared/sysdep/ptrace.h:17, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/ptrace-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/ptrace.h:14, > from > /home/fox/workspace3/linux-2.6.32/arch/um/include/asm/processor-generic.h:13, > from > /home/fox/workspace3/linux-2.6.32/arch/um/sys-x86_64/asm/processor.h:54, > from include/linux/prefetch.h:14, > from include/linux/list.h:6, > from include/linux/module.h:9, > from /home/fox/workspace/hello.c:2: > /home/fox/workspace3/linux-2.6.32/arch/um/include/shared/user_constants.h:28:1: > warning: this is the location of the previous definition > In file included from include/linux/bitmap.h:8, > from include/linux/nodemask.h:95, > from include/linux/mmzone.h:16, > from include/linux/gfp.h:4, > from include/linux/kmod.h:22, > from include/linux/module.h:13, > from /home/fox/workspace/hello.c:2: > include/linux/string.h:101: warning: conflicting types for built-in > function ‘__builtin_memcmp’ > In file included from include/net/sock.h:60, > from include/linux/tcp.h:177, > from /home/fox/workspace/hello.c:9: > include/net/dst.h: In function ‘dst_hold’: > include/net/dst.h:157: error: negative width in bit-field ‘<anonymous>’ > make[1]: *** [/home/fox/workspace/hello.o] Error 1 > make: *** [_module_/home/fox/workspace] Error 2 > make: Leaving directory `/home/fox/workspace3/linux-2.6.32' > root@dasaradham-laptop:/home/fox/workspace# > > > > > > On Sat, Jul 17, 2010 at 10:13 PM, ratheesh k <ratheesh.ksz@gmail.com> wrote: >> Hi , >> >> i have ubuntu linux on my 64 bit machine . I have successully built >> and up an instance of UML which is 32 bit . I am able to establish >> networking also . >>m >> I would like to build a simple hello world kernel module on host 64 >> bit machine , which should be loaded in UML . How do i build the same >> ? >> >> Thanks, >> Ratheesh >> > -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-19 3:42 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-17 16:43 User mode linux- kernel module ratheesh k 2010-07-18 15:54 ` ratheesh k 2010-07-19 3:42 ` ratheesh k
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).