Kernel Build a la WSL

Hi, I’m trying to build Kernel following instructions here: Zero/dev/kernel - Radxa Wiki
After make, I get a failed build. Could you take a look?

Preface: I am using WSL Ubuntu 20.04

$ make -j8
scripts/Makefile.lib:8: ‘always’ is deprecated. Please use ‘always-y’ instead
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC net/8021q/vlan_core.o
CC [M] net/ipv4/netfilter/ipt_ECN.o
CC net/8021q/vlan.o
CC [M] net/ipv4/netfilter/ipt_REJECT.o
net/ipv4/netfilter/ipt_ECN.c:26:46: warning: ‘struct ipt_ECN_info’ declared inside parameter list will not be visible outside of this definition or declaration
26 | set_ect_ip(struct sk_buff *skb, const struct ipt_ECN_info *einfo)
| ^~~~~~~~~~~~
net/ipv4/netfilter/ipt_ECN.c: In function ‘set_ect_ip’:
net/ipv4/netfilter/ipt_ECN.c:30:44: error: invalid use of undefined type ‘const struct ipt_ECN_info’
30 | if ((iph->tos & IPT_ECN_IP_MASK) != (einfo->ip_ect & IPT_ECN_IP_MASK)) {
| ^~
net/ipv4/netfilter/ipt_ECN.c:37:21: error: invalid use of undefined type ‘const struct ipt_ECN_info’
37 | iph->tos |= (einfo->ip_ect & IPT_ECN_IP_MASK);
| ^~
net/ipv4/netfilter/ipt_ECN.c: At top level:
net/ipv4/netfilter/ipt_ECN.c:45:47: warning: ‘struct ipt_ECN_info’ declared inside parameter list will not be visible outside of this definition or declaration
45 | set_ect_tcp(struct sk_buff *skb, const struct ipt_ECN_info *einfo)
| ^~~~~~~~~~~~
net/ipv4/netfilter/ipt_ECN.c: In function ‘set_ect_tcp’:
net/ipv4/netfilter/ipt_ECN.c:55:14: error: invalid use of undefined type ‘const struct ipt_ECN_info’
55 | if ((!(einfo->operation & IPT_ECN_OP_SET_ECE) ||
| ^~
net/ipv4/netfilter/ipt_ECN.c:55:28: error: ‘IPT_ECN_OP_SET_ECE’ undeclared (first use in this function); did you mean ‘IPT_ECN_OP_MATCH_ECE’?
55 | if ((!(einfo->operation & IPT_ECN_OP_SET_ECE) ||
| ^~~~~~~~~~~~~~~~~~
| IPT_ECN_OP_MATCH_ECE
net/ipv4/netfilter/ipt_ECN.c:55:28: note: each undeclared identifier is reported only once for each function it appears in
net/ipv4/netfilter/ipt_ECN.c:56:25: error: invalid use of undefined type ‘const struct ipt_ECN_info’
56 | tcph->ece == einfo->proto.tcp.ece) &&
| ^~
net/ipv4/netfilter/ipt_ECN.c:57:14: error: invalid use of undefined type ‘const struct ipt_ECN_info’
57 | (!(einfo->operation & IPT_ECN_OP_SET_CWR) ||
| ^~
net/ipv4/netfilter/ipt_ECN.c:57:28: error: ‘IPT_ECN_OP_SET_CWR’ undeclared (first use in this function); did you mean ‘IPT_ECN_OP_MATCH_CWR’?
57 | (!(einfo->operation & IPT_ECN_OP_SET_CWR) ||
| ^~~~~~~~~~~~~~~~~~
| IPT_ECN_OP_MATCH_CWR
net/ipv4/netfilter/ipt_ECN.c:58:25: error: invalid use of undefined type ‘const struct ipt_ECN_info’
58 | tcph->cwr == einfo->proto.tcp.cwr))
| ^~
net/ipv4/netfilter/ipt_ECN.c:66:11: error: invalid use of undefined type ‘const struct ipt_ECN_info’
66 | if (einfo->operation & IPT_ECN_OP_SET_ECE)
| ^~
net/ipv4/netfilter/ipt_ECN.c:67:20: error: invalid use of undefined type ‘const struct ipt_ECN_info’
67 | tcph->ece = einfo->proto.tcp.ece;
| ^~
net/ipv4/netfilter/ipt_ECN.c:68:11: error: invalid use of undefined type ‘const struct ipt_ECN_info’
68 | if (einfo->operation & IPT_ECN_OP_SET_CWR)
| ^~
net/ipv4/netfilter/ipt_ECN.c:69:20: error: invalid use of undefined type ‘const struct ipt_ECN_info’
69 | tcph->cwr = einfo->proto.tcp.cwr;
| ^~
net/ipv4/netfilter/ipt_ECN.c: In function ‘ecn_tg’:
net/ipv4/netfilter/ipt_ECN.c:81:11: error: invalid use of undefined type ‘const struct ipt_ECN_info’
81 | if (einfo->operation & IPT_ECN_OP_SET_IP)
| ^~
net/ipv4/netfilter/ipt_ECN.c:81:25: error: ‘IPT_ECN_OP_SET_IP’ undeclared (first use in this function); did you mean ‘IPT_ECN_OP_MATCH_IP’?
81 | if (einfo->operation & IPT_ECN_OP_SET_IP)
| ^~~~~~~~~~~~~~~~~
| IPT_ECN_OP_MATCH_IP
net/ipv4/netfilter/ipt_ECN.c:82:24: error: passing argument 2 of ‘set_ect_ip’ from incompatible pointer type [-Werror=incompatible-pointer-types]
82 | if (!set_ect_ip(skb, einfo))
| ^~~~~
| |
| const struct ipt_ECN_info *
net/ipv4/netfilter/ipt_ECN.c:26:60: note: expected ‘const struct ipt_ECN_info *’ but argument is of type ‘const struct ipt_ECN_info *’
26 | set_ect_ip(struct sk_buff *skb, const struct ipt_ECN_info *einfo)
| ~^
net/ipv4/netfilter/ipt_ECN.c:85:11: error: invalid use of undefined type ‘const struct ipt_ECN_info’
85 | if (einfo->operation & (IPT_ECN_OP_SET_ECE | IPT_ECN_OP_SET_CWR) &&
| ^~
net/ipv4/netfilter/ipt_ECN.c:85:26: error: ‘IPT_ECN_OP_SET_ECE’ undeclared (first use in this function); did you mean ‘IPT_ECN_OP_MATCH_ECE’?
85 | if (einfo->operation & (IPT_ECN_OP_SET_ECE | IPT_ECN_OP_SET_CWR) &&
| ^
~
| IPT_ECN_OP_MATCH_ECE
net/ipv4/netfilter/ipt_ECN.c:85:47: error: ‘IPT_ECN_OP_SET_CWR’ undeclared (first use in this function); did you mean ‘IPT_ECN_OP_MATCH_CWR’?
85 | if (einfo->operation & (IPT_ECN_OP_SET_ECE | IPT_ECN_OP_SET_CWR) &&
| ^
~~~~~~~~~~~
| IPT_ECN_OP_MATCH_CWR
net/ipv4/netfilter/ipt_ECN.c:87:25: error: passing argument 2 of ‘set_ect_tcp’ from incompatible pointer type [-Werror=incompatible-pointer-types]
87 | if (!set_ect_tcp(skb, einfo))
| ^~~~~
| |
| const struct ipt_ECN_info *
net/ipv4/netfilter/ipt_ECN.c:45:61: note: expected ‘const struct ipt_ECN_info *’ but argument is of type ‘const struct ipt_ECN_info *’
45 | set_ect_tcp(struct sk_buff *skb, const struct ipt_ECN_info *einfo)
| ~^
net/ipv4/netfilter/ipt_ECN.c: In function ‘ecn_tg_check’:
net/ipv4/netfilter/ipt_ECN.c:98:11: error: invalid use of undefined type ‘const struct ipt_ECN_info’
98 | if (einfo->operation & IPT_ECN_OP_MASK)
| ^~
net/ipv4/netfilter/ipt_ECN.c:98:25: error: ‘IPT_ECN_OP_MASK’ undeclared (first use in this function); did you mean ‘IPT_ECN_IP_MASK’?
98 | if (einfo->operation & IPT_ECN_OP_MASK)
| ^

| IPT_ECN_IP_MASK
net/ipv4/netfilter/ipt_ECN.c:101:11: error: invalid use of undefined type ‘const struct ipt_ECN_info’
101 | if (einfo->ip_ect & ~IPT_ECN_IP_MASK)
| ^~
net/ipv4/netfilter/ipt_ECN.c:104:12: error: invalid use of undefined type ‘const struct ipt_ECN_info’
104 | if ((einfo->operation & (IPT_ECN_OP_SET_ECE|IPT_ECN_OP_SET_CWR)) &&
| ^~
net/ipv4/netfilter/ipt_ECN.c:104:27: error: ‘IPT_ECN_OP_SET_ECE’ undeclared (first use in this function); did you mean ‘IPT_ECN_OP_MATCH_ECE’?
104 | if ((einfo->operation & (IPT_ECN_OP_SET_ECE|IPT_ECN_OP_SET_CWR)) &&
| ^
~~~~~~~~~
| IPT_ECN_OP_MATCH_ECE
net/ipv4/netfilter/ipt_ECN.c:104:46: error: ‘IPT_ECN_OP_SET_CWR’ undeclared (first use in this function); did you mean ‘IPT_ECN_OP_MATCH_CWR’?
104 | if ((einfo->operation & (IPT_ECN_OP_SET_ECE|IPT_ECN_OP_SET_CWR)) &&
| ^~~~~~~~~~~~~~~~~~
| IPT_ECN_OP_MATCH_CWR
net/ipv4/netfilter/ipt_ECN.c: At top level:
net/ipv4/netfilter/ipt_ECN.c:116:23: error: invalid application of ‘sizeof’ to incomplete type ‘struct ipt_ECN_info’
116 | .targetsize = sizeof(struct ipt_ECN_info),
| ^~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:280: net/ipv4/netfilter/ipt_ECN.o] Error 1
make[3]: *** Waiting for unfinished jobs…
CC net/8021q/vlan_dev.o
make[2]: *** [scripts/Makefile.build:497: net/ipv4/netfilter] Error 2
make[1]: *** [scripts/Makefile.build:497: net/ipv4] Error 2
make[1]: *** Waiting for unfinished jobs…
CC net/8021q/vlan_netlink.o
CC net/8021q/vlan_gvrp.o
CC net/8021q/vlan_mvrp.o
CHK kernel/kheaders_data.tar.xz
CC net/8021q/vlanproc.o
AR net/8021q/built-in.a
make[2]: *** No rule to make target ‘net/netfilter/xt_DSCP.o’, needed by ‘net/netfilter/xt_DSCP.mod’. Stop.
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [scripts/Makefile.build:497: net/netfilter] Error 2
make: *** [Makefile:1822: net] Error 2
make: *** Waiting for unfinished jobs…

All good. The problem was building the kernel in the Windows file system, which is case insensitive.