Build kernel error - Xiaomi Redmi Note 3 Questions & Answers

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

Related

Kernel Compiling Error

I'm trying to compile a kernel for my Neo V.
But it stops at error.
Error:
Code:
ARCH=arm CROSS_COMPILE=/host/arm/bin/arm-none-linux-gnueabi- make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1562:12: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1982:10: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:112:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
CC init/main.o
In file included from include/linux/mempolicy.h:62:0,
from init/main.c:52:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Error at Last line.
Why this happening?
I followed the Sony Ericsson Tutorial.
svprm said:
I'm trying to compile a kernel for my Neo V.
But it stops at error.
Error:
Code:
ARCH=arm CROSS_COMPILE=/host/arm/bin/arm-none-linux-gnueabi- make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1562:12: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1982:10: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:112:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
CC init/main.o
In file included from include/linux/mempolicy.h:62:0,
from init/main.c:52:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Error at Last line.
Why this happening?
I followed the Sony Ericsson Tutorial.
Click to expand...
Click to collapse
gcc and make need to be a certain version. What OS are you running?
Ubuntu 11.10
Sent from my MT11i using XDA App
I met the same issue in the few days ago.
But these issues had been resolved as follow solution:
1. Remove the -Wall argument in the Kernel/ Makefile
2. Copy the cc1 from eabi tool chain sub folder libexec/gcc/arm-none-eabi/4.6.1
(OR, you can create the soft link from libexec/gcc/arm-none-eabi/4.6.1 to current working directory)
Kernel Compilation error.
Hi All,
I have an LG O2X, and trying to compile stock kernel.
But while compiling i am facing the following error.
[email protected]:/home/kartik/Desktop/DriodKernel/kernel# make ARCH=arm CROSS_COMPILE=/home/kartik/Desktop/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
<command-line>: error: macro names must be identifiers
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
PLzzz help.

[Q] HTC Jetstream kernel issue

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

errors while compiling kernel

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?

[Q] First time compiling kernel with a governor and I got errors. Im lost.

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

Error while compiling a cm kernel

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

Categories

Resources