[Honor 4C ROMs, Kernels, Recoveries, & Other Develo] hackslash:
Trying to compile kernel for ARM64 from Marshmallow sources.

The hisi_hi6210sft_defconfig had bunch of simple errors. At the top a variable is set to be excluded and in the bottom it was defined. Cleared those issues pretty easily.

But at compiling the kernel, bunch of errors:

init/main.c:481:24: warning: 'srecorder_res' defined but not used [-Wunused-variable]

static struct resource srecorder_res =

^

/bin/sh: 1: /home/mfbcool/sources/kernel_sources_6.0_hi6210sft/kernel/arch/arm64/kernel/vdso/gen_vdso_offsets.sh: Permission denied

arch/arm64/mm/fault.c: In function 'do_sp_pc_abort':

arch/arm64/mm/fault.c:489:3: warning: 'return' with a value, in function returning void

return 0;

^

In file included from include/linux/compiler.h:54:0,

from include/linux/ioport.h:12,

from include/linux/device.h:16,

from include/linux/node.h:17,

from include/linux/cpu.h:17,

from arch/arm64/kernel/fpsimd.c:20:

arch/arm64/kernel/fpsimd.c: In function 'fpsimd_cpu_hot_notifier':

arch/arm64/kernel/fpsimd.c:281:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

fpsimd_hot_regs = &per_cpu(fpsimd_hot_state, (unsigned int)hcpu);

^

include/linux/compiler-gcc.h:38:29: note: in definition of macro 'RELOC_HIDE'

(typeof(ptr)) (__ptr + (off)); })

^

include/asm-generic/percpu.h:57:4: note: in expansion of macro 'SHIFT_PERCPU_PTR'

(*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu)))

^

include/asm-generic/percpu.h:57:29: note: in expansion of macro 'per_cpu_offset'

(*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu)))

^

arch/arm64/kernel/fpsimd.c:281:21: note: in expansion of macro 'per_cpu'

fpsimd_hot_regs = &per_cpu(fpsimd_hot_state, (unsigned int)hcpu);

^

In file included from include/linux/kernel.h:12:0,

from kernel/printk.c:19:

kernel/printk.c: In function 'log_store':

include/linux/typecheck.h:11:18: warning: comparison of distinct pointer types lacks a cast

(void)(&__dummy == &__dummy2); \

^

include/linux/jiffies.h:103:3: note: in expansion of macro 'typecheck'

typecheck(unsigned long, b) && \

^

kernel/printk.c:494:6: note: in expansion of macro 'time_after'

