As, by going previous issues i found solution of "tspdrv.h not found" by doing
#include to "tspdrv.h"
now it is giving error like shown below...
Device kernel: - Xiomi mi4i
CC drivers/misc/qcom/qdsp6v2/audio_amrnb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwbplus.o
CC drivers/misc/qcom/qdsp6v2/audio_evrc.o
CC drivers/misc/qcom/qdsp6v2/audio_qcelp.o
CC drivers/misc/qcom/qdsp6v2/amrwb_in.o
LD drivers/misc/qcom/qdsp6v2/built-in.o
LD drivers/misc/qcom/built-in.o
CC drivers/misc/tspdrv/tspdrv.o
In file included from drivers/misc/tspdrv/tspdrv.c:43:0:
drivers/misc/tspdrv/tspdrv.h:90:9: note: #pragma message: ************ KERNEL ************
#pragma message "************ KERNEL ***********"
^
In file included from include/linux/kernel.h:14:0,
from include/linux/sched.h:15,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/compat.h:25,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from drivers/misc/tspdrv/tspdrv.c:34:
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'isa1000_vib_set_level':
include/linux/dynamic_debug.h:64:16: error: implicit declaration of function 'KBUILD_STR' [-Werror=implicit-function-declaration]
static struct ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS_)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: note: each undeclared identifier is reported only once for each function it appears in
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'ImmVibeSPI_ForceOut_SetSamples':
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:487:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target 'drivers/misc/tspdrv/tspdrv.o' failed
make[3]: ** [drivers/misc/tspdrv/tspdrv.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/misc/tspdrv' failed
make[2]: *** [drivers/misc/tspdrv] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/misc' failed
make[1]: *** [drivers/misc] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2
Thank you....
Need more info like which source are you using, compiler, and such. Also, please move the thread to thw QA section, this is the development section.
System info
haikalizz said:
Need more info like which source are you using, compiler, and such. Also, please move the thread to thw QA section, this is the development section.
Click to expand...
Click to collapse
toolchain :- NDK- aarch64-linux-android-gcc (version 4.9)
Kernel source :- https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/ferrari-l-oss
Ubuntu 64 bit 16.04 LTS (all things upgraded)
All necessary packages installed for building
thank you for quick reply...
Btw how can i move this thread to Q&A?
Alright, you may need to redownload those sources back. This happened to me the first time. Make sure the file exists where it is supposed to be after you redownload, if not you can try another source..
haikalizz said:
Alright, you may need to redownload those sources back. This happened to me the first time. Make sure the file exists where it is supposed to be after you redownload, if not you can try another source..
Click to expand...
Click to collapse
It's compiling now....
Redownloaded source and it worked.
Thanks mate...: highfive:
Related
As, by going previous issues i found solution of "tspdrv.h not found" by doing
#include to "tspdrv.h"
now it is giving error like shown below...
CC drivers/misc/qcom/qdsp6v2/audio_amrnb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwb.o
CC drivers/misc/qcom/qdsp6v2/audio_amrwbplus.o
CC drivers/misc/qcom/qdsp6v2/audio_evrc.o
CC drivers/misc/qcom/qdsp6v2/audio_qcelp.o
CC drivers/misc/qcom/qdsp6v2/amrwb_in.o
LD drivers/misc/qcom/qdsp6v2/built-in.o
LD drivers/misc/qcom/built-in.o
CC drivers/misc/tspdrv/tspdrv.o
In file included from drivers/misc/tspdrv/tspdrv.c:43:0:
drivers/misc/tspdrv/tspdrv.h:90:9: note: #pragma message: ************ KERNEL ************
#pragma message "************ KERNEL ***********"
^
In file included from include/linux/kernel.h:14:0,
from include/linux/sched.h:15,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/compat.h:25,
from /home/rushabh/KernelDevelopment/Xiaomi_Kernel_OpenSource-ferrari-l-oss/arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from drivers/misc/tspdrv/tspdrv.c:34:
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'isa1000_vib_set_level':
include/linux/dynamic_debug.h:64:16: error: implicit declaration of function 'KBUILD_STR' [-Werror=implicit-function-declaration]
static struct ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS_)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
:0:27: note: each undeclared identifier is reported only once for each function it appears in
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:244:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
drivers/misc/tspdrv/ImmVibeSPI.c: In function 'ImmVibeSPI_ForceOut_SetSamples':
:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:66:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:240:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##VA_ARGS)
^
drivers/misc/tspdrv/ImmVibeSPI.c:487:2: note: in expansion of macro 'pr_debug'
pr_debug("%s: level = %d\n", func, level);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target 'drivers/misc/tspdrv/tspdrv.o' failed
make[3]: ** [drivers/misc/tspdrv/tspdrv.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/misc/tspdrv' failed
make[2]: *** [drivers/misc/tspdrv] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/misc' failed
make[1]: *** [drivers/misc] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2
For anyone still having this issue, 'error: 'tspdrv' undeclared (first use in this function)' can be solved with this patch:
Code:
diff --git a/drivers/tspdrv/Makefile b/drivers/tspdrv/Makefile
index 73d893d..4144167 100644
--- a/drivers/tspdrv/Makefile
+++ b/drivers/tspdrv/Makefile
@@ -32,7 +32,7 @@ endif
EXTRA_CFLAGS += -I$(M)
-obj-$(CONFIG_TSPDRV) += tspdrv.o
+obj-m += tspdrv.o
all:
@$(MAKE) -C $(KERNEL_ROOT) M=$(shell pwd) modules
hello,
i have the driver for a wifi adapter (chipset rtl8192cu)
but i need the correct module (ko file) for my z3 kernel (3.4.0-EliteV3)
how can i build the module?
i've read about cross compiling but the guides are really outdated (I can use windows or linux)
Basic steps:
1. You need to be on linux
2. Download your kernel source, Elite Kernel in your case
3. Luckily, drivers are already in the tree. So set CONFIG_RTL8192CU=m (m for module) in the defconfig file
4. Compile the kernel, fix any compilation issues if needed
5. it'll also output rtl8192cu.ko which is the module
If you didn't understand any of that, first familiarise yourself with how to compile a kernel: http://developer.sonymobile.com/ope...h-a-linux-kernel-from-sony-copyleft-archives/
tomascus said:
Basic steps:
1. You need to be on linux
2. Download your kernel source, Elite Kernel in your case
3. Luckily, drivers are already in the tree. So set CONFIG_RTL8192CU=m (m for module) in the defconfig file
4. Compile the kernel, fix any compilation issues if needed
5. it'll also output rtl8192cu.ko which is the module
If you didn't understand any of that, first familiarise yourself with how to compile a kernel: http://developer.sonymobile.com/ope...h-a-linux-kernel-from-sony-copyleft-archives/
Click to expand...
Click to collapse
thanks for your help, but i cannot find the CONFIG_RTL8192CU string in the defconfig file (shinano_leo_defconfig)
Alex261099 said:
thanks for your help, but i cannot find the CONFIG_RTL8192CU string in the defconfig file (shinano_leo_defconfig)
Click to expand...
Click to collapse
Yea of course, you add it in
tomascus said:
Yea of course, you add it in
Click to expand...
Click to collapse
added but it results in an error:
Code:
[email protected]:/android/kernel-copyleft# make shinano_leo_defconfig
arch/arm/configs/shinano_leo_defconfig:533:warning: override: reassigning to symbol CRYPTO_AES_ARM
#
# configuration written to .config
#
[email protected]:/android/kernel-copyleft# make
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: "include/generated/mach-types.h" è aggiornato.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
GZIP kernel/config_data.gz
CHK kernel/config_data.h
CC sound/soc/codecs/wcd9320.o
sound/soc/codecs/wcd9320.c:269:1: error: expected identifier or '(' before ')' token
)
^
sound/soc/codecs/wcd9320.c:392:36: error: 'NUM_CODEC_DAIS' undeclared here (not in a function)
static const u32 vport_check_table[NUM_CODEC_DAIS] = {
^
sound/soc/codecs/wcd9320.c:394:8: error: 'AIF2_CAP' undeclared here (not in a function)
(1 << AIF2_CAP) | (1 << AIF3_CAP), /* AIF1_CAP */
^
sound/soc/codecs/wcd9320.c:394:26: error: 'AIF3_CAP' undeclared here (not in a function)
(1 << AIF2_CAP) | (1 << AIF3_CAP), /* AIF1_CAP */
^
sound/soc/codecs/wcd9320.c:396:8: error: 'AIF1_CAP' undeclared here (not in a function)
(1 << AIF1_CAP) | (1 << AIF3_CAP), /* AIF2_CAP */
^
sound/soc/codecs/wcd9320.c: In function 'slim_rx_mux_put':
sound/soc/codecs/wcd9320.c:2278:18: error: 'AIF1_PB' undeclared (first use in this function)
&taiko_p->dai[AIF1_PB].wcd9xxx_ch_list)) {
^
sound/soc/codecs/wcd9320.c:2278:18: note: each undeclared identifier is reported only once for each function it appears in
sound/soc/codecs/wcd9320.c:2289:18: error: 'AIF2_PB' undeclared (first use in this function)
&taiko_p->dai[AIF2_PB].wcd9xxx_ch_list)) {
^
sound/soc/codecs/wcd9320.c:2300:18: error: 'AIF3_PB' undeclared (first use in this function)
&taiko_p->dai[AIF3_PB].wcd9xxx_ch_list)) {
^
sound/soc/codecs/wcd9320.c: In function 'taiko_set_dai_fmt':
sound/soc/codecs/wcd9320.c:4391:24: error: 'AIF1_PB' undeclared (first use in this function)
else if (dai->id == AIF1_PB)
^
sound/soc/codecs/wcd9320.c: In function 'taiko_set_channel_map':
sound/soc/codecs/wcd9320.c:4436:26: error: 'AIF4_VIFEED' undeclared (first use in this function)
dai_data = &taiko->dai[AIF4_VIFEED];
^
sound/soc/codecs/wcd9320.c: In function 'taiko_get_channel_map':
sound/soc/codecs/wcd9320.c:4457:7: error: 'AIF1_PB' undeclared (first use in this function)
case AIF1_PB:
^
sound/soc/codecs/wcd9320.c:4458:7: error: 'AIF2_PB' undeclared (first use in this function)
case AIF2_PB:
^
sound/soc/codecs/wcd9320.c:4459:7: error: 'AIF3_PB' undeclared (first use in this function)
case AIF3_PB:
^
sound/soc/codecs/wcd9320.c:4477:7: error: 'AIF4_VIFEED' undeclared (first use in this function)
case AIF4_VIFEED:
^
sound/soc/codecs/wcd9320.c:4478:7: error: 'AIF4_MAD_TX' undeclared (first use in this function)
case AIF4_MAD_TX:
^
sound/soc/codecs/wcd9320.c: In function 'taiko_hw_params':
sound/soc/codecs/wcd9320.c:4763:18: error: 'AIF4_VIFEED' undeclared (first use in this function)
if (dai->id != AIF4_VIFEED) {
^
sound/soc/codecs/wcd9320.c: At top level:
sound/soc/codecs/wcd9320.c:4850:9: error: 'AIF1_PB' undeclared here (not in a function)
.id = AIF1_PB,
^
sound/soc/codecs/wcd9320.c:4878:9: error: 'AIF2_PB' undeclared here (not in a function)
.id = AIF2_PB,
^
sound/soc/codecs/wcd9320.c:4920:9: error: 'AIF3_PB' undeclared here (not in a function)
.id = AIF3_PB,
^
sound/soc/codecs/wcd9320.c:4934:9: error: 'AIF4_VIFEED' undeclared here (not in a function)
.id = AIF4_VIFEED,
^
sound/soc/codecs/wcd9320.c:4948:9: error: 'AIF4_MAD_TX' undeclared here (not in a function)
.id = AIF4_MAD_TX,
^
sound/soc/codecs/wcd9320.c:4965:3: error: initializer element is not constant
.id = AIF1_PB,
^
sound/soc/codecs/wcd9320.c:4965:3: error: (near initialization for 'taiko_i2s_dai[0].id')
sound/soc/codecs/wcd9320.c:4979:3: error: initializer element is not constant
.id = AIF1_CAP,
^
sound/soc/codecs/wcd9320.c:4979:3: error: (near initialization for 'taiko_i2s_dai[1].id')
sound/soc/codecs/wcd9320.c:4993:3: error: initializer element is not constant
.id = AIF1_PB,
^
sound/soc/codecs/wcd9320.c:4993:3: error: (near initialization for 'taiko_i2s_dai[2].id')
sound/soc/codecs/wcd9320.c:5007:3: error: initializer element is not constant
.id = AIF1_CAP,
^
sound/soc/codecs/wcd9320.c:5007:3: error: (near initialization for 'taiko_i2s_dai[3].id')
sound/soc/codecs/wcd9320.c: In function 'taiko_codec_enable_slimrx':
sound/soc/codecs/wcd9320.c:5112:6: warning: assignment from incompatible pointer type
error, forbidden warning: wcd9320.c:5112
scripts/Makefile.build:307: set di istruzioni per l'obiettivo "sound/soc/codecs/wcd9320.o" non riuscito
make[3]: *** [sound/soc/codecs/wcd9320.o] Errore 1
scripts/Makefile.build:443: set di istruzioni per l'obiettivo "sound/soc/codecs" non riuscito
make[2]: *** [sound/soc/codecs] Errore 2
scripts/Makefile.build:443: set di istruzioni per l'obiettivo "sound/soc" non riuscito
make[1]: *** [sound/soc] Errore 2
Makefile:951: set di istruzioni per l'obiettivo "sound" non riuscito
make: *** [sound] Errore 2
defconfig file with .txt extension (added to allow uploading)
View attachment shinano_leo_defconfig.txt
Alex261099 said:
added but it results in an error:
defconfig file with .txt extension (added to allow uploading)
Click to expand...
Click to collapse
Make sure you're on whatever branch the kernel guy is working on and then revert all those commits done to sound/ directory.
And make sure your defconfig is the one he is using too
tomascus said:
Make sure you're on whatever branch the kernel guy is working on and then revert all those commits done to sound/ directory.
And make sure your defconfig is the one he is using too
Click to expand...
Click to collapse
sorry but i'm not sure on what i'm doing ...
here is the kernel
and this is the readme file
View attachment README_Xperia.txt
branch is not specified ( master ?)
in the readme file it's not clear what defconfig file he uses
Alex261099 said:
sorry but i'm not sure on what i'm doing ...
here is the kernel
and this is the readme file
branch is not specified ( master ?)
in the readme file it's not clear what defconfig file he uses
Click to expand...
Click to collapse
I know what the kernel is.
Go to the link in the source to see the branches, and view the history to see which defconfig he uses (it's shinano_leo_defconfig so it's right).
Those readmes are generic so don't bother.
tomascus said:
I know what the kernel is.
Go to the link in the source to see the branches, and view the history to see which defconfig he uses (it's shinano_leo_defconfig so it's right).
Those readmes are generic so don't bother.
Click to expand...
Click to collapse
OK but why it results in an error
i'm using 23.5.A.1.291 branch
Alex261099 said:
OK but why it results in an error
Click to expand...
Click to collapse
Because he didn't bother cherry picking commits properly or fixing compilation issues most likely.
Since you made it this far you might as well try build your own custom kernel :silly:
tomascus said:
Because he didn't bother cherry picking commits properly most likely.
Since you made it this far you might as well try build your own custom kernel :silly:
Click to expand...
Click to collapse
I Will try
tomascus said:
Because he didn't bother cherry picking commits properly or fixing compilation issues most likely.
Since you made it this far you might as well try build your own custom kernel :silly:
Click to expand...
Click to collapse
ok, now i'm trying to build my own kernel from the guide you've attached
http://developer.sonymobile.com/ope...h-a-linux-kernel-from-sony-copyleft-archives/
using arm-linux-androideabi-4.9
how can i include my driver in the kernel?
Alex261099 said:
ok, now i'm trying to build my own kernel from the guide you've attached
http://developer.sonymobile.com/ope...h-a-linux-kernel-from-sony-copyleft-archives/
using arm-linux-androideabi-4.9
how can i include my driver in the kernel?
Click to expand...
Click to collapse
Its already there, not like shadow would add some random as wifi driver to his kernel. Add the line in defconfig..
tomascus said:
Add the line in defconfig..
Click to expand...
Click to collapse
it's so easy?
:victory:
Alex261099 said:
it's so easy?
:victory:
Click to expand...
Click to collapse
No, but seriously you'll figure it out, no one held my hand when I built my first kernels
tomascus said:
No, but seriously you'll figure it out, no one held my hand when I built my first kernels
Click to expand...
Click to collapse
f*ck :laugh::laugh::laugh:,
can i have your help if i'm in difficult?
Alex261099 said:
f*ck :laugh::laugh::laugh:,
can i have your help if i'm in difficult?
Click to expand...
Click to collapse
Like I said it's up to you, not me. There are plenty of tutorials online.
Tip 1: look at Shadows commit history to see any changes he needed to get it compiling. Example: https://github.com/ShadowElite22/Xp...=Y3Vyc29yOvUu8ix9Cm9uFFc0XOqJgV10lEi6KzI3OQ==
More examples: https://github.com/tunturn/android_...=Y3Vyc29yOg9VMTFMCWu8kAgT7WiC1DM/o30qKzI0NA==
Tip 2: use GCC 4.8, don't use GCC 4.9 unless you know what you're doing.
Good luck :good:
So I was compiling kernel for my Meizu m2 note and I encountered this error :
Code:
In file included from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/io.h:243:0,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/clocksource.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/clocksource/arm_arch_timer.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/arch_timer.h:27,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/timex.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timex.h:65,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/jiffies.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/ktime.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timer.h:5,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/workqueue.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/pm.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/device.h:25,
from drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:11:
/home/suvam/RRMM/kernel/meizu/m2note/include/asm-generic/iomap.h:31:21: note: expected 'void *' but argument is of type 'long unsigned int'
extern unsigned int ioread32(void __iomem *);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:99:26: warning: passing argument 1 of 'ioread32' makes pointer from integer without a cast
#define ISP_RD32(addr) ioread32(addr)
^
/home/suvam/RRMM/kernel/meizu/m2note/include/linux/printk.h:248:38: note: in expansion of macro 'ISP_RD32'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:87:37: note: in expansion of macro 'pr_debug'
#define LOG_DBG(format, args...) pr_debug(MyTag format, ##args)
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:10828:3: note: in expansion of macro 'LOG_DBG'
LOG_DBG("0x%08X %08X", (unsigned int)(ISP_TPIPE_ADDR + 0x00a8), (unsigned int)ISP_RD32(ISP_ADDR + 0x00a8));
^
In file included from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/io.h:243:0,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/clocksource.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/clocksource/arm_arch_timer.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/arch_timer.h:27,
from /home/suvam/RRMM/kernel/meizu/m2note/arch/arm64/include/asm/timex.h:19,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timex.h:65,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/jiffies.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/ktime.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/timer.h:5,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/workqueue.h:8,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/pm.h:25,
from /home/suvam/RRMM/kernel/meizu/m2note/include/linux/device.h:25,
from drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:11:
/home/suvam/RRMM/kernel/meizu/m2note/include/asm-generic/iomap.h:31:21: note: expected 'void *' but argument is of type 'long unsigned int'
extern unsigned int ioread32(void __iomem *);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: At top level:
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:175:22: warning: 'g_isp_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_isp_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:176:22: warning: 'g_isp_inner_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_isp_inner_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:177:22: warning: 'g_imgsys_config_base_dase' defined but not used [-Wunused-variable]
static void __iomem *g_imgsys_config_base_dase;
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'compat_put_isp_read_register_data':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:8407:6: warning: 'err' is used uninitialized in this function [-Wuninitialized]
err |= get_user(count, &data->Count);
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'ISP_DONE_Buf_Time.isra.4':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:5522:49: warning: 'out' may be used uninitialized in this function [-Wmaybe-uninitialized]
pstRTBuf->ring_buf[i_dma].img_cnt = sof_count[out];
^
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c: In function 'ISP_Buf_CTRL_FUNC':
drivers/misc/mediatek/mach/mt6735/camera_isp_D1.c:4447:34: warning: 'out' may be used uninitialized in this function [-Wmaybe-uninitialized]
deque_buf.sof_cnt = sof_count[out];
^
LD drivers/misc/mediatek/mach/mt6735/built-in.o
LD drivers/misc/mediatek/mach/built-in.o
make[4]: *** [drivers/misc/mediatek] Error 2
make[3]: *** [drivers/misc] Error 2
make[2]: *** [drivers] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/suvam/RRMM/kernel/meizu/m2note'
make: *** [TARGET_KERNEL_BINARIES] Error 2
#### make failed to build some targets (09:32 (mm:ss)) ####
Can somebody please help me out ?
So,
This error has been around like 5 days now.
Trying to compile aarch64 kernel which actually works if some drivers are disabled in defconfig, otherwise, they don't compile.
For example: arizona-core.c
Error message:
Code:
CC drivers/mfd/arizona-core.o
In file included from /home/nonta72/LP51/include/linux/kernel.h:13:0,
from /home/nonta72/LP51/include/linux/delay.h:10,
from /home/nonta72/LP51/drivers/mfd/arizona-core.c:13:
/home/nonta72/LP51/drivers/mfd/arizona-core.c: In function 'arizona_runtime_resume':
/home/nonta72/LP51/drivers/mfd/arizona-core.c:735:121: error: 'struct arizona_pdata' has no member named 'ldo_enable'
pr_debug("%s, ldo_enable=%d, ena_ldo=%d, reset=%d, i2c_addr=%d, irq_gpio=%d\n", __func__, gpio_get_value(arizona->pdata.ldo_enable),
^
/home/nonta72/LP51/include/linux/printk.h:246:38: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
/home/nonta72/LP51/drivers/mfd/arizona-core.c:736:33: error: 'struct arizona_pdata' has no member named 'ena_ldo'
gpio_get_value(arizona->pdata.ena_ldo), gpio_get_value(arizona->pdata.reset),
^
/home/nonta72/LP51/include/linux/printk.h:246:38: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
/home/nonta72/LP51/drivers/mfd/arizona-core.c:737:33: error: 'struct arizona_pdata' has no member named 'i2c_addr'
gpio_get_value(arizona->pdata.i2c_addr), gpio_get_value(arizona->pdata.irq_gpio));
^
/home/nonta72/LP51/include/linux/printk.h:246:38: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
Driver : https://github.com/Nonta72/android_kernel_bq_msm8939/blob/cm-14.1/drivers/mfd/arizona-core.c
Solution:
In pdata.h file, find struct arizona_pdata and add this
Code:
int ldo_enable;
int ena_ldo;
int i2c_addr;
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