Getting irq/irqdesc.o error while kernel compilation - Android Software/Hacking General [Developers Only]

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

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....

[Help][kernel compilation error] tspdrv.c ("some warnings are treated as a error")

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

Kernel compilation error - Mi4i

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:

how do i install a driver?

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:

Categories

Resources