LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-05-2009, 12:25 AM   #1
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Rep: Reputation: 46
Crosscompiling a driver dual core to single core


Can I crosscompile a driver with an intel dualcore processor to be used in a celeron machine, and if so, the how? Both machines are running Linux Mint 7. The driver in question is ov51x-jpeg.
 
Old 08-05-2009, 04:51 PM   #2
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
You should provide more info about what it is you're working with. That said, I am fairly sure there isn't going to be any difference if you haven't asked for some kind of multi-threaded optimizations or libraries, and I am entirely sure that it will run on both systems either way.
 
Old 08-05-2009, 11:34 PM   #3
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
I wonder if I could compile the web camera (Creative Live cam vista IM)
driver for someone else's celeron machine running Linux Mint 7.

The driver is ov51x-jpeg

I could install Linux Mint 7 on 4 different machines, one of which is has AMD Athlon, one has AMD 3-core, one has dual core T2410 and one has an Intel dual core (I don't remembet which dual core).

I guess AMDs are different in some respects, but are Intel dual cores?
(I mean compiler produced binary here)
Do I have to use cross-compilation? If so, how do I get gcc to compile for another architecture?

Last edited by turboscrew; 08-05-2009 at 11:35 PM.
 
Old 08-06-2009, 11:02 AM   #4
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
How do you know you have a problem?
 
Old 08-07-2009, 12:09 AM   #5
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by karamarisan View Post
How do you know you have a problem?
I don't. That's why I'm asking.

At least the kernel is different for AMD. I guess GCC uses processor specific features for more optimal binary. To my knowledge AMD and Pentium have differencies in instruction set even if there is quite large common subset. It's just if GCC might use the specific instructions.

Another matter is multicore pentium. Does it (could it) show in the GCC-generated code if code is compiled for a multicore pentium?

I'd also like to know what should I do to to be able to cross-compile with GCC for another processor architecture.
 
Old 08-07-2009, 12:51 AM   #6
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
Ah, gotcha. You should be fine - the differences between AMD and Intel are small and tend to be relevant only in extremely specific circumstances (as there is some adoption of each others' instructions and little use of instructions that aren't valid on both). Also, unless you are writing significant parallelization into your code, there's no reason to worry about that, either (and I'm not sure gcc even has a 'multithreading' mode, since that functionality kind of exists above the level gcc works on, if you get me). Just compile normally and your program will work on all x86 and x86-compatible (read: x86-64) processors. Note that your distro does not have separate repos for AMD, Intel, 2x-SMT, 8x-SMT, and so on - just x86 and x86-64.

If you do want to cross-compile - and we're talking about PPC, ARM, etc. here - I believe there is a -march option to gcc, but you will have to research that yourself if you're interested.
 
Old 08-07-2009, 06:01 AM   #7
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Original Poster
Rep: Reputation: 46
OK, I'll try. Thanks.
 
  


Reply



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
kernel module migrate from single core to dual core senthil100 Programming 2 07-28-2009 03:59 PM
migrate an old kernel module (working in single core) to dual core - repost senthil100 Programming 0 07-28-2009 03:39 PM
dual core and single core temperatures. justwantin Slackware 7 10-07-2008 04:45 AM
single core to dual core matuk_444 SUSE / openSUSE 8 02-03-2007 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:55 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
Open Source Consulting | Domain Registration