Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a target in which i have the toolchain installed with the RFS image.
If i have the kernel source code in some PC in the network which i can mount via NFS, is it possible to compile the source code from the target?

If yes, could you explain how or what different techniques are available for it.

EDIT : The Scenario I wish to Execute -
When my board boots up it will mount my root file system(RFS) which has the toolchain and the binutils present within it.

After the RFS has been mounted successfully, it will connect to the NFS location where my kernel source is present and using the binutils in my RFS, it will try to compile that source code.
Once the compilation is successful the new executable (for eg. vmlinux.bin) will be flashed to the ROM and board will be restarted with the new image.

I just want to know if this scenario can be realized. If Yes, how can it be done in a more technical way?

share|improve this question
What do you really mean by 'target' and what's an 'RFS image'? – alex Dec 7 '10 at 7:48
Target - means the custom board or platform other than the Host(my PC) RFS- Root File System which will be loaded prior to the full linux image. – Sen Dec 7 '10 at 8:11
@Sen do me a favor and explain how this in ontopic on unix SE? this sounds much like a programming question... but... i really don't understand what you're saying enough to be 100% it's not on topic. are you cross compiling architectures? what are you compiling? – xenoterracide Dec 7 '10 at 12:49
I think he's asking how to build a Linux kernel over NFS and flash it onto a board when the board first starts, which I'd definitely call on-topic. Assuming I understood the question correctly – Michael Mrozek Dec 7 '10 at 15:11
@Michael ah.. I'm just checking, like I said I didn't understand the question enough to make a call. – xenoterracide Dec 8 '10 at 2:05

Because you have the binutils and compiler on the target, and because you're able to mount the NFS volume, this should be as simple as mounting the NFS volume, navigating to the directory, and running make. It's not a cross-compile; it's your run-of-the-mill native compile. Give it a try and if you get stuck, you'll be able to ask a more specific question.

share|improve this answer
Thanks Shawn, The problem is like we are in the requirements Analysis state and we dont have the boards with us right now. I was just trying to think it out of the box, and was trying to see if somebody have come across such a scenario. – Sen Dec 7 '10 at 13:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.