First time compiling kernel with a governor and I got errors. - Android Q&A, Help & Troubleshooting

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:

Related

[Q] New Kernel Compilation Error ???

I am trying to compile the new kernel and keep getting this error:
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
I am new to kernel dev and can't seem to track this one down. Anyone know how to fix it ?
smokin1337 said:
I am trying to compile the new kernel and keep getting this error:
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
I am new to kernel dev and can't seem to track this one down. Anyone know how to fix it ?
Click to expand...
Click to collapse
It is said here in the Forums, that the uploaded Files are corrupted and Not able to be compiled...have to wait until HTC fixes this.
Sent from my HTC EVO 3D X515m using xda premium
smokin1337 said:
I am trying to compile the new kernel and keep getting this error:
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
I am new to kernel dev and can't seem to track this one down. Anyone know how to fix it ?
Click to expand...
Click to collapse
simple answer: as posted above, if it doesn't compile properly from HTC, as the last kernel release from them also didn't, it probably won't be an *easy* fix.
warning: the technical method i suggest might only lead deeper and deeper, but it is a generally good strategy to research and resolve compiling issues.
technical research method: without having looked at this kernel source or researched the error, i would start searching for the implicit declarion of function 'arch_has_speculative_dfetch' in the dma-mapping.h file at line 442. it should be declared and setup in some file, so i'd grep through the files for it. grep -irs arch_has_speculative_dfetch /home/smokin/kernel/arch/arm/include/asm/*
depending on the results, the grep search might have to be expanded so i'd move up a level. might have a lot of results to search through but it is usually a great learning experience.
as a beginner, i would suggest watching http://github.com/toastcfh as toastcfh does a great job fixing the error laden kernel source code HTC releases. generally, toastcfh's patched kernels are used by all the popular kernel releases and will more than likely be the base kernel used by cm7.
hope that helps!
Thanks !! That helps alot, considering i wasn't sure if i had the toolchain setup right. I appreciate it.
smokin1337 said:
Thanks !! That helps alot, considering i wasn't sure if i had the toolchain setup right. I appreciate it.
Click to expand...
Click to collapse
ah, you didnt mention that before!
if you want to test your toolchain, i'd clone/fork toastcfh's repo for the previous evo 3d kernel release. it should cleanly compile, no issues. that'll be a great test for your toolchain and to give you some confidence in compiling the kernel with *proper* source code.
toastcfh worked some magic to fix htc's last borked kernel release code by pulling files from caf (code aurora forum - code contributor) and probably lots of other complicated coding/compiling tweaks.
hope that helps at least get you ready for the next proper kernel source code!
I took your advice and got toastcfh source and i got the same error with crc. I guess i'm missing something, probably a stupid dependency.
HTC jetstream error
smokin1337 said:
I took your advice and got toastcfh source and i got the same error with crc. I guess i'm missing something, probably a stupid dependency.
Click to expand...
Click to collapse
I am getting same error for htc jetstream source code and i am not able to figure out which toastcfh to use. So can you help me with the same
/puccini_lte_att_wwe_hc-32-crc-2.6.35/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/puccini_lte_att_wwe_hc-32-crc-2.6.35/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Can you please let me know how to get the fix for this one.
-Khushboo

[Guide] Compiling your own kernel.

