[One (M9+) General] GhostCop1:
I tried to build kernel image using the toolchain the kernel , which I downloaded from htcdev, had in the README file :

defconfig file: msm8994_defconfig

Download:

========

Download the corresponding official android toolchain:

linux-x86:

git clone //android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9( I downloaded this one)

darwin-x86:

git clone //android.googlesource.com/platform/prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9

Build the kernel:

=================

set the following environment variables:

$ mkdir -p out

$ make ARCH=arm64 CROSS_COMPILE=<path-to-toolchain>/bin/aarch64-linux-android- O=out msm8994_defconfig

$ make ARCH=arm64 CROSS_COMPILE=<path-to-toolchain>/bin/aarch64-linux-android- O=out -j16

Output binary files:

====================

After the build process finishes, the kernel image will be located at out/arch/arm64/boot/Image.gz-dtb

For additional information:

===========================

I modified the the kernel using the command : make menuconfig

After I modified it as the nethunter modifying the kernel section said.

I could not modify the SDR section because I did not have those options in the menuconfig

After that, I tried to compile, but this happened:

# make ARCH=arm64 CROSS_COMPILE=/root/nethunter/toolchain/bin/aarch64-linux-android- -j16

scripts/kconfig/conf --silentoldconfig Kconfig

warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)

warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))

warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)

warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))

CHK include/generated/uapi/linux/version.h

CHK include/generated/utsrelease.h

CC scripts/mod/devicetable-offsets.s

GEN scripts/mod/devicetable-offsets.h

HOSTCC scripts/mod/file2alias.o

CALL scripts/checksyscalls.sh

HOSTLD scripts/mod/modpost

CHK include/generated/compile.h

GZIP kernel/config_data.gz

CHK kernel/config_data.h

UPD kernel/config_data.h

CC kernel/configs.o

LD kernel/built-in.o

make[1]: Nothing to be done for 'dtbs'.

make[1]: Nothing to be done for 'dtbs'.

LD drivers/media/platform/msm/dvb/built-in.o

CC drivers/media/media-device.o

LD drivers/media/platform/msm/built-in.o

CC drivers/media/media-devnode.o

CC drivers/media/media-entity.o

LD drivers/media/platform/built-in.o

LD drivers/media/media.o

LD drivers/media/built-in.o

LD drivers/built-in.o

LINK vmlinux

LD vmlinux.o

MODPOST vmlinux.o

GEN .version

CHK include/generated/compile.h

UPD include/generated/compile.h

CC init/version.o

LD init/built-in.o

drivers/built-in.o: In function `btusb_probe':

/root/nethunter/kernel/drivers/bluetooth/btusb.c:1391: undefined reference to `get_rome_version'

/root/nethunter/kernel/drivers/bluetooth/btusb.c:1391:(.text+0x5e9e58): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `get_rome_version'

/root/nethunter/kernel/drivers/bluetooth/btusb.c:1400: undefined reference to `rome_download'

/root/nethunter/kernel/drivers/bluetooth/btusb.c:1400:(.text+0x5e9ea4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rome_download'

Makefile:814: recipe for target 'vmlinux' failed

make: *** [vmlinux] Error 1

I do not know what to do now. Can you please help me?