[Q] Android Kernel Development HELP - Android Q&A, Help & Troubleshooting

i get this errors...
Code:
CC drivers/cpufreq/cpufreq.o
CC drivers/cpufreq/cpufreq_stats.o
CC drivers/cpufreq/cpufreq_performance.o
CC drivers/cpufreq/cpufreq_smartass.o
drivers/cpufreq/cpufreq_smartass.c: In function 'cpufreq_governor_smartass':
drivers/cpufreq/cpufreq_smartass.c:496: error: 'CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX' undeclared (first use in this function)
drivers/cpufreq/cpufreq_smartass.c:496: error: (Each undeclared identifier is reported only once
drivers/cpufreq/cpufreq_smartass.c:496: error: for each function it appears in.)
drivers/cpufreq/cpufreq_smartass.c:497: error: 'CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN' undeclared (first use in this function)
make[2]: *** [drivers/cpufreq/cpufreq_smartass.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
[email protected]:~/sgy/kernel/common$
whats the meaning of those things?

jasonxD said:
i get this errors...
Code:
CC drivers/cpufreq/cpufreq.o
CC drivers/cpufreq/cpufreq_stats.o
CC drivers/cpufreq/cpufreq_performance.o
CC drivers/cpufreq/cpufreq_smartass.o
drivers/cpufreq/cpufreq_smartass.c: In function 'cpufreq_governor_smartass':
drivers/cpufreq/cpufreq_smartass.c:496: error: 'CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX' undeclared (first use in this function)
drivers/cpufreq/cpufreq_smartass.c:496: error: (Each undeclared identifier is reported only once
drivers/cpufreq/cpufreq_smartass.c:496: error: for each function it appears in.)
drivers/cpufreq/cpufreq_smartass.c:497: error: 'CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN' undeclared (first use in this function)
make[2]: *** [drivers/cpufreq/cpufreq_smartass.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
[email protected]tu:~/sgy/kernel/common$
whats the meaning of those things?
Click to expand...
Click to collapse
It sounds like you didn't apply the patch file for the smartass governor properly to the kernel try making a clean kernel configuration. Also sometimes you have to tweak the CPU governor's (In your case the smartass governor) source .c file to work with your particular device. I would recommend taking a look at the cpufreq_smartass.c file and making sure CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX and CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN have values assisigned to them for the CPU speed you want the min and max to be.
Sent from my Nexus 10 using xda premium

i have a galaxy y and i used some governors in a galaxy y kernel source
ill check the values later and reply back
No Moar Powah!

Related

{Help} Kernel Compilation Error

Code:
CC arch/arm/mach-msm/board-msm7627a-camera.o
arch/arm/mach-msm/board-msm7627a-camera.c: In function 'evb_camera_gpio_cfg':
arch/arm/mach-msm/board-msm7627a-camera.c:545: error: 'msm_camera_sensor_ov5647_data' undeclared (first use in this function)
arch/arm/mach-msm/board-msm7627a-camera.c:545: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/board-msm7627a-camera.c:545: error: for each function it appears in.)
arch/arm/mach-msm/board-msm7627a-camera.c:586: error: 'msm_camera_sensor_ov7692_data' undeclared (first use in this function)
arch/arm/mach-msm/board-msm7627a-camera.c: At top level:
arch/arm/mach-msm/board-msm7627a-camera.c:1051: error: 'msm_camera_sensor_ov8825' undeclared here (not in a function)
arch/arm/mach-msm/board-msm7627a-camera.c: In function 'msm7627a_camera_init':
arch/arm/mach-msm/board-msm7627a-camera.c:1195: error: 'ov7692_cam_req_gpio' undeclared (first use in this function)
arch/arm/mach-msm/board-msm7627a-camera.c:1195: error: request for member 'gpio' in something not a structure or union
arch/arm/mach-msm/board-msm7627a-camera.c:1196: warning: statement with no effect
error, forbidden warning: board-msm7627a-camera.c:1196
make[1]: *** [arch/arm/mach-msm/board-msm7627a-camera.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
Can anyone help ?
check the include files
forumber2 said:
check the include files
Click to expand...
Click to collapse
Can u plz explain it ? I am not able to get u .
Sent from my S100 using Tapatalk HD
Workaround found
I am getting exactly the same error. But I managed a workaround. Use camera.c from ICS kernel.
1. Goto CAF
2. Choose ICS branch
3. Select any kernel
4. Goto kernels arch/arm/mach-msm/camera.c
5. Download it as raw.(there will be raw link along with tree and other links right under project head line)
6. copy it to same location as in above and paste it there. Make sure you make backup of earlier one.
Done. Worked for me. But you know what? I am now stuck at display.c and io.c . Its really hard without documentation....

Kernel Compiling Error

Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Any ideas?
Kernel Compilation
srsdani said:
Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Click to expand...
Click to collapse
I guess you are looking on another file.
Code:
error, forbidden warning: dynamic_debug.h:75
I guess there is a problem in dynamic_debug.h in line 75. I guess you need to initialise something.
Here is dynamic_debug.h but I can't find the problem.
I will appreciate any opinion.
Try this method!
srsdani said:
Here is dynamic_debug.h but I can't find the problem.
Click to expand...
Click to collapse
I am not much used to kernel related development but I analysed your dynamic_debug.h and found the problem (maybe a problem):
Normally, a do-while loop syntax is this:
Code:
do
{
Statement1;
Statement2;
...
}while(condition);
But I don't see a semicolon in the end of those loops in your code. This maybe a syntax error.
Also analyse these codes:
Code:
#if defined(CONFIG_DYNAMIC_DEBUG)
extern int ddebug_remove_module(const char *mod_name);
extern __printf(2, 3)
int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
struct device;
extern __printf(3, 4)
int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
const char *fmt, ...);
struct net_device;
extern __printf(3, 4)
int __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev,
const char *fmt, ...);
Every intialisation has 4 protocols but the first initialisation contain only 3.
Try the above things and tell me back if it works or not.
So, the problem was in Makefile and .config. I compared and added some flags from Mako (from franco) and it worked. I still have some warning/s, some breakpoints but at least now it's working. Anyway, this thread may be useful for all of us. Thanks a lot for help.
Now, another problem.
Code:
CC fs/proc/loadavg.o
CC fs/proc/meminfo.o
fs/proc/meminfo.c: In function ‘meminfo_proc_show’:
fs/proc/meminfo.c:175:1: internal compiler error: in optimize_sc, at modulo-sched.c:1069
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.launchpad.net/gcc-linaro> for instructions.
make[2]: *** [fs/proc/meminfo.o] Error 1
make[1]: *** [fs/proc] Error 2
make: *** [fs] Error 2
[email protected]:~/kernel2$
With linaro 4.8.3 => OK;
linaro 4.8.3 + A15 optimize=> fail, error above. meminfo.c it's exactly like the one from nexus 4.
FIX: compiler bug;
srsdani said:
Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Click to expand...
Click to collapse
Hey sarsdani Apologies that I'm quoting you 12 month later. I am getting an identical error in the same file/address as you had when you posted this question. Im compiling stock HTC m7 Android L kernel with Google tool chain 4.8 - android 5.1 r1
You mentioned later on that you changed the Makefile and .config to fix the [-Wmaybe-uninitialized] error. Can you please detail what those changes were or point me to an example ( if you can remember ) I could just change Wmaybe in Makefile to Wno but turning the flag off altogether seems dangerous.
@Joeisgood99 there are two ways to solve this.
1. using a "hack". So, you need to add in makefile (in root folder from kernel source) at KBUILD_CFLAGS: -Wno-maybe-uninitialized \
2. Open that file with the error and asign a value to protocol.
The first option is not dangerous. Why? Because only the toolchain say this. In gcc 4.6, the reason why you don't get this error is because it assign a value automatically to that "protocol", usualy random value but not always. In gcc 4.7/4.8/4.9(or 4.10) this is threated as warning/error.
/home/austin/cm11/kernel/lge/w3c/net/ipv4/ipconfig.c:264: undefined reference to `msecs_to_jiffies'
/home/austin/cm11/kernel/lge/w3c/Makefile:877: recipe for target '.tmp_vmlinux1' failed
make[2]: *** [.tmp_vmlinux1] Error 1
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/austin/cm11/kernel/lge/w3c'
build/core/tasks/kernel.mk:188: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
Any ideas what this could be? I'm a bit stumped i've never seen an error like this before
It's okay i retired the project as of now since trying to modify the kernel source code isn't do anything but causing more errors. I do appreciate any help when everyone has a chance

First time compiling kernel with a governor and I got errors.

I am trying to compile a kernel for my device(kyleprods or GT-S7582 or Galaxy S duos 2) because I havent found any custom kernel out here. Im compiling from source. I tried compiling WITHOUT any tweaks or such, just plain compile after downloading the source, and it compiled successfully. I tried adding smartassv2 but I got these errors after running "make -j1" twice. Can anybody help/guide me? It is really my first time doing these things, because I'm very interested.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
Creating rdb link for Hawaii
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/cpufreq/cpufreq_smartass2.o
drivers/cpufreq/cpufreq_smartass2.c:175:10: error: ‘THIS_MODULE’ undeclared here (not in a function)
.owner = THIS_MODULE,
^
drivers/cpufreq/cpufreq_smartass2.c: In function ‘cpufreq_smartass_timer’:
drivers/cpufreq/cpufreq_smartass2.c:295:1: error: implicit declaration of function ‘cputime64_sub’ [-Werror=implicit-function-declaration]
delta_idle = cputime64_sub(now_idle, this_smartass->time_in_idle);
^
drivers/cpufreq/cpufreq_smartass2.c: At top level:
drivers/cpufreq/cpufreq_smartass2.c:869:16: error: expected declaration specifiers or ‘...’ before string constant
MODULE_AUTHOR ("Erasmux");
^
drivers/cpufreq/cpufreq_smartass2.c:870:21: error: expected declaration specifiers or ‘...’ before string constant
MODULE_DESCRIPTION ("'cpufreq_smartass2' - A smart cpufreq governor");
^
drivers/cpufreq/cpufreq_smartass2.c:871:17: error: expected declaration specifiers or ‘...’ before string constant
MODULE_LICENSE ("GPL");
^
cc1: some warnings being treated as errors
make[2]: *** [drivers/cpufreq/cpufreq_smartass2.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
SORRY I DONT KNOW WHERE TO POST.
diskie said:
I am trying to compile a kernel for my device(kyleprods or GT-S7582 or Galaxy S duos 2) because I havent found any custom kernel out here. Im compiling from source. I tried compiling WITHOUT any tweaks or such, just plain compile after downloading the source, and it compiled successfully. I tried adding smartassv2 but I got these errors after running "make -j1" twice. Can anybody help/guide me? It is really my first time doing these things, because I'm very interested.
-snip-
Click to expand...
Click to collapse
Part of the errors can be fixed by adding:
#include <linux/module.h>
at the top. I don't know about the rest, but @xpirt or @InfinityShooter once fixed this problem for the desire x, perhaps he can help? I want to know it myself as well
@diskie
https://github.com/ProtoU/neXusKERNEL/commit/8c77e8a4b1962bb6fbb41732aba5ded40007876a
Look in drivers/cpufreq/cpufreq_ondemand.c and include/linux/cpufreq.h for fix
xpirt
xpirt said:
@diskie
https://github.com/ProtoU/neXusKERNEL/commit/8c77e8a4b1962bb6fbb41732aba5ded40007876a
Look in drivers/cpufreq/cpufreq_ondemand.c and include/linux/cpufreq.h for fix
xpirt
Click to expand...
Click to collapse
Thanks a lot :good:

Cross-Compile Error When Building Kernel (Nexus9 Memory Forensics)

Cross-compile error when building kernel (nexus9 memory forensics)
I'm currently following the AndroidMemoryForensics guide (I cannot post a link) on how to extract memory from an android device using LiME. I'm using the flounder_defconfig build configuration and create the .config file using
Code:
make flounder_defconfig
. In order to be able to load the LiME module to the kernel I need to add the following lines to the .config file:
CONFIG_MODULES=y
CONFIG_MODULES_UNLOAD=y
CONFIG_MODULES_FORCE_UNLOAD=y
When I compile the kernel I set the architecture to arm64 (ARCH=arm64) and use the aarch64-linux-android-4.9 toolchain (CROSS_COMPILE=aarch64-linux-android-4.9/aarch64-linux-android-).
When running
Code:
make
I get compile errors saying that "battery_voltage_monitor_on" is undeclared (see below).
If I try to compile the kernel without making the changes to the .config file I get no compile errors.
Am I missing something here, e.g. some package, or have I done something wrong to cause this compile error?
I tried to search for a solution online but have had little success so far so I hope I have better success here
Thanks in advance!
Jonas
Output:
CC drivers/htc_debug/stability/reboot_params.o
LD drivers/htc_debug/stability/built-in.o
CC drivers/hwmon/hwmon.o
CC drivers/hwmon/battery_system_voltage_monitor.o
In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/sched.h:31,
from /home/jonas/android/Nexus9_Volantis_source/test2/flounder-kernel/tegra/arch/arm64/include/asm/compat.h:25,
from /home/jonas/android/Nexus9_Volantis_source/test2/flounder-kernel/tegra/arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from drivers/hwmon/battery_system_voltage_monitor.c:15:
drivers/hwmon/battery_system_voltage_monitor.c:151:19: error: 'battery_voltage_monitor_on' undeclared here (not in a function)
EXPORT_SYMBOL_GPL(battery_voltage_monitor_on);
^
include/linux/export.h:57:16: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/hwmon/battery_system_voltage_monitor.c:151:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(battery_voltage_monitor_on);
^
drivers/hwmon/battery_system_voltage_monitor.c:183:19: error: 'system_voltage_monitor_on' undeclared here (not in a function)
EXPORT_SYMBOL_GPL(system_voltage_monitor_on);
^
include/linux/export.h:57:16: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/hwmon/battery_system_voltage_monitor.c:183:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(system_voltage_monitor_on);
^
make[2]: *** [drivers/hwmon/battery_system_voltage_monitor.o] Error 1
make[1]: *** [drivers/hwmon] Error 2
make: *** [drivers] Error 2
I'm having same issue on my build. Fine without modules but throws linker errors when enabled.
https://github.com/binkybear/flounder/commit/06781f20ea737f6b52a4589827d5d52688d20728

[Q] Developers: Trouble Compiling CM11 Kernel

So I've done some work on boot images before, but not much, and I wanted to try building a kernel for AOSP KitKat on the EVO 4G LTE. (Why not Lollipop? Data and roaming issues.) But I'm hitting camera-related errors when I try to compile it. Here's the relevant output in the make process:
Code:
CC arch/arm/mach-msm/board-8064-gpiomux.o
CC arch/arm/mach-msm/board-8064-camera.o
In file included from arch/arm/mach-msm/include/mach/camera.h:26:0,
from arch/arm/mach-msm/board-8064-camera.c:19:
include/media/msm_camera.h:1543:6: warning: "CONFIG_HTC_CAMERA_HAL_VERSION" is not defined [-Wundef]
error, forbidden warning: msm_camera.h:1543
make[1]: *** [arch/arm/mach-msm/board-8064-camera.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
I tried to fix it by adding the HTC_CAMERA_HAL_VERSION config to Kconfig, but then I get this error instead:
Code:
CC arch/arm/mach-msm/board-8064-gpiomux.o
CC arch/arm/mach-msm/board-8064-camera.o
In file included from arch/arm/mach-msm/board-8064-camera.c:19:0:
arch/arm/mach-msm/include/mach/camera.h:682:33: warning: 'struct msm_camera_csi_params' declared inside parameter list
error, forbidden warning: camera.h:682
make[1]: *** [arch/arm/mach-msm/board-8064-camera.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
Any ideas?

Categories

Resources