Build driver failed in PAE platform with linux kernel 2.6.27.19-5-pae
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.