LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Compiling kernel module errors with kernel 2.6.32-279 (https://www.linuxquestions.org/questions/programming-9/compiling-kernel-module-errors-with-kernel-2-6-32-279-a-4175455547/)

jleaming 03-25-2013 02:55 PM

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


Emerson 03-25-2013 04:34 PM

Why is this module needed?

jleaming 03-25-2013 04:40 PM

This module is used to communicate with the BIOS on HP PCs.

Emerson 03-25-2013 04:42 PM

Communicate with BIOS but it is called hpuefi? Why is this communication needed? Booting? Is the board BIOS or UEFI?

jleaming 03-25-2013 04:44 PM

It communicates with a HP UEFI enabled BIOS in order to configure settings and flash updates from within Linux.

Emerson 03-25-2013 05:04 PM

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?

jleaming 03-25-2013 05:07 PM

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.

Emerson 03-25-2013 05:12 PM

Methinks your best bet is to bug HP and RH. Can you provide a link to the module sources (just out of curiosity)?

jleaming 03-25-2013 05:36 PM

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

Emerson 03-25-2013 05:41 PM

sp57468.exe is supposed to be Linux update utility ... !?!

jleaming 03-25-2013 05:42 PM

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.

Emerson 03-25-2013 05:45 PM

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.


All times are GMT -5. The time now is 03:34 PM.