This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello,
I am trying to compile a module. I don't know how to make .ko file. All examples, i have seen are a little confusing.
I have tried to compile a very simple device driver.
The .o file I compile cannot be loaded into the kernel, because the format is wrong. How can I compile a .ko file.
I read the faq http://www.faqs.org/docs/kernel/ , but it did not help either.
IIRC, beginning in the 2.6 kernel series, there is an ... interesting ... new procedure where the program derived from "scripts/modpost.c" (found in the root of your kernel tree) must be used to build a module header using your kernel's Module.symvers file and the your main module.o file, The resulting file is subsequently linked using "ld -r" with your otherwise normal module.o file(s) to yeild the module.ko file.
-- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org
"So often times it happens, that we live our lives in chains and we never even know we have the key." The Eagles, "Already Gone"
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |