Need help with KVM-Enabled stock kernel compilation - OnePlus 6 Questions & Answers

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

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

GCC Related Kernel Building Error

Hey XDA folk, pretty sure this is the correct forum to post this in, but if it isn't, then please enlighten me.
For those that aren't following my work, I've patched up the G2 CAF kernel from the lg-devs repo to my old kernel, along with GCC 5+ fixes. I am building with the GCC 6.0 UBERTC kernel toolchain. The kernel can be found here.
The exact kernel error I am getting is:
Code:
LD .tmp_vmlinux1
arch/arm/kernel/built-in.o:(___ksymtab_gpl+return_address+0x0): undefined reference to `return_address'
kernel/built-in.o: In function `get_parent_ip':
hw_breakpoint.c:(.text+0x39b10): undefined reference to `return_address'
hw_breakpoint.c:(.text+0x39b3c): undefined reference to `return_address'
/home/tsunami/android/kernel/lge/msm8974-caf/Makefile:919: recipe for target '.tmp_vmlinux1' failed
make[2]: *** [.tmp_vmlinux1] Error 1
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/tsunami/android/kernel/lge/msm8974-caf'
build/core/tasks/kernel.mk:229: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
My error probably resides within this commit, but reverting it leads to a different error as well (Not the unwind warning). I am not sure as to whether I am missing a separate commit or not.
Just gonna give this a small bump.
Another bump. Do code-related issues even go here?
Closed at OP's request.

make[1]: *** [mm/vmscan.o] Error 1

I'm building a CM13 appeared the following error when the kernel..
CC mm/vmscan.o
mm/vmscan.c: In function 'putback_inactive_pages':
mm/vmscan.c:1336:5: error: implicit declaration of function 'SetPageWasActive' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
scripts/Makefile.build:307: recipe for target 'mm/vmscan.o' failed
make[1]: *** [mm/vmscan.o] Error 1
Makefile:952: recipe for target 'mm' failed
make: *** [mm] Error 2
I got the same issue while building the CM13 kernel for the S5 (klte).
Did you manage to fix it?
newjanson said:
I got the same issue while building the CM13 kernel for the S5 (klte).
Did you manage to fix it?
Click to expand...
Click to collapse
did you manage to fix it ?
im trying to get cm14 kernel for klte working
Enable zcache

Categories

Resources