OnePlusOSS / android_kernel_5.10_oneplus_mt6895

Other
17 stars 11 forks source link

Missing & Broken Kernel Code in Oneplus Ace/Race ColorOS 12.1 Source Cross compiling #2

Open CloudMeiyu opened 2 years ago

CloudMeiyu commented 2 years ago

Still getting errors from mt6895 12.1 kernel source :

using config : mgk_64_k510_defconfig and oplus6895.config CROSS_COMPILE = aarch64-linux-gnu-

command to compile kernel :

make O=out -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- mgk_64_k510_defconfig oplus6895.config make O=out -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-

getting error :

GEN Makefile CALL ../scripts/checksyscalls.sh CALL ../scripts/atomic/check-atomics.sh CHK include/generated/compile.h CC arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.o ../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:103:11: error: no member named 'android_kabi_reserved4' in 'struct task_struct' current->android_kabi_reserved4 = regs->syscallno;


../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:104:11: error: no member named 'android_kabi_reserved5' in 'struct task_struct'
current->android_kabi_reserved5 = current_uid().val;
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:105:11: error: no member named 'android_kabi_reserved6' in 'struct task_struct'
current->android_kabi_reserved6 = current_euid().val;
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:106:11: error: no member named 'android_kabi_reserved7' in 'struct task_struct'
current->android_kabi_reserved7 = current_gid().val;
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:107:11: error: no member named 'android_kabi_reserved8' in 'struct task_struct'
current->android_kabi_reserved8 = current_egid().val;
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:114:23: error: no member named 'android_kabi_reserved4' in 'struct task_struct'
uid_t scno =current->android_kabi_reserved4;
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:121:21: error: no member named 'android_kabi_reserved5' in 'struct task_struct'
if ((0 != current->android_kabi_reserved5 ) && (is_unlocked() == 0)){
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:122:17: error: no member named 'android_kabi_reserved5' in 'struct task_struct'
if ((current->android_kabi_reserved5 != current_uid().val) || (current->android_kabi_reserved6 != current_euid().val) ||
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:122:75: error: no member named 'android_kabi_reserved6' in 'struct task_struct'
if ((current->android_kabi_reserved5 != current_uid().val) || (current->android_kabi_reserved6 != current_euid().val) ||
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:123:31: error: no member named 'android_kabi_reserved7' in 'struct task_struct'
(current->android_kabi_reserved7 != current_gid().val) || (current->android_kabi_reserved8 != current_egid().val) || (get_fs() > KERNEL_ADDR_LIMIT)){
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:123:89: error: no member named 'android_kabi_reserved8' in 'struct task_struct'
(current->android_kabi_reserved7 != current_gid().val) || (current->android_kabi_reserved8 != current_egid().val) || (get_fs() > KERNEL_ADDR_LIMIT)){
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:137:37: error: no member named 'android_kabi_reserved5' in 'struct task_struct'
oplus_root_check_succ(current->android_kabi_reserved5, current->android_kabi_reserved6, current->android_kabi_reserved8, current->android_kabi_reserved4);
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:137:70: error: no member named 'android_kabi_reserved6' in 'struct task_struct'
oplus_root_check_succ(current->android_kabi_reserved5, current->android_kabi_reserved6, current->android_kabi_reserved8, current->android_kabi_reserved4);
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:137:103: error: no member named 'android_kabi_reserved8' in 'struct task_struct'
oplus_root_check_succ(current->android_kabi_reserved5, current->android_kabi_reserved6, current->android_kabi_reserved8, current->android_kabi_reserved4);
~~~~~~~ ^
../arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.c:137:136: error: no member named 'android_kabi_reserved4' in 'struct task_struct'
oplus_root_check_succ(current->android_kabi_reserved5, current->android_kabi_reserved6, current->android_kabi_reserved8, current->android_kabi_reserved4);
~~~~~~~ ^
15 errors generated.
make[5]: *** [../scripts/Makefile.build:277: arch/arm64/kernel/secureguard/rootguard/oplus_root_hook.o] Error 1
make[4]: *** [../scripts/Makefile.build:526: arch/arm64/kernel/secureguard/rootguard] Error 2
make[3]: *** [../scripts/Makefile.build:526: arch/arm64/kernel/secureguard] Error 2
make[2]: *** [../scripts/Makefile.build:526: arch/arm64/kernel] Error 2

please ask oneplus kernel team to just to test only the kernel compilation not the entire source.
Please tell me how to successfully compile the kernel. Is there a problem with the compiler used?
Thanks.