Open techyminati opened 2 years ago
Hello Oneplus, this if a followup regarding your mail, in which you asked me to rebuild kernel
I've tried same and here are the logs
drivers/input/Kconfig:215: can't open file "drivers/input/uff_fp_drivers/Kconfig"
make[2]: *** [../scripts/kconfig/Makefile:88: mgk_64_k510_defconfig] Error 1
make[1]: *** [/drone/src/k/Makefile:617: mgk_64_k510_defconfig] Error 2
make[1]: Leaving directory '/drone/src/k/out'
make: *** [Makefile:185: __sub-make] Error 2
make[1]: Entering directory '/drone/src/k/out'
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[1]: *** [/drone/src/k/Makefile:714: .config] Error 1
make[1]: Leaving directory '/drone/src/k/out'
make: *** [Makefile:185: __sub-make] Error 2
Now the build does not even start since uff fp drivers are missing, which i already told here https://github.com/OnePlusOSS/android_kernel_5.10_oneplus_mt6895/issues/1#issue-1278750072
Now i tried to build further after dropping uff drivers (temporarily) & here are more errors
../net/oplus_score/oplus_score.c:1435:8: error: implicit declaration of function 'nf_register_net_hooks' [-Werror,-Wimplicit-function-declaration]
ret = nf_register_net_hooks(&init_net, oplus_score_netfilter_ops, ARRAY_SIZE(oplus_score_netfilter_ops));
^
AR drivers/tty/serial/built-in.a
CC net/oplus_modules/oplus_stats_calc/oplus_stats_calc.o
CC drivers/char/hw_random/core.o
CC drivers/tty/vt/vc_screen.o
AR fs/devpts/built-in.a
../net/oplus_score/oplus_score.c:1453:2: error: implicit declaration of function 'nf_unregister_net_hooks' [-Werror,-Wimplicit-function-declaration]
nf_unregister_net_hooks(&init_net, oplus_score_netfilter_ops, ARRAY_SIZE(oplus_score_netfilter_ops));
^
AR fs/oplus_perf_fs/built-in.a
AR drivers/tty/ipwireless/built-in.a
CC drivers/tty/tty_io.o
2 errors generated.
AR fs/exportfs/built-in.a
make[3]: *** [../scripts/Makefile.build:277: net/oplus_score/oplus_score.o] Error 1
Further again i got these errors
In file included from ../drivers/base/power/power_diag/power_diag.c:17:
../include/linux/sched/nohz.h:22:49: error: AR drivers/pinctrl/mediatek/built-in.a
declaration of 'struct rq' will not be visible outside of this function [-Werror,-Wvisibility]
static inline void calc_load_nohz_remote(struct rq *rq) { }
^
CC drivers/pinctrl/core.o
CC drivers/clk/mediatek/clk-cpumux.o
AR drivers/char/hw_random/built-in.a
CC drivers/char/mem.o
AR kernel/rcu/built-in.a
AR drivers/soc/sunxi/built-in.a
CC kernel/time/jiffies.o
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:237:15: error: no member named 'mark' in 'struct nf_conn'
return (ct->mark & CT_MARK_APP_TYPE_MASK) >> CT_MARK_APP_TYPE_OFFSET;
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:246:7: error: no member named 'mark' in 'struct nf_conn'
ct->mark = (ct->mark & ~CT_MARK_APP_TYPE_MASK) | ((type <<
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c: CC drivers/soc/mediatek/mtk_tinysys_ipi.o
246:19: error: no member named 'mark' in 'struct nf_conn'
ct->mark = (ct->mark & ~CT_MARK_APP_TYPE_MASK) | ((type <<
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:259:15: error: no member named 'mark' in 'struct nf_conn'
return (ct->mark & ~CT_MARK_APP_TYPE_MASK);
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:267:7: error: no member named 'mark' in 'struct nf_conn'
ct->mark = (ct->mark & ~MARK_MASK) | mark;
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:267:19: error: no member named 'mark' in 'struct nf_conn'
ct->mark = (ct->mark & ~MARK_MASK) | mark;
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:556:7: error: no member named 'mark' in 'struct nf_conn'
ct->mark = dns_ct_mark;
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:886:77: error: no member named 'mark' in 'struct nf_conn'
debug("skb->mark = %x ct->mark = %x get_ct_mark = %x\n", skb->mark, ct->mark,
~~ ^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:50:71: note: expanded from macro 'debug'
#define debug(fmt,args...) printk(LOG_TAG fmt,__FUNCTION__,__LINE__,##args)
^~~~
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:1591:9: error: implicit declaration of function 'nf_register_net_hooks' [-Werror,-Wimplicit-function-declaration]
ret |= nf_register_net_hooks(&init_net, oplus_sla_ops,
^
../net/oplus_connectivity_sla/oplus_connectivity_sla.c:1607:2: error: implicit declaration of function 'nf_unregister_net_hooks' [-Werror,-Wimplicit-function-declaration]
nf_unregister_net_hooks(&init_net, oplus_sla_ops, ARRAY_SIZE(oplus_sla_ops));
^
CC drivers/tty/n_tty.o
10 errors generated.
make[3]: *** [../scripts/Makefile.build:277: net/oplus_connectivity_sla/oplus_connectivity_sla.o] Error 1
make[2]: *** [../scripts/Makefile.build:526: net/oplus_connectivity_sla] Error 2
CC drivers/clk/clkdev.o
CC fs/pipe.o
CC drivers/char/random.o
AR drivers/phy/built-in.a
CC drivers/tty/vt/keyboard.o
AR drivers/reset/built-in.a
AR drivers/misc/eeprom/built-in.a
AR drivers/misc/cb710/built-in.a
AR drivers/misc/ti-st/built-in.a
AR drivers/misc/lis3lv02d/built-in.a
AR drivers/misc/cardreader/built-in.a
CC drivers/base/power/qos.o
CC drivers/misc/mediatek/blocktag/blocktag-core.o
CC drivers/misc/mediatek/slbc/slbc.o
CC drivers/misc/mediatek/cm_mgr/mtk_cm_mgr_common.o
../net/oplus_modules/oplus_dns_hook/oplus_dns_hook.c:413:13: error: implicit declaration of function 'ip6_route_me_harder' [-Werror,-Wimplicit-function-declaration]
if (ip6_route_me_harder(state->net, state->sk, rsp_skb)) {
^
CC drivers/misc/mediatek/qos/mtk_qos_common.o
../net/oplus_modules/oplus_dns_hook/oplus_dns_hook.c:413:13: note: did you mean 'ip_route_me_harder'?
../include/linux/netfilter_ipv4.h:19:5: note: 'ip_route_me_harder' declared here
int ip_route_me_harder(struct net *net, struct sock *sk, struct sk_buff *skb, unsigned addr_type);
^
../net/oplus_modules/oplus_dns_hook/oplus_dns_hook.c:808:11: CC fs/proc/fd.o
error: implicit declaration of function 'nf_register_net_hooks' [-Werror,-Wimplicit-function-declaration]
ret = nf_register_net_hooks(&init_net, oplus_dns_hook_netfilter_ops, ARRAY_SIZE(oplus_dns_hook_netfilter_ops));
^
CC drivers/gpu/mediatek/ged/src/ged_dcs.o
CC drivers/misc/mediatek/qos/mtk_qos_bound.o
CC drivers/clk/mediatek/reset.o
../drivers/char/rpmb/rpmb-mtk.c:2326:25: error: use of undeclared identifier 'mtk_mmc_host'
struct mmc_host *mmc = mtk_mmc_host[0];
^
../net/oplus_modules/oplus_dns_hook/oplus_dns_hook.c:825:5: error: implicit declaration of function 'nf_unregister_net_hooks' [-Werror,-Wimplicit-function-declaration]
nf_unregister_net_hooks(&init_net, oplus_dns_hook_netfilter_ops, ARRAY_SIZE(oplus_dns_hook_netfilter_ops));
^
1 error generated.
CC drivers/soc/mediatek/devapc/devapc-mt6895.o
make[4]: *** [../scripts/Makefile.build:277: drivers/char/rpmb/rpmb-mtk.o] Error 1
make[3]: *** [../scripts/Makefile.build:526: drivers/char/rpmb] Error 2
make[3]: *** Waiting for unfinished jobs....
CC kernel/time/timer_list.o
CC drivers/gpu/mediatek/ged/src/ged.o
3 errors generated.
make[4]: *** [../scripts/Makefile.build:277: net/oplus_modules/oplus_dns_hook/oplus_dns_hook.o] Error 1
make[3]: *** [../scripts/Makefile.build:526: net/oplus_modules/oplus_dns_hook] Error 2
make[3]: *** Waiting for unfinished jobs....
CC drivers/gpu/mediatek/ged/src/ged_base.o
make[2]: *** [../scripts/Makefile.build:526: net/oplus_apps_monitor] Error 2
../net/oplus_modules/oplus_stats_calc/oplus_stats_calc.c:416:8: error: implicit declaration of function 'nf_register_net_hooks' [-Werror,-Wimplicit-function-declaration]
ret = nf_register_net_hooks(&init_net, oplus_stats_calc_netfilter_ops, ARRAY_SIZE(oplus_stats_calc_netfilter_ops));
^
CC drivers/gpu/mediatek/ged/src/ged_main.o
CC kernel/time/timeconv.o
CC drivers/misc/mediatek/slbc/slbc_mt6893.o
../net/oplus_modules/oplus_stats_calc/oplus_stats_calc.c CC fs/namei.o
:433:2: error: implicit declaration of function 'nf_unregister_net_hooks' [-Werror,-Wimplicit-function-declaration]
nf_unregister_net_hooks(&init_net, oplus_stats_calc_netfilter_ops, ARRAY_SIZE(oplus_stats_calc_netfilter_ops));
^
CC fs/fcntl.o
AR drivers/gpio/built-in.a
2 errors generated.
CC drivers/clk/clk.o
make[4]: *** [../scripts/Makefile.build:277: net/oplus_modules/oplus_stats_calc/oplus_stats_calc.o] Error 1
make[3]: *** [../scripts/Makefile.build:526: net/oplus_modules/oplus_stats_calc] Error 2
make[2]: *** [../scripts/Makefile.build:526: net/oplus_modules] Error 2
make[1]: *** [/drone/src/k/Makefile:1911: net] Error
And more
../drivers/soc/oplus/midas/v1_gki/binder_stats_dev.c:1429:2: error: implicit declaration of function 'unregister_trace_android_vh_binder_del_ref' [-Werror,-Wimplicit-function-declaration]
unregister_trace_android_vh_binder_del_ref(binder_del_ref_hook, NULL);
^
../drivers/soc/oplus/midas/v1_gki/binder_stats_dev.c:1429:2: note: did you mean 'unregister_trace_android_vh_binder_new_ref'?
../drivers/soc/oplus/midas/v1_gki/binder_stats_dev.c:1428:2: note: 'unregister_trace_android_vh_binder_new_ref' declared here
unregister_trace_android_vh_binder_new_ref(binder_new_ref_hool, NULL);
^
../drivers/soc/oplus/system/oplus_phoenix/phoenix_base.c:67:2: error: implicit declaration of function 'rtc_time_to_tm' [-Werror,-Wimplicit-function-declaration]
rtc_time_to_tm(ts.tv_sec, &tm);
^
6 errors generated.
And more
../drivers/soc/oplus/system/oplus_phoenix/phoenix_dump.c:202:7: error: implicit declaration of function 'ksys_open' [-Werror,-Wimplicit-function-declaration]
fd = ksys_open(keyinfo_file, O_CREAT | O_WRONLY | O_TRUNC, FILE_MODE_0666);
^
CC drivers/clk/mediatek/clk-mt6893-imgsys2.o
../drivers/soc/oplus/system/oplus_phoenix/phoenix_dump.c:355:7: error: implicit declaration of function 'ksys_access' [-Werror,-Wimplicit-function-declaration]
if (!ksys_access(PHOENIX_TEMP_DIR, 0))
^
../drivers/soc/oplus/system/oplus_phoenix/phoenix_watchdog.c:161:9: error: implicit declaration of function 'ksys_access' [-Werror,-Wimplicit-function-declaration]
return ksys_access("/system/system_ext/etc/init/init.oplus.rootdir.rc", 0);
^
CC drivers/clk/mediatek/clk-mt6893-impc.o
2 errors generated.
4 errors generated.
And yeah I'm using arch/arm64/configs/mgk_64_k510_defconfig
as my kernel config
Regards
Got it, exists here https://github.com/OnePlusOSS/android_kernel_5.10_oneplus_mt6895/blob/oneplus/mt6895_s_12.1_oneplus_ace_race/kernel/configs/oplus6895.config
Thx I'll compile and let you know
Still getting errors from mt6895 12.1 kernel source :
using config : mgk_64_k510_defconfig and oplus6895.config using clang : 12.0.9 based on r416183c2
command to compile kernel :
make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 mgk_64_k510_defconfig oplus6895.config make O=out ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabi- LLVM=1 LLVM_IAS=1 ABI_OUT_TAG="mtk" KMI_SYMBOL_LIST=android/abi_gki_aarch64_mtk GKI_MODULES_LIST=android/abi_gki_aarch64_oplus ABI_DEFINITION=android/abi_gki_aarch64.xml SKIP_CP_KERNEL_HDR=1
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.
Got it, exists here https://github.com/OnePlusOSS/android_kernel_5.10_oneplus_mt6895/blob/oneplus/mt6895_s_12.1_oneplus_ace_race/kernel/configs/oplus6895.config
Thx I'll compile and let you know
any update on this matter ... were you successful ??
Still getting errors from mt6895 12.1 kernel source :
using config : mgk_64_k510_defconfig and oplus6895.config using clang : 12.0.9 based on r416183c2
command to compile kernel :
make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 mgk_64_k510_defconfig oplus6895.config make O=out ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabi- LLVM=1 LLVM_IAS=1 ABI_OUT_TAG="mtk" KMI_SYMBOL_LIST=android/abi_gki_aarch64_mtk GKI_MODULES_LIST=android/abi_gki_aarch64_oplus ABI_DEFINITION=android/abi_gki_aarch64.xml SKIP_CP_KERNEL_HDR=1
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 2please ask oneplus kernel team to just to test only the kernel compilation not the entire source.
after a lot of fight .. finally it compiled.
found a few issues with touchscreen code. if using CONFIG_OPLUS_MTK_DRM_GKI_NOTIFY then all the CONFIG_FB code should be coming after the first config else all the code will give compilation errors.
Still getting errors from mt6895 12.1 kernel source :
using config : mgk_64_k510_defconfig and oplus6895.config using clang : 12.0.9 based on r416183c2
command to compile kernel :
make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 mgk_64_k510_defconfig oplus6895.config make O=out ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabi- LLVM=1 LLVM_IAS=1 ABI_OUT_TAG="mtk" KMI_SYMBOL_LIST=android/abi_gki_aarch64_mtk GKI_MODULES_LIST=android/abi_gki_aarch64_oplus ABI_DEFINITION=android/abi_gki_aarch64.xml SKIP_CP_KERNEL_HDR=1
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 2please ask oneplus kernel team to just to test only the kernel compilation not the entire source.
Hi brother, I have the same problem as you. How did you solve it, thank you very much
I tried to find the relevant code to comment it out, but I found more and more errors. It was really frustrating
@CloudMeiyu can you check your config ... the issue is because of config ... you need to include android gki config, android recommend configs, mtk and oplus configs .... then it will compile fine.
@CloudMeiyu can you check your config ... the issue is because of config ... you need to include android gki config, android recommend configs, mtk and oplus configs .... then it will compile fine.
Thank you very much for taking the time to reply the message. I used mgk_64_k510_defconfig and oplus6895.config..... Do you need to make any other Settings? The documentation doesn't say anything else...
@CloudMeiyu can you check your config ... the issue is because of config ... you need to include android gki config, android recommend configs, mtk and oplus configs .... then it will compile fine.
make O=out ARCH=arm64 mgk_64_k510_defconfig oplus6895.config What else do we need ? It's too hard brother. wailing
@CloudMeiyu yes please use merge tool in script folder in kernel to merge all these config :
you can remove redundant configs and use the merged config to build with googles gki build system.
yes the documentation are scarce for gki.
@CloudMeiyu yes please use merge tool in script folder in kernel to merge all these config :
1. gki_defconfig 2. android-base.config 3. android-recommended.config 4. mgk_64_k510_defconfig 5. oplus6895.config
you can remove redundant configs and use the merged config to build with googles gki build system.
yes the documentation are scarce for gki.
Brother Could you tell me how to use merge tool in script folder in kernel to merge all these config ..? I checked the data and found that it was using "./scripts/kconfig/merge_config.sh" merge all these config I don't know if it's right.
command to compile kernel :
./scripts/kconfig/merge_config.sh -m arch/arm64/configs/gki_defconfig kernel/configs/android-base.config kernel/configs/android-recommended.config arch/arm64/configs/mgk_64_k510_defconfig kernel/configs/oplus6895.config
mv -f .config .merged.config (Looking through the data, I don't know why he did it.) make O=out -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- KCONFIG_ALLCONFIG=.merged.config alldefconfig (Looking through the data, I don't know why he did it.)
make O=out -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
getting error :
In file included from ./../include/linux/compiler_types.h:74,
from ~~~~
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:21:2: note: in expansion of macro ‘asm_volatile_goto’
21 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: error: impossible constraint in ‘asm’
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: error: impossible constraint in ‘asm’
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: error: impossible constraint in ‘asm’
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: error: impossible constraint in ‘asm’
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: error: impossible constraint in ‘asm’
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:21:2: note: in expansion of macro ‘asm_volatile_goto’
21 | asm_volatile_goto(
| ^~~~~
../arch/arm64/include/asm/jump_label.h: In function ‘system_uses_lse_atomics’:
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: error: impossible constraint in ‘asm’
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../include/linux/compiler-gcc.h:102:38: error: impossible constraint in ‘asm’
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
38 | asm_volatile_goto(
| ^~~~~
../arch/arm64/include/asm/jump_label.h: In function ‘arch_local_irq_disable’:
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:21:2: note: in expansion of macro ‘asm_volatile_goto’
21 | asm_volatile_goto(
| ^~~~~
../arch/arm64/include/asm/jump_label.h: In function ‘preempt_notifier_register’:
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:21:2: note: in expansion of macro ‘asm_volatile_goto’
21 | asm_volatile_goto(
| ^~~~~
../arch/arm64/include/asm/jump_label.h: In function ‘schedule_bug’:
../include/linux/compiler-gcc.h:102:38: warning: asm operand 0 probably doesn’t match constraints
102 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
| ^~~
../arch/arm64/include/asm/jump_label.h:21:2: note: in expansion of macro ‘asm_volatile_goto’
21 | asm_volatile_goto(
| ^~~~~
Oh, my God, my mind is about to explode.....................Damn it. Wrong report..............
@CloudMeiyu well from kernel 5.10 onwards google started using llvm/clang (please go through google documentation) so not more cross compiling using gcc and regarding the merge tool please find the help documentation using a notepad or using -h or --help. Yes the path and script is the same. The reason we are merging multiple config as to specify which is vendor config and which is common and which is gki and android specific. Brings more clarity which config is for what.
@CloudMeiyu well from kernel 5.10 onwards google started using llvm/clang (please go through google documentation) so not more cross compiling using gcc and regarding the merge tool please find the help documentation using a notepad or using -h or --help. Yes the path and script is the same. The reason we are merging multiple config as to specify which is vendor config and which is common and which is gki and android specific. Brings more clarity which config is for what.
Brother, thank you very much. I have avoided the error reported before through your description and compiled normally for a period of time. However, there is a stack error reported later that I cannot solve. Have you ever encountered this problem? I wonder if it has anything to do with the machine being 64-bit, when the normal build environment should be 32-bit
Error:
../drivers/misc/mediatek/imgsensor/src-v4l2/frame-sync/frame_sync_console.c:284:16: error: stack frame size of 8256 bytes in function 'fsync_console_store' [-Werror,-Wframe-larger-than=] static ssize_t fsync_console_store( ^ 1 error generated. ../scripts/Makefile.build:277: recipe for target 'drivers/misc/mediatek/imgsensor/src-v4l2/frame-sync/frame_sync_console.o' failed
@CloudMeiyu bro only 64 bit is only supported not 32 bit for building anything. Please DM for support if needed.
Hi the following kernel drivers are missing in kernel code
vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/
does not exist https://github.com/OnePlusOSS/android_vendor_mediatek_kernel_modules_mt6895/tree/oneplus/mt6895_s_12.1_oneplus_ace_race/vendor/oplus/kernel & these are symlinked here https://github.com/OnePlusOSS/android_kernel_5.10_oneplus_mt6895/blob/oneplus/mt6895_s_12.1_oneplus_ace_race/drivers/input/touchscreen/oplus_touchscreen_v2Also the uff_fp_drivers are missing
vendor/oplus/secure/biometrics/fingerprints/bsp/uff/driver
does not existAlso the whole kernel is broken , it does not compile at all, I'm using Clang 11 in my build, here are logs. https://gist.github.com/techyminati/c8cd8c65c16eaf1cc84f8479984e8935
splitted logs:- https://katb.in/osamuzogobo https://katb.in/nogitipikey https://katb.in/isiwepugobu