LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2010, 08:52 AM   #1
joslyn
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
cross compilation


Hi All,

I am new to the embedded domain.I am learning about cross compilation. Just i want to compile an application and an driver file for ARM platform. I have downloaded the toolchain binaries from http://www.kernel.org/pub/tools/cros...es/bin/x86_64/. Please let me know the command that i need to use to compile the hello_world.c application and driver file.

Thanks,
Joslyn.
 
Old 04-22-2010, 08:55 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
What kind of system are you using?

If Linux, do you have the gcc compiler installed?

Does your package have a makefile?
 
Old 04-22-2010, 09:36 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Welcome to LQ!

'How to Ask Questions the Smart Way' would be my first suggestion since your post should have included more information.

If your using a embed and a PC to do your cross work on then the manufacture of the embed system will have the tools necessary. If you want to use the PC exclusively then the work is rather easily done with a GNU/Linux distribution that uses gcc (which most do). You would create your app then create a Makefile (this is where having the OEMs tools will make things easier). Once you compile and link for your system then it is just the matter of moving things to the embed.

I do suggest that you do a search here on LQ as this very subject has been covered so many times. Maybe not for your particular board but generally things are performed in the same manner.

Just a few more useful links;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Newbie Admin Guide
LinuxSelfHelp
Getting Started with Linux

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 04-23-2010, 03:33 AM   #4
joslyn
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Original Poster
Rep: Reputation: 0
The development system is x86 PC running on Linux kernel 2.6.21 with gcc 4.3.3 and the target system is beagle board.

The program what i have written is a helloword program (lodable kernel module) which has only module_init and module_exit functions and its definitions.
The Makefile given below is the one that i have used for compiling and running it on my development system (x86).

Makefile
--------
obj-m := hello_world.o

KDIR :=/lib/modules/$(shell uname -r)/build
PWD :=$(shell pwd)

default:
$(MAKE) -C $(KDIR) M=$(PWD) modules

Now i want to load the helloworld module in the target program. For this I need to compile the program for the target system using toolchain.
Pls let me the procedure that i need to follow to get this done.

Thanks.
 
  


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
cross compilation shariefbe Linux - Software 5 02-15-2010 06:23 AM
cross compilation shaiva Linux - Newbie 2 10-06-2009 04:43 AM
all about cross compilation swift2008 Programming 3 08-27-2008 06:49 AM
cross compilation NeoMagic Programming 5 12-13-2006 03:19 AM
Cross-compilation radhapriya Linux - Software 0 08-11-2003 08:24 AM


All times are GMT -5. The time now is 12:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration