[P8 Lite (2017) Development] noobington:
P8lite kernel, compile under Linux Mint (Ubuntu)

How do you compile the P8lite kernel source?

Which tools (and exact version)?

What sequence of commands?

My current setup: VMWare Player / Linux Mint 18.3 Cinnamon 64bit (Ubuntu)

I only receive errors and warnings, following instructions from [REFERENCE] How to compile an Android kernel and OhHeyItsLou Custom Android Kernel Guide

Error Log:

# ----------------------------------------------------------------------------------------------------

sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2

# ----------------------------------------------------------------------------------------------------

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

# ----------------------------------------------------------------------------------------------------

cd $HOME/kernel/toolchain

export CROSS_COMPILE=$HOME/kernel/toolchain/bin/aarch64-linux-android-
export ARCH=arm64 && export SUBARCH=arm64

# ----------------------------------------------------------------------------------------------------

cd $HOME/kernel/android

make clean

[COLOR="Red"]drivers/connectivity/hisi/wifi/Makefile:2: HI1102_DRIVER_BUILTIN_PATH
find lcdkit qcom folder, include it now![/COLOR]

# ----------------------------------------------------------------------------------------------------

make mrproper

[COLOR="Red"]drivers/connectivity/hisi/wifi/Makefile:2: HI1102_DRIVER_BUILTIN_PATH
find lcdkit qcom folder, include it now![/COLOR]

# ----------------------------------------------------------------------------------------------------

make labyrinth_prague_defconfig

[COLOR="Red"]drivers/huawei_platform/sw/Kconfig:4:warning: prompt redefined
arch/arm64/configs/labyrinth_prague_defconfig:317:warning: override: DEFAULT_ROW changes choice state
arch/arm64/configs/labyrinth_prague_defconfig:321:warning: override: reassigning to symbol DEFAULT_IOSCHED
arch/arm64/configs/labyrinth_prague_defconfig:687:warning: override: reassigning to symbol DEFAULT_TCP_CONG
arch/arm64/configs/labyrinth_prague_defconfig:5008:warning: override: reassigning to symbol NTFS_FS[/COLOR]

# ----------------------------------------------------------------------------------------------------

make -j2

[COLOR="Red"]scripts/kconfig/conf --silentoldconfig Kconfig
drivers/huawei_platform/sw/Kconfig:4:warning: prompt redefined

drivers/connectivity/hisi/wifi/Makefile:24: defconfig: ./drivers/connectivity/hisi/wifi/wifi_1102_v8r2_defconfig
find lcdkit hisi folder, include it now!

arch/arm64/kernel/insn.c:1271:2: warning: initialization from incompatible pointer type
__check_eq, __check_ne, __check_cs, __check_cc,
^
arch/arm64/kernel/insn.c:1271:2: warning: (near initialization for 'aarch32_opcode_cond_checks[0]')
arch/arm64/kernel/insn.c:1271:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1271:2: warning: (near initialization for 'aarch32_opcode_cond_checks[1]')
arch/arm64/kernel/insn.c:1271:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1271:2: warning: (near initialization for 'aarch32_opcode_cond_checks[2]')
arch/arm64/kernel/insn.c:1271:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1271:2: warning: (near initialization for 'aarch32_opcode_cond_checks[3]')
arch/arm64/kernel/insn.c:1272:2: warning: initialization from incompatible pointer type
__check_mi, __check_pl, __check_vs, __check_vc,
^
arch/arm64/kernel/insn.c:1272:2: warning: (near initialization for 'aarch32_opcode_cond_checks[4]')
arch/arm64/kernel/insn.c:1272:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1272:2: warning: (near initialization for 'aarch32_opcode_cond_checks[5]')
arch/arm64/kernel/insn.c:1272:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1272:2: warning: (near initialization for 'aarch32_opcode_cond_checks[6]')
arch/arm64/kernel/insn.c:1272:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1272:2: warning: (near initialization for 'aarch32_opcode_cond_checks[7]')
arch/arm64/kernel/insn.c:1273:2: warning: initialization from incompatible pointer type
__check_hi, __check_ls, __check_ge, __check_lt,
^
arch/arm64/kernel/insn.c:1273:2: warning: (near initialization for 'aarch32_opcode_cond_checks[8]')
arch/arm64/kernel/insn.c:1273:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1273:2: warning: (near initialization for 'aarch32_opcode_cond_checks[9]')
arch/arm64/kernel/insn.c:1273:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1273:2: warning: (near initialization for 'aarch32_opcode_cond_checks[10]')
arch/arm64/kernel/insn.c:1273:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1273:2: warning: (near initialization for 'aarch32_opcode_cond_checks[11]')
arch/arm64/kernel/insn.c:1274:2: warning: initialization from incompatible pointer type
__check_gt, __check_le, __check_al, __check_al
^
arch/arm64/kernel/insn.c:1274:2: warning: (near initialization for 'aarch32_opcode_cond_checks[12]')
arch/arm64/kernel/insn.c:1274:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1274:2: warning: (near initialization for 'aarch32_opcode_cond_checks[13]')
arch/arm64/kernel/insn.c:1274:2: warning: initialization from incompatible pointer type
arch/arm64/kernel/insn.c:1274:2: warning: (near initialization for 'aarch32_opcode_cond_checks[14]')
arch/arm64/kernel/insn.c:1275:1: warning: initialization from incompatible pointer type
};
^
arch/arm64/kernel/insn.c:1275:1: warning: (near initialization for 'aarch32_opcode_cond_checks[15]')

arch/arm64/kernel/module-plts.c: In function 'livepatch_emit_plt_entry':
arch/arm64/kernel/module-plts.c:242:14: warning: initialization from incompatible pointer type
u32 *addr = &plt[num];
^

kernel/fork.c:102:41: fatal error: ./cgroup_huawei/cgroup_pids.h: No such file or directory
#include <./cgroup_huawei/cgroup_pids.h>
^
compilation terminated.
scripts/Makefile.build:274: recipe for target 'kernel/fork.o' failed
make[1]: *** [kernel/fork.o] Error 1
Makefile:1048: recipe for target 'kernel' failed
make: *** [kernel] Error 2

mm/rmap.c: In function 'rmap_walk_anon':
mm/rmap.c:1592:24: warning: unused variable 'mapping' [-Wunused-variable]
struct address_space *mapping = page->mapping;
^
mm/unmovable_isolate.c: In function 'get_ddr_size':
mm/unmovable_isolate.c:235:143: warning: comparison of distinct pointer types lacks a cast
ret = min(MEMSIZE_INDEX_MAX + MEMSIZE_INDEX_OFFSET, ddr_size_cmdline);[/COLOR]