Advertisement

08.26.2008 at 11:26AM PDT, ID: 23679557
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Kernel Module compilation errors

Asked by Neville_Chinan in Linux Programming, Kernel And Operating System Specific Programming

Tags: ,

I have the code
#define MODULE
#include <linux/module.h>
int init_module(void) { printk("<1>Hello, world\n"); return 0; }
void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); }

from the book.
I compile with the line
gcc -c -I/lib/modules/2.6.25/build/include -O hello.c

That is where my files are.  And I get a long stream of errors
  from hello.c:2:
/lib/modules/2.6.25/build/include/asm/system.h:275: error: expected =, ,, ;, asm or __attribute__ before { token
/lib/modules/2.6.25/build/include/asm/system.h:284: error: storage class specified for parameter es7000_plat
/lib/modules/2.6.25/build/include/asm/system.h:287: error: storage class specified for parameter arch_align_stack
/lib/modules/2.6.25/build/include/asm/system.h:288: error: storage class specified for parameter free_init_pages
/lib/modules/2.6.25/build/include/asm/system.h:404: error: expected =, ,, ;, asm or __attribute__ before { token
In file included from /lib/modules/2.6.25/build/include/asm/atomic.h:4,
                 from /lib/modules/2.6.25/build/include/asm/local.h:7,
                 from /lib/modules/2.6.25/build/include/linux/module.h:19,
                 from hello.c:2:
/lib/modules/2.6.25/build/include/asm/atomic_64.h:25: error: storage class specified for parameter atomic_t
/lib/modules/2.6.25/build/include/asm/atomic_64.h:53: error: expected declaration specifiers or ... before atomic_t
/lib/modules/2.6.25/build/include/asm/atomic_64.h:54: error: expected =, ,, ;, asm or __attribute__ before { token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:68: error: expected declaration specifiers or ... before atomic_t
/lib/modules/2.6.25/build/include/asm/atomic_64.h:69: error: expected =, ,, ;, asm or __attribute__ before { token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:85: error: expected declaration specifiers or ... before atomic_t
/lib/modules/2.6.25/build/include/asm/atomic_64.h:86: error: expected =, ,, ;, asm or __attribute__ before { token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:102: error: expected ) before * token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:116: error: expected ) before * token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:132: error: expected ) before * token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:151: error: expected ) before * token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:171: error: expected declaration specifiers or ... before atomic_t
/lib/modules/2.6.25/build/include/asm/atomic_64.h:172: error: expected =, ,, ;, asm or __attribute__ before { token
/lib/modules/2.6.25/build/include/asm/atomic_64.h:189: error: expected declaration specifiers or ... before atomic_t

A little snippet above.  What is going on?  I have recompiled the kernel I have installed everything correctly etc.Start Free Trial
 
Loading Advertisement...
 
[+][-]08.27.2008 at 04:00AM PDT, ID: 22323250

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux Programming, Kernel And Operating System Specific Programming
Tags: C++, Kernel
Sign Up Now!
Solution Provided By: duncan_roe
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.27.2008 at 06:56AM PDT, ID: 22324764

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.27.2008 at 03:03PM PDT, ID: 22329717

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628