Re: Simple module for 2.6 request?

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

 



>how to by hand build a module.

Compilation has too many flags and too many steps to be reasonably done 
by hand. Unlike *cough* BSD or Solaris, the Linux kernel makefile system 
is designed to reasonably support external modules using all the 
necessary parameters the kernel you are compiling for needs. You know, I 
always get a shudder when I have to think of Solaris not having 
MODVERSIONS or even VERMAGIC -- it is dangerous because it allows you to 
build stuff that can fubar more easily.

>gcc -o foo.c -ko foo.ko -DMODULE -D__KERNEL__
>-I/usr/src/kernel-headers-directory/include/

gcc: unrecognized option '-ko'

>How to add them by hand (not using all the big Makefiles normally
>included in kernel tree)?

Who said they are big? Look at 
http://jengelh.hopto.org/f/oops_ko.tar.bz2 for a _really_ simple module.


	-`J'
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux