Cross Compile for FSG

From OpenFSG

Jump to: navigation, search

Contents

Intro

Here you can find a basic explanation about Bases of compiling.

Some comments

Native compiling on FSG

Native compiling is pretty easy, only install the ipkg packages optware-devel on your fsg.
Now you are able to use "gcc" and "make".
But note that the optware-devel-package is only available for firmware 3.x., as you can see here: List_of_Compatible_ipkgs

Cross compiling on FSG

For Cross Compiling you need the toolchain. With this toolchain you can compile software for FSG on other systems.
You have to differ between compiling for firmware 3.x and 4.x, because of different kernel-versions.
If you compile for 3.x your software won't run with 4.x and the other way around.

Cross compiling on FSG

1. Step: download the toolchain

  • firmware 3.x: [1]
  • firmware 4.x: [2]

2. Step:

  • uncompress the toolchain
  • copy the toolchain to "/" of your linux-distribution
    • NOTE: as you can see, the cross compiling must be done under a Linux machine (not Windows...)

3. Step

  • the new compiler of your toolchain can be found in "/bin/" (like "/bin/armeb-none-linux-gnueabi-gcc")
  • so you edit your makefile to use the compiler from your toolchain instead of the native compiler




That's all. I know there are some bugs in the toolchain (for example wrong paths to linux-headers), but with the error-message during compiling you could find solutions at the internet.

If you try to compile the complete firmware you download the sources of firmware and kernel from the download section. Than uncompress and read the compiling-manual.

Personal tools