Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-22-2010, 07:52 AM   #1
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 Please let me know the command that i need to use to compile the hello_world.c application and driver file.

Old 04-22-2010, 07:55 AM   #2
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, 08:36 AM   #3
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,875
Blog Entries: 27

Rep: Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163Reputation: 2163

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
Getting Started with Linux

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
Old 04-23-2010, 02:33 AM   #4
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).

obj-m := hello_world.o

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

$(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.



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

All times are GMT -5. The time now is 03:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration