Compile LKM with -D__KERNEL__ in UML query

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

 



Hi dudes,

This is the first time I tried compiling a module in uml.

When I tried to compile an lkm with:
urop-vm:~# gcc -c -O2 lkm.c -DMODULE

it works, and I can insmod it.

But when I compile with:
urop-vm:~# gcc -c -O2 lkm.c -DMODULE -D__KERNEL__ -DLINUX

it gives me a handful of error messages:

In file included from /usr/include/linux/prefetch.h:13,
                 from /usr/include/linux/list.h:6,
		 from /usr/include/linux/module.h:12,
		 from lkm.c:2:
/usr/include/asm/processor.h:56: error: `CONFIG_X86_L1_CACHE_SHIFT'
undeclared here (not in a function)
/usr/include/asm/processor.h:56: error: requested alignment is not a
constant

To test, my lkm.c is just a simple hello world module, with 
init_module(), and cleanup_module(), using printk to print
some messages.

I am using a uml kernel I compiled
Linux urop-vm 2.4.21-rc3-urop-5um #1 Mon May 26 21:48:41 SGT 2003 i686 GNU/Linux

Please advice. Thanks!

Eugene

Attachment: pgp00408.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux