[Q] Problems compiling stock Kernel from official source. - Galaxy Note 10.1 Q&A, Help & Troubleshooting

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

Related

help building android kernel module, error

Hi all,
I'm trying to build the tiwlan_drv kernel module for my Droid1. I built the kernel, and now I am trying to build this module. However, I get several warnings and errors:
Code:
LD [M] /home/gnychis/Documents/android/ti/wilink_6_1/stad/build/linux/tiwlan_drv.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hPlatform_DevicePowerOn" [/home/gnychis/Documents/android/ti/wilink_6_1/stad/build/linux/tiwlan_drv.ko] undefined!
I'm not sure why I get that undefined error when I just built the core of the module.
Code:
make[2]: Entering directory `/home/gnychis/Documents/android/omap'
CC [M] /home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.o
/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.c: In function 'wlanDrvIf_Create':
/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.c:855: error: implicit declaration of function 'create_freezeable_workqueue'
/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.c:855: warning: assignment makes pointer from integer without a cast
make[3]: *** [/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.o] Error 1
make[2]: *** [_module_/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build] Error 2
make[2]: Leaving directory `/home/gnychis/Documents/android/omap'
make[1]: *** [../../../../platforms/os/linux/build/tiwlan_drv_stub.o] Error 2
make[1]: Leaving directory `/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build'
make: *** [../../../platforms/os/linux/build/tiwlan_drv_stub.o] Error 2
Here is the full output:
http://pastebin.com/6T0UcWgw
solved, this function name (where i get the error), was renamed in the kernel version i'm using... discrepancies between english
freezable and freezeable

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] building cyanogenmod gingerbread

I am trying to build the kernel from source.
I followed the instructions from http://oldwiki.cyano...nel_from_source .
I did:
git clone git://github.com/CyanogenMod/cm-kernel.git
cd cm-kernel
git branch -a
git checkout supersonic-2.6.34
export PATH=$PATH:/home/zoi/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
make ARCH=arm CROSS_COMPILE=/home/zoi/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- supersonic_defconfig
make -j4 ARCH=arm
and the zimage in the /arch/arm/boot folder is not created. The building process just stops :with error
2.c: In function 'msm_v4l2_video_dev_init':
drivers/media/video/msm/msm_v4l2.c:713: error: 'VID_TYPE_CAPTURE' undeclared (first use in this function)
drivers/media/video/msm/msm_v4l2.c:713: error: (Each undeclared identifier is reported only once
drivers/media/video/msm/msm_v4l2.c:713: error: for each function it appears in.)
make[4]: *** [drivers/media/video/msm/msm_v4l2.o] Error 1
make[3]: *** [drivers/media/video/msm] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
Am i doing something wrong?

Mtk6573 Alcatel 918D Kernel Compilation (Framebuffer Console Driver)

Hi i've been trying to compile the Alcatel 918D kernel with the framebuffer console driver, but I get this error. Can anyone help, Originally the procedure I followed was for a Samsung mobile which have the same kernel version on XDA. I really need this to enable me to debug errors effectively.
http://forum.xda-developers.com/showthread.php?t=829817&page=1
If anyone has a compiled fbcon module please share it so I may test it.
Code:
MAKEFILE OPTIONS
CONFIG_CMDLINE="console=ttyMT3,921600n1 loglevel=0 nand_manf_id=0xad nand_dev_id=0xbc uboot_ver=2010.06 uboot_build_ver=MAIN2.2.ubt.2354 lcm=1-ili9481 console=ttyS0 fbcon=rotate:0 "
CONFIG_BOOT_PRINTK_DELAY=y
CONFIG_CMDLINE_FORCE=y
CONFIG_CMDLINE_EXTEND=y
CONFIG_VT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_LOGO_LINUX_MONO is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
# CONFIG_FONT_4x6 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_8x8 is not set
# CONFIG_FONT_8x16 is not set
Code:
*************************************************************************************************
Compilation error
*************************************************************************************************
drivers/video/console/fbcon.c:638: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:638: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'con2fb_release_oldinfo':
drivers/video/console/fbcon.c:670: warning: passing argument 1 of 'oldinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:670: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:670: error: too few arguments to function 'oldinfo->fbops->fb_release'
drivers/video/console/fbcon.c:673: warning: passing argument 1 of 'newinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:673: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:673: error: too few arguments to function 'newinfo->fbops->fb_release'
drivers/video/console/fbcon.c: In function 'fbcon_startup':
drivers/video/console/fbcon.c:868: warning: passing argument 1 of 'info->fbops->fb_open' from incompatible pointer type
drivers/video/console/fbcon.c:868: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:868: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'fbcon_exit':
drivers/video/console/fbcon.c:3388: warning: passing argument 1 of 'info->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:3388: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:3388: error: too few arguments to function 'info->fbops->fb_release'
make[3]: *** [drivers/video/console/fbcon.o] Error 1
make[2]: *** [drivers/video/console] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
kenkit said:
Hi i've been trying to compile the Alcatel 918D kernel with the framebuffer console driver, but I get this error. Can anyone help, Originally the procedure I followed was for a Samsung mobile which have the same kernel version on XDA. I really need this to enable me to debug errors effectively.
http://forum.xda-developers.com/showthread.php?t=829817&page=1
If anyone has a compiled fbcon module please share it so I may test it.
MAKEFILE OPTIONS
CONFIG_CMDLINE="console=ttyMT3,921600n1 loglevel=0 nand_manf_id=0xad nand_dev_id=0xbc uboot_ver=2010.06 uboot_build_ver=MAIN2.2.ubt.2354 lcm=1-ili9481 console=ttyS0 fbcon=rotate:0 "
CONFIG_BOOT_PRINTK_DELAY=y
CONFIG_CMDLINE_FORCE=y
CONFIG_CMDLINE_EXTEND=y
CONFIG_VT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_LOGO_LINUX_MONO is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
# CONFIG_FONT_4x6 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_8x8 is not set
# CONFIG_FONT_8x16 is not set
*************************************************************************************************
Compilation error
*************************************************************************************************
drivers/video/console/fbcon.c:638: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:638: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'con2fb_release_oldinfo':
drivers/video/console/fbcon.c:670: warning: passing argument 1 of 'oldinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:670: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:670: error: too few arguments to function 'oldinfo->fbops->fb_release'
drivers/video/console/fbcon.c:673: warning: passing argument 1 of 'newinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:673: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:673: error: too few arguments to function 'newinfo->fbops->fb_release'
drivers/video/console/fbcon.c: In function 'fbcon_startup':
drivers/video/console/fbcon.c:868: warning: passing argument 1 of 'info->fbops->fb_open' from incompatible pointer type
drivers/video/console/fbcon.c:868: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:868: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'fbcon_exit':
drivers/video/console/fbcon.c:3388: warning: passing argument 1 of 'info->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:3388: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:3388: error: too few arguments to function 'info->fbops->fb_release'
make[3]: *** [drivers/video/console/fbcon.o] Error 1
make[2]: *** [drivers/video/console] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
The reason is that just because they may have the same version doesn't mean they are the same. I would check the OEM site of your device to see if they releases the specific kernel for your device.
zelendel said:
The reason is that just because they may have the same version doesn't mean they are the same. I would check the OEM site of your device to see if they releases the specific kernel for your device.
Click to expand...
Click to collapse
Actually I only borrowed the procedure, but am using the original 918D kernel which I have compiled without the fbcon driver and tested it on the phone which works just fine.
But a different idea has struck me, I wonder if i used a pre-compiled *.ko from a different phone so long as I use the same kernel version, e.g the Samsung one, should work.
The only problem would be getting someone to compile his and send me.
I tried downloading and compiling the Samusung source but it failed to compile due to some other errors, which am not interested in debugging.

Need help with KVM-Enabled stock kernel compilation

I am having an issue when compiling the kernel with KVM Enabled options, I am using the stock google toolchain and I am compiling the stock OnePlus pie kernel :
In file included from arch/arm64/kvm/../../../arch/arm/kvm/arm.c:44:0:
./arch/arm64/include/asm/kvm_mmu.h: In function 'kvm_get_hyp_vector':
./arch/arm64/include/asm/kvm_mmu.h:328:3: error: implicit declaration of function 'has_vhe' [-Werror=implicit-function-declaration]
if (!has_vhe())
^
cc1: some warnings being treated as errors
scripts/Makefile.build:298: recipe for target 'arch/arm64/kvm/../../../arch/arm/kvm/arm.o' failed
make[1]: *** [arch/arm64/kvm/../../../arch/arm/kvm/arm.o] Error 1
AS arch/arm64/kernel/kuser32.o
Makefile:995: recipe for target 'arch/arm64/kvm' failed
make: *** [arch/arm64/kvm] Error 2

Categories

Resources