I'm trying to compile the kernel from source on the Raspberry Pi, so I fetched it from [email protected]:raspberrypi/linux.git, and I'm using the stable branch (rpi-3.6.y).

I did the following:

  1. git clone [email protected]:raspberrypi/linux.git
  2. cd linux
  3. make mrproper
  4. zcat /proc/config.gz > .config
  5. make oldconfig
  6. make menuconfig
  7. make

And during the build process I'm getting the following errors:

CC [M]  net/ipv4/netfilter/ipt_ECN.o
net/ipv4/netfilter/ipt_ECN.c:20:42: fatal error: linux/netfilter_ipv4/ipt_ECN.h: No such file or directory
compilation terminated.
make[3]: *** [net/ipv4/netfilter/ipt_ECN.o] Error 1
make[2]: *** [net/ipv4/netfilter] Error 2
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2

I'm using Raspbian GNU/Linux 7 (Linux raspberrypi 3.6.11+ #545 PREEMPT) and GCC version 4.6.3 (Debian 4.6.3-14+rpi1).

  • 1
    Have you tried getting the source again ? It looks like it didn't get everything as it's missing files. Or you could try compiling the kernel without using that ipt_ECN module.
    – Lawrence
    Oct 15, 2013 at 0:50
  • Yeah -- I haven't had any such problems with that source.
    – goldilocks
    Oct 15, 2013 at 15:21

4 Answers 4


I had the same problem. I'm working with Mac, and the reason was that Mac is not a case-sensitive OS, so when I download the source, ipt_ECN.h was deleted because there was a file called ipt_ecn.h (for Mac it is the same so one is deleted). The solution was to make a case-sensitive image disk and download the source there.

I know you are not using Mac, but I hope this will help you. PS: I followed the guide Raspberry Pi Kernel Compilation.

  • They are probably closely related, but isn't the real reason different filesystems (HFS+ on Mac?)? Can't a case-sensitive filesystem be used on Mac (it is based on Unix after all)? May 13, 2015 at 18:17

As an addition to the answer of Nilar.

To get my kernel compiled and workaround the error message: net/ipv4/netfilter/ipt_ECN.c:20:42: fatal error: linux/netfilter_ipv4/ipt_ECN.h: No such file or directory compilation terminated.

I downloaded the following files:

  • include/uapi/linux/netfilter_ipv4/ipt_ECN.h
  • include/uapi/linux/netfilter_ipv4/ipt_TTL.h
  • include/uapi/linux/netfilter/xt_DSCP.h
  • include/uapi/linux/netfilter_ipv6/ip6t_HL.h
  • include/uapi/linux/netfilter/xt_DSCP.h
  • include/uapi/linux/netfilter/xt_RATEEST.h
  • include/uapi/linux/netfilter/xt_TCPMSS.h
  • net/netfilter/xt_DSCP.c
  • net/netfilter/xt_HL.c
  • net/netfilter/xt_RATEEST.c
  • net/netfilter/xt_TCPMSS.c

from: https://github.com/raspberrypi/linux/tree/rpi-3.12.y

and put them in my source tree. (Then I executed the make command.)

These 3 files somehow got lost when using the git clone command on my Mac as described in a previous answer by Nilar.


Yeah, I think this is a bit messier than it should be. Someone was walked through the process on #raspbian (log here), search for user Foxdie and jump through the same hoops they had to.

  • 1
    It would be better if you provided a summary here. May 13, 2015 at 18:12
  • @PeterMortensen if you really believe so, feel free to go ahead and do so May 15, 2015 at 8:53

FAT and NTFS file system:
"lowercase" = "uppercase ". (e.g. ipt_ecn.h = ipt_ECN.h) if you clone "linux" from git, files with uppercase will be disappear.

DO NOT make the working directory in these format.

  • 1
    This answer makes no sense. What are you trying to say?
    – Bex
    Jun 2, 2017 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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