I am trying to compile an android kernel and am getting this error:
mediatek/platform/mt6589/kernel/drivers/power/mt6320_battery.c: In function' BattThermistorConverTemp':
mediatek/platform/mt6589/kernel/drivers/power/mt6320_battery.c:1361:14: error: 'Batt_Temperature_Table' undeclared (first use in this function)
if(Res>= Batt_Temperature_Table[0].TemperatureR)
^
mediatek/platform/mt6589/kernel/drivers/power/mt6320_battery.c:1361:14: note: each undeclared identifier is reported only once for each function it appears in
CC [M] mediatek/platform/mt6589/kernel/drivers/masp/asf/core/alg_aes_so.o
CC [M] mediatek/platform/mt6589/kernel/drivers/dual_ccci/asf/core/sec_ops.o
make[2]: ** *[mediatek/platform/mt6589/kernel/drivers/power/mt6320_battery.o] Error 1
make[1]: ** *[mediatek/platform/mt6589/kernel/drivers/power] Error 2
make[1]: ** *Waiting for unfinished jobs....
Here is the code:
mt6320_battery.c: http://pastebin.com/thGQLNS9
mt6320_battery.h: http://pastebin.com/tfekgst6
I don't see anything wrong with the code. Please Help!
Thanks!
Related
I am making the android kernel for the first time and after few errors(which I have overcome) I am getting below error log:
casual#Casual-PC:/media/casual/USB/android_kernel_yotaphone2-DKernel$
make O=../out -j4
GEN /media/casual/USB/out/Makefile
CHK include/linux/version.h
Using /media/casual/USB/android_kernel_yotaphone2-DKernel as source for kernel
CHK include/generated/utsrelease.h
make[2]: «include/generated/mach-types.h» не требует обновления. (dont need update)
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL /media/casual/USB/android_kernel_yotaphone2- DKernel/scripts/checksyscalls.sh
CC arch/arm/common/vic.o
CC arch/arm/mm/dma-mapping.o
CC init/main.o
CC arch/arm/common/timer-sp.o
AS arch/arm/kernel/entry-armv.o
AS arch/arm/kernel/entry-common.o
LD arch/arm/common/built-in.o
CHK include/generated/compile.h
CC arch/arm/kernel/process.o
CC arch/arm/mm/init.o
LD arch/arm/net/built-in.o
CC arch/arm/kernel/ptrace.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/mm/init.c: In function 'mem_init':
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/mm/init.c:921:6: warning: format '%d' expects argument of
type 'int', but argument 7 has type 'long int' [-Wformat]
error, forbidden warning: init.c:921
/media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/mm/init.o' failed
make[2]: *** [arch/arm/mm/init.o] Error 1
/media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/mm' failed
make[1]: *** [arch/arm/mm] Error 2
make[1]: *** Ожидание завершения заданий…
CC arch/arm/kernel/sched_clock.o
CC init/do_mounts_initrd.o
CC init/do_mounts_md.o
CC arch/arm/kernel/signal.o
CC arch/arm/kernel/armksyms.o
CC arch/arm/kernel/bios32.o
LD init/mounts.o
LD init/built-in.o
CC arch/arm/kernel/isa.o
AS arch/arm/kernel/sleep.o
CC arch/arm/kernel/machine_kexec.o
CC arch/arm/kernel/io.o
CC arch/arm/kernel/crash_dump.o
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c: In function '_memcpy_fromio':
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c:14:3: error: implicit declaration of function 'nop' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
/media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/kernel/io.o' failed
make[2]: *** [arch/arm/kernel/io.o] Error 1
make[2]: *** Ожидание завершения заданий…
/media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/kernel' failed
make[1]: *** [arch/arm/kernel] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
(sry for bad code blocks)
So, I have found similar questions, but I didn't understand the answer:
android kernel build (first time)
when i make it throw
`LC_ALL=C make O=../out`
it gives me(spoiler - LC_ALL=C don't work how i thought, so i translated it(as #) by myself):
casual#Casual-PC:/media/casual/USB/android_kernel_yotaphone2-DKernel$ LC_ALL=C make O=../out
Using /media/casual/USB/android_kernel_yotaphone2-DKernel as source for kernel
GEN /media/casual/USB/out/Makefile
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[2]: «include/generated/mach-types.h» не требует обновления. #dont need updates
CALL /media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm/kernel/io.o
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c: In function '_memcpy_fromio':
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c:14:3: error: implicit declaration of function 'nop' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
/media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/kernel/io.o' failed
make[2]: *** [arch/arm/kernel/io.o] Error 1
/media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/kernel' failed
make[1]: *** [arch/arm/kernel] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
I'm doing cross-compile vsomeip for android. But, I have fatal error to boost library. I already to boost for android. It doesn't have error. But, In vsomeip for android, I have boost error.
[ 61%] Linking CXX executable vsomeipd
../libvsomeip.so.2.0.1: error: undefined reference to
'boost::filesystem::detail::dir_itr_close(void*&, void*&)'
../libvsomeip.so.2.0.1: error: undefined reference to 'boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
../libvsomeip.so.2.0.1: error: undefined reference to 'boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
../libvsomeip.so.2.0.1: error: undefined reference to '
'boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
clang50++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: [daemon/vsomeipd] Error 1
make[1]: [daemon/CMakeFiles/vsomeipd.dir/all] Error 2
make[1]: Waiting for unfinished jobs....
[98%] Built target vsomeip-sd
make: [all] Error 2
I'm using clang++ in Android-ndk-16b,14b.
please help me.....
whenever i try to compile the samsung stock 4.4.2 kernel i m getting this error
CC arch/arm/mach-msm/board-8930-display.o
arch/arm/mach-msm/board-8930-display.c: In function 'mipi_dsi2lvds_cdp_panel_power':
arch/arm/mach-msm/board-8930-display.c:577:3: error: implicit declaration of function 'msm_xo_get' [-Werror=implicit-function-declaration]
arch/arm/mach-msm/board-8930-display.c:577:26: error: 'MSM_XO_TCXO_A1' undeclared (first use in this function)
arch/arm/mach-msm/board-8930-display.c:577:26: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/mach-msm/board-8930-display.c:663:3: error: implicit declaration of function 'msm_xo_mode_vote' [-Werror=implicit-function-declaration]
arch/arm/mach-msm/board-8930-display.c:663:31: error: 'MSM_XO_MODE_ON' undeclared (first use in this function)
arch/arm/mach-msm/board-8930-display.c:671:31: error: 'MSM_XO_MODE_OFF' undeclared (first use in this function)
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mach-msm/board-8930-display.o] Error 1
make: *** [arch/arm/mach-msm] Error 2 }
this is the lines the terminal pointed to in board-8930-display.c
rfa_clock = msm_xo_get (MSM_XO_TCXO_A1, id); /create a handle for Aq buffer of XO/
msm_xo_mode_vote(rfa_clock, MSM_XO_MODE_ON); /Vote to turn ON the clock buffer/
3.msm_xo_mode_vote(rfa_clock, MSM_XO_MODE_OFF); /Vote to turn OFF the clock buffer/
how can this be fixed ?
Not able to find the problem:
make PLATFORM=android
make[2]: Entering directory `/home/debian/Downloads/nonemaioq3'
CC code/client/cl_cgame.c
/prog/toolchain/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: 4: /prog/toolchain/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Syntax error: Unterminated quoted string
make[2]: *** [build/release-android-arm/client/cl_cgame.o] Error 2
make[2]: Leaving directory `/home/debian/Downloads/nonemaioq3'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/debian/Downloads/nonemaioq3'
make: *** [release] Error 2
and this is the Makefile I got:
http://pastebin.com/QYZYVvTn
I don't find any problem there :S Help please.
The line
CC code/client/cl_cgame.c
starts the compiler (C Compiler or CC). The error message is after the CC and doesn't start with make, so it relates to the compiler, not the Makefile.
/prog/toolchain/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: 4: /prog/toolchain/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Syntax error: Unterminated quoted string
gcc is the GNU C compiler. The error is in the file /prog/toolchain/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc, on line 4.
In view of your comment, "arm-linux" means that version of GCC is meant to run on ARM processors. If you are running this on a PC, you want a gcc with "x86" or "x64" in place of "arm." That would be a cross-compiling situation; see here for links on how to set that up.
something i should mention that i add fuse support to the kernel,and it prompt such error duing make:
CC drivers/char/goldfish_tty.o
drivers/char/goldfish_tty.c: In function 'goldfish_tty_probe':
drivers/char/goldfish_tty.c:233: error: 'IO_START' undeclared (first use in this function)
drivers/char/goldfish_tty.c:233: error: (Each undeclared identifier is reported only once
drivers/char/goldfish_tty.c:233: error: for each function it appears in.)
make[2]: * [drivers/char/goldfish_tty.o] Error 1
make[1]: [drivers/char] Error 2
make: ** [drivers] Error 2