LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-17-2011, 04:19 AM   #1
julio_jeorje
LQ Newbie
 
Registered: Mar 2011
Posts: 21

Rep: Reputation: Disabled
cross compilation of Makefile


Hi,
I want to build an object code for ARM at91rm9200 board from a Makefile using a crosscompiler . So please would somebody help me.

thanks and regards
julio_jeorje
 
Old 04-17-2011, 10:55 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by julio_jeorje View Post
Hi,
I want to build an object code for ARM at91rm9200 board from a Makefile using a crosscompiler . So please would somebody help me.

thanks and regards
julio_jeorje
How do you expect anyone to be able to help you with this?? You provide no details. What version/distro of LInux? What "makefile", for what software, and what crosscompiler? What have you done/tried? What error(s) do you see?? Without details and an exact question, no one can help you.
 
Old 04-18-2011, 10:32 PM   #3
julio_jeorje
LQ Newbie
 
Registered: Mar 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
I am using rhel5.Linux kernel in my pc is 2.6.18-128.el5 and on my board is 2.6.12.The cross compiler I am using is gcc-4.1.0-glibc-2.3.2.Now I have char driver code in my pc which is implemented using a makefile.I Know how to crosscompile an ordinary .c file for the arm board. But, I would like to know how to crosscompile the char driver code for arm board.
 
Old 04-27-2011, 10:20 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-27-2011, 03:39 PM   #5
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
Quote:
Originally Posted by julio_jeorje View Post
I am using rhel5.Linux kernel in my pc is 2.6.18-128.el5 and on my board is 2.6.12.The cross compiler I am using is gcc-4.1.0-glibc-2.3.2.Now I have char driver code in my pc which is implemented using a makefile.I Know how to crosscompile an ordinary .c file for the arm board. But, I would like to know how to crosscompile the char driver code for arm board.
Ok your question is a bit ambiguous but normally you'd have have your compiler say gcc or g++ you need to add the name of the cross compiler you are using rather than just gcc, you may also need to add the path to the cross compiler in you paths.
So to make for a normal file you have just g++ EG
TRGT =
CC =$(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp

For the cross you need to add the full name to your compiler, so if you are using a arm compiler call ed arm-linux-g++ EG

TRGT = arm-linux-
CC =$(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp

I think we need a lot more information from you, like why doesn't it compile? What errors are you getting? Are you talking about compiling against you boards kernel?

Last edited by knobby67; 04-27-2011 at 03:42 PM.
 
  


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
[SOLVED] cross compilation joslyn Linux - Newbie 3 04-23-2010 02:33 AM
cross compilation shaiva Linux - Newbie 2 10-06-2009 03:43 AM
cross compilation NeoMagic Programming 5 12-13-2006 02:19 AM
cross compilation Kocil Slackware 6 12-18-2003 01:53 PM
Cross-compilation radhapriya Linux - Software 0 08-11-2003 07:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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