Unbable to add GOVERNOR. - Sony Xperia E3

Today i tried to add ONDEMANDX GOVERNOR TO MY KERNEL I got this error.
Code:
[email protected]:~/android/xperia/D2212-02/kernel$ make ARCH=arm CROSS_COMPILE=~/tc/bin/arm-cortex_a7-linux-gnueabihf- -j3
CHK include/linux/version.h
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC arch/arm/mach-msm/acpuclock-cortex.o
CC arch/arm/mach-msm/msm_rq_stats.o
CC arch/arm/mach-msm/cpufreq.o
CC drivers/cpufreq/cpufreq.o
CC arch/arm/mach-msm/devfreq_cpubw.o
LD arch/arm/mach-msm/built-in.o
CC drivers/cpufreq/cpu-boost.o
CC drivers/cpufreq/cpufreq_stats.o
CC drivers/devfreq/devfreq.o
CC drivers/cpufreq/cpufreq_performance.o
CC drivers/cpufreq/cpufreq_powersave.o
CC drivers/cpufreq/cpufreq_userspace.o
CC drivers/cpufreq/cpufreq_ondemand.o
CC drivers/cpufreq/cpufreq_ondemandx.o
CC drivers/devfreq/governor_simpleondemand.o
drivers/cpufreq/cpufreq_ondemandx.c:132:9: error: unknown field ‘suspend’ specified in initializer
.suspend = ondemandx_early_suspend,
^
drivers/cpufreq/cpufreq_ondemandx.c:133:9: error: unknown field ‘resume’ specified in initializer
.resume = ondemandx_late_resume,
^
drivers/cpufreq/cpufreq_ondemandx.c:134:9: error: unknown field ‘level’ specified in initializer
.level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1,
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘get_cpu_idle_time_jiffy’:
drivers/cpufreq/cpufreq_ondemandx.c:166:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(kstat_cpu(cpu).cpustat.user,
^
drivers/cpufreq/cpufreq_ondemandx.c:167:18: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(cpu).cpustat.system);
^
drivers/cpufreq/cpufreq_ondemandx.c:169:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.irq);
^
drivers/cpufreq/cpufreq_ondemandx.c:170:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.softirq);
^
drivers/cpufreq/cpufreq_ondemandx.c:171:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.steal);
^
drivers/cpufreq/cpufreq_ondemandx.c:172:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.nice);
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘store_ignore_nice_load’:
drivers/cpufreq/cpufreq_ondemandx.c:382:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘dbs_check_cpu’:
drivers/cpufreq/cpufreq_ondemandx.c:498:41: error: ‘struct kernel_stat’ has no member named ‘cpustat’
cur_nice = cputime64_sub(kstat_cpu(j).cpustat.nice,
^
drivers/cpufreq/cpufreq_ondemandx.c:507:44: error: ‘struct kernel_stat’ has no member named ‘cpustat’
j_dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘cpufreq_governor_dbs’:
drivers/cpufreq/cpufreq_ondemandx.c:689:19: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(j).cpustat.nice;
^
make[2]: *** [drivers/cpufreq/cpufreq_ondemandx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CC drivers/devfreq/governor_performance.o
CC drivers/devfreq/governor_powersave.o
make[1]: *** [drivers/cpufreq] Error 2
make[1]: *** Waiting for unfinished jobs....
CC drivers/devfreq/governor_userspace.o
CC drivers/devfreq/governor_msm_adreno_tz.o
CC drivers/devfreq/governor_msm_cpufreq.o
LD drivers/devfreq/built-in.o
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
[email protected]:~/android/xperia/D2212-02/kernel$ make ARCH=arm CROSS_COMPILE=~/tc/bin/arm-cortex_a7-linux-gnueabihf- -j3
CHK include/linux/version.h
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/cpufreq/cpufreq_ondemand.o
In file included from include/asm-generic/percpu.h:6:0,
from arch/arm/include/generated/asm/percpu.h:1,
from include/linux/percpu.h:10,
from include/linux/topology.h:34,
from include/linux/gfp.h:7,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/cpufreq/cpufreq_ondemand.c:15:
include/linux/percpu-defs.h:80:2: error: expected ‘,’ or ‘;’ before ‘__typeof__’
__typeof__(type) name
^
include/linux/percpu-defs.h:91:2: note: in expansion of macro ‘DEFINE_PER_CPU_SECTION’
DEFINE_PER_CPU_SECTION(type, name, "")
^
drivers/cpufreq/cpufreq_ondemand.c:114:7: note: in expansion of macro ‘DEFINE_PER_CPU’
tatic DEFINE_PER_CPU(unsigned int, cpu_load);
^
make[2]: *** [drivers/cpufreq/cpufreq_ondemand.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
[email protected]:~/android/xperia/D2212-02/kernel$ make ARCH=arm CROSS_COMPILE=~/tc/bin/arm-cortex_a7-linux-gnueabihf- -j3
CHK include/linux/version.h
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/cpufreq/cpufreq_ondemand.o
CC drivers/cpufreq/cpufreq_ondemandx.o
drivers/cpufreq/cpufreq_ondemandx.c:132:9: error: unknown field ‘suspend’ specified in initializer
.suspend = ondemandx_early_suspend,
^
drivers/cpufreq/cpufreq_ondemandx.c:133:9: error: unknown field ‘resume’ specified in initializer
.resume = ondemandx_late_resume,
^
drivers/cpufreq/cpufreq_ondemandx.c:134:9: error: unknown field ‘level’ specified in initializer
.level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1,
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘get_cpu_idle_time_jiffy’:
drivers/cpufreq/cpufreq_ondemandx.c:166:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(kstat_cpu(cpu).cpustat.user,
^
drivers/cpufreq/cpufreq_ondemandx.c:167:18: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(cpu).cpustat.system);
^
drivers/cpufreq/cpufreq_ondemandx.c:169:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.irq);
^
drivers/cpufreq/cpufreq_ondemandx.c:170:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.softirq);
^
drivers/cpufreq/cpufreq_ondemandx.c:171:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.steal);
^
drivers/cpufreq/cpufreq_ondemandx.c:172:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.nice);
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘store_ignore_nice_load’:
drivers/cpufreq/cpufreq_ondemandx.c:382:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘dbs_check_cpu’:
drivers/cpufreq/cpufreq_ondemandx.c:498:41: error: ‘struct kernel_stat’ has no member named ‘cpustat’
cur_nice = cputime64_sub(kstat_cpu(j).cpustat.nice,
^
drivers/cpufreq/cpufreq_ondemandx.c:507:44: error: ‘struct kernel_stat’ has no member named ‘cpustat’
j_dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘cpufreq_governor_dbs’:
drivers/cpufreq/cpufreq_ondemandx.c:689:19: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(j).cpustat.nice;
^
make[2]: *** [drivers/cpufreq/cpufreq_ondemandx.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
[email protected]:~/android/xperia/D2212-02/kernel$ make ARCH=arm CROSS_COMPILE=~/tc/bin/arm-cortex_a7-linux-gnueabihf- -j3
CHK include/linux/version.h
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/cpufreq/cpufreq_ondemand.o
CC drivers/cpufreq/cpufreq_ondemandx.o
drivers/cpufreq/cpufreq_ondemandx.c:134:9: error: unknown field ‘suspend’ specified in initializer
.suspend = ondemandx_early_suspend,
^
drivers/cpufreq/cpufreq_ondemandx.c:135:9: error: unknown field ‘resume’ specified in initializer
.resume = ondemandx_late_resume,
^
drivers/cpufreq/cpufreq_ondemandx.c:136:9: error: unknown field ‘level’ specified in initializer
.level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1,
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘get_cpu_idle_time_jiffy’:
drivers/cpufreq/cpufreq_ondemandx.c:168:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(kstat_cpu(cpu).cpustat.user,
^
drivers/cpufreq/cpufreq_ondemandx.c:169:18: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(cpu).cpustat.system);
^
drivers/cpufreq/cpufreq_ondemandx.c:171:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.irq);
^
drivers/cpufreq/cpufreq_ondemandx.c:172:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.softirq);
^
drivers/cpufreq/cpufreq_ondemandx.c:173:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.steal);
^
drivers/cpufreq/cpufreq_ondemandx.c:174:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.nice);
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘store_ignore_nice_load’:
drivers/cpufreq/cpufreq_ondemandx.c:384:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘dbs_check_cpu’:
drivers/cpufreq/cpufreq_ondemandx.c:500:41: error: ‘struct kernel_stat’ has no member named ‘cpustat’
cur_nice = cputime64_sub(kstat_cpu(j).cpustat.nice,
^
drivers/cpufreq/cpufreq_ondemandx.c:509:44: error: ‘struct kernel_stat’ has no member named ‘cpustat’
j_dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘cpufreq_governor_dbs’:
drivers/cpufreq/cpufreq_ondemandx.c:691:19: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(j).cpustat.nice;
^
make[2]: *** [drivers/cpufreq/cpufreq_ondemandx.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
[email protected]:~/android/xperia/D2212-02/kernel$ clean
No command 'clean' found, did you mean:
Command 'clear' from package 'ncurses-bin' (main)
Command 'pclean' from package 'pbuilder-scripts' (universe)
Command 'uclean' from package 'svn-buildpackage' (universe)
clean: command not found
[email protected]:~/android/xperia/D2212-02/kernel$ clear
[email protected]:~/android/xperia/D2212-02/kernel$ make ARCH=arm CROSS_COMPILE=~/tc/bin/arm-cortex_a7-linux-gnueabihf- -j3
CHK include/linux/version.h
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/cpufreq/cpufreq_ondemand.o
CC drivers/cpufreq/cpufreq_ondemandx.o
drivers/cpufreq/cpufreq_ondemandx.c:132:9: error: unknown field ‘suspend’ specified in initializer
.suspend = ondemandx_early_suspend,
^
drivers/cpufreq/cpufreq_ondemandx.c:133:9: error: unknown field ‘resume’ specified in initializer
.resume = ondemandx_late_resume,
^
drivers/cpufreq/cpufreq_ondemandx.c:134:9: error: unknown field ‘level’ specified in initializer
.level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1,
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘get_cpu_idle_time_jiffy’:
drivers/cpufreq/cpufreq_ondemandx.c:166:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(kstat_cpu(cpu).cpustat.user,
^
drivers/cpufreq/cpufreq_ondemandx.c:167:18: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(cpu).cpustat.system);
^
drivers/cpufreq/cpufreq_ondemandx.c:169:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.irq);
^
drivers/cpufreq/cpufreq_ondemandx.c:170:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.softirq);
^
drivers/cpufreq/cpufreq_ondemandx.c:171:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.steal);
^
drivers/cpufreq/cpufreq_ondemandx.c:172:53: error: ‘struct kernel_stat’ has no member named ‘cpustat’
busy_time = cputime64_add(busy_time, kstat_cpu(cpu).cpustat.nice);
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘store_ignore_nice_load’:
drivers/cpufreq/cpufreq_ondemandx.c:382:42: error: ‘struct kernel_stat’ has no member named ‘cpustat’
dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘dbs_check_cpu’:
drivers/cpufreq/cpufreq_ondemandx.c:498:41: error: ‘struct kernel_stat’ has no member named ‘cpustat’
cur_nice = cputime64_sub(kstat_cpu(j).cpustat.nice,
^
drivers/cpufreq/cpufreq_ondemandx.c:507:44: error: ‘struct kernel_stat’ has no member named ‘cpustat’
j_dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
^
drivers/cpufreq/cpufreq_ondemandx.c: In function ‘cpufreq_governor_dbs’:
drivers/cpufreq/cpufreq_ondemandx.c:689:19: error: ‘struct kernel_stat’ has no member named ‘cpustat’
kstat_cpu(j).cpustat.nice;
^
make[2]: *** [drivers/cpufreq/cpufreq_ondemandx.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
I am sure i have done everything correctly.
you can check my source code here => https://github.com/vinay94185vinay/Flamingo-kernel

Update the ondemandx governor source from a better version.
AFAIK ,you are using the source of 2.6.x which had the cpustat defined in kernel_stat.
It's not the case right now since now cpustat is defined in kernel_cpustat.

karandpr said:
Update the ondemandx governor source from a better version.
AFAIK ,you are using the source of 2.6.x which had the cpustat defined in kernel_stat.
It's not the case right now since now cpustat is defined in kernel_cpustat.
Click to expand...
Click to collapse
so, I have have to get governor form same version of kernel source that I have.
am I right.(which is lowest version of kernel I can use.)

vinay said:
so, I have have to get governor form same version of kernel source that I have.
am I right.(which is lowest version of kernel I can use.)
Click to expand...
Click to collapse
3.4.x...
I don't have patience to check out full lkml and actually pinpoint on when they decided to create a separate struct for cpustat . It was done for 64 arch and cpustat is now a u64 variable instead of struct. ...so the struct you are looking at will be kernel_cpustat instead of cpustat... A whole lot of can of worms if you ask me....

karandpr said:
3.4.x...
I don't have patience to check out full lkml and actually pinpoint on when they decided to create a separate struct for cpustat . It was done for 64 arch and cpustat is now a u64 variable instead of struct. ...so the struct you are looking at will be kernel_cpustat instead of cpustat... A whole lot of can of worms if you ask me....
Click to expand...
Click to collapse
ok i will check source from 3.4.x.
thank,s again.

karandpr said:
3.4.x...
I don't have patience to check out full lkml and actually pinpoint on when they decided to create a separate struct for cpustat . It was done for 64 arch and cpustat is now a u64 variable instead of struct. ...so the struct you are looking at will be kernel_cpustat instead of cpustat... A whole lot of can of worms if you ask me....
Click to expand...
Click to collapse
i did,t found ondemandx but found intellidemand and it worked.
but when i change my governor to intelidemand phone crash and reboot.

vinay said:
i did,t found ondemandx but found intellidemand and it worked.
but when i change my governor to intelidemand phone crash and reboot.
Click to expand...
Click to collapse
last_kmsg ?

karandpr said:
last_kmsg ?
Click to expand...
Click to collapse
thare is no last_kmsg.
were is option of enabling last_kmsg in menuconfig.

vinay said:
thare is no last_kmsg.
were is option of enabling last_kmsg in menuconfig.
Click to expand...
Click to collapse
It's a patch in ram console driver...
It should be present iff the kernel has panicked ....

karandpr said:
It's a patch in ram console driver...
It should be present iff the kernel has panicked ....
Click to expand...
Click to collapse
in xperia e3 thare is no last_kmsg.
atleast in stock. it,s disabled by sony.
i tryed finding it in make menuconfig.
but did,t found how can i enable it.

vinay said:
in xperia e3 thare is no last_kmsg.
atleast in stock. it,s disabled by sony.
i tryed finding it in make menuconfig.
but did,t found how can i enable it.
Click to expand...
Click to collapse
It should already be enabled with .....
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y

karandpr said:
It should already be enabled with .....
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y
Click to expand...
Click to collapse
CONFIG_ANDROID_RAM_CONSOLE=y
was already in defconfig so i added only
CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y
but still no last_kmsg.
i have attached a list of files so you can check.
EDIT
i added intelliactive governor and it worked.
why intelidemand is not working

vinay said:
CONFIG_ANDROID_RAM_CONSOLE=y
was already in defconfig so i added only
CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y
but still no last_kmsg.
i have attached a list of files so you can check.
EDIT
i added intelliactive governor and it worked.
why intelidemand is not working
Click to expand...
Click to collapse
what are the contents of last_ssr_kmsg ?

karandpr said:
what are the contents of last_ssr_kmsg ?
Click to expand...
Click to collapse
it is empty.
opened with gedit and also done cat /proc/last_ssr_kmsg
it was empty file.

vinay said:
it is empty.
opened with gedit and also done cat /proc/last_ssr_kmsg
it was empty file.
Click to expand...
Click to collapse
In that case ,tough luck mate !!
Rollback the commit and twiddle thumbs ...

karandpr said:
In that case ,tough luck mate !!
Rollback the commit and twiddle thumbs ...
Click to expand...
Click to collapse
that,s all i can do.
BUT
SONY MIGHT HAVE DISABLED LAST_KMSG THROUGH A PATCH IN RAM DISK
IS IT POSSIBLE.
should i check ramdisk.

Why are you asking? , check ramdisk and see for yourself.....
Else boot to recovery and see if kmsg is present..

karandpr said:
Why are you asking? , check ramdisk and see for yourself.....
Else boot to recovery and see if kmsg is present..
Click to expand...
Click to collapse
that,s why i was asking.
you could give me a tip.
i will boot into recovery. it,s better that reading ramdisk for hour,s and hour,s.
EDIT
no last kmsg.
so NO HOPE.
i am rolling back.
(BTW, did you mean delete and commit by roll back or thare is really a roll back command in git hub)

You can use git revert ...

karandpr said:
You can use git revert ...
Click to expand...
Click to collapse
i did,t understood.
i am going to use delete and commit.

Related

Compiling Kernel

I keep getting kernel compilation error when trying to compile CM kernel from sources.
Code:
/tmp/cc0DKVco.s: Assembler messages:
/tmp/cc0DKVco.s:172: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc0DKVco.s:199: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
CC arch/arm/mach-msm/smd_private.o
CC arch/arm/mach-msm/smem.o
CC arch/arm/kernel/pmu.o
CC kernel/resource.o
CC arch/arm/kernel/perf_event.o
CC arch/arm/mach-msm/smd_init_dt.o
CC kernel/sysctl.o
arch/arm/mach-msm/smd_init_dt.c:24:25: fatal error: smd_private.h: No such file or directory
#include <smd_private.h>
^
compilation terminated.
make[1]: *** [arch/arm/mach-msm/smd_init_dt.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
No mods or tweaks has been added, just compiling with A7 optimized (linaro) toolchain on Ubuntu 13.10. I'm pretty sure I have installed all the necessary files and set-up the build environment. I'm new to this so could a dev help me?
bu,p
Same for me, where is the problem? can anyone help?
here is my output:
Code:
arch/arm/mach-msm/smd_init_dt.c:24:25: error: smd_private.h: No such file or directory
arch/arm/mach-msm/smd_init_dt.c: In function 'msm_smsm_probe':
arch/arm/mach-msm/smd_init_dt.c:66: error: 'disable_smsm_reset_handshake' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:66: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/smd_init_dt.c:66: error: for each function it appears in.)
arch/arm/mach-msm/smd_init_dt.c:88: error: 'msm_smd_debug_mask' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:88: error: 'MSM_SMSM_DEBUG' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:88: error: 'smd_log_ctx' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:114: error: implicit declaration of function 'smd_get_intr_config'
arch/arm/mach-msm/smd_init_dt.c:114: warning: assignment makes pointer from integer without a cast
error, forbidden warning: smd_init_dt.c:114
make[1]: *** [arch/arm/mach-msm/smd_init_dt.o] Errore 1
make: *** [arch/arm/mach-msm] Errore 2
make: *** Attesa per i processi non terminati....
CC arch/arm/kernel/pmu.o
LD arch/arm/perfmon/built-in.o
CC arch/arm/kernel/perf_event.o
arch/arm/kernel/bootinfo.c: In function 'bootinfo_bck_buf_check':
arch/arm/kernel/bootinfo.c:277: warning: integer constant is too large for 'long' type
error, forbidden warning: bootinfo.c:277
EDIT: I solved the smd_privae.h not found simply by copying it from mach-msm into mach-msm/include/mach and replacing
Code:
#include <smd_private.h>
with
Code:
#include <mach/smd_private.h>
But i still have this problem: in bootinfo.c the value BOOTINFO_BCK_MAGIC (defined as #define BOOTINFO_BCK_MAGIC 0x626f6f74696e666f) is an integer costant which is too large for 'long' type (at line 277 in the expression if (bck->magic != BOOTINFO_BCK_MAGIC))
Any help?
EDIT2: solved it thanks to google and stackoverflow, just replace 0x626F6F74696E666F with 0x626F6F74696E666FULL (where ULL = Unsigned Long Long, not sure about the meaning, still a complete noob at C++ (not even sure it is C++) :silly:

[Q] Problems compiling stock Kernel from official source.

Hi all.
I run into some problems when trying to build a Kernel from GT-N8000_KK_Opensource.zip (opensource.samsung.com).
I can compile the kernel with the defconfig shipped with the source code (p4notepq-w_00_defconfig) without any changes and i get a fully functional kernel and modules.
My aim is to compile driver modules for my usb-wlan-dongle TP-LINK TL-WN722N. That are the ath9k n ath9k_htc modules (also mac80211 module is needed).
I did the following changes to enable the ath9k and ath9k_htc in menuconfig
Code:
file drivers/net/wireless/ath/Makefile :
added: obj-$(CONFIG_ATH9K_HW) += ath9k/
file drivers/net/wireless/ath/Kconfig :
added: source "drivers/net/wireless/ath/ath9k/Kconfig
Also i removed Wall flags from Makefile and inserted some -Wno-error to get rid off some additional warnings.
To get rid off
Code:
include/linux/device.h:722:38: error: 'THIS_MODULE' undeclared (first use in this function)
i inserted my kernel export.h in the compat include.
Now i got the following error unsolved:
Code:
drivers/net/wireless/ath/ath9k/beacon.c: In function 'ath_beacon_setup':
drivers/net/wireless/ath/ath9k/beacon.c:109: error: 'struct ath_common' has no member named 'tx_chainmask'
make[5]: *** [drivers/net/wireless/ath/ath9k/beacon.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [drivers/net/wireless/ath/ath9k] Error 2
make[3]: *** [drivers/net/wireless/ath] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
My Build environment is:
Ubuntu 14.4.01 64bit in a VM with 8gb ram.
Toolchain used:
arm-eabi-4.4.3
Maybe someone can give me some advice how to get this module compiled.
Thanks in advance
smue83 said:
Hi all.
I run into some problems when trying to build a Kernel from GT-N8000_KK_Opensource.zip (opensource.samsung.com).
I can compile the kernel with the defconfig shipped with the source code (p4notepq-w_00_defconfig) without any changes and i get a fully functional kernel and modules.
My aim is to compile driver modules for my usb-wlan-dongle TP-LINK TL-WN722N. That are the ath9k n ath9k_htc modules (also mac80211 module is needed).
I did the following changes to enable the ath9k and ath9k_htc in menuconfig
Code:
file drivers/net/wireless/ath/Makefile :
added: obj-$(CONFIG_ATH9K_HW) += ath9k/
file drivers/net/wireless/ath/Kconfig :
added: source "drivers/net/wireless/ath/ath9k/Kconfig
Also i removed Wall flags from Makefile and inserted some -Wno-error to get rid off some additional warnings.
To get rid off
Code:
include/linux/device.h:722:38: error: 'THIS_MODULE' undeclared (first use in this function)
i inserted my kernel export.h in the compat include.
Now i got the following error unsolved:
Code:
drivers/net/wireless/ath/ath9k/beacon.c: In function 'ath_beacon_setup':
drivers/net/wireless/ath/ath9k/beacon.c:109: error: 'struct ath_common' has no member named 'tx_chainmask'
make[5]: *** [drivers/net/wireless/ath/ath9k/beacon.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [drivers/net/wireless/ath/ath9k] Error 2
make[3]: *** [drivers/net/wireless/ath] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
My Build environment is:
Ubuntu 14.4.01 64bit in a VM with 8gb ram.
Toolchain used:
arm-eabi-4.4.3
Maybe someone can give me some advice how to get this module compiled.
Thanks in advance
Click to expand...
Click to collapse
Similar issue here on S3,
Code:
net/mac80211/mlme.c: In function 'ieee80211_mgd_auth':
net/mac80211/mlme.c:2344:16: error: 'struct cfg80211_auth_request' has no member named 'local_state_change'
net/mac80211/mlme.c:2346:9: error: 'struct cfg80211_auth_request' has no member named 'local_state_change'
net/mac80211/mlme.c: In function 'ieee80211_assoc_done':
net/mac80211/mlme.c:2448:2: warning: passing argument 2 of 'cfg80211_send_rx_assoc' from incompatible pointer type [enabled by default]
include/net/cfg80211.h:2802:6: note: expected 'struct cfg80211_bss *' but argument is of type 'unsigned char *'
net/mac80211/mlme.c:2448:2: warning: passing argument 3 of 'cfg80211_send_rx_assoc' makes pointer from integer without a cast [enabled by default]
include/net/cfg80211.h:2802:6: note: expected 'u8 const *' but argument is of type 'unsigned int'
net/mac80211/mlme.c:2448:2: error: too few arguments to function 'cfg80211_send_rx_assoc'
include/net/cfg80211.h:2802:6: note: declared here
net/mac80211/mlme.c: In function 'ieee80211_mgd_deauth':
net/mac80211/mlme.c:2589:19: error: 'struct cfg80211_deauth_request' has no member named 'bss'
net/mac80211/mlme.c:2590:30: error: 'struct cfg80211_deauth_request' has no member named 'bss'
net/mac80211/mlme.c:2610:18: error: 'struct cfg80211_deauth_request' has no member named 'bss'
net/mac80211/mlme.c:2639:16: error: 'struct cfg80211_deauth_request' has no member named 'local_state_change'
make[2]: *** [net/mac80211/mlme.o] Error 1
make[2]: *** Waiting for unfinished jobs....

[Q] Help !!!!

i am trying to compile a kernel but get into this error .. can any one help me ??
Code:
arch/arm/mach-msm/htc_acoustic_8x60.c: In function 'acoustic_ioctl':
arch/arm/mach-msm/htc_acoustic_8x60.c:248:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'voc_action'
arch/arm/mach-msm/htc_acoustic_8x60.c:249:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'voc_action_sz'
arch/arm/mach-msm/htc_acoustic_8x60.c:252:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'midi_action'
arch/arm/mach-msm/htc_acoustic_8x60.c:253:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'midi_action_sz'
make[1]: *** [arch/arm/mach-msm/htc_acoustic_8x60.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....

[Completed] Can't enable OTG when building kernel:getting errors plz help!! LENOVO A6000/plus

I am using
toolchain : arm-linux-gnueabi-linaro_4.9.3-2014.12
kernel source : source code of gods kernel by Tarun93
config:gk_a6000_defconfig
with this config kernel build is succesfull and i got zimage.
but when i enable otg i got these errors
Code:
drivers/usb/core/hub.c: In function ‘usb_enumerate_device_otg’:
drivers/usb/core/hub.c:2257:18: warning: passing argument 1 of ‘otg_send_event’ makes pointer from integer without a cast
otg_send_event(OTG_EVENT_DEV_NOT_SUPPORTED);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: expected ‘struct usb_otg *’ but argument is of type ‘int’
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
drivers/usb/core/hub.c:2257:3: error: too few arguments to function ‘otg_send_event’
otg_send_event(OTG_EVENT_DEV_NOT_SUPPORTED);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: declared here
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
drivers/usb/core/hub.c: In function ‘usb_port_suspend’:
drivers/usb/core/hub.c:3053:19: warning: passing argument 1 of ‘otg_send_event’ makes pointer from integer without a cast
otg_send_event(OTG_EVENT_NO_RESP_FOR_HNP_ENABLE);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: expected ‘struct usb_otg *’ but argument is of type ‘int’
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
drivers/usb/core/hub.c:3053:4: error: too few arguments to function ‘otg_send_event’
otg_send_event(OTG_EVENT_NO_RESP_FOR_HNP_ENABLE);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: declared here
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
scripts/Makefile.build:308: recipe for target 'drivers/usb/core/hub.o' failed
make[3]: *** [drivers/usb/core/hub.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/usb/core' failed
make[2]: *** [drivers/usb/core] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/usb' failed
make[1]: *** [drivers/usb] Error 2
please!!!!! help me to solve these errors
ameen ahsan said:
I am using
toolchain : arm-linux-gnueabi-linaro_4.9.3-2014.12
kernel source : source code of gods kernel by Tarun93
config:gk_a6000_defconfig
with this config kernel build is succesfull and i got zimage.
but when i enable otg i got these errors
Code:
drivers/usb/core/hub.c: In function ‘usb_enumerate_device_otg’:
drivers/usb/core/hub.c:2257:18: warning: passing argument 1 of ‘otg_send_event’ makes pointer from integer without a cast
otg_send_event(OTG_EVENT_DEV_NOT_SUPPORTED);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: expected ‘struct usb_otg *’ but argument is of type ‘int’
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
drivers/usb/core/hub.c:2257:3: error: too few arguments to function ‘otg_send_event’
otg_send_event(OTG_EVENT_DEV_NOT_SUPPORTED);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: declared here
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
drivers/usb/core/hub.c: In function ‘usb_port_suspend’:
drivers/usb/core/hub.c:3053:19: warning: passing argument 1 of ‘otg_send_event’ makes pointer from integer without a cast
otg_send_event(OTG_EVENT_NO_RESP_FOR_HNP_ENABLE);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: expected ‘struct usb_otg *’ but argument is of type ‘int’
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
drivers/usb/core/hub.c:3053:4: error: too few arguments to function ‘otg_send_event’
otg_send_event(OTG_EVENT_NO_RESP_FOR_HNP_ENABLE);
^
In file included from drivers/usb/core/hub.c:23:0:
include/linux/usb/otg.h:125:1: note: declared here
otg_send_event(struct usb_otg *otg, enum usb_otg_event event)
^
scripts/Makefile.build:308: recipe for target 'drivers/usb/core/hub.o' failed
make[3]: *** [drivers/usb/core/hub.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/usb/core' failed
make[2]: *** [drivers/usb/core] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/usb' failed
make[1]: *** [drivers/usb] Error 2
please!!!!! help me to solve these errors
Click to expand...
Click to collapse
Hello,
Try posting your query here [Tutorial] Building Your First Kernel or [GUIDE][COMPLETE] Android ROM Development From Source To Endwith all relevant details, the experts there maybe able to assist you.
-Vatsal

Getting irq/irqdesc.o error while kernel compilation

I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
fawazahmed0 said:
I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
Click to expand...
Click to collapse
Now works perfectly, followed this guide:
https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297

Categories

Resources