LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 07-25-2008, 08:37 AM   #1
ra2008
LQ Newbie
 
Registered: Jul 2008
Posts: 23

Rep: Reputation: 15
native compilation on ARM ??


Hi,
i am running Kernel 2.6.8.1 and using ramdisk as files system.
can i install a compiler on a USB stick and do native compilation on ARM board.?
if yes which version? is it the same as the cross tool chain i use on my PC for the ARM?

thanks
ra2008
 
Old 07-26-2008, 03:37 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
You cannot use the toolchain on your x86 for the ARM; you need to build a native toolchain for the ARM. You can use your cross-compiler to build a native compiler and tool chain with BUILD set for the x86, and HOST and TARGET set for ARM.

The ARM libraries which you have already compiled should be fine; you just need to put a copy on the ARM along with header files.
 
Old 07-26-2008, 04:12 AM   #3
ra2008
LQ Newbie
 
Registered: Jul 2008
Posts: 23

Original Poster
Rep: Reputation: 15
to be used for modules

Quote:
Originally Posted by pinniped View Post
The ARM libraries which you have already compiled should be fine; you just need to put a copy on the ARM along with header files.
hi,
u r right, but how can i generate modules, if i dont do on the ARM board building and conpilationn for the modules using (make -C $KDIR M=`pwd` modules)?
(by the way my ARM board runs kernel2.6.24.7 and the ramdisk)
thanks

Last edited by ra2008; 07-26-2008 at 04:25 AM.
 
Old 07-26-2008, 07:30 PM   #4
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
To build modules for your ARM using the x86, you need a cross-compiler installed and the headers for that kernel. You can then build a module almost like normal - you just have to look at the various build scripts to see how you're meant to use a cross-compiler; most of the time it's simply setting 'CC' to point to your cross-compiler.
 
Old 07-26-2008, 08:09 PM   #5
ra2008
LQ Newbie
 
Registered: Jul 2008
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pinniped View Post
you need a cross-compiler installed and the headers for that kernel.
hi,
it seems many things have been clarified now to me.
how do i get the headers of my kernel? and where do i have to intsall it?
thanks
 
Old 07-27-2008, 07:38 AM   #6
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
If your board came with a development kit, there are usually instructions somewhere on where to find the kernel headers needed (and also the version information - the most important dynamically created kernel header).

If those headers were not provided, you will need to configure your kernel source as if it were the kernel on the ARM. Usually a "config" file is provided; if not, you can try to discover it from the ARM board if it's running the /proc virtual filesystem; there should be a virtual file /proc/config or /proc/config.gz. If you don't have any of those files, it's very difficult to build the module and it may be better to build the entire kernel.

It doesn't really matter where the headers go; you can say where they are when you invoke 'make' for the module.
 
  


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
ARM-Linux Cross compilation Toolkits 2.95 hazzyb Programming 3 02-06-2009 10:21 AM
Problem compiling BlueZ stack on ARM ( cross compilation from linux x86) shilpates Linux - Wireless Networking 1 08-20-2008 03:02 AM
Gcc 4.3.0 cross compilation for arm is failing bhagat_singh Linux - Software 2 07-10-2008 02:38 PM
My Arm carlosinfl General 7 09-07-2006 02:04 PM
Debian Arm shixi Linux - Distributions 0 02-01-2006 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 01:01 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