I have writen this guide so that anyone whom wants to try to compile and customize their kernel can.
LINK
It took me a long time to write this guide, and its pretty through, but if you see something missing please let me know, or post it in the discussion part of the page.
Once you compile the kernel aka zImage you can use hkvc kexec, or use bawks 2ndboot (if your daring enough) With this guide, hopefully we can get others to join the effort of making their own roms, and boot.img
Disclaimer"
I am not responsible for any damages done to any equipment
Saved for Future use.
Good write up.
I am having some errors pop-up at the end of compile. Here is my output:
Code:
CC [M] drivers/media/video/omapgfx/gfx_init.o
CC [M] drivers/media/video/omapgfx/gfx_io.o
CC [M] drivers/media/video/omapgfx/gfx_bc.o
In file included from drivers/media/video/omapgfx/gfx_bc.c:17:
drivers/gpu/pvr/img_defs.h:89:7: error: #error ("define an OS")
In file included from drivers/media/video/omapgfx/gfx_bc.c:18:
drivers/gpu/pvr/servicesext.h:811: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVReadRegistryString'
drivers/gpu/pvr/servicesext.h:812: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVWriteRegistryString'
In file included from drivers/media/video/omapgfx/gfx_bc.c:19:
drivers/gpu/pvr/kernelbuffer.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IMG_BOOL'
drivers/media/video/omapgfx/gfx_bc.c: In function 'bc_init':
drivers/media/video/omapgfx/gfx_bc.c:381: error: implicit declaration of function 'PVRGetBufferClassJTable'
make[4]: *** [drivers/media/video/omapgfx/gfx_bc.o] Error 1
make[3]: *** [drivers/media/video/omapgfx] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
Goncezilla said:
Good write up.
I am having some errors pop-up at the end of compile. Here is my output:
Code:
CC [M] drivers/media/video/omapgfx/gfx_init.o
CC [M] drivers/media/video/omapgfx/gfx_io.o
CC [M] drivers/media/video/omapgfx/gfx_bc.o
In file included from drivers/media/video/omapgfx/gfx_bc.c:17:
drivers/gpu/pvr/img_defs.h:89:7: error: #error ("define an OS")
In file included from drivers/media/video/omapgfx/gfx_bc.c:18:
drivers/gpu/pvr/servicesext.h:811: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVReadRegistryString'
drivers/gpu/pvr/servicesext.h:812: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVWriteRegistryString'
In file included from drivers/media/video/omapgfx/gfx_bc.c:19:
drivers/gpu/pvr/kernelbuffer.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IMG_BOOL'
drivers/media/video/omapgfx/gfx_bc.c: In function 'bc_init':
drivers/media/video/omapgfx/gfx_bc.c:381: error: implicit declaration of function 'PVRGetBufferClassJTable'
make[4]: *** [drivers/media/video/omapgfx/gfx_bc.o] Error 1
make[3]: *** [drivers/media/video/omapgfx] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
Click to expand...
Click to collapse
Which cross-compiler are you using? I use code sourcery lite. It works.
AdamOutler said:
Which cross-compiler are you using? I use code sourcery lite. It works.
Click to expand...
Click to collapse
Hmm, was just using whatever was synced with the repo.
Is there anyway you could post or send me a generic zImage from this compile? Trying to get a internal boot.img up and running but it seems to keep crapping out at the kernel (got 2ndboot showing up and ramdisk is in good shape).
Goncezilla said:
Hmm, was just using whatever was synced with the repo.
Is there anyway you could post or send me a generic zImage from this compile? Trying to get a internal boot.img up and running but it seems to keep crapping out at the kernel (got 2ndboot showing up and ramdisk is in good shape).
Click to expand...
Click to collapse
Fixed the 4.4.0 works better.
Loglud said:
Fixed the 4.4.0 works better.
Click to expand...
Click to collapse
Awesome, Ill try that one tonight!
For anyone interested in making your boot.img run off of internal storage (flashing via CWM or other recovery) you will need this file:
http://www.mediafire.com/?zrx5gk32casx55g
Just cat it to your custom_boot.img and flash!
Code:
cat irboot.img custom_boot.img >new_boot.img
Credit for the source for this goes to Bauwks!
AdamOutler said:
Which cross-compiler are you using? I use code sourcery lite. It works.
Click to expand...
Click to collapse
You are correct Finally got something to compile using TI's 2009 codesourcery lite!
Thanks button hit!
Goncezilla said:
For anyone interested in making your boot.img run off of internal storage (flashing via CWM or other recovery) you will need this file:
http://www.mediafire.com/?zrx5gk32casx55g
Just cat it to your custom_boot.img and flash!
Code:
cat irboot.img custom_boot.img >new_boot.img
Click to expand...
Click to collapse
how did you come up with irboot.img, if it bauwks make sure you give him credit, if not would love to knwo what it is?
Loglud said:
how did you come up with irboot.img, if it bauwks make sure you give him credit, if not would love to knwo what it is?
Click to expand...
Click to collapse
It was from Bauwks source. Was excited to get something running and slipped my mind. Edited post!
Sorry for the noobish question, but anyway how can we get a 3.x kernel? What are the difficulties to get it compiled?
I am not sure if I can help. I have some Linux experience compiling software from sources and I know compiling a kernel is not a trivial thing to do, however I would be happy to contribute.
How to you edit kernel.img that is inside the zImage?
[null]

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

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