I've been trying to port the a7y17lte for a while now. But I encountered a lot of issue with the kernel compilation. There were a couple implicit declaration warning that caused errors because of the build options. Fortunately, I was able to fix those. But I then encountered other strange errors.
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv6/syncookies.c: In function 'cookie_v6_check':
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv6/syncookies.c:186:4: error: 'mopt' undeclared (first use in this function)
&mopt,
^
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv6/syncookies.c:186:4: note: each undeclared identifier is reported only once for each function it appears in
CC lib/string.o
make[3]: *** [/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/scripts/Makefile.build:279: net/ipv6/syncookies.o] Error 1
make[2]: *** [/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/scripts/Makefile.build:486: net/ipv6] Error 2
and
In file included from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/uapi/linux/posix_types.h:4:0,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/uapi/linux/types.h:13,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/linux/compiler.h:214,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/linux/linkage.h:4,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/linux/kernel.h:6,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/linux/skbuff.h:26,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/linux/tcp.h:21,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv4/syncookies.c:13:
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv4/syncookies.c: In function 'cookie_v4_check':
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/linux/stddef.h:7:14: error: passing argument 4 of 'tcp_parse_options' makes integer from pointer without a cast [-Werror]
#define NULL ((void *)0)
^
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv4/syncookies.c:292:38: note: in expansion of macro 'NULL'
tcp_parse_options(skb, &tcp_opt, 0, NULL);
^
In file included from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/net/mptcp.h:46:0,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv4/syncookies.c:20:
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/net/tcp.h:591:6: note: expected 'int' but argument is of type 'void *'
void tcp_parse_options(const struct sk_buff *skb,
^
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv4/syncookies.c:292:2: error: too few arguments to function 'tcp_parse_options'
tcp_parse_options(skb, &tcp_opt, 0, NULL);
^
In file included from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/net/mptcp.h:46:0,
from /home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/net/ipv4/syncookies.c:20:
/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/include/net/tcp.h:591:6: note: declared here
void tcp_parse_options(const struct sk_buff *skb,
^
cc1: all warnings being treated as errors
make[3]: *** [/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/scripts/Makefile.build:279: net/ipv4/syncookies.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CC drivers/hwmon/sec_thermistor.o
make[2]: *** [/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/scripts/Makefile.build:486: net/ipv4] Error 2
make[1]: *** [/home/arashk/Projects/Ubuntu-touch/non-standalone/halium/kernel/samsung/universal7880/Makefile:1046: net] Error 2
A note regarding the &mopt error. I can't just remove those lines of code since they run when a config is set in the kernel config file. And that config is most certainly set.
Another thing to note is that I'm using archlinux. Therefore I'm using gcc 11 to compile this. I also have gcc 9 installed (from the AUR) but setting the CC flag to gcc-9 didn't seem to do anything other than some outputs saying the CC flag is already set. If I'm doing something wrong, please tell me. I also saw that while running "mka mkbootimg" it said:
libmediaplayerservice/Android.mk: no such file or directory
It compiled fine but I checked and that framework contained the older android.bp format.