LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 03-25-2013, 03:55 PM   #1
jleaming
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
Compiling kernel module errors with kernel 2.6.32-279


I am trying to compile and install a kernel module on a Red Hat Enterprise Linux 6.3 box. I run into an issue with a redefinition of the __pa() function. I'm not sure this module has been compiled on this version of the kernel. I've done a bunch of programming, but not on Linux. Can anyone help me figure this out?

Thanks,
Jeff

Here's my make output:

Code:
make -C /lib/modules/2.6.32-279.el6.x86_64/build SUBDIRS=/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3 modules
make[1]: Entering directory `/usr/src/kernels/2.6.32-279.el6.x86_64'
  CC [M]  /usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.o
In file included from include/linux/prefetch.h:14,
                 from include/linux/list.h:7,
                 from include/linux/module.h:9,
                 from /usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:30:
/usr/src/kernels/2.6.32-279.el6.x86_64/arch/x86/include/asm/processor.h: In function 'load_cr3':
/usr/src/kernels/2.6.32-279.el6.x86_64/arch/x86/include/asm/processor.h:221: error: implicit declaration of function '__pa'
In file included from include/linux/mm.h:39,
                 from /usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:34:
/usr/src/kernels/2.6.32-279.el6.x86_64/arch/x86/include/asm/pgtable.h: In function 'pmd_page_vaddr':
/usr/src/kernels/2.6.32-279.el6.x86_64/arch/x86/include/asm/pgtable.h:359: error: implicit declaration of function '__va'
In file included from /usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:34:
include/linux/mm.h: In function 'virt_to_head_page':
include/linux/mm.h:360: error: implicit declaration of function 'virt_to_page'
include/linux/mm.h:360: warning: initialization makes pointer from integer without a cast
In file included from /usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:34:
include/linux/mm.h: In function 'lowmem_page_address':
include/linux/mm.h:663: error: implicit declaration of function 'page_to_pfn'
include/linux/mm.h:663: warning: return makes pointer from integer without a cast
In file included from /usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:37:
/usr/src/kernels/2.6.32-279.el6.x86_64/arch/x86/include/asm/io.h: In function 'phys_to_virt':
/usr/src/kernels/2.6.32-279.el6.x86_64/arch/x86/include/asm/io.h:117: warning: return makes pointer from integer without a cast
/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c: In function 'UefiDriverInit':
/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:172: warning: passing argument 1 of 'lowmem_page_address' makes pointer from integer without a cast
include/linux/mm.h:661: note: expected 'struct page *' but argument is of type 'int'
/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:184: error: invalid type argument of '->' (have 'int')
/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c: In function 'UefiDriverExit':
/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.c:283: error: invalid type argument of '->' (have 'int')
make[2]: *** [/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3/hpuefi.o] Error 1
make[1]: *** [_module_/usr/local/src/hpuefi-mod/hpuefi-mod-1.0.3] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32-279.el6.x86_64'
make: *** [default] Error 2
 
Old 03-25-2013, 05:34 PM   #2
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Why is this module needed?
 
Old 03-25-2013, 05:40 PM   #3
jleaming
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
This module is used to communicate with the BIOS on HP PCs.
 
Old 03-25-2013, 05:42 PM   #4
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Communicate with BIOS but it is called hpuefi? Why is this communication needed? Booting? Is the board BIOS or UEFI?
 
Old 03-25-2013, 05:44 PM   #5
jleaming
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
It communicates with a HP UEFI enabled BIOS in order to configure settings and flash updates from within Linux.
 
Old 03-25-2013, 06:04 PM   #6
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Basically, you are trying to build a module which source comes from HP? Does this source claim to be compatible with your version of kernel? Since RH is providing support for their product, did you contact them?
 
Old 03-25-2013, 06:07 PM   #7
jleaming
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, I'm building a module with source from HP. The source doesn't say it's compatible with this version of the kernel. Maybe I should try contacting Red Hat for support. I was just wondering if anyone had encountered a similar issue with kernel compatibility and had resolved it.
 
Old 03-25-2013, 06:12 PM   #8
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Methinks your best bet is to bug HP and RH. Can you provide a link to the module sources (just out of curiosity)?
 
Old 03-25-2013, 06:36 PM   #9
jleaming
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
You can get the source for the kernel module from any BIOS update that includes the Linux tools component, such as the one listed below:

http://h20000.www2.hp.com/bizsupport...em=vc-105857-1
 
Old 03-25-2013, 06:41 PM   #10
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
sp57468.exe is supposed to be Linux update utility ... !?!
 
Old 03-25-2013, 06:42 PM   #11
jleaming
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
No, you have to run the executable on a Windows machine to extract the SoftPaq. The extracted files will contain the Linux update tools and the binary of the BIOS update.
 
Old 03-25-2013, 06:45 PM   #12
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
I see. I do not have Windows. Haven't had it for ten years now. I could install Wine, but it's lots of compiling in Gentoo. End of curiosity.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting errors while compiling kernel module in fedora 9-pls help chandanaraj Linux - Kernel 0 10-10-2008 03:39 PM
Errors Compiling Kernel 2.6 on Slackware 10.2 - Old kernel headers required? Dave S. Slackware 8 03-04-2006 01:15 AM


All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration