[Android Software/Hacking General [Developers Only]] RogerF81:
Hello, I have a question: I want to compile a kernel for the Pixel 2 XL. I chose Sultan's, just to learn it. I think I have downloaded and set the correct toolchains, this is what I did:

PATH="~/tc/linux-x86/bin:~/tc/aarch64-linux-android-4.9/bin:~/tc/arm-linux-androideabi-android-4.9/bin:${PATH}" \
> make -j$(nproc --all) O=out \
> ARCH=arm64 \
> CC=clang \
> CLANG_TRIPLE=aarch64-linux-gnu- \
> CROSS_COMPILE=aarch64-linux-android- \

This was the output:

>
android/ .gitmodules
AndroidKernel.mk include/
arch/ init/
backported-features ipc/
block/ Kbuild
build.config Kconfig
build.config.clang.lto kernel/
build.config.debug_api lib/
build.config.debug_hang .mailmap
build.config.debug_locking MAINTAINERS
build.config.debug_memory Makefile
build.config.gcc mm/
build.config.kasan net/
certs/ out/
COPYING README
CREDITS REPORTING-BUGS
crypto/ samples/
Documentation/ scripts/
drivers/ security/
firmware/ sound/
fs/ tools/
.get_maintainer.ignore usr/
.git/ virt/
.gitignore .wireguard-fetch-lock
>
android/ .gitmodules
AndroidKernel.mk include/
arch/ init/
backported-features ipc/
block/ Kbuild
build.config Kconfig
build.config.clang.lto kernel/
build.config.debug_api lib/
build.config.debug_hang .mailmap
build.config.debug_locking MAINTAINERS
build.config.debug_memory Makefile
build.config.gcc mm/
build.config.kasan net/
certs/ out/
COPYING README
CREDITS REPORTING-BUGS
crypto/ samples/
Documentation/ scripts/
drivers/ security/
firmware/ sound/
fs/ tools/
.get_maintainer.ignore usr/
.git/ virt/
.gitignore .wireguard-fetch-lock
>
android/ .gitmodules
AndroidKernel.mk include/
arch/ init/
backported-features ipc/
block/ Kbuild
build.config Kconfig
build.config.clang.lto kernel/
build.config.debug_api lib/
build.config.debug_hang .mailmap
build.config.debug_locking MAINTAINERS
build.config.debug_memory Makefile
build.config.gcc mm/
build.config.kasan net/
certs/ out/
COPYING README
CREDITS REPORTING-BUGS
crypto/ samples/
Documentation/ scripts/
drivers/ security/
firmware/ sound/
fs/ tools/
.get_maintainer.ignore usr/
.git/ virt/
.gitignore .wireguard-fetch-lock
>
android/ .gitmodules
AndroidKernel.mk include/
arch/ init/
backported-features ipc/
block/ Kbuild
build.config Kconfig
build.config.clang.lto kernel/
build.config.debug_api lib/
build.config.debug_hang .mailmap
build.config.debug_locking MAINTAINERS
build.config.debug_memory Makefile
build.config.gcc mm/
build.config.kasan net/
certs/ out/
COPYING README
CREDITS REPORTING-BUGS
crypto/ samples/
Documentation/ scripts/
drivers/ security/
firmware/ sound/
fs/ tools/
.get_maintainer.ignore usr/
.git/ virt/
.gitignore .wireguard-fetch-lock

I wanted to use this directly, but I only could write this in terminal afterwards:

> CROSS_COMPILE_ARM32=arm-linux-androideabi-

Then, the output was the following:

make[1]: Entering directory '/home/rogerf81/sultan/sultan_kernel/out'
CHK include/config/kernel.release
Using .. as source for kernel
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL ../scripts/checksyscalls.sh
VDSOL arch/arm64/kernel/vdso/vdso.so.dbg
/usr/bin/ld: unrecognised emulation mode: aarch64linux
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../arch/arm64/kernel/vdso/Makefile:48: arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
make[1]: *** [arch/arm64/Makefile:214: vdso_prepare] Error 2
make[1]: Leaving directory '/home/rogerf81/sultan/sultan_kernel/out'
make: *** [Makefile:154: sub-make] Error 2

So what am I doing wrong? Can someone help me please? :)