I have try compiling Cyanogenmod 11.0 kernel for galaxy s4 I9505 and nexus 7 2012 wifi and on both i am getting two different errors which i cant find a fix for.
Nexus 7
Code:
CC drivers/cpuidle/governors/menu.o
drivers/cpuidle/governors/menu.c:128:12: warning: ‘get_loadavg’ defined but not used [-Wunused-function]
static int get_loadavg(void)
^
LD drivers/cpuidle/governors/built-in.o
LD drivers/cpuidle/built-in.o
LD drivers/crypto/built-in.o
CC drivers/dma/dmaengine.o
LD drivers/dma/built-in.o
CC [M] drivers/dma/timb_dma.o
In file included from include/linux/dmaengine.h:24:0,
from drivers/dma/timb_dma.c:23:
drivers/dma/timb_dma.c: In function ‘td_tx_status’:
drivers/dma/timb_dma.c:523:18: error: ‘last_complete’ undeclared (first use in this function)
__func__, ret, last_complete, last_used);
^
include/linux/device.h:876:41: note: in definition of macro ‘dev_dbg’
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^
drivers/dma/timb_dma.c:523:18: note: each undeclared identifier is reported only once for each function it appears in
__func__, ret, last_complete, last_used);
^
include/linux/device.h:876:41: note: in definition of macro ‘dev_dbg’
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^
drivers/dma/timb_dma.c:523:33: error: ‘last_used’ undeclared (first use in this function)
__func__, ret, last_complete, last_used);
^
include/linux/device.h:876:41: note: in definition of macro ‘dev_dbg’
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^
drivers/dma/timb_dma.c:513:24: warning: unused variable ‘td_chan’ [-Wunused-variable]
struct timb_dma_chan *td_chan =
^
drivers/dma/timb_dma.c: In function ‘td_prep_slave_sg’:
drivers/dma/timb_dma.c:565:25: warning: comparison between ‘enum dma_data_direction’ and ‘enum dma_transfer_direction’ [-Wenum-compare]
if (td_chan->direction != direction) {
^
make[2]: *** [drivers/dma/timb_dma.o] Error 1
make[1]: *** [drivers/dma] Error 2
make: *** [drivers] Error 2
Galaxy S4 I9505
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/scatterlist.h:10:0,
from include/linux/dma-mapping.h:9,
from arch/arm/kernel/asm-offsets.c:15:
/home/user/SAMSUNG/arch/arm/include/asm/io.h:30:26: fatal error: mach/msm_rtb.h: No such file or directory
#include <mach/msm_rtb.h>
^
compilation terminated.
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
Related
Hi
I am trying to build Jetstream Kernel on Ubuntu system with arm-eabi-gcc compiler but i am getting the following error
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/kgoel/android_kernels/puccini_lte_att_wwe_hc-32-crc-2.6.35/arch/arm/include/asm/dma-mapping.h:13:51: error: arch/arm/mach-msm/include/mach/memory.h: No such file or directory
In file included from include/linux/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/kgoel/android_kernels/puccini_lte_att_wwe_hc-32-crc-2.6.35/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/home/kgoel/android_kernels/puccini_lte_att_wwe_hc-32-crc-2.6.35/arch/arm/include/asm/dma-mapping.h:444: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
Can someone please help me with this ?
-K
Hi, I have this error while compile kumquat kernel:
The file is:
https://github.com/cesanaboia/PANIC_KERNEL/blob/master/Scrivania/kernel3/drivers/mfd/db8500-prcmu.c
Code:
[email protected]:~/Scrivania/kernel$ make -j 1
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
CC drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/linux/mali_osk_mali.o
LD drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/mali.o
LD drivers/gpu/mali/mali400ko/driver/src/devicedrv/mali/built-in.o
LD drivers/gpu/mali/built-in.o
LD drivers/gpu/built-in.o
CC drivers/mfd/db8500-prcmu.o
drivers/mfd/db8500-prcmu.c:701:1: warning: "/*" within comment [-Wcomment]
/*
^
drivers/mfd/db8500-prcmu.c:707:2: warning: "/*" within comment [-Wcomment]
/* Dump AB8500 registers */
^
drivers/mfd/db8500-prcmu.c:708:1: error: expected identifier or ‘(’ before ‘{’ token
{
^
drivers/mfd/db8500-prcmu.c: In function ‘db8500_prcmu_set_arm_lopp’:
drivers/mfd/db8500-prcmu.c:1280:3: error: implicit declaration of function ‘log_this’ [-Werror=implicit-function-declaration]
log_this(120, "OPP", opp, NULL, 0);
^
drivers/mfd/db8500-prcmu.c:1290:3: error: implicit declaration of function ‘liveopp_update_arm’ [-Werror=implicit-function-declaration]
liveopp_update_arm(liveopp_arm[idx]);
^
drivers/mfd/db8500-prcmu.c:1290:22: error: ‘liveopp_arm’ undeclared (first use in this function)
liveopp_update_arm(liveopp_arm[idx]);
^
drivers/mfd/db8500-prcmu.c:1290:22: note: each undeclared identifier is reported only once for each function it appears in
drivers/mfd/db8500-prcmu.c:1291:3: error: implicit declaration of function ‘compute_armss_rate’ [-Werror=implicit-function-declaration]
compute_armss_rate();
^
In file included from include/linux/stddef.h:4:0,
from include/linux/posix_types.h:4,
from include/linux/types.h:17,
from include/linux/list.h:4,
from include/linux/module.h:9,
from drivers/mfd/db8500-prcmu.c:14:
drivers/mfd/db8500-prcmu.c: In function ‘arm_get_rate’:
drivers/mfd/db8500-prcmu.c:1344:12: error: ‘freq_table’ undeclared (first use in this function)
BUG_ON(!freq_table);
^
include/linux/compiler.h:147:42: note: in definition of macro ‘unlikely’
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/mfd/db8500-prcmu.c:1344:4: note: in expansion of macro ‘BUG_ON’
BUG_ON(!freq_table);
^
drivers/mfd/db8500-prcmu.c: In function ‘set_epod’:
drivers/mfd/db8500-prcmu.c:1696:3: error: implicit declaration of function ‘db8500_prcmu_debug_dump’ [-Werror=implicit-function-declaration]
db8500_prcmu_debug_dump(__func__, true, true);
^
drivers/mfd/db8500-prcmu.c: At top level:
drivers/mfd/db8500-prcmu.c:1261:12: warning: ‘db8500_prcmu_set_arm_lopp’ defined but not used [-Wunused-function]
static int db8500_prcmu_set_arm_lopp(u8 opp, int idx)
^
drivers/mfd/db8500-prcmu.c:1328:22: warning: ‘arm_get_rate’ defined but not used [-Wunused-function]
static unsigned long arm_get_rate(void)
^
cc1: some warnings being treated as errors
make[2]: *** [drivers/mfd/db8500-prcmu.o] Errore 1
make[1]: *** [drivers/mfd] Errore 2
make: *** [drivers] Errore 2
Can anyone help me?
I am trying to compile a kernel for my device(kyleprods or GT-S7582 or Galaxy S duos 2) because I havent found any custom kernel out here. Im compiling from source. I tried compiling WITHOUT any tweaks or such, just plain compile after downloading the source, and it compiled successfully. I tried adding smartassv2 but I got these errors after running "make -j1" twice. Can anybody help/guide me? It is really my first time doing these things, because I'm very interested.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
Creating rdb link for Hawaii
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/cpufreq/cpufreq_smartass2.o
drivers/cpufreq/cpufreq_smartass2.c:175:10: error: ‘THIS_MODULE’ undeclared here (not in a function)
.owner = THIS_MODULE,
^
drivers/cpufreq/cpufreq_smartass2.c: In function ‘cpufreq_smartass_timer’:
drivers/cpufreq/cpufreq_smartass2.c:295:1: error: implicit declaration of function ‘cputime64_sub’ [-Werror=implicit-function-declaration]
delta_idle = cputime64_sub(now_idle, this_smartass->time_in_idle);
^
drivers/cpufreq/cpufreq_smartass2.c: At top level:
drivers/cpufreq/cpufreq_smartass2.c:869:16: error: expected declaration specifiers or ‘...’ before string constant
MODULE_AUTHOR ("Erasmux");
^
drivers/cpufreq/cpufreq_smartass2.c:870:21: error: expected declaration specifiers or ‘...’ before string constant
MODULE_DESCRIPTION ("'cpufreq_smartass2' - A smart cpufreq governor");
^
drivers/cpufreq/cpufreq_smartass2.c:871:17: error: expected declaration specifiers or ‘...’ before string constant
MODULE_LICENSE ("GPL");
^
cc1: some warnings being treated as errors
make[2]: *** [drivers/cpufreq/cpufreq_smartass2.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
Hi guys i want make a kernel but when i compile, by an error :
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/compile.h
CHK kernel/config_data.h
CC mm/page_alloc.o
mm/page_alloc.c: In function '__rmqueue_cma':
mm/page_alloc.c:1162:12: error: 'struct zone' has no member named 'cma_alloc'
if (!zone->cma_alloc = 0)
^
mm/page_alloc.c:1163:43: error: 'MIGRATE_CMA' undeclared (first use in this function)
page = __rmqueue_smallest(zone, order, MIGRATE_CMA);
^
mm/page_alloc.c:1163:43: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:308: recipe for target 'mm/page_alloc.o' failed
make[1]: *** [mm/page_alloc.o] Error 1
Makefile:825: recipe for target 'mm' failed
make: *** [mm] Error 2
in the file source the fuction __rmqueue_cma is :
static struct page *__rmqueue_cma(struct zone *zone, unsigned int order)
{
struct page *page = 0;
if (IS_ENABLED(CONFIG_CMA))
if (!zone->cma_alloc)
page = __rmqueue_smallest(zone, order, MIGRATE_CMA);
return page;
}
why ?My command to build is:
export ARCH=arm64
export SUBARCH=arm64
export CROSS_COMPILE= "mypwd"/toolchain64/bin/aarch64-linux-android-
Help my please
Up
Up up
Up
So I'm doing this guide (https://forum.xda-developers.com/zenfone2/general/compile-kernel-t3307932) by say99 on how to compile your own kernel and what I've done are the following:
Code:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip
export ARCH=x86_64
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=x86_64-linux-
export PATH=/root/Documents/kernel/x86_64-toolchain-GCC-5.3.0/bin:$PATH
export PATH="${PATH}:/root/Documents/kernel/x86_64-toolchain-GCC-5.3.0/bin"
cd /Documents/kernel/kernel-FlareM-cm-13.0
make menuconfig
./buildzf2
now when I typed in ./buildzf2 it returns with this error:
Code:
script made by eoghan2t7 of xda
say thanks to him if this helped you :)
Current Date : 21-08-2018
Applying Build Settings
Setting CPU Cores/Threads
Setting Version Number
Setting Extra Version
Setting Defconfig
SElinux set to Enforcing
Setting bzImage Location For FlareM kernel By say99 Of XDA (thanks to eoghan2t7)
Enabling Graphite Optimizations
Enviroment Setup Complete Now Moving To Compiling
Cleaning Out Compiled Files
Starting Build Process
.config exists
Continuing To Compiler
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2500:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:762:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
sprintf(newname, "%s%s", dirname, basename);
^~~~~~
scripts/kconfig/confdata.c:762:19: note: assuming directive output of 7 bytes
scripts/kconfig/confdata.c:762:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
sprintf(newname, "%s%s", dirname, basename);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:765:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
^~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:765:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/external_drivers/camera/Kconfig:5:warning: config symbol defined without type
make[1]: Nothing to be done for 'all'.
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
make[1]: Nothing to be done for 'relocs'.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC init/version.o
LD init/built-in.o
CC arch/x86/kernel/acpi/cstate.o
CC kernel/sys.o
CC arch/x86/kernel/kprobes/core.o
CC arch/x86/kernel/cpu/intel_cacheinfo.o
CC arch/x86/kernel/kprobes/opt.o
CC arch/x86/kernel/cpu/common.o
CC arch/x86/kernel/kprobes/ftrace.o
arch/x86/kernel/acpi/cstate.c:163:6: error: redefinition of ‘mwait_idle_with_hints’
void mwait_idle_with_hints(unsigned long ax, unsigned long cx)
^
In file included from arch/x86/kernel/acpi/cstate.c:16:0:
/root/Documents/kernel/kernel-FlareM-cm-13.0/arch/x86/include/asm/mwait.h:28:20: note: previous definition of ‘mwait_idle_with_hints’ was here
static inline void mwait_idle_with_hints(unsigned long eax, unsigned long ecx)
^
scripts/Makefile.build:308: recipe for target 'arch/x86/kernel/acpi/cstate.o' failed
make[3]: *** [arch/x86/kernel/acpi/cstate.o] Error 1
scripts/Makefile.build:455: recipe for target 'arch/x86/kernel/acpi' failed
make[2]: *** [arch/x86/kernel/acpi] Error 2
make[2]: *** Waiting for unfinished jobs....
LD arch/x86/kernel/kprobes/built-in.o
CC arch/x86/kernel/cpu/match.o
CC kernel/power/consoleearlysuspend.o
CC arch/x86/kernel/cpu/bugs_64.o
CC arch/x86/kernel/cpu/intel.o
CC kernel/trace/trace.o
CC arch/x86/kernel/cpu/amd.o
kernel/power/consoleearlysuspend.c: In function ‘console_early_suspend’:
kernel/power/consoleearlysuspend.c:28:2: error: implicit declaration of function ‘acquire_console_sem’ [-Werror=implicit-function-declaration]
acquire_console_sem();
^
kernel/power/consoleearlysuspend.c:34:2: error: implicit declaration of function ‘release_console_sem’ [-Werror=implicit-function-declaration]
release_console_sem();
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target 'kernel/power/consoleearlysuspend.o' failed
make[2]: *** [kernel/power/consoleearlysuspend.o] Error 1
scripts/Makefile.build:455: recipe for target 'kernel/power' failed
make[1]: *** [kernel/power] Error 2
make[1]: *** Waiting for unfinished jobs....
CC arch/x86/kernel/cpu/centaur.o
CC arch/x86/kernel/cpu/perf_event.o
CC arch/x86/kernel/cpu/perf_event_amd.o
LD kernel/trace/built-in.o
Makefile:845: recipe for target 'kernel' failed
make: *** [kernel] Error 2
make: *** Waiting for unfinished jobs....
CC arch/x86/kernel/cpu/perf_event_amd_uncore.o
CC arch/x86/kernel/cpu/perf_event_p6.o
CC arch/x86/kernel/cpu/perf_event_knc.o
PASYMS arch/x86/realmode/rm/pasyms.h
LDS arch/x86/realmode/rm/realmode.lds
CC arch/x86/kernel/cpu/perf_event_p4.o
LD arch/x86/realmode/rm/realmode.elf
RELOCS arch/x86/realmode/rm/realmode.relocs
CC arch/x86/kernel/cpu/perf_event_intel_lbr.o
OBJCOPY arch/x86/realmode/rm/realmode.bin
CC arch/x86/kernel/cpu/perf_event_intel_ds.o
AS arch/x86/realmode/rmpiggy.o
CC arch/x86/kernel/cpu/perf_event_intel.o
CC arch/x86/kernel/cpu/perf_event_intel_uncore.o
LD arch/x86/realmode/built-in.o
CC arch/x86/kernel/cpu/mcheck/mce.o
CC arch/x86/kernel/cpu/mtrr/main.o
CC arch/x86/kernel/cpu/mtrr/if.o
CC arch/x86/kernel/cpu/perfctr-watchdog.o
CC arch/x86/kernel/cpu/mcheck/mce_intel.o
CC arch/x86/kernel/cpu/mcheck/mce_amd.o
CC arch/x86/kernel/cpu/mtrr/generic.o
CC arch/x86/kernel/cpu/perf_event_amd_ibs.o
CC arch/x86/kernel/cpu/mcheck/threshold.o
CC arch/x86/kernel/cpu/mcheck/therm_throt.o
CC arch/x86/kernel/cpu/mtrr/cleanup.o
CC arch/x86/kernel/cpu/mcheck/mce-apei.o
CC [M] arch/x86/kernel/cpu/mcheck/mce-inject.o
VDSOSYM arch/x86/vdso/vdso-syms.lds
VDSOSYM arch/x86/vdso/vdsox32-syms.lds
CC arch/x86/kernel/cpu/vmware.o
VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syscall-syms.lds
VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syms.lds
LD arch/x86/kernel/cpu/mcheck/built-in.o
CC arch/x86/kernel/cpu/hypervisor.o
LD arch/x86/vdso/built-in.o
CC arch/x86/kernel/cpu/mshyperv.o
LD arch/x86/kernel/cpu/mtrr/built-in.o
LD arch/x86/kernel/cpu/built-in.o
scripts/Makefile.build:455: recipe for target 'arch/x86/kernel' failed
make[1]: *** [arch/x86/kernel] Error 2
Makefile:845: recipe for target 'arch/x86' failed
make: *** [arch/x86] Error 2
arch/x86/boot/bzImage Does Not Exists Please Check For Compile Errors
Now exiting script
anything I could do? Any help would be appreciated.
i have also several problems on galaxy s7 kernel