Take the 2-minute tour ×

I am trying to cross-compile a Linux kernel for an ARM-target (Freescale i.Mx28) on a windows host. I know that this approach is not the best one compared to using a Linux host but unfortunately it's not up to me to decide that.

The restrictions are:

I got that far, that I worked around the missing case sensitivity on windows so that I can extract the kernel sources using cygwin. But now I got problems with the kernel Makefile. I think there are some issues with the windows paths as I get the error message *** multiple target patterns. Stop., which comes from the : in paths and other errors concerning the dependency check when configuring:

      HOSTCC  scripts/basic/fixdep
    /usr/bin/sh: scripts/basic/fixdep: cannot execute binary file
    make[1]: *** [scripts/basic/fixdep] Error 126
    make: *** [scripts_basic] Error 2

Is there a way to port the Makefile without having to rewrite it or is there another way to build the kernel without using the given Makefile? Can I use the sourcery toolchain or IDE to handle the Makefile? Do you know any other way to build the kernel within the given restrictions?

share|improve this question
You should ask your board support provider and compiler vendor. –  sessyargc.jp Jan 24 '12 at 2:44
Can't you simply install a Linux VM? It would be on windows and takes 30 minutes top on a VirtualBox... –  Quentin Casasnovas Jan 24 '12 at 23:15

2 Answers 2

up vote 1 down vote accepted

To cross compile the kernel, you'll need two compilers: One that is able to build tools that run in your build environment, and one that can create executables for your target.

It seems like you aren't really cross compiling but you have just replaced your compiler. You are now building tools required for the build for ARM and try to run them on Windows.

You can specify which cross compiler to use:

make ARCH=arm CROSS_COMPILE=your-compiler-prefix- ...

You might also have a problem with the filesystem. The filesystem in Windows is case-insensitive and the Kernel build might create files where the case matters. To get support for a case-insensitive filesystem on Windows, you can have a look at Windows Services for UNIX.

share|improve this answer

Use another toolchain! CodeBench is NOT compatible with building Linux on Windows hosts, not matter what eye candy (lies) they put on their website about using CYGPATH etc. I have tried this myself for weeks, and the problem is that CB accepts POSIX paths, but insists outputting Win32 paths that are hard, if not impossible to control in the Linux Kernel Make procedures. I'm not saying it is impossible, I'm sure it is possible. But it is not worth the time, no matter what your boss tell you. There are more problem to consider. Another problem is that the tools in the Linux sources ./scripts directory are not directly compatible with the Windows environment and thus, although they might compile they don't run as expected. They need to be patched!

The best chance you have, is by compiling your own cross-compiler with Cygwin. Or find one already cooked for you.

share|improve this answer
That's just what I found out myself...eventually I gave up and convinced everybody to start building Linux on Linux, because everything else is just stupid^^ –  Tobson Jan 18 '13 at 17:26
If you want to know ALL the details why this is so problematic, have a careful look at this SamyGo wikientry. –  user1147688 Oct 29 '13 at 21:41

Your Answer


