LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Build driver failed in PAE platform with linux kernel 2.6.27.19-5-pae (http://www.linuxquestions.org/questions/programming-9/build-driver-failed-in-pae-platform-with-linux-kernel-2-6-27-19-5-pae-777964/)

steven215 12-24-2009 08:46 PM

Build driver failed in PAE platform with linux kernel 2.6.27.19-5-pae
 
I installed SUSE11 x86 linux on a PAE platform(linux kernal is 2.6.27.19-5-pae), then built my driver, but got the following mem_map undeclared error message. The same driver can build success in other non PAE platforms(for example, linux kernel is 2.6.27.19-5-default). Has anyone know how to fix this problem? Thanks a lot!
gcc version is 4.3.2

=============Error log======================
make -C /lib/modules/2.6.27.19-5-pae/build M=/root/LinPhlash/driver modules
make[1]: Entering directory `/usr/src/linux-2.6.27.19-5-obj/i386/pae'
make -C ../../../linux-2.6.27.19-5 O=/usr/src/linux-2.6.27.19-5-obj/i386/pae/. modules
CC [M] /root/LinPhlash/driver/Driver.o
In file included from /root/LinPhlash/driver/Driver.c:160:
/root/LinPhlash/driver/../app/linphlash.h:172:1: warning: multi-line comment
/root/LinPhlash/driver/Driver.c:210: warning: function declaration isn’t a prototype
/root/LinPhlash/driver/Driver.c: In function ‘flash_open’:
/root/LinPhlash/driver/Driver.c:437: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:438: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c: In function ‘flash_ioctl’:
/root/LinPhlash/driver/Driver.c:571: warning: function declaration isn’t a prototype
/root/LinPhlash/driver/Driver.c:673: warning: assignment from incompatible pointer type
/root/LinPhlash/driver/Driver.c:703: warning: assignment makes integer from pointer without a cast
/root/LinPhlash/driver/Driver.c:705: warning: assignment makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:705: warning: comparison between pointer and integer
/root/LinPhlash/driver/Driver.c:720: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:744: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:750: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:831: warning: passing argument 1 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:831: warning: passing argument 2 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:837: warning: passing argument 1 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:837: warning: passing argument 2 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c: In function ‘flash_MapBlockTable’:
/root/LinPhlash/driver/Driver.c:1009: error: ‘mem_map’ undeclared (first use in this function)
/root/LinPhlash/driver/Driver.c:1009: error: (Each undeclared identifier is reported only once
/root/LinPhlash/driver/Driver.c:1009: error: for each function it appears in.)
/root/LinPhlash/driver/Driver.c: In function ‘flash_MapFixupTable’:
/root/LinPhlash/driver/Driver.c:1127: error: ‘mem_map’ undeclared (first use in this function)
/root/LinPhlash/driver/Driver.c: In function ‘cache_toggle’:
/root/LinPhlash/driver/Driver.c:1226: warning: comparison of distinct pointer types lacks a cast
/root/LinPhlash/driver/Driver.c:1244: warning: comparison of distinct pointer types lacks a cast
make[4]: *** [/root/LinPhlash/driver/Driver.o] Error 1
make[3]: *** [_module_/root/LinPhlash/driver] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.27.19-5-obj/i386/pae'
make: *** [default] Error 2

paulsm4 12-25-2009 12:24 AM

Here's a quarter - go buy a 64-bit CPU.

PAE is just bad news. If you can live in 32-bit address space, do it. If you absolutely need more RAM, than go 64 bit.

IMHO .. PSM

PS:
If you're curious, take a look in your kernel source, at include/asm-generic/memory_model.h. I suspect that (might be) one of the sources of the problem ... and I'm not sure there's any easy solution.

steven215 12-26-2009 04:47 AM

Hi Paulsm4,

Thanks your information.
Unfortunately, PAE is our customer's shipping platform, so I must resolve the problem on PAE platform, and they also ask so.

Do you know which source causes the problem? And how to fix it?
Thanks a lot!

Steven

ashphx 01-19-2014 05:11 PM

I was looking for LinPhlash
 
Do you happen to have it?

Quote:

Originally Posted by steven215 (Post 3804011)
I installed SUSE11 x86 linux on a PAE platform(linux kernal is 2.6.27.19-5-pae), then built my driver, but got the following mem_map undeclared error message. The same driver can build success in other non PAE platforms(for example, linux kernel is 2.6.27.19-5-default). Has anyone know how to fix this problem? Thanks a lot!
gcc version is 4.3.2

=============Error log======================
make -C /lib/modules/2.6.27.19-5-pae/build M=/root/LinPhlash/driver modules
make[1]: Entering directory `/usr/src/linux-2.6.27.19-5-obj/i386/pae'
make -C ../../../linux-2.6.27.19-5 O=/usr/src/linux-2.6.27.19-5-obj/i386/pae/. modules
CC [M] /root/LinPhlash/driver/Driver.o
In file included from /root/LinPhlash/driver/Driver.c:160:
/root/LinPhlash/driver/../app/linphlash.h:172:1: warning: multi-line comment
/root/LinPhlash/driver/Driver.c:210: warning: function declaration isn’t a prototype
/root/LinPhlash/driver/Driver.c: In function ‘flash_open’:
/root/LinPhlash/driver/Driver.c:437: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:438: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c: In function ‘flash_ioctl’:
/root/LinPhlash/driver/Driver.c:571: warning: function declaration isn’t a prototype
/root/LinPhlash/driver/Driver.c:673: warning: assignment from incompatible pointer type
/root/LinPhlash/driver/Driver.c:703: warning: assignment makes integer from pointer without a cast
/root/LinPhlash/driver/Driver.c:705: warning: assignment makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:705: warning: comparison between pointer and integer
/root/LinPhlash/driver/Driver.c:720: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:744: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:750: warning: integer constant is too large for ‘long’ type
/root/LinPhlash/driver/Driver.c:831: warning: passing argument 1 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:831: warning: passing argument 2 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:837: warning: passing argument 1 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c:837: warning: passing argument 2 of ‘copy_from_user’ makes pointer from integer without a cast
/root/LinPhlash/driver/Driver.c: In function ‘flash_MapBlockTable’:
/root/LinPhlash/driver/Driver.c:1009: error: ‘mem_map’ undeclared (first use in this function)
/root/LinPhlash/driver/Driver.c:1009: error: (Each undeclared identifier is reported only once
/root/LinPhlash/driver/Driver.c:1009: error: for each function it appears in.)
/root/LinPhlash/driver/Driver.c: In function ‘flash_MapFixupTable’:
/root/LinPhlash/driver/Driver.c:1127: error: ‘mem_map’ undeclared (first use in this function)
/root/LinPhlash/driver/Driver.c: In function ‘cache_toggle’:
/root/LinPhlash/driver/Driver.c:1226: warning: comparison of distinct pointer types lacks a cast
/root/LinPhlash/driver/Driver.c:1244: warning: comparison of distinct pointer types lacks a cast
make[4]: *** [/root/LinPhlash/driver/Driver.o] Error 1
make[3]: *** [_module_/root/LinPhlash/driver] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.27.19-5-obj/i386/pae'
make: *** [default] Error 2



All times are GMT -5. The time now is 12:18 AM.