[Realme 2 pro Questions & Answers] gilius2k15:
Hi aaditya1234,

Thanks for bringing to my attention! Unfortunately, there's still a similar amount of errors compared with the original source.

Based on Samar's source code I have attached the output for:

RMX1801_defconfig.txt

sdm660-perf_defconfig.txt

Judging by Samar's April 29th commit there were only 4 fixes applied and 21 deletions:

https://github.com/SamarV-121/andro...mmit/ff37e8796f2ec9a5c95dc2c6370252b8e5b2fe03

However, based on the advice surrounding the OnePlus5 and making it "standalone compilable" I must have applied more than 50 fixes to the Realme 2 Pro kernel source!

https://github.com/adin-k/oneplus5-kernel/commit/ec4ec687ba23609b9c323145c7d509262b0f025f

Coupled with export OPPO_TARGET_DEVICE=18321 (Samar's fix may be more appropriate) I was actually able to get a successful build without any errors barring 3 warnings at the end of the compile not to mention the unsupported character warnings at the beginning:

drivers/input/touchscreen/oppo_touchscreen/Kconfig:32:warning: ignoring unsupported character '

'

drivers/input/touchscreen/oppo_touchscreen/Kconfig:32:warning: ignoring unsupported character '

'

drivers/input/touchscreen/oppo_touchscreen/Kconfig:32:warning: ignoring unsupported character '

'

drivers/input/touchscreen/oppo_touchscreen/Kconfig:32:warning: ignoring unsupported character '

'

drivers/input/touchscreen/oppo_touchscreen/Kconfig:35:warning: ignoring unsupported character '

'

drivers/input/touchscreen/oppo_touchscreen/Kconfig:35:warning: ignoring unsupported character '

...

LINK vmlinux

LD vmlinux.o

MODPOST vmlinux.o

WARNING: modpost: Found 3 section mismatch(es).

To see full details build your kernel with:

'make CONFIG_DEBUG_SECTION_MISMATCH=y'

GEN .version

CHK include/generated/compile.h

UPD include/generated/compile.h

CC init/version.o

LD init/built-in.o

KSYM .tmp_kallsyms1.o

KSYM .tmp_kallsyms2.o

LD vmlinux

SORTEX vmlinux

SYSMAP System.map

Building modules, stage 2.

MODPOST 9 modules

OBJCOPY arch/arm64/boot/Image

DTC arch/arm64/boot/dts/18321/sdm660-pm660a-mtp-18321.dtb

CC block/test-iosched.mod.o

CC drivers/char/rdbg.mod.o

CC drivers/media/platform/msm/dvb/adapter/mpq-adapter.mod.o

CC drivers/media/platform/msm/dvb/demux/mpq-dmx-hw-plugin.mod.o

CC drivers/media/usb/gspca/gspca_main.mod.o

CC drivers/net/wireless/ath/wil6210/wil6210.mod.o

CC drivers/platform/msm/msm_11ad/msm_11ad_proxy.mod.o

CC drivers/scsi/ufs/ufs_test.mod.o

CC net/bridge/br_netfilter.mod.o

GZIP arch/arm64/boot/Image.gz

LD [M] drivers/media/platform/msm/dvb/adapter/mpq-adapter.ko

LD [M] block/test-iosched.ko

LD [M] drivers/char/rdbg.ko

LD [M] drivers/media/platform/msm/dvb/demux/mpq-dmx-hw-plugin.ko

LD [M] drivers/net/wireless/ath/wil6210/wil6210.ko

LD [M] drivers/scsi/ufs/ufs_test.ko

LD [M] net/bridge/br_netfilter.ko

LD [M] drivers/media/usb/gspca/gspca_main.ko

LD [M] drivers/platform/msm/msm_11ad/msm_11ad_proxy.ko

CAT arch/arm64/boot/Image.gz-dtb

You can see the full output in gilius-best-effort.txt (also attached).

Unfortunately, when enabled, the Virtualization/KVM errors persist in all defconfigs:

arch/arm64/kernel/cpu_errata.c: In function '__copy_hyp_vect_bpi':

arch/arm64/kernel/cpu_errata.c:58:2: error: implicit declaration of function 'lm_alias' [-Werror=implicit-function-declaration]

void *dst = lm_alias(__bp_harden_hyp_vecs_start + slot * SZ_2K);

^

arch/arm64/kernel/cpu_errata.c:58:14: warning: initialization makes pointer from integer without a cast

error, forbidden warning: cpu_errata.c:58

That error is totally unheard of outside of the Realme 2 Pro kernel source - suggesting something is fundamentally wrong with the basic underlying kernel framework.