LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 12-24-2009, 08:46 PM   #1
steven215
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
Unhappy 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
 
Old 12-25-2009, 12:24 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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.

Last edited by paulsm4; 12-25-2009 at 01:01 AM.
 
Old 12-26-2009, 04:47 AM   #3
steven215
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
Old 01-19-2014, 05:11 PM   #4
ashphx
LQ Newbie
 
Registered: Jan 2014
Posts: 1

Rep: Reputation: Disabled
I was looking for LinPhlash

Do you happen to have it?

Quote:
Originally Posted by steven215 View Post
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
 
  


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
[SOLVED] Nvidia Driver fails to load after Kernel Update (2.6.30.9-90.fc11.i686.PAE) nivantha Linux - Laptop and Netbook 3 11-10-2009 09:52 AM
kernel-PAE danospv Debian 20 11-13-2008 09:20 AM
KERNEL PANIC: Cannot execute a PAE-enabled kernel on a PAE-less CPU! ovais370 Linux - Laptop and Netbook 7 10-13-2007 05:49 PM
PAE Kernel stumpedguy_frustrate Fedora 5 07-22-2007 09:46 PM
Kernel-PAE stumpedguy_frustrate Fedora 0 04-08-2007 12:02 PM


All times are GMT -5. The time now is 04:11 AM.

Main Menu
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