[Android Software/Hacking General [Developers Only]] prt23:
Hi! im currently trying to compile the Lineage OS v19.1 Kernel for the SM-G973F/beyond1lte/Samsung S10.

im using this toolchain:

https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu.tar.xz

And if I try to compile I get these errors:

(1):

In file included from ./include/linux/printk.h:7:0,

from ./include/linux/kernel.h:14,

from ./include/asm-generic/bug.h:16,

from ./arch/arm64/include/asm/bug.h:37,

from ./include/linux/bug.h:5,

from ./include/linux/signal.h:5,

from arch/arm64/mm/fault.c:22:

arch/arm64/mm/fault.c: In function ‘do_sea’:

./include/linux/kern_levels.h:5:18: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘phys_addr_t {aka long long unsigned int}’ [-Werror=format=]

#define KERN_SOH "\001" /* ASCII Start Of Header */

^

./include/linux/kern_levels.h:20:19: note: in expansion of macro ‘KERN_SOH’

#define KERN_AUTO KERN_SOH /* auto-summary messages */

^

./include/linux/printk.h:328:9: note: in expansion of macro ‘KERN_AUTO’

printk(KERN_AUTO index pr_fmt(fmt), ##__VA_ARGS__)

^

arch/arm64/mm/fault.c:705:2: note: in expansion of macro ‘pr_auto’

pr_auto(ASL1, "%s (0x%08x) at 0x%016lx[0x%09lx]\n",

^

arch/arm64/kernel/process.c: In function ‘show_data’:

arch/arm64/kernel/process.c:217:9: error: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘long unsigned int’ [-Werror=format=]

printk("\n%s: %pS:\n", name, addr);

(2):

In file included from ./include/trace/define_trace.h:96:0,

from ./include/trace/events/ems.h:748,

from kernel/sched/ems/core.c:15:

./include/trace/events/ems.h: In function ‘trace_raw_output_ems_select_service_cpu’:

./include/trace/events/ems.h:692:12: error: too many arguments for format [-Werror=format-extra-args]

TP_printk("comm=%s pid=%d best_cpu=%d backup_cpu",

^

./include/trace/trace_events.h:360:22: note: in definition of macro ‘DECLARE_EVENT_CLASS’

trace_seq_printf(s, print); \

^

./include/trace/trace_events.h:79:9: note: in expansion of macro ‘PARAMS’

PARAMS(print)); \

^

./include/trace/events/ems.h:672:1: note: in expansion of macro ‘TRACE_EVENT’

TRACE_EVENT(ems_select_service_cpu,

^

./include/trace/events/ems.h:692:2: note: in expansion of macro ‘TP_printk’

TP_printk("comm=%s pid=%d best_cpu=%d backup_cpu",

^

CC kernel/sched/ems/load_balance.o

kernel/sched/ems/core.c: In function ‘init_sysfs’:

kernel/sched/ems/core.c:309:2: error: ignoring return value of ‘sysfs_create_file’, declared with attribute warn_unused_result [-Werror=unused-result]

sysfs_create_file(ems_kobj, &sched_topology_attr.attr);

^

kernel/sched/ems/core.c:310:2: error: ignoring return value of ‘sysfs_create_file’, declared with attribute warn_unused_result [-Werror=unused-result]

sysfs_create_file(ems_kobj, &eff_mode_attr.attr);

^

CC kernel/sched/ems/service.o

CC kernel/sched/ems/st_addon.o

CC kernel/sched/ems/freqvar_tune.o

cc1: all warnings being treated as errors

make[3]: *** [scripts/Makefile.build:359: kernel/sched/ems/core.o] Error 1

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

make[2]: *** [scripts/Makefile.build:674: kernel/sched/ems] Error 2

make[1]: *** [scripts/Makefile.build:674: kernel/sched] Error 2

make: *** [Makefile:1202: kernel] Error 2

Full log:

make -j$(nproc --all)/bin/sh: 1: Syntax error: "(" unexpectedscripts/kconfig - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com

I know it has nothing to do with the Compiler as I have tried many toolchain versions from google, Linaro etc. and all returned this error.

As for the Process.c error you could try removing the Printk function as, to my knowlidge, it only prints to the kernel logger.

Ill try some things and read the failed code rn, but not sure if Im competent enough to understand C Kernel Code...

Kernel source:

GitHub - LineageOS/android_kernel_samsung_exynos9820

Contribute to LineageOS/android_kernel_samsung_exynos9820 development by creating an account on GitHub.

github.com