if (time_after(jiffies, prev_jffy + 1 * HZ)) {

^

In file included from kernel/printk.c:19:0:

kernel/printk.c: In function 'get_console_name':

include/linux/kernel.h:663:17: warning: comparison of distinct pointer types lacks a cast

(void) (&_min1 == &_min2); \

^

kernel/printk.c:2455:57: note: in expansion of macro 'min'

strncpy(name, console_cmdline[selected_console].name, min(sizeof(console_cmdline[selected_console].name), name_buf_len));

^

kernel/printk.c: At top level:

kernel/printk.c:77:21: warning: 'scbbpdrxstat1' defined but not used [-Wunused-variable]

static unsigned int scbbpdrxstat1;

^

kernel/printk.c:78:21: warning: 'scbbpdrxstat2' defined but not used [-Wunused-variable]

static unsigned int scbbpdrxstat2;

^

kernel/printk.c:79:21: warning: 'fpga_flag' defined but not used [-Wunused-variable]

static unsigned int fpga_flag;

^

init/init_task.c:18:8: warning: missing braces around initializer [-Wmissing-braces]

struct task_struct init_task = INIT_TASK(init_task);

^

init/init_task.c:18:8: warning: (near initialization for 'init_task.ms.sched_time') [-Wmissing-braces]

/home/mfbcool/ndk/r11/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld: no input files

make[1]: *** [init/mounts.o] Error 1

make: *** [init] Error 2

make: *** Waiting for unfinished jobs....

In file included from arch/arm64/kernel/signal.c:36:0:

arch/arm64/kernel/signal.c: In function 'setup_return':

/home/mfbcool/sources/kernel_sources_6.0_hi6210sft/kernel/arch/arm64/include/asm/vdso.h:34:11: error: 'vdso_offset_sigtramp' undeclared (first use in this function)

(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \

^

arch/arm64/kernel/signal.c:241:14: note: in expansion of macro 'VDSO_SYMBOL'

sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);

^

/home/mfbcool/sources/kernel_sources_6.0_hi6210sft/kernel/arch/arm64/include/asm/vdso.h:34:11: note: each undeclared identifier is reported only once for each function it appears in

(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \

^

arch/arm64/kernel/signal.c:241:14: note: in expansion of macro 'VDSO_SYMBOL'

sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);

^

make[1]: *** [arch/arm64/kernel/signal.o] Error 1

make[1]: *** Waiting for unfinished jobs....

/home/mfbcool/ndk/r11/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld: no input files

make[1]: *** [arch/arm64/crypto/sha1-ce.o] Error 1

make: *** [arch/arm64/crypto] Error 2

make: *** [arch/arm64/kernel] Error 2

arch/arm64/mm/alignment.c: In function 'safe_usermode':

arch/arm64/mm/alignment.c:100:2: warning: implicit declaration of function 'cpu_is_v6_unaligned' [-Wimplicit-function-declaration]

if (cpu_is_v6_unaligned() && !(new_usermode & (UM_FIXUP | UM_SIGNAL))) {

^

arch/arm64/mm/alignment.c: In function 'do_alignment_thumb_vldr':

arch/arm64/mm/alignment.c:757:3: warning: implicit declaration of function 'case_reg' [-Wimplicit-function-declaration]

case_reg(0, val); case_reg(1, val);

^

arch/arm64/mm/alignment.c:739:6: warning: unused variable 'tinstr' [-Wunused-variable]

u16 tinstr = 0;

^

arch/arm64/mm/alignment.c:738:15: warning: unused variable 'fs' [-Wunused-variable]

mm_segment_t fs;

^

arch/arm64/mm/alignment.c:737:16: warning: unused variable 'instrptr' [-Wunused-variable]

unsigned long instrptr;

^

kernel/workqueue.c: In function 'delayed_work_timer_fn':

kernel/workqueue.c:1440:2: warning: implicit declaration of function 'exch_save_slice_wdg' [-Wimplicit-function-declaration]

exch_save_slice_wdg((unsigned long)dwork);

^

kernel/posix-cpu-timers.c: In function 'set_process_cpu_timer':

kernel/posix-cpu-timers.c:1406:13: warning: 'now.cpu' may be used uninitialized in this function [-Wmaybe-uninitialized]

*oldval -= now.cpu;

^

kernel/sched/core.c: In function 'context_switch':

kernel/sched/core.c:2237:46: warning: passing argument 1 of 'task_switch_ls[ix]' makes integer from pointer without a cast

(*task_switch_ls[ix])((void *)prev, (void *)next);

^

kernel/sched/core.c:2237:46: note: expected 'long unsigned int' but argument is of type 'void *'

kernel/sched/core.c:2237:60: warning: passing argument 2 of 'task_switch_ls[ix]' makes integer from pointer without a cast

(*task_switch_ls[ix])((void *)prev, (void *)next);

^

kernel/sched/core.c:2237:60: note: expected 'long unsigned int' but argument is of type 'void *'

kernel/power/hw_power_monitor.c: In function 'wakeup_irq_show':

kernel/power/hw_power_monitor.c:627:22: warning: unused variable 'id' [-Wunused-variable]

unsigned int id = WAKEUP_IRQ;

^

kernel/cgroup_ionice.c:37:30: warning: 'task_to_ionice' defined but not used [-Wunused-function]

static struct ionice_cgroup *task_to_ionice(struct task_struct *task)

^

kernel/hung_task.c: In function 'enable_show':

kernel/hung_task.c:510:30: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]

return snprintf(buf, sizeof(buf), "on\n");

^

kernel/hung_task.c:512:30: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]

return snprintf(buf, sizeof(buf), "off\n");

^

kernel/hung_task.c: In function 'enable_store':

kernel/hung_task.c:532:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]

pr_err("hung_task:tmp=%s, count %d\n", tmp, count);

^

kernel/hung_task.c: In function 'rebuild_name_table':

kernel/hung_task.c:666:28: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]

memset(pname, 0x00, sizeof(pname));

^

kernel/hung_task.c: In function 'register_hook_func':

kernel/hung_task.c:797:2: warning: implicit declaration of function 'add_hw_hungtask_hook' [-Wimplicit-function-declaration]

add_hw_hungtask_hook((funcptr2)dump_hungtask_trace);

^