[Android Software/Hacking General [Developers Only]] vish97:
I tried to compile the kernel using the given steps but ended up with unkown makefile error.

cleoz@cleoz-Aspire-E5-551G:~/oreo/kernel/bacon$ ./b_build.sh
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 25: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 26: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 25: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 26: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 25: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 26: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 25: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
/home/cleoz/oreo/kernel/bacon/scripts/gcc-version.sh: line 26: /home/cleoz/oreo/arm-linux-androideabi-4.9: Is a directory
CLEAN scripts/basic
CLEAN scripts/dtc
CLEAN scripts/kconfig
CLEAN scripts/selinux/genheaders
CLEAN scripts/selinux/mdp
CLEAN include/config include/generated arch/arm/include/generated
CLEAN .config include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
scripts/kconfig/conf --silentoldconfig Kconfig
WRAP arch/arm/include/generated/asm/auxvec.h
WRAP arch/arm/include/generated/asm/bitsperlong.h
WRAP arch/arm/include/generated/asm/cputime.h
WRAP arch/arm/include/generated/asm/emergency-restart.h
WRAP arch/arm/include/generated/asm/errno.h
CHK include/linux/version.h
WRAP arch/arm/include/generated/asm/ioctl.h
UPD include/linux/version.h
WRAP arch/arm/include/generated/asm/irq_regs.h
WRAP arch/arm/include/generated/asm/kdebug.h
WRAP arch/arm/include/generated/asm/local.h
WRAP arch/arm/include/generated/asm/local64.h
WRAP arch/arm/include/generated/asm/poll.h
WRAP arch/arm/include/generated/asm/resource.h
WRAP arch/arm/include/generated/asm/sections.h
WRAP arch/arm/include/generated/asm/siginfo.h
WRAP arch/arm/include/generated/asm/simd.h
WRAP arch/arm/include/generated/asm/sizes.h
CC scripts/mod/empty.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/selinux/genheaders/genheaders
/home/cleoz/oreo/arm-linux-androideabi-4.9 [Errno 13] Permission denied
scripts/Makefile.build:307: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 13
scripts/Makefile.build:443: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
HOSTCC scripts/dtc/data.o
HOSTCC scripts/selinux/mdp/mdp
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/util.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
Makefile:510: recipe for target 'scripts' failed
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....

Device: One plus one

Kernel tree used : https://github.com/LineageOS/android_kernel_oneplus_msm8974 cm-14.1 branch

I have tried changing toolchain and also re-clone the kernel tree.Any assistance is much appreciated.

Vishal