I am trying to build the linux kernel for arm based i.mx6 board. I have following these steps for building linux kernel

1.export ARCH=arm

2.export CROSS_COMPILE=/media/cascademic-101/D:/alam/MyProjects/IIOT-Gateway/porting/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-


But I am getting the following error.

Makefile:129: *** multiple target patterns. Stop.

Any solution to fix this problem?

  • Is this the full output of make or only the last line? Does your directory in step 2 have special characters in it? stackoverflow.com/a/3711394/3792138 suggests that e.g. : can be a problem. – johnLate Aug 12 '20 at 21:02
  • yes this is the full output of make Makefile:129: *** multiple target patterns. Stop. – Md Shahnawaz Alam Aug 13 '20 at 5:01
  • @johnLate yes the Path to the directory for cross-compile contains : – Md Shahnawaz Alam Aug 13 '20 at 5:39
  • Can you try renaming those directories to not contain any colon (:)? Please report back if that works. – johnLate Aug 13 '20 at 21:01
  • @johnLate yes it works ...Thanks – Md Shahnawaz Alam Aug 14 '20 at 10:06

CROSS_COMPILE must be set to the prefix used for the compiler, not the directory containing it; typically for a 32-bit ARM build,

export CROSS_COMPILE=arm-linux-gnueabihf-

You must then ensure that the corresponding tools are on your PATH.

  • OK, so you need to export CROSS_COMPILE as in my answer, and add /home/cascademic/quectel/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin to your PATH. – Stephen Kitt Aug 12 '20 